Acl.php
7 months ago
CalendarList.php
7 months ago
Calendars.php
7 months ago
Channels.php
7 months ago
Colors.php
7 months ago
Events.php
7 months ago
Freebusy.php
7 months ago
Settings.php
7 months ago
Acl.php
205 lines
| 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 AmeliaVendor\Google\Service\Calendar\Resource; |
| 19 | |
| 20 | use AmeliaVendor\Google\Service\Calendar\Acl as AclModel; |
| 21 | use AmeliaVendor\Google\Service\Calendar\AclRule; |
| 22 | use AmeliaVendor\Google\Service\Calendar\Channel; |
| 23 | |
| 24 | /** |
| 25 | * The "acl" collection of methods. |
| 26 | * Typical usage is: |
| 27 | * <code> |
| 28 | * $calendarService = new \AmeliaVendor\Google\Service\Calendar(...); |
| 29 | * $acl = $calendarService->acl; |
| 30 | * </code> |
| 31 | */ |
| 32 | class Acl extends \AmeliaVendor\Google\Service\Resource |
| 33 | { |
| 34 | /** |
| 35 | * Deletes an access control rule. (acl.delete) |
| 36 | * |
| 37 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 38 | * the calendarList.list method. If you want to access the primary calendar of |
| 39 | * the currently logged in user, use the "primary" keyword. |
| 40 | * @param string $ruleId ACL rule identifier. |
| 41 | * @param array $optParams Optional parameters. |
| 42 | * @throws \AmeliaVendor\Google\Service\Exception |
| 43 | */ |
| 44 | public function delete($calendarId, $ruleId, $optParams = []) |
| 45 | { |
| 46 | $params = ['calendarId' => $calendarId, 'ruleId' => $ruleId]; |
| 47 | $params = array_merge($params, $optParams); |
| 48 | return $this->call('delete', [$params]); |
| 49 | } |
| 50 | /** |
| 51 | * Returns an access control rule. (acl.get) |
| 52 | * |
| 53 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 54 | * the calendarList.list method. If you want to access the primary calendar of |
| 55 | * the currently logged in user, use the "primary" keyword. |
| 56 | * @param string $ruleId ACL rule identifier. |
| 57 | * @param array $optParams Optional parameters. |
| 58 | * @return AclRule |
| 59 | * @throws \AmeliaVendor\Google\Service\Exception |
| 60 | */ |
| 61 | public function get($calendarId, $ruleId, $optParams = []) |
| 62 | { |
| 63 | $params = ['calendarId' => $calendarId, 'ruleId' => $ruleId]; |
| 64 | $params = array_merge($params, $optParams); |
| 65 | return $this->call('get', [$params], AclRule::class); |
| 66 | } |
| 67 | /** |
| 68 | * Creates an access control rule. (acl.insert) |
| 69 | * |
| 70 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 71 | * the calendarList.list method. If you want to access the primary calendar of |
| 72 | * the currently logged in user, use the "primary" keyword. |
| 73 | * @param AclRule $postBody |
| 74 | * @param array $optParams Optional parameters. |
| 75 | * |
| 76 | * @opt_param bool sendNotifications Whether to send notifications about the |
| 77 | * calendar sharing change. Optional. The default is True. |
| 78 | * @return AclRule |
| 79 | * @throws \AmeliaVendor\Google\Service\Exception |
| 80 | */ |
| 81 | public function insert($calendarId, AclRule $postBody, $optParams = []) |
| 82 | { |
| 83 | $params = ['calendarId' => $calendarId, 'postBody' => $postBody]; |
| 84 | $params = array_merge($params, $optParams); |
| 85 | return $this->call('insert', [$params], AclRule::class); |
| 86 | } |
| 87 | /** |
| 88 | * Returns the rules in the access control list for the calendar. (acl.listAcl) |
| 89 | * |
| 90 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 91 | * the calendarList.list method. If you want to access the primary calendar of |
| 92 | * the currently logged in user, use the "primary" keyword. |
| 93 | * @param array $optParams Optional parameters. |
| 94 | * |
| 95 | * @opt_param int maxResults Maximum number of entries returned on one result |
| 96 | * page. By default the value is 100 entries. The page size can never be larger |
| 97 | * than 250 entries. Optional. |
| 98 | * @opt_param string pageToken Token specifying which result page to return. |
| 99 | * Optional. |
| 100 | * @opt_param bool showDeleted Whether to include deleted ACLs in the result. |
| 101 | * Deleted ACLs are represented by role equal to "none". Deleted ACLs will |
| 102 | * always be included if syncToken is provided. Optional. The default is False. |
| 103 | * @opt_param string syncToken Token obtained from the nextSyncToken field |
| 104 | * returned on the last page of results from the previous list request. It makes |
| 105 | * the result of this list request contain only entries that have changed since |
| 106 | * then. All entries deleted since the previous list request will always be in |
| 107 | * the result set and it is not allowed to set showDeleted to False. If the |
| 108 | * syncToken expires, the server will respond with a 410 GONE response code and |
| 109 | * the client should clear its storage and perform a full synchronization |
| 110 | * without any syncToken. Learn more about incremental synchronization. |
| 111 | * Optional. The default is to return all entries. |
| 112 | * @return AclModel |
| 113 | * @throws \AmeliaVendor\Google\Service\Exception |
| 114 | */ |
| 115 | public function listAcl($calendarId, $optParams = []) |
| 116 | { |
| 117 | $params = ['calendarId' => $calendarId]; |
| 118 | $params = array_merge($params, $optParams); |
| 119 | return $this->call('list', [$params], AclModel::class); |
| 120 | } |
| 121 | /** |
| 122 | * Updates an access control rule. This method supports patch semantics. |
| 123 | * (acl.patch) |
| 124 | * |
| 125 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 126 | * the calendarList.list method. If you want to access the primary calendar of |
| 127 | * the currently logged in user, use the "primary" keyword. |
| 128 | * @param string $ruleId ACL rule identifier. |
| 129 | * @param AclRule $postBody |
| 130 | * @param array $optParams Optional parameters. |
| 131 | * |
| 132 | * @opt_param bool sendNotifications Whether to send notifications about the |
| 133 | * calendar sharing change. Note that there are no notifications on access |
| 134 | * removal. Optional. The default is True. |
| 135 | * @return AclRule |
| 136 | * @throws \AmeliaVendor\Google\Service\Exception |
| 137 | */ |
| 138 | public function patch($calendarId, $ruleId, AclRule $postBody, $optParams = []) |
| 139 | { |
| 140 | $params = ['calendarId' => $calendarId, 'ruleId' => $ruleId, 'postBody' => $postBody]; |
| 141 | $params = array_merge($params, $optParams); |
| 142 | return $this->call('patch', [$params], AclRule::class); |
| 143 | } |
| 144 | /** |
| 145 | * Updates an access control rule. (acl.update) |
| 146 | * |
| 147 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 148 | * the calendarList.list method. If you want to access the primary calendar of |
| 149 | * the currently logged in user, use the "primary" keyword. |
| 150 | * @param string $ruleId ACL rule identifier. |
| 151 | * @param AclRule $postBody |
| 152 | * @param array $optParams Optional parameters. |
| 153 | * |
| 154 | * @opt_param bool sendNotifications Whether to send notifications about the |
| 155 | * calendar sharing change. Note that there are no notifications on access |
| 156 | * removal. Optional. The default is True. |
| 157 | * @return AclRule |
| 158 | * @throws \AmeliaVendor\Google\Service\Exception |
| 159 | */ |
| 160 | public function update($calendarId, $ruleId, AclRule $postBody, $optParams = []) |
| 161 | { |
| 162 | $params = ['calendarId' => $calendarId, 'ruleId' => $ruleId, 'postBody' => $postBody]; |
| 163 | $params = array_merge($params, $optParams); |
| 164 | return $this->call('update', [$params], AclRule::class); |
| 165 | } |
| 166 | /** |
| 167 | * Watch for changes to ACL resources. (acl.watch) |
| 168 | * |
| 169 | * @param string $calendarId Calendar identifier. To retrieve calendar IDs call |
| 170 | * the calendarList.list method. If you want to access the primary calendar of |
| 171 | * the currently logged in user, use the "primary" keyword. |
| 172 | * @param Channel $postBody |
| 173 | * @param array $optParams Optional parameters. |
| 174 | * |
| 175 | * @opt_param int maxResults Maximum number of entries returned on one result |
| 176 | * page. By default the value is 100 entries. The page size can never be larger |
| 177 | * than 250 entries. Optional. |
| 178 | * @opt_param string pageToken Token specifying which result page to return. |
| 179 | * Optional. |
| 180 | * @opt_param bool showDeleted Whether to include deleted ACLs in the result. |
| 181 | * Deleted ACLs are represented by role equal to "none". Deleted ACLs will |
| 182 | * always be included if syncToken is provided. Optional. The default is False. |
| 183 | * @opt_param string syncToken Token obtained from the nextSyncToken field |
| 184 | * returned on the last page of results from the previous list request. It makes |
| 185 | * the result of this list request contain only entries that have changed since |
| 186 | * then. All entries deleted since the previous list request will always be in |
| 187 | * the result set and it is not allowed to set showDeleted to False. If the |
| 188 | * syncToken expires, the server will respond with a 410 GONE response code and |
| 189 | * the client should clear its storage and perform a full synchronization |
| 190 | * without any syncToken. Learn more about incremental synchronization. |
| 191 | * Optional. The default is to return all entries. |
| 192 | * @return Channel |
| 193 | * @throws \AmeliaVendor\Google\Service\Exception |
| 194 | */ |
| 195 | public function watch($calendarId, Channel $postBody, $optParams = []) |
| 196 | { |
| 197 | $params = ['calendarId' => $calendarId, 'postBody' => $postBody]; |
| 198 | $params = array_merge($params, $optParams); |
| 199 | return $this->call('watch', [$params], Channel::class); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | // Adding a class alias for backwards compatibility with the previous class name. |
| 204 | class_alias(Acl::class, 'Google_Service_Calendar_Resource_Acl'); |
| 205 |