* $contentwarehouseService = new Google\Service\Contentwarehouse(...); * $projects = $contentwarehouseService->projects; * */ class Projects extends \Google\Service\Resource { /** * Gets the access control policy for a resource. Returns NOT_FOUND error if the * resource does not exist. Returns an empty policy if the resource exists but * does not have a policy set. (projects.fetchAcl) * * @param string $resource Required. REQUIRED: The resource for which the policy * is being requested. Format for document: * projects/{project_number}/locations/{location}/documents/{document_id}. * Format for collection: * projects/{project_number}/locations/{location}/collections/{collection_id}. * Format for project: projects/{project_number}. * @param GoogleCloudContentwarehouseV1FetchAclRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudContentwarehouseV1FetchAclResponse * @throws \Google\Service\Exception */ public function fetchAcl($resource, GoogleCloudContentwarehouseV1FetchAclRequest $postBody, $optParams = []) { $params = ['resource' => $resource, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('fetchAcl', [$params], GoogleCloudContentwarehouseV1FetchAclResponse::class); } /** * Sets the access control policy for a resource. Replaces any existing policy. * (projects.setAcl) * * @param string $resource Required. REQUIRED: The resource for which the policy * is being requested. Format for document: * projects/{project_number}/locations/{location}/documents/{document_id}. * Format for collection: * projects/{project_number}/locations/{location}/collections/{collection_id}. * Format for project: projects/{project_number}. * @param GoogleCloudContentwarehouseV1SetAclRequest $postBody * @param array $optParams Optional parameters. * @return GoogleCloudContentwarehouseV1SetAclResponse * @throws \Google\Service\Exception */ public function setAcl($resource, GoogleCloudContentwarehouseV1SetAclRequest $postBody, $optParams = []) { $params = ['resource' => $resource, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('setAcl', [$params], GoogleCloudContentwarehouseV1SetAclResponse::class); } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(Projects::class, 'Google_Service_Contentwarehouse_Resource_Projects');