source: vendor/google/apiclient-services/src/Drive/Resource/FilesAccessproposals.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: 3.1 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\Drive\Resource;
19
20use Google\Service\Drive\ListAccessProposalsResponse;
21
22/**
23 * The "accessproposals" collection of methods.
24 * Typical usage is:
25 * <code>
26 * $driveService = new Google\Service\Drive(...);
27 * $accessproposals = $driveService->files_accessproposals;
28 * </code>
29 */
30class FilesAccessproposals extends \Google\Service\Resource
31{
32 /**
33 * List the AccessProposals on a file. Note: Only approvers are able to list
34 * AccessProposals on a file. If the user is not an approver, returns a 403.
35 * (accessproposals.listFilesAccessproposals)
36 *
37 * @param string $fileId Required. The id of the item the request is on.
38 * @param array $optParams Optional parameters.
39 *
40 * @opt_param int pageSize Optional. The number of results per page
41 * @opt_param string pageToken Optional. The continuation token on the list of
42 * access requests.
43 * @return ListAccessProposalsResponse
44 * @throws \Google\Service\Exception
45 */
46 public function listFilesAccessproposals($fileId, $optParams = [])
47 {
48 $params = ['fileId' => $fileId];
49 $params = array_merge($params, $optParams);
50 return $this->call('list', [$params], ListAccessProposalsResponse::class);
51 }
52 /**
53 * Used to approve or deny an Access Proposal. (accessproposals.resolve)
54 *
55 * @param string $fileId Required. The id of the item the request is on.
56 * @param string $proposalId Required. The id of the access proposal to resolve.
57 * @param array $optParams Optional parameters.
58 *
59 * @opt_param string action Required. The action to take on the AccessProposal.
60 * @opt_param string role Optional. The roles the approver has allowed, if any.
61 * Note: This field is required for the `ACCEPT` action.
62 * @opt_param bool sendNotification Optional. Whether to send an email to the
63 * requester when the AccessProposal is denied or accepted.
64 * @opt_param string view Optional. Indicates the view for this access proposal.
65 * This should only be set when the proposal belongs to a view. `published` is
66 * the only supported value.
67 * @throws \Google\Service\Exception
68 */
69 public function resolve($fileId, $proposalId, $optParams = [])
70 {
71 $params = ['fileId' => $fileId, 'proposalId' => $proposalId];
72 $params = array_merge($params, $optParams);
73 return $this->call('resolve', [$params]);
74 }
75}
76
77// Adding a class alias for backwards compatibility with the previous class name.
78class_alias(FilesAccessproposals::class, 'Google_Service_Drive_Resource_FilesAccessproposals');
Note: See TracBrowser for help on using the repository browser.