source: vendor/google/apiclient-services/src/Dataform/Resource/ProjectsLocationsRepositoriesCommentThreadsComments.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 6 weeks ago

Upload project files

  • Property mode set to 100644
File size: 3.7 KB
Line 
1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Dataform\Resource;
19
20use Google\Service\Dataform\Policy;
21use Google\Service\Dataform\SetIamPolicyRequest;
22
23/**
24 * The "comments" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $dataformService = new Google\Service\Dataform(...);
28 * $comments = $dataformService->projects_locations_repositories_commentThreads_comments;
29 * </code>
30 */
31class ProjectsLocationsRepositoriesCommentThreadsComments extends \Google\Service\Resource
32{
33 /**
34 * Gets the access control policy for a resource. Returns an empty policy if the
35 * resource exists and does not have a policy set. (comments.getIamPolicy)
36 *
37 * @param string $resource REQUIRED: The resource for which the policy is being
38 * requested. See [Resource
39 * names](https://cloud.google.com/apis/design/resource_names) for the
40 * appropriate value for this field.
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
44 * version that will be used to format the policy. Valid values are 0, 1, and 3.
45 * Requests specifying an invalid value will be rejected. Requests for policies
46 * with any conditional role bindings must specify version 3. Policies with no
47 * conditional role bindings may specify any valid value or leave the field
48 * unset. The policy in the response might use the policy version that you
49 * specified, or it might use a lower policy version. For example, if you
50 * specify version 3, but the policy has no conditional role bindings, the
51 * response uses version 1. To learn which resources support conditions in their
52 * IAM policies, see the [IAM
53 * documentation](https://cloud.google.com/iam/help/conditions/resource-
54 * policies).
55 * @return Policy
56 * @throws \Google\Service\Exception
57 */
58 public function getIamPolicy($resource, $optParams = [])
59 {
60 $params = ['resource' => $resource];
61 $params = array_merge($params, $optParams);
62 return $this->call('getIamPolicy', [$params], Policy::class);
63 }
64 /**
65 * Sets the access control policy on the specified resource. Replaces any
66 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
67 * `PERMISSION_DENIED` errors. (comments.setIamPolicy)
68 *
69 * @param string $resource REQUIRED: The resource for which the policy is being
70 * specified. See [Resource
71 * names](https://cloud.google.com/apis/design/resource_names) for the
72 * appropriate value for this field.
73 * @param SetIamPolicyRequest $postBody
74 * @param array $optParams Optional parameters.
75 * @return Policy
76 * @throws \Google\Service\Exception
77 */
78 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
79 {
80 $params = ['resource' => $resource, 'postBody' => $postBody];
81 $params = array_merge($params, $optParams);
82 return $this->call('setIamPolicy', [$params], Policy::class);
83 }
84}
85
86// Adding a class alias for backwards compatibility with the previous class name.
87class_alias(ProjectsLocationsRepositoriesCommentThreadsComments::class, 'Google_Service_Dataform_Resource_ProjectsLocationsRepositoriesCommentThreadsComments');
Note: See TracBrowser for help on using the repository browser.