[e3d4e0a] | 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\SASPortalTesting\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\SASPortalTesting\SasPortalGetPolicyRequest;
|
---|
| 21 | use Google\Service\SASPortalTesting\SasPortalPolicy;
|
---|
| 22 | use Google\Service\SASPortalTesting\SasPortalSetPolicyRequest;
|
---|
| 23 | use Google\Service\SASPortalTesting\SasPortalTestPermissionsRequest;
|
---|
| 24 | use Google\Service\SASPortalTesting\SasPortalTestPermissionsResponse;
|
---|
| 25 |
|
---|
| 26 | /**
|
---|
| 27 | * The "policies" collection of methods.
|
---|
| 28 | * Typical usage is:
|
---|
| 29 | * <code>
|
---|
| 30 | * $prod_tt_sasportalService = new Google\Service\SASPortalTesting(...);
|
---|
| 31 | * $policies = $prod_tt_sasportalService->policies;
|
---|
| 32 | * </code>
|
---|
| 33 | */
|
---|
| 34 | class Policies 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. (policies.get)
|
---|
| 39 | *
|
---|
| 40 | * @param SasPortalGetPolicyRequest $postBody
|
---|
| 41 | * @param array $optParams Optional parameters.
|
---|
| 42 | * @return SasPortalPolicy
|
---|
| 43 | * @throws \Google\Service\Exception
|
---|
| 44 | */
|
---|
| 45 | public function get(SasPortalGetPolicyRequest $postBody, $optParams = [])
|
---|
| 46 | {
|
---|
| 47 | $params = ['postBody' => $postBody];
|
---|
| 48 | $params = array_merge($params, $optParams);
|
---|
| 49 | return $this->call('get', [$params], SasPortalPolicy::class);
|
---|
| 50 | }
|
---|
| 51 | /**
|
---|
| 52 | * Sets the access control policy on the specified resource. Replaces any
|
---|
| 53 | * existing policy. (policies.set)
|
---|
| 54 | *
|
---|
| 55 | * @param SasPortalSetPolicyRequest $postBody
|
---|
| 56 | * @param array $optParams Optional parameters.
|
---|
| 57 | * @return SasPortalPolicy
|
---|
| 58 | * @throws \Google\Service\Exception
|
---|
| 59 | */
|
---|
| 60 | public function set(SasPortalSetPolicyRequest $postBody, $optParams = [])
|
---|
| 61 | {
|
---|
| 62 | $params = ['postBody' => $postBody];
|
---|
| 63 | $params = array_merge($params, $optParams);
|
---|
| 64 | return $this->call('set', [$params], SasPortalPolicy::class);
|
---|
| 65 | }
|
---|
| 66 | /**
|
---|
| 67 | * Returns permissions that a caller has on the specified resource.
|
---|
| 68 | * (policies.test)
|
---|
| 69 | *
|
---|
| 70 | * @param SasPortalTestPermissionsRequest $postBody
|
---|
| 71 | * @param array $optParams Optional parameters.
|
---|
| 72 | * @return SasPortalTestPermissionsResponse
|
---|
| 73 | * @throws \Google\Service\Exception
|
---|
| 74 | */
|
---|
| 75 | public function test(SasPortalTestPermissionsRequest $postBody, $optParams = [])
|
---|
| 76 | {
|
---|
| 77 | $params = ['postBody' => $postBody];
|
---|
| 78 | $params = array_merge($params, $optParams);
|
---|
| 79 | return $this->call('test', [$params], SasPortalTestPermissionsResponse::class);
|
---|
| 80 | }
|
---|
| 81 | }
|
---|
| 82 |
|
---|
| 83 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 84 | class_alias(Policies::class, 'Google_Service_SASPortalTesting_Resource_Policies');
|
---|