source: vendor/google/apiclient-services/src/DriveLabels.php@ f9c482b

Last change on this file since f9c482b was f9c482b, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload new project files

  • Property mode set to 100644
File size: 16.2 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;
19
20use Google\Client;
21
22/**
23 * Service definition for DriveLabels (v2).
24 *
25 * <p>
26 * An API for managing Drive Labels</p>
27 *
28 * <p>
29 * For more information about this service, see the API
30 * <a href="https://developers.google.com/drive/labels" target="_blank">Documentation</a>
31 * </p>
32 *
33 * @author Google, Inc.
34 */
35class DriveLabels extends \Google\Service
36{
37 /** See, edit, create, and delete all Google Drive labels in your organization, and see your organization's label-related admin policies. */
38 const DRIVE_ADMIN_LABELS =
39 "https://www.googleapis.com/auth/drive.admin.labels";
40 /** See all Google Drive labels and label-related admin policies in your organization. */
41 const DRIVE_ADMIN_LABELS_READONLY =
42 "https://www.googleapis.com/auth/drive.admin.labels.readonly";
43 /** See, edit, create, and delete your Google Drive labels. */
44 const DRIVE_LABELS =
45 "https://www.googleapis.com/auth/drive.labels";
46 /** See your Google Drive labels. */
47 const DRIVE_LABELS_READONLY =
48 "https://www.googleapis.com/auth/drive.labels.readonly";
49
50 public $labels;
51 public $labels_locks;
52 public $labels_permissions;
53 public $labels_revisions;
54 public $labels_revisions_locks;
55 public $labels_revisions_permissions;
56 public $limits;
57 public $users;
58 public $rootUrlTemplate;
59
60 /**
61 * Constructs the internal representation of the DriveLabels service.
62 *
63 * @param Client|array $clientOrConfig The client used to deliver requests, or a
64 * config array to pass to a new Client instance.
65 * @param string $rootUrl The root URL used for requests to the service.
66 */
67 public function __construct($clientOrConfig = [], $rootUrl = null)
68 {
69 parent::__construct($clientOrConfig);
70 $this->rootUrl = $rootUrl ?: 'https://drivelabels.googleapis.com/';
71 $this->rootUrlTemplate = $rootUrl ?: 'https://drivelabels.UNIVERSE_DOMAIN/';
72 $this->servicePath = '';
73 $this->batchPath = 'batch';
74 $this->version = 'v2';
75 $this->serviceName = 'drivelabels';
76
77 $this->labels = new DriveLabels\Resource\Labels(
78 $this,
79 $this->serviceName,
80 'labels',
81 [
82 'methods' => [
83 'create' => [
84 'path' => 'v2/labels',
85 'httpMethod' => 'POST',
86 'parameters' => [
87 'languageCode' => [
88 'location' => 'query',
89 'type' => 'string',
90 ],
91 'useAdminAccess' => [
92 'location' => 'query',
93 'type' => 'boolean',
94 ],
95 ],
96 ],'delete' => [
97 'path' => 'v2/{+name}',
98 'httpMethod' => 'DELETE',
99 'parameters' => [
100 'name' => [
101 'location' => 'path',
102 'type' => 'string',
103 'required' => true,
104 ],
105 'useAdminAccess' => [
106 'location' => 'query',
107 'type' => 'boolean',
108 ],
109 'writeControl.requiredRevisionId' => [
110 'location' => 'query',
111 'type' => 'string',
112 ],
113 ],
114 ],'delta' => [
115 'path' => 'v2/{+name}:delta',
116 'httpMethod' => 'POST',
117 'parameters' => [
118 'name' => [
119 'location' => 'path',
120 'type' => 'string',
121 'required' => true,
122 ],
123 ],
124 ],'disable' => [
125 'path' => 'v2/{+name}:disable',
126 'httpMethod' => 'POST',
127 'parameters' => [
128 'name' => [
129 'location' => 'path',
130 'type' => 'string',
131 'required' => true,
132 ],
133 ],
134 ],'enable' => [
135 'path' => 'v2/{+name}:enable',
136 'httpMethod' => 'POST',
137 'parameters' => [
138 'name' => [
139 'location' => 'path',
140 'type' => 'string',
141 'required' => true,
142 ],
143 ],
144 ],'get' => [
145 'path' => 'v2/{+name}',
146 'httpMethod' => 'GET',
147 'parameters' => [
148 'name' => [
149 'location' => 'path',
150 'type' => 'string',
151 'required' => true,
152 ],
153 'languageCode' => [
154 'location' => 'query',
155 'type' => 'string',
156 ],
157 'useAdminAccess' => [
158 'location' => 'query',
159 'type' => 'boolean',
160 ],
161 'view' => [
162 'location' => 'query',
163 'type' => 'string',
164 ],
165 ],
166 ],'list' => [
167 'path' => 'v2/labels',
168 'httpMethod' => 'GET',
169 'parameters' => [
170 'customer' => [
171 'location' => 'query',
172 'type' => 'string',
173 ],
174 'languageCode' => [
175 'location' => 'query',
176 'type' => 'string',
177 ],
178 'minimumRole' => [
179 'location' => 'query',
180 'type' => 'string',
181 ],
182 'pageSize' => [
183 'location' => 'query',
184 'type' => 'integer',
185 ],
186 'pageToken' => [
187 'location' => 'query',
188 'type' => 'string',
189 ],
190 'publishedOnly' => [
191 'location' => 'query',
192 'type' => 'boolean',
193 ],
194 'useAdminAccess' => [
195 'location' => 'query',
196 'type' => 'boolean',
197 ],
198 'view' => [
199 'location' => 'query',
200 'type' => 'string',
201 ],
202 ],
203 ],'publish' => [
204 'path' => 'v2/{+name}:publish',
205 'httpMethod' => 'POST',
206 'parameters' => [
207 'name' => [
208 'location' => 'path',
209 'type' => 'string',
210 'required' => true,
211 ],
212 ],
213 ],'updateLabelCopyMode' => [
214 'path' => 'v2/{+name}:updateLabelCopyMode',
215 'httpMethod' => 'POST',
216 'parameters' => [
217 'name' => [
218 'location' => 'path',
219 'type' => 'string',
220 'required' => true,
221 ],
222 ],
223 ],'updatePermissions' => [
224 'path' => 'v2/{+parent}/permissions',
225 'httpMethod' => 'PATCH',
226 'parameters' => [
227 'parent' => [
228 'location' => 'path',
229 'type' => 'string',
230 'required' => true,
231 ],
232 'useAdminAccess' => [
233 'location' => 'query',
234 'type' => 'boolean',
235 ],
236 ],
237 ],
238 ]
239 ]
240 );
241 $this->labels_locks = new DriveLabels\Resource\LabelsLocks(
242 $this,
243 $this->serviceName,
244 'locks',
245 [
246 'methods' => [
247 'list' => [
248 'path' => 'v2/{+parent}/locks',
249 'httpMethod' => 'GET',
250 'parameters' => [
251 'parent' => [
252 'location' => 'path',
253 'type' => 'string',
254 'required' => true,
255 ],
256 'pageSize' => [
257 'location' => 'query',
258 'type' => 'integer',
259 ],
260 'pageToken' => [
261 'location' => 'query',
262 'type' => 'string',
263 ],
264 ],
265 ],
266 ]
267 ]
268 );
269 $this->labels_permissions = new DriveLabels\Resource\LabelsPermissions(
270 $this,
271 $this->serviceName,
272 'permissions',
273 [
274 'methods' => [
275 'batchDelete' => [
276 'path' => 'v2/{+parent}/permissions:batchDelete',
277 'httpMethod' => 'POST',
278 'parameters' => [
279 'parent' => [
280 'location' => 'path',
281 'type' => 'string',
282 'required' => true,
283 ],
284 ],
285 ],'batchUpdate' => [
286 'path' => 'v2/{+parent}/permissions:batchUpdate',
287 'httpMethod' => 'POST',
288 'parameters' => [
289 'parent' => [
290 'location' => 'path',
291 'type' => 'string',
292 'required' => true,
293 ],
294 ],
295 ],'create' => [
296 'path' => 'v2/{+parent}/permissions',
297 'httpMethod' => 'POST',
298 'parameters' => [
299 'parent' => [
300 'location' => 'path',
301 'type' => 'string',
302 'required' => true,
303 ],
304 'useAdminAccess' => [
305 'location' => 'query',
306 'type' => 'boolean',
307 ],
308 ],
309 ],'delete' => [
310 'path' => 'v2/{+name}',
311 'httpMethod' => 'DELETE',
312 'parameters' => [
313 'name' => [
314 'location' => 'path',
315 'type' => 'string',
316 'required' => true,
317 ],
318 'useAdminAccess' => [
319 'location' => 'query',
320 'type' => 'boolean',
321 ],
322 ],
323 ],'list' => [
324 'path' => 'v2/{+parent}/permissions',
325 'httpMethod' => 'GET',
326 'parameters' => [
327 'parent' => [
328 'location' => 'path',
329 'type' => 'string',
330 'required' => true,
331 ],
332 'pageSize' => [
333 'location' => 'query',
334 'type' => 'integer',
335 ],
336 'pageToken' => [
337 'location' => 'query',
338 'type' => 'string',
339 ],
340 'useAdminAccess' => [
341 'location' => 'query',
342 'type' => 'boolean',
343 ],
344 ],
345 ],
346 ]
347 ]
348 );
349 $this->labels_revisions = new DriveLabels\Resource\LabelsRevisions(
350 $this,
351 $this->serviceName,
352 'revisions',
353 [
354 'methods' => [
355 'updatePermissions' => [
356 'path' => 'v2/{+parent}/permissions',
357 'httpMethod' => 'PATCH',
358 'parameters' => [
359 'parent' => [
360 'location' => 'path',
361 'type' => 'string',
362 'required' => true,
363 ],
364 'useAdminAccess' => [
365 'location' => 'query',
366 'type' => 'boolean',
367 ],
368 ],
369 ],
370 ]
371 ]
372 );
373 $this->labels_revisions_locks = new DriveLabels\Resource\LabelsRevisionsLocks(
374 $this,
375 $this->serviceName,
376 'locks',
377 [
378 'methods' => [
379 'list' => [
380 'path' => 'v2/{+parent}/locks',
381 'httpMethod' => 'GET',
382 'parameters' => [
383 'parent' => [
384 'location' => 'path',
385 'type' => 'string',
386 'required' => true,
387 ],
388 'pageSize' => [
389 'location' => 'query',
390 'type' => 'integer',
391 ],
392 'pageToken' => [
393 'location' => 'query',
394 'type' => 'string',
395 ],
396 ],
397 ],
398 ]
399 ]
400 );
401 $this->labels_revisions_permissions = new DriveLabels\Resource\LabelsRevisionsPermissions(
402 $this,
403 $this->serviceName,
404 'permissions',
405 [
406 'methods' => [
407 'batchDelete' => [
408 'path' => 'v2/{+parent}/permissions:batchDelete',
409 'httpMethod' => 'POST',
410 'parameters' => [
411 'parent' => [
412 'location' => 'path',
413 'type' => 'string',
414 'required' => true,
415 ],
416 ],
417 ],'batchUpdate' => [
418 'path' => 'v2/{+parent}/permissions:batchUpdate',
419 'httpMethod' => 'POST',
420 'parameters' => [
421 'parent' => [
422 'location' => 'path',
423 'type' => 'string',
424 'required' => true,
425 ],
426 ],
427 ],'create' => [
428 'path' => 'v2/{+parent}/permissions',
429 'httpMethod' => 'POST',
430 'parameters' => [
431 'parent' => [
432 'location' => 'path',
433 'type' => 'string',
434 'required' => true,
435 ],
436 'useAdminAccess' => [
437 'location' => 'query',
438 'type' => 'boolean',
439 ],
440 ],
441 ],'delete' => [
442 'path' => 'v2/{+name}',
443 'httpMethod' => 'DELETE',
444 'parameters' => [
445 'name' => [
446 'location' => 'path',
447 'type' => 'string',
448 'required' => true,
449 ],
450 'useAdminAccess' => [
451 'location' => 'query',
452 'type' => 'boolean',
453 ],
454 ],
455 ],'list' => [
456 'path' => 'v2/{+parent}/permissions',
457 'httpMethod' => 'GET',
458 'parameters' => [
459 'parent' => [
460 'location' => 'path',
461 'type' => 'string',
462 'required' => true,
463 ],
464 'pageSize' => [
465 'location' => 'query',
466 'type' => 'integer',
467 ],
468 'pageToken' => [
469 'location' => 'query',
470 'type' => 'string',
471 ],
472 'useAdminAccess' => [
473 'location' => 'query',
474 'type' => 'boolean',
475 ],
476 ],
477 ],
478 ]
479 ]
480 );
481 $this->limits = new DriveLabels\Resource\Limits(
482 $this,
483 $this->serviceName,
484 'limits',
485 [
486 'methods' => [
487 'getLabel' => [
488 'path' => 'v2/limits/label',
489 'httpMethod' => 'GET',
490 'parameters' => [
491 'name' => [
492 'location' => 'query',
493 'type' => 'string',
494 ],
495 ],
496 ],
497 ]
498 ]
499 );
500 $this->users = new DriveLabels\Resource\Users(
501 $this,
502 $this->serviceName,
503 'users',
504 [
505 'methods' => [
506 'getCapabilities' => [
507 'path' => 'v2/{+name}',
508 'httpMethod' => 'GET',
509 'parameters' => [
510 'name' => [
511 'location' => 'path',
512 'type' => 'string',
513 'required' => true,
514 ],
515 'customer' => [
516 'location' => 'query',
517 'type' => 'string',
518 ],
519 ],
520 ],
521 ]
522 ]
523 );
524 }
525}
526
527// Adding a class alias for backwards compatibility with the previous class name.
528class_alias(DriveLabels::class, 'Google_Service_DriveLabels');
Note: See TracBrowser for help on using the repository browser.