source: vendor/google/apiclient-services/src/ServiceManagement/Resource/ServicesConsumers.php

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

Upload project files

  • Property mode set to 100644
File size: 4.2 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\ServiceManagement\Resource;
19
20use Google\Service\ServiceManagement\GetIamPolicyRequest;
21use Google\Service\ServiceManagement\Policy;
22use Google\Service\ServiceManagement\SetIamPolicyRequest;
23use Google\Service\ServiceManagement\TestIamPermissionsRequest;
24use Google\Service\ServiceManagement\TestIamPermissionsResponse;
25
26/**
27 * The "consumers" collection of methods.
28 * Typical usage is:
29 * <code>
30 * $servicemanagementService = new Google\Service\ServiceManagement(...);
31 * $consumers = $servicemanagementService->services_consumers;
32 * </code>
33 */
34class ServicesConsumers 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. (consumers.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 * @throws \Google\Service\Exception
48 */
49 public function getIamPolicy($resource, GetIamPolicyRequest $postBody, $optParams = [])
50 {
51 $params = ['resource' => $resource, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('getIamPolicy', [$params], Policy::class);
54 }
55 /**
56 * Sets the access control policy on the specified resource. Replaces any
57 * existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and
58 * `PERMISSION_DENIED` errors. (consumers.setIamPolicy)
59 *
60 * @param string $resource REQUIRED: The resource for which the policy is being
61 * specified. See [Resource
62 * names](https://cloud.google.com/apis/design/resource_names) for the
63 * appropriate value for this field.
64 * @param SetIamPolicyRequest $postBody
65 * @param array $optParams Optional parameters.
66 * @return Policy
67 * @throws \Google\Service\Exception
68 */
69 public function setIamPolicy($resource, SetIamPolicyRequest $postBody, $optParams = [])
70 {
71 $params = ['resource' => $resource, 'postBody' => $postBody];
72 $params = array_merge($params, $optParams);
73 return $this->call('setIamPolicy', [$params], Policy::class);
74 }
75 /**
76 * Returns permissions that a caller has on the specified resource. If the
77 * resource does not exist, this will return an empty set of permissions, not a
78 * `NOT_FOUND` error. Note: This operation is designed to be used for building
79 * permission-aware UIs and command-line tools, not for authorization checking.
80 * This operation may "fail open" without warning.
81 * (consumers.testIamPermissions)
82 *
83 * @param string $resource REQUIRED: The resource for which the policy detail is
84 * being requested. See [Resource
85 * names](https://cloud.google.com/apis/design/resource_names) for the
86 * appropriate value for this field.
87 * @param TestIamPermissionsRequest $postBody
88 * @param array $optParams Optional parameters.
89 * @return TestIamPermissionsResponse
90 * @throws \Google\Service\Exception
91 */
92 public function testIamPermissions($resource, TestIamPermissionsRequest $postBody, $optParams = [])
93 {
94 $params = ['resource' => $resource, 'postBody' => $postBody];
95 $params = array_merge($params, $optParams);
96 return $this->call('testIamPermissions', [$params], TestIamPermissionsResponse::class);
97 }
98}
99
100// Adding a class alias for backwards compatibility with the previous class name.
101class_alias(ServicesConsumers::class, 'Google_Service_ServiceManagement_Resource_ServicesConsumers');
Note: See TracBrowser for help on using the repository browser.