source: vendor/google/apiclient-services/src/CloudDataplex/Resource/ProjectsLocationsGovernanceRules.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 5.0 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\CloudDataplex\Resource;
19
20use Google\Service\CloudDataplex\GoogleIamV1Policy;
21use Google\Service\CloudDataplex\GoogleIamV1SetIamPolicyRequest;
22use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsRequest;
23use Google\Service\CloudDataplex\GoogleIamV1TestIamPermissionsResponse;
24
25/**
26 * The "governanceRules" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $dataplexService = new Google\Service\CloudDataplex(...);
30 * $governanceRules = $dataplexService->projects_locations_governanceRules;
31 * </code>
32 */
33class ProjectsLocationsGovernanceRules extends \Google\Service\Resource
34{
35 /**
36 * Gets the access control policy for a resource. Returns an empty policy if the
37 * resource exists and does not have a policy set.
38 * (governanceRules.getIamPolicy)
39 *
40 * @param string $resource REQUIRED: The resource for which the policy is being
41 * requested. See Resource names
42 * (https://cloud.google.com/apis/design/resource_names) for the appropriate
43 * value for this field.
44 * @param array $optParams Optional parameters.
45 *
46 * @opt_param int options.requestedPolicyVersion Optional. The maximum policy
47 * version that will be used to format the policy.Valid values are 0, 1, and 3.
48 * Requests specifying an invalid value will be rejected.Requests for policies
49 * with any conditional role bindings must specify version 3. Policies with no
50 * conditional role bindings may specify any valid value or leave the field
51 * unset.The policy in the response might use the policy version that you
52 * specified, or it might use a lower policy version. For example, if you
53 * specify version 3, but the policy has no conditional role bindings, the
54 * response uses version 1.To learn which resources support conditions in their
55 * IAM policies, see the IAM documentation
56 * (https://cloud.google.com/iam/help/conditions/resource-policies).
57 * @return GoogleIamV1Policy
58 * @throws \Google\Service\Exception
59 */
60 public function getIamPolicy($resource, $optParams = [])
61 {
62 $params = ['resource' => $resource];
63 $params = array_merge($params, $optParams);
64 return $this->call('getIamPolicy', [$params], GoogleIamV1Policy::class);
65 }
66 /**
67 * Sets the access control policy on the specified resource. Replaces any
68 * existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED
69 * errors. (governanceRules.setIamPolicy)
70 *
71 * @param string $resource REQUIRED: The resource for which the policy is being
72 * specified. See Resource names
73 * (https://cloud.google.com/apis/design/resource_names) for the appropriate
74 * value for this field.
75 * @param GoogleIamV1SetIamPolicyRequest $postBody
76 * @param array $optParams Optional parameters.
77 * @return GoogleIamV1Policy
78 * @throws \Google\Service\Exception
79 */
80 public function setIamPolicy($resource, GoogleIamV1SetIamPolicyRequest $postBody, $optParams = [])
81 {
82 $params = ['resource' => $resource, 'postBody' => $postBody];
83 $params = array_merge($params, $optParams);
84 return $this->call('setIamPolicy', [$params], GoogleIamV1Policy::class);
85 }
86 /**
87 * Returns permissions that a caller has on the specified resource. If the
88 * resource does not exist, this will return an empty set of permissions, not a
89 * NOT_FOUND error.Note: This operation is designed to be used for building
90 * permission-aware UIs and command-line tools, not for authorization checking.
91 * This operation may "fail open" without warning.
92 * (governanceRules.testIamPermissions)
93 *
94 * @param string $resource REQUIRED: The resource for which the policy detail is
95 * being requested. See Resource names
96 * (https://cloud.google.com/apis/design/resource_names) for the appropriate
97 * value for this field.
98 * @param GoogleIamV1TestIamPermissionsRequest $postBody
99 * @param array $optParams Optional parameters.
100 * @return GoogleIamV1TestIamPermissionsResponse
101 * @throws \Google\Service\Exception
102 */
103 public function testIamPermissions($resource, GoogleIamV1TestIamPermissionsRequest $postBody, $optParams = [])
104 {
105 $params = ['resource' => $resource, 'postBody' => $postBody];
106 $params = array_merge($params, $optParams);
107 return $this->call('testIamPermissions', [$params], GoogleIamV1TestIamPermissionsResponse::class);
108 }
109}
110
111// Adding a class alias for backwards compatibility with the previous class name.
112class_alias(ProjectsLocationsGovernanceRules::class, 'Google_Service_CloudDataplex_Resource_ProjectsLocationsGovernanceRules');
Note: See TracBrowser for help on using the repository browser.