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 |
|
---|
18 | namespace Google\Service\CloudIot\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\CloudIot\GetIamPolicyRequest;
|
---|
21 | use Google\Service\CloudIot\Policy;
|
---|
22 | use Google\Service\CloudIot\SetIamPolicyRequest;
|
---|
23 | use Google\Service\CloudIot\TestIamPermissionsRequest;
|
---|
24 | use Google\Service\CloudIot\TestIamPermissionsResponse;
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * The "groups" collection of methods.
|
---|
28 | * Typical usage is:
|
---|
29 | * <code>
|
---|
30 | * $cloudiotService = new Google\Service\CloudIot(...);
|
---|
31 | * $groups = $cloudiotService->projects_locations_registries_groups;
|
---|
32 | * </code>
|
---|
33 | */
|
---|
34 | class ProjectsLocationsRegistriesGroups extends \Google\Service\Resource
|
---|
35 | {
|
---|
36 | /**
|
---|
37 | * Gets the access control policy for a resource. Returns an empty policy if the
|
---|
38 | * resource exists and does not have a policy set. (groups.getIamPolicy)
|
---|
39 | *
|
---|
40 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
41 | * requested. See [Resource
|
---|
42 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
43 | * appropriate value for this field.
|
---|
44 | * @param GetIamPolicyRequest $postBody
|
---|
45 | * @param array $optParams Optional parameters.
|
---|
46 | * @return Policy
|
---|
47 | */
|
---|
48 | public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
|
---|
49 | {
|
---|
50 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
51 | $params = array_merge($params, $optParams);
|
---|
52 | return $this->call('getIamPolicy', [$params], Policy::class);
|
---|
53 | }
|
---|
54 | /**
|
---|
55 | * Sets the access control policy on the specified resource. Replaces any
|
---|
56 | * existing policy. (groups.setIamPolicy)
|
---|
57 | *
|
---|
58 | * @param string $resource REQUIRED: The resource for which the policy is being
|
---|
59 | * specified. See [Resource
|
---|
60 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
61 | * appropriate value for this field.
|
---|
62 | * @param SetIamPolicyRequest $postBody
|
---|
63 | * @param array $optParams Optional parameters.
|
---|
64 | * @return Policy
|
---|
65 | */
|
---|
66 | public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
|
---|
67 | {
|
---|
68 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
69 | $params = array_merge($params, $optParams);
|
---|
70 | return $this->call('setIamPolicy', [$params], Policy::class);
|
---|
71 | }
|
---|
72 | /**
|
---|
73 | * Returns permissions that a caller has on the specified resource. If the
|
---|
74 | * resource does not exist, this will return an empty set of permissions, not a
|
---|
75 | * NOT_FOUND error. (groups.testIamPermissions)
|
---|
76 | *
|
---|
77 | * @param string $resource REQUIRED: The resource for which the policy detail is
|
---|
78 | * being requested. See [Resource
|
---|
79 | * names](https://cloud.google.com/apis/design/resource_names) for the
|
---|
80 | * appropriate value for this field.
|
---|
81 | * @param TestIamPermissionsRequest $postBody
|
---|
82 | * @param array $optParams Optional parameters.
|
---|
83 | * @return TestIamPermissionsResponse
|
---|
84 | */
|
---|
85 | public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
|
---|
86 | {
|
---|
87 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
88 | $params = array_merge($params, $optParams);
|
---|
89 | return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
|
---|
90 | }
|
---|
91 | }
|
---|
92 |
|
---|
93 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
94 | class_alias(ProjectsLocationsRegistriesGroups::class, 'Google_Service_CloudIot_Resource_ProjectsLocationsRegistriesGroups');
|
---|