[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\Contentwarehouse\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1FetchAclRequest;
|
---|
| 21 | use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1FetchAclResponse;
|
---|
| 22 | use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1SetAclRequest;
|
---|
| 23 | use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1SetAclResponse;
|
---|
| 24 |
|
---|
| 25 | /**
|
---|
| 26 | * The "projects" collection of methods.
|
---|
| 27 | * Typical usage is:
|
---|
| 28 | * <code>
|
---|
| 29 | * $contentwarehouseService = new Google\Service\Contentwarehouse(...);
|
---|
| 30 | * $projects = $contentwarehouseService->projects;
|
---|
| 31 | * </code>
|
---|
| 32 | */
|
---|
| 33 | class Projects extends \Google\Service\Resource
|
---|
| 34 | {
|
---|
| 35 | /**
|
---|
| 36 | * Gets the access control policy for a resource. Returns NOT_FOUND error if the
|
---|
| 37 | * resource does not exist. Returns an empty policy if the resource exists but
|
---|
| 38 | * does not have a policy set. (projects.fetchAcl)
|
---|
| 39 | *
|
---|
| 40 | * @param string $resource Required. REQUIRED: The resource for which the policy
|
---|
| 41 | * is being requested. Format for document:
|
---|
| 42 | * projects/{project_number}/locations/{location}/documents/{document_id}.
|
---|
| 43 | * Format for collection:
|
---|
| 44 | * projects/{project_number}/locations/{location}/collections/{collection_id}.
|
---|
| 45 | * Format for project: projects/{project_number}.
|
---|
| 46 | * @param GoogleCloudContentwarehouseV1FetchAclRequest $postBody
|
---|
| 47 | * @param array $optParams Optional parameters.
|
---|
| 48 | * @return GoogleCloudContentwarehouseV1FetchAclResponse
|
---|
| 49 | * @throws \Google\Service\Exception
|
---|
| 50 | */
|
---|
| 51 | public function fetchAcl($resource, GoogleCloudContentwarehouseV1FetchAclRequest $postBody, $optParams = [])
|
---|
| 52 | {
|
---|
| 53 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 54 | $params = array_merge($params, $optParams);
|
---|
| 55 | return $this->call('fetchAcl', [$params], GoogleCloudContentwarehouseV1FetchAclResponse::class);
|
---|
| 56 | }
|
---|
| 57 | /**
|
---|
| 58 | * Sets the access control policy for a resource. Replaces any existing policy.
|
---|
| 59 | * (projects.setAcl)
|
---|
| 60 | *
|
---|
| 61 | * @param string $resource Required. REQUIRED: The resource for which the policy
|
---|
| 62 | * is being requested. Format for document:
|
---|
| 63 | * projects/{project_number}/locations/{location}/documents/{document_id}.
|
---|
| 64 | * Format for collection:
|
---|
| 65 | * projects/{project_number}/locations/{location}/collections/{collection_id}.
|
---|
| 66 | * Format for project: projects/{project_number}.
|
---|
| 67 | * @param GoogleCloudContentwarehouseV1SetAclRequest $postBody
|
---|
| 68 | * @param array $optParams Optional parameters.
|
---|
| 69 | * @return GoogleCloudContentwarehouseV1SetAclResponse
|
---|
| 70 | * @throws \Google\Service\Exception
|
---|
| 71 | */
|
---|
| 72 | public function setAcl($resource, GoogleCloudContentwarehouseV1SetAclRequest $postBody, $optParams = [])
|
---|
| 73 | {
|
---|
| 74 | $params = ['resource' => $resource, 'postBody' => $postBody];
|
---|
| 75 | $params = array_merge($params, $optParams);
|
---|
| 76 | return $this->call('setAcl', [$params], GoogleCloudContentwarehouseV1SetAclResponse::class);
|
---|
| 77 | }
|
---|
| 78 | }
|
---|
| 79 |
|
---|
| 80 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 81 | class_alias(Projects::class, 'Google_Service_Contentwarehouse_Resource_Projects');
|
---|