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\Directory\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\Directory\CalendarResource;
|
---|
21 | use Google\Service\Directory\CalendarResources;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The "calendars" collection of methods.
|
---|
25 | * Typical usage is:
|
---|
26 | * <code>
|
---|
27 | * $adminService = new Google\Service\Directory(...);
|
---|
28 | * $calendars = $adminService->resources_calendars;
|
---|
29 | * </code>
|
---|
30 | */
|
---|
31 | class ResourcesCalendars extends \Google\Service\Resource
|
---|
32 | {
|
---|
33 | /**
|
---|
34 | * Deletes a calendar resource. (calendars.delete)
|
---|
35 | *
|
---|
36 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
37 | * account. As an account administrator, you can also use the `my_customer`
|
---|
38 | * alias to represent your account's customer ID.
|
---|
39 | * @param string $calendarResourceId The unique ID of the calendar resource to
|
---|
40 | * delete.
|
---|
41 | * @param array $optParams Optional parameters.
|
---|
42 | * @throws \Google\Service\Exception
|
---|
43 | */
|
---|
44 | public function delete($customer, $calendarResourceId, $optParams = [])
|
---|
45 | {
|
---|
46 | $params = ['customer' => $customer, 'calendarResourceId' => $calendarResourceId];
|
---|
47 | $params = array_merge($params, $optParams);
|
---|
48 | return $this->call('delete', [$params]);
|
---|
49 | }
|
---|
50 | /**
|
---|
51 | * Retrieves a calendar resource. (calendars.get)
|
---|
52 | *
|
---|
53 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
54 | * account. As an account administrator, you can also use the `my_customer`
|
---|
55 | * alias to represent your account's customer ID.
|
---|
56 | * @param string $calendarResourceId The unique ID of the calendar resource to
|
---|
57 | * retrieve.
|
---|
58 | * @param array $optParams Optional parameters.
|
---|
59 | * @return CalendarResource
|
---|
60 | * @throws \Google\Service\Exception
|
---|
61 | */
|
---|
62 | public function get($customer, $calendarResourceId, $optParams = [])
|
---|
63 | {
|
---|
64 | $params = ['customer' => $customer, 'calendarResourceId' => $calendarResourceId];
|
---|
65 | $params = array_merge($params, $optParams);
|
---|
66 | return $this->call('get', [$params], CalendarResource::class);
|
---|
67 | }
|
---|
68 | /**
|
---|
69 | * Inserts a calendar resource. (calendars.insert)
|
---|
70 | *
|
---|
71 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
72 | * account. As an account administrator, you can also use the `my_customer`
|
---|
73 | * alias to represent your account's customer ID.
|
---|
74 | * @param CalendarResource $postBody
|
---|
75 | * @param array $optParams Optional parameters.
|
---|
76 | * @return CalendarResource
|
---|
77 | * @throws \Google\Service\Exception
|
---|
78 | */
|
---|
79 | public function insert($customer, CalendarResource $postBody, $optParams = [])
|
---|
80 | {
|
---|
81 | $params = ['customer' => $customer, 'postBody' => $postBody];
|
---|
82 | $params = array_merge($params, $optParams);
|
---|
83 | return $this->call('insert', [$params], CalendarResource::class);
|
---|
84 | }
|
---|
85 | /**
|
---|
86 | * Retrieves a list of calendar resources for an account.
|
---|
87 | * (calendars.listResourcesCalendars)
|
---|
88 | *
|
---|
89 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
90 | * account. As an account administrator, you can also use the `my_customer`
|
---|
91 | * alias to represent your account's customer ID.
|
---|
92 | * @param array $optParams Optional parameters.
|
---|
93 | *
|
---|
94 | * @opt_param int maxResults Maximum number of results to return.
|
---|
95 | * @opt_param string orderBy Field(s) to sort results by in either ascending or
|
---|
96 | * descending order. Supported fields include `resourceId`, `resourceName`,
|
---|
97 | * `capacity`, `buildingId`, and `floorName`. If no order is specified, defaults
|
---|
98 | * to ascending. Should be of the form "field [asc|desc], field [asc|desc],
|
---|
99 | * ...". For example `buildingId, capacity desc` would return results sorted
|
---|
100 | * first by `buildingId` in ascending order then by `capacity` in descending
|
---|
101 | * order.
|
---|
102 | * @opt_param string pageToken Token to specify the next page in the list.
|
---|
103 | * @opt_param string query String query used to filter results. Should be of the
|
---|
104 | * form "field operator value" where field can be any of supported fields and
|
---|
105 | * operators can be any of supported operations. Operators include '=' for exact
|
---|
106 | * match, '!=' for mismatch and ':' for prefix match or HAS match where
|
---|
107 | * applicable. For prefix match, the value should always be followed by a *.
|
---|
108 | * Logical operators NOT and AND are supported (in this order of precedence).
|
---|
109 | * Supported fields include `generatedResourceName`, `name`, `buildingId`,
|
---|
110 | * `floor_name`, `capacity`, `featureInstances.feature.name`, `resourceEmail`,
|
---|
111 | * `resourceCategory`. For example `buildingId=US-NYC-9TH AND
|
---|
112 | * featureInstances.feature.name:Phone`.
|
---|
113 | * @return CalendarResources
|
---|
114 | * @throws \Google\Service\Exception
|
---|
115 | */
|
---|
116 | public function listResourcesCalendars($customer, $optParams = [])
|
---|
117 | {
|
---|
118 | $params = ['customer' => $customer];
|
---|
119 | $params = array_merge($params, $optParams);
|
---|
120 | return $this->call('list', [$params], CalendarResources::class);
|
---|
121 | }
|
---|
122 | /**
|
---|
123 | * Patches a calendar resource. (calendars.patch)
|
---|
124 | *
|
---|
125 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
126 | * account. As an account administrator, you can also use the `my_customer`
|
---|
127 | * alias to represent your account's customer ID.
|
---|
128 | * @param string $calendarResourceId The unique ID of the calendar resource to
|
---|
129 | * update.
|
---|
130 | * @param CalendarResource $postBody
|
---|
131 | * @param array $optParams Optional parameters.
|
---|
132 | * @return CalendarResource
|
---|
133 | * @throws \Google\Service\Exception
|
---|
134 | */
|
---|
135 | public function patch($customer, $calendarResourceId, CalendarResource $postBody, $optParams = [])
|
---|
136 | {
|
---|
137 | $params = ['customer' => $customer, 'calendarResourceId' => $calendarResourceId, 'postBody' => $postBody];
|
---|
138 | $params = array_merge($params, $optParams);
|
---|
139 | return $this->call('patch', [$params], CalendarResource::class);
|
---|
140 | }
|
---|
141 | /**
|
---|
142 | * Updates a calendar resource. This method supports patch semantics, meaning
|
---|
143 | * you only need to include the fields you wish to update. Fields that are not
|
---|
144 | * present in the request will be preserved. (calendars.update)
|
---|
145 | *
|
---|
146 | * @param string $customer The unique ID for the customer's Google Workspace
|
---|
147 | * account. As an account administrator, you can also use the `my_customer`
|
---|
148 | * alias to represent your account's customer ID.
|
---|
149 | * @param string $calendarResourceId The unique ID of the calendar resource to
|
---|
150 | * update.
|
---|
151 | * @param CalendarResource $postBody
|
---|
152 | * @param array $optParams Optional parameters.
|
---|
153 | * @return CalendarResource
|
---|
154 | * @throws \Google\Service\Exception
|
---|
155 | */
|
---|
156 | public function update($customer, $calendarResourceId, CalendarResource $postBody, $optParams = [])
|
---|
157 | {
|
---|
158 | $params = ['customer' => $customer, 'calendarResourceId' => $calendarResourceId, 'postBody' => $postBody];
|
---|
159 | $params = array_merge($params, $optParams);
|
---|
160 | return $this->call('update', [$params], CalendarResource::class);
|
---|
161 | }
|
---|
162 | }
|
---|
163 |
|
---|
164 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
165 | class_alias(ResourcesCalendars::class, 'Google_Service_Directory_Resource_ResourcesCalendars');
|
---|