Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
25 - 1
<?php
2
/*
3
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4
 * use this file except in compliance with the License. You may obtain a copy of
5
 * the License at
6
 *
7
 * http://www.apache.org/licenses/LICENSE-2.0
8
 *
9
 * Unless required by applicable law or agreed to in writing, software
10
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
 * License for the specific language governing permissions and limitations under
13
 * the License.
14
 */
15
 
16
 
17
  /**
18
   * The "objectAccessControls" collection of methods.
19
   * Typical usage is:
20
   *  <code>
21
   *   $storageService = new Google_StorageService(...);
22
   *   $objectAccessControls = $storageService->objectAccessControls;
23
   *  </code>
24
   */
25
  class Google_ObjectAccessControlsServiceResource extends Google_ServiceResource {
26
 
27
 
28
    /**
29
     * Creates a new ACL entry on the specified object. (objectAccessControls.insert)
30
     *
31
     * @param string $bucket Name of a bucket.
32
     * @param string $object Name of the object.
33
     * @param Google_ObjectAccessControl $postBody
34
     * @param array $optParams Optional parameters.
35
     * @return Google_ObjectAccessControl
36
     */
37
    public function insert($bucket, $object, Google_ObjectAccessControl $postBody, $optParams = array()) {
38
      $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody);
39
      $params = array_merge($params, $optParams);
40
      $data = $this->__call('insert', array($params));
41
      if ($this->useObjects()) {
42
        return new Google_ObjectAccessControl($data);
43
      } else {
44
        return $data;
45
      }
46
    }
47
    /**
48
     * Returns the ACL entry for the specified entity on the specified object.
49
     * (objectAccessControls.get)
50
     *
51
     * @param string $bucket Name of a bucket.
52
     * @param string $object Name of the object.
53
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
54
     * @param array $optParams Optional parameters.
55
     * @return Google_ObjectAccessControl
56
     */
57
    public function get($bucket, $object, $entity, $optParams = array()) {
58
      $params = array('bucket' => $bucket, 'object' => $object, 'entity' => $entity);
59
      $params = array_merge($params, $optParams);
60
      $data = $this->__call('get', array($params));
61
      if ($this->useObjects()) {
62
        return new Google_ObjectAccessControl($data);
63
      } else {
64
        return $data;
65
      }
66
    }
67
    /**
68
     * Retrieves ACL entries on the specified object. (objectAccessControls.list)
69
     *
70
     * @param string $bucket Name of a bucket.
71
     * @param string $object Name of the object.
72
     * @param array $optParams Optional parameters.
73
     * @return Google_ObjectAccessControls
74
     */
75
    public function listObjectAccessControls($bucket, $object, $optParams = array()) {
76
      $params = array('bucket' => $bucket, 'object' => $object);
77
      $params = array_merge($params, $optParams);
78
      $data = $this->__call('list', array($params));
79
      if ($this->useObjects()) {
80
        return new Google_ObjectAccessControls($data);
81
      } else {
82
        return $data;
83
      }
84
    }
85
    /**
86
     * Updates an ACL entry on the specified object. (objectAccessControls.update)
87
     *
88
     * @param string $bucket Name of a bucket.
89
     * @param string $object Name of the object.
90
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
91
     * @param Google_ObjectAccessControl $postBody
92
     * @param array $optParams Optional parameters.
93
     * @return Google_ObjectAccessControl
94
     */
95
    public function update($bucket, $object, $entity, Google_ObjectAccessControl $postBody, $optParams = array()) {
96
      $params = array('bucket' => $bucket, 'object' => $object, 'entity' => $entity, 'postBody' => $postBody);
97
      $params = array_merge($params, $optParams);
98
      $data = $this->__call('update', array($params));
99
      if ($this->useObjects()) {
100
        return new Google_ObjectAccessControl($data);
101
      } else {
102
        return $data;
103
      }
104
    }
105
    /**
106
     * Updates an ACL entry on the specified object. This method supports patch semantics.
107
     * (objectAccessControls.patch)
108
     *
109
     * @param string $bucket Name of a bucket.
110
     * @param string $object Name of the object.
111
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
112
     * @param Google_ObjectAccessControl $postBody
113
     * @param array $optParams Optional parameters.
114
     * @return Google_ObjectAccessControl
115
     */
116
    public function patch($bucket, $object, $entity, Google_ObjectAccessControl $postBody, $optParams = array()) {
117
      $params = array('bucket' => $bucket, 'object' => $object, 'entity' => $entity, 'postBody' => $postBody);
118
      $params = array_merge($params, $optParams);
119
      $data = $this->__call('patch', array($params));
120
      if ($this->useObjects()) {
121
        return new Google_ObjectAccessControl($data);
122
      } else {
123
        return $data;
124
      }
125
    }
126
    /**
127
     * Deletes the ACL entry for the specified entity on the specified object.
128
     * (objectAccessControls.delete)
129
     *
130
     * @param string $bucket Name of a bucket.
131
     * @param string $object Name of the object.
132
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
133
     * @param array $optParams Optional parameters.
134
     */
135
    public function delete($bucket, $object, $entity, $optParams = array()) {
136
      $params = array('bucket' => $bucket, 'object' => $object, 'entity' => $entity);
137
      $params = array_merge($params, $optParams);
138
      $data = $this->__call('delete', array($params));
139
      return $data;
140
    }
141
  }
142
 
143
  /**
144
   * The "bucketAccessControls" collection of methods.
145
   * Typical usage is:
146
   *  <code>
147
   *   $storageService = new Google_StorageService(...);
148
   *   $bucketAccessControls = $storageService->bucketAccessControls;
149
   *  </code>
150
   */
151
  class Google_BucketAccessControlsServiceResource extends Google_ServiceResource {
152
 
153
 
154
    /**
155
     * Creates a new ACL entry on the specified bucket. (bucketAccessControls.insert)
156
     *
157
     * @param string $bucket Name of a bucket.
158
     * @param Google_BucketAccessControl $postBody
159
     * @param array $optParams Optional parameters.
160
     * @return Google_BucketAccessControl
161
     */
162
    public function insert($bucket, Google_BucketAccessControl $postBody, $optParams = array()) {
163
      $params = array('bucket' => $bucket, 'postBody' => $postBody);
164
      $params = array_merge($params, $optParams);
165
      $data = $this->__call('insert', array($params));
166
      if ($this->useObjects()) {
167
        return new Google_BucketAccessControl($data);
168
      } else {
169
        return $data;
170
      }
171
    }
172
    /**
173
     * Returns the ACL entry for the specified entity on the specified bucket.
174
     * (bucketAccessControls.get)
175
     *
176
     * @param string $bucket Name of a bucket.
177
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
178
     * @param array $optParams Optional parameters.
179
     * @return Google_BucketAccessControl
180
     */
181
    public function get($bucket, $entity, $optParams = array()) {
182
      $params = array('bucket' => $bucket, 'entity' => $entity);
183
      $params = array_merge($params, $optParams);
184
      $data = $this->__call('get', array($params));
185
      if ($this->useObjects()) {
186
        return new Google_BucketAccessControl($data);
187
      } else {
188
        return $data;
189
      }
190
    }
191
    /**
192
     * Retrieves ACL entries on the specified bucket. (bucketAccessControls.list)
193
     *
194
     * @param string $bucket Name of a bucket.
195
     * @param array $optParams Optional parameters.
196
     * @return Google_BucketAccessControls
197
     */
198
    public function listBucketAccessControls($bucket, $optParams = array()) {
199
      $params = array('bucket' => $bucket);
200
      $params = array_merge($params, $optParams);
201
      $data = $this->__call('list', array($params));
202
      if ($this->useObjects()) {
203
        return new Google_BucketAccessControls($data);
204
      } else {
205
        return $data;
206
      }
207
    }
208
    /**
209
     * Updates an ACL entry on the specified bucket. (bucketAccessControls.update)
210
     *
211
     * @param string $bucket Name of a bucket.
212
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
213
     * @param Google_BucketAccessControl $postBody
214
     * @param array $optParams Optional parameters.
215
     * @return Google_BucketAccessControl
216
     */
217
    public function update($bucket, $entity, Google_BucketAccessControl $postBody, $optParams = array()) {
218
      $params = array('bucket' => $bucket, 'entity' => $entity, 'postBody' => $postBody);
219
      $params = array_merge($params, $optParams);
220
      $data = $this->__call('update', array($params));
221
      if ($this->useObjects()) {
222
        return new Google_BucketAccessControl($data);
223
      } else {
224
        return $data;
225
      }
226
    }
227
    /**
228
     * Updates an ACL entry on the specified bucket. This method supports patch semantics.
229
     * (bucketAccessControls.patch)
230
     *
231
     * @param string $bucket Name of a bucket.
232
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
233
     * @param Google_BucketAccessControl $postBody
234
     * @param array $optParams Optional parameters.
235
     * @return Google_BucketAccessControl
236
     */
237
    public function patch($bucket, $entity, Google_BucketAccessControl $postBody, $optParams = array()) {
238
      $params = array('bucket' => $bucket, 'entity' => $entity, 'postBody' => $postBody);
239
      $params = array_merge($params, $optParams);
240
      $data = $this->__call('patch', array($params));
241
      if ($this->useObjects()) {
242
        return new Google_BucketAccessControl($data);
243
      } else {
244
        return $data;
245
      }
246
    }
247
    /**
248
     * Deletes the ACL entry for the specified entity on the specified bucket.
249
     * (bucketAccessControls.delete)
250
     *
251
     * @param string $bucket Name of a bucket.
252
     * @param string $entity The entity holding the permission. Can be user-userId, group-groupId, allUsers, or allAuthenticatedUsers.
253
     * @param array $optParams Optional parameters.
254
     */
255
    public function delete($bucket, $entity, $optParams = array()) {
256
      $params = array('bucket' => $bucket, 'entity' => $entity);
257
      $params = array_merge($params, $optParams);
258
      $data = $this->__call('delete', array($params));
259
      return $data;
260
    }
261
  }
262
 
263
  /**
264
   * The "objects" collection of methods.
265
   * Typical usage is:
266
   *  <code>
267
   *   $storageService = new Google_StorageService(...);
268
   *   $objects = $storageService->objects;
269
   *  </code>
270
   */
271
  class Google_ObjectsServiceResource extends Google_ServiceResource {
272
 
273
 
274
    /**
275
     * Stores new data blobs and associated metadata. (objects.insert)
276
     *
277
     * @param string $bucket Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.
278
     * @param Google_StorageObject $postBody
279
     * @param array $optParams Optional parameters.
280
     *
281
     * @opt_param string name Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.
282
     * @opt_param string projection Set of properties to return. Defaults to no_acl, unless the object resource specifies the acl property, when it defaults to full.
283
     * @return Google_StorageObject
284
     */
285
    public function insert($bucket, Google_StorageObject $postBody, $optParams = array()) {
286
      $params = array('bucket' => $bucket, 'postBody' => $postBody);
287
      $params = array_merge($params, $optParams);
288
      $data = $this->__call('insert', array($params));
289
      if ($this->useObjects()) {
290
        return new Google_StorageObject($data);
291
      } else {
292
        return $data;
293
      }
294
    }
295
    /**
296
     * Retrieves objects or their associated metadata. (objects.get)
297
     *
298
     * @param string $bucket Name of the bucket in which the object resides.
299
     * @param string $object Name of the object.
300
     * @param array $optParams Optional parameters.
301
     *
302
     * @opt_param string projection Set of properties to return. Defaults to no_acl.
303
     * @return Google_StorageObject
304
     */
305
    public function get($bucket, $object, $optParams = array()) {
306
      $params = array('bucket' => $bucket, 'object' => $object);
307
      $params = array_merge($params, $optParams);
308
      $data = $this->__call('get', array($params));
309
      if ($this->useObjects()) {
310
        return new Google_StorageObject($data);
311
      } else {
312
        return $data;
313
      }
314
    }
315
    /**
316
     * Retrieves a list of objects matching the criteria. (objects.list)
317
     *
318
     * @param string $bucket Name of the bucket in which to look for objects.
319
     * @param array $optParams Optional parameters.
320
     *
321
     * @opt_param string max-results Maximum number of items plus prefixes to return. As duplicate prefixes are omitted, fewer total results may be returned than requested.
322
     * @opt_param string projection Set of properties to return. Defaults to no_acl.
323
     * @opt_param string prefix Filter results to objects whose names begin with this prefix.
324
     * @opt_param string pageToken A previously-returned page token representing part of the larger set of results to view.
325
     * @opt_param string delimiter Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.
326
     * @return Google_Objects
327
     */
328
    public function listObjects($bucket, $optParams = array()) {
329
      $params = array('bucket' => $bucket);
330
      $params = array_merge($params, $optParams);
331
      $data = $this->__call('list', array($params));
332
      if ($this->useObjects()) {
333
        return new Google_Objects($data);
334
      } else {
335
        return $data;
336
      }
337
    }
338
    /**
339
     * Updates a data blob's associated metadata. (objects.update)
340
     *
341
     * @param string $bucket Name of the bucket in which the object resides.
342
     * @param string $object Name of the object.
343
     * @param Google_StorageObject $postBody
344
     * @param array $optParams Optional parameters.
345
     *
346
     * @opt_param string projection Set of properties to return. Defaults to full.
347
     * @return Google_StorageObject
348
     */
349
    public function update($bucket, $object, Google_StorageObject $postBody, $optParams = array()) {
350
      $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody);
351
      $params = array_merge($params, $optParams);
352
      $data = $this->__call('update', array($params));
353
      if ($this->useObjects()) {
354
        return new Google_StorageObject($data);
355
      } else {
356
        return $data;
357
      }
358
    }
359
    /**
360
     * Updates a data blob's associated metadata. This method supports patch semantics. (objects.patch)
361
     *
362
     * @param string $bucket Name of the bucket in which the object resides.
363
     * @param string $object Name of the object.
364
     * @param Google_StorageObject $postBody
365
     * @param array $optParams Optional parameters.
366
     *
367
     * @opt_param string projection Set of properties to return. Defaults to full.
368
     * @return Google_StorageObject
369
     */
370
    public function patch($bucket, $object, Google_StorageObject $postBody, $optParams = array()) {
371
      $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody);
372
      $params = array_merge($params, $optParams);
373
      $data = $this->__call('patch', array($params));
374
      if ($this->useObjects()) {
375
        return new Google_StorageObject($data);
376
      } else {
377
        return $data;
378
      }
379
    }
380
    /**
381
     * Deletes data blobs and associated metadata. (objects.delete)
382
     *
383
     * @param string $bucket Name of the bucket in which the object resides.
384
     * @param string $object Name of the object.
385
     * @param array $optParams Optional parameters.
386
     */
387
    public function delete($bucket, $object, $optParams = array()) {
388
      $params = array('bucket' => $bucket, 'object' => $object);
389
      $params = array_merge($params, $optParams);
390
      $data = $this->__call('delete', array($params));
391
      return $data;
392
    }
393
  }
394
 
395
  /**
396
   * The "buckets" collection of methods.
397
   * Typical usage is:
398
   *  <code>
399
   *   $storageService = new Google_StorageService(...);
400
   *   $buckets = $storageService->buckets;
401
   *  </code>
402
   */
403
  class Google_BucketsServiceResource extends Google_ServiceResource {
404
 
405
 
406
    /**
407
     * Creates a new bucket. (buckets.insert)
408
     *
409
     * @param Google_Bucket $postBody
410
     * @param array $optParams Optional parameters.
411
     *
412
     * @opt_param string projection Set of properties to return. Defaults to no_acl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.
413
     * @return Google_Bucket
414
     */
415
    public function insert(Google_Bucket $postBody, $optParams = array()) {
416
      $params = array('postBody' => $postBody);
417
      $params = array_merge($params, $optParams);
418
      $data = $this->__call('insert', array($params));
419
      if ($this->useObjects()) {
420
        return new Google_Bucket($data);
421
      } else {
422
        return $data;
423
      }
424
    }
425
    /**
426
     * Returns metadata for the specified bucket. (buckets.get)
427
     *
428
     * @param string $bucket Name of a bucket.
429
     * @param array $optParams Optional parameters.
430
     *
431
     * @opt_param string projection Set of properties to return. Defaults to no_acl.
432
     * @return Google_Bucket
433
     */
434
    public function get($bucket, $optParams = array()) {
435
      $params = array('bucket' => $bucket);
436
      $params = array_merge($params, $optParams);
437
      $data = $this->__call('get', array($params));
438
      if ($this->useObjects()) {
439
        return new Google_Bucket($data);
440
      } else {
441
        return $data;
442
      }
443
    }
444
    /**
445
     * Retrieves a list of buckets for a given project. (buckets.list)
446
     *
447
     * @param string $projectId A valid API project identifier.
448
     * @param array $optParams Optional parameters.
449
     *
450
     * @opt_param string max-results Maximum number of buckets to return.
451
     * @opt_param string pageToken A previously-returned page token representing part of the larger set of results to view.
452
     * @opt_param string projection Set of properties to return. Defaults to no_acl.
453
     * @return Google_Buckets
454
     */
455
    public function listBuckets($projectId, $optParams = array()) {
456
      $params = array('projectId' => $projectId);
457
      $params = array_merge($params, $optParams);
458
      $data = $this->__call('list', array($params));
459
      if ($this->useObjects()) {
460
        return new Google_Buckets($data);
461
      } else {
462
        return $data;
463
      }
464
    }
465
    /**
466
     * Updates a bucket. (buckets.update)
467
     *
468
     * @param string $bucket Name of a bucket.
469
     * @param Google_Bucket $postBody
470
     * @param array $optParams Optional parameters.
471
     *
472
     * @opt_param string projection Set of properties to return. Defaults to full.
473
     * @return Google_Bucket
474
     */
475
    public function update($bucket, Google_Bucket $postBody, $optParams = array()) {
476
      $params = array('bucket' => $bucket, 'postBody' => $postBody);
477
      $params = array_merge($params, $optParams);
478
      $data = $this->__call('update', array($params));
479
      if ($this->useObjects()) {
480
        return new Google_Bucket($data);
481
      } else {
482
        return $data;
483
      }
484
    }
485
    /**
486
     * Updates a bucket. This method supports patch semantics. (buckets.patch)
487
     *
488
     * @param string $bucket Name of a bucket.
489
     * @param Google_Bucket $postBody
490
     * @param array $optParams Optional parameters.
491
     *
492
     * @opt_param string projection Set of properties to return. Defaults to full.
493
     * @return Google_Bucket
494
     */
495
    public function patch($bucket, Google_Bucket $postBody, $optParams = array()) {
496
      $params = array('bucket' => $bucket, 'postBody' => $postBody);
497
      $params = array_merge($params, $optParams);
498
      $data = $this->__call('patch', array($params));
499
      if ($this->useObjects()) {
500
        return new Google_Bucket($data);
501
      } else {
502
        return $data;
503
      }
504
    }
505
    /**
506
     * Deletes an empty bucket. (buckets.delete)
507
     *
508
     * @param string $bucket Name of a bucket.
509
     * @param array $optParams Optional parameters.
510
     */
511
    public function delete($bucket, $optParams = array()) {
512
      $params = array('bucket' => $bucket);
513
      $params = array_merge($params, $optParams);
514
      $data = $this->__call('delete', array($params));
515
      return $data;
516
    }
517
  }
518
 
519
/**
520
 * Service definition for Google_Storage (v1beta1).
521
 *
522
 * <p>
523
 * Lets you store and retrieve potentially-large, immutable data objects.
524
 * </p>
525
 *
526
 * <p>
527
 * For more information about this service, see the
528
 * <a href="https://code.google.com/apis/storage/docs/developer-guide.html" target="_blank">API Documentation</a>
529
 * </p>
530
 *
531
 * @author Google, Inc.
532
 */
533
class Google_StorageService extends Google_Service {
534
  public $objectAccessControls;
535
  public $bucketAccessControls;
536
  public $objects;
537
  public $buckets;
538
  /**
539
   * Constructs the internal representation of the Storage service.
540
   *
541
   * @param Google_Client $client
542
   */
543
  public function __construct(Google_Client $client) {
544
    $this->servicePath = 'storage/v1beta1/';
545
    $this->version = 'v1beta1';
546
    $this->serviceName = 'storage';
547
 
548
    $client->addService($this->serviceName, $this->version);
549
    $this->objectAccessControls = new Google_ObjectAccessControlsServiceResource($this, $this->serviceName, 'objectAccessControls', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "ObjectAccessControl"}, "response": {"$ref": "ObjectAccessControl"}, "httpMethod": "POST", "path": "b/{bucket}/o/{object}/acl", "id": "storage.objectAccessControls.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "id": "storage.objectAccessControls.get", "httpMethod": "GET", "path": "b/{bucket}/o/{object}/acl/{entity}", "response": {"$ref": "ObjectAccessControl"}}, "list": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}}, "id": "storage.objectAccessControls.list", "httpMethod": "GET", "path": "b/{bucket}/o/{object}/acl", "response": {"$ref": "ObjectAccessControls"}}, "update": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "ObjectAccessControl"}, "response": {"$ref": "ObjectAccessControl"}, "httpMethod": "PUT", "path": "b/{bucket}/o/{object}/acl/{entity}", "id": "storage.objectAccessControls.update"}, "patch": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "ObjectAccessControl"}, "response": {"$ref": "ObjectAccessControl"}, "httpMethod": "PATCH", "path": "b/{bucket}/o/{object}/acl/{entity}", "id": "storage.objectAccessControls.patch"}, "delete": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "path": "b/{bucket}/o/{object}/acl/{entity}", "id": "storage.objectAccessControls.delete", "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
550
    $this->bucketAccessControls = new Google_BucketAccessControlsServiceResource($this, $this->serviceName, 'bucketAccessControls', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "BucketAccessControl"}, "response": {"$ref": "BucketAccessControl"}, "httpMethod": "POST", "path": "b/{bucket}/acl", "id": "storage.bucketAccessControls.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "id": "storage.bucketAccessControls.get", "httpMethod": "GET", "path": "b/{bucket}/acl/{entity}", "response": {"$ref": "BucketAccessControl"}}, "list": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}}, "id": "storage.bucketAccessControls.list", "httpMethod": "GET", "path": "b/{bucket}/acl", "response": {"$ref": "BucketAccessControls"}}, "update": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "BucketAccessControl"}, "response": {"$ref": "BucketAccessControl"}, "httpMethod": "PUT", "path": "b/{bucket}/acl/{entity}", "id": "storage.bucketAccessControls.update"}, "patch": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "request": {"$ref": "BucketAccessControl"}, "response": {"$ref": "BucketAccessControl"}, "httpMethod": "PATCH", "path": "b/{bucket}/acl/{entity}", "id": "storage.bucketAccessControls.patch"}, "delete": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control"], "path": "b/{bucket}/acl/{entity}", "id": "storage.bucketAccessControls.delete", "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "entity": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
551
    $this->objects = new Google_ObjectsServiceResource($this, $this->serviceName, 'objects', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "name": {"type": "string", "location": "query"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "supportsMediaUpload": true, "request": {"$ref": "Object"}, "mediaUpload": {"protocols": {"simple": {"path": "/upload/storage/v1beta1/b/{bucket}/o", "multipart": true}, "resumable": {"path": "/resumable/upload/storage/v1beta1/b/{bucket}/o", "multipart": true}}, "accept": ["*/*"]}, "response": {"$ref": "Object"}, "httpMethod": "POST", "path": "b/{bucket}/o", "id": "storage.objects.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "id": "storage.objects.get", "httpMethod": "GET", "supportsMediaDownload": true, "path": "b/{bucket}/o/{object}", "response": {"$ref": "Object"}}, "list": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"max-results": {"minimum": "0", "type": "integer", "location": "query", "format": "uint32"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}, "bucket": {"required": true, "type": "string", "location": "path"}, "prefix": {"type": "string", "location": "query"}, "pageToken": {"type": "string", "location": "query"}, "delimiter": {"type": "string", "location": "query"}}, "response": {"$ref": "Objects"}, "httpMethod": "GET", "supportsSubscription": true, "path": "b/{bucket}/o", "id": "storage.objects.list"}, "update": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "request": {"$ref": "Object"}, "response": {"$ref": "Object"}, "httpMethod": "PUT", "path": "b/{bucket}/o/{object}", "id": "storage.objects.update"}, "patch": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "request": {"$ref": "Object"}, "response": {"$ref": "Object"}, "httpMethod": "PATCH", "path": "b/{bucket}/o/{object}", "id": "storage.objects.patch"}, "delete": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "path": "b/{bucket}/o/{object}", "id": "storage.objects.delete", "parameters": {"object": {"required": true, "type": "string", "location": "path"}, "bucket": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
552
    $this->buckets = new Google_BucketsServiceResource($this, $this->serviceName, 'buckets', json_decode('{"methods": {"insert": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "request": {"$ref": "Bucket"}, "response": {"$ref": "Bucket"}, "httpMethod": "POST", "path": "b", "id": "storage.buckets.insert"}, "get": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "id": "storage.buckets.get", "httpMethod": "GET", "path": "b/{bucket}", "response": {"$ref": "Bucket"}}, "list": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"max-results": {"minimum": "0", "type": "integer", "location": "query", "format": "uint32"}, "pageToken": {"type": "string", "location": "query"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}, "projectId": {"required": true, "type": "string", "location": "query", "format": "uint64"}}, "id": "storage.buckets.list", "httpMethod": "GET", "path": "b", "response": {"$ref": "Buckets"}}, "update": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "request": {"$ref": "Bucket"}, "response": {"$ref": "Bucket"}, "httpMethod": "PUT", "path": "b/{bucket}", "id": "storage.buckets.update"}, "patch": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}, "projection": {"enum": ["full", "no_acl"], "type": "string", "location": "query"}}, "request": {"$ref": "Bucket"}, "response": {"$ref": "Bucket"}, "httpMethod": "PATCH", "path": "b/{bucket}", "id": "storage.buckets.patch"}, "delete": {"scopes": ["https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_write"], "path": "b/{bucket}", "id": "storage.buckets.delete", "parameters": {"bucket": {"required": true, "type": "string", "location": "path"}}, "httpMethod": "DELETE"}}}', true));
553
 
554
  }
555
}
556
 
557
class Google_Bucket extends Google_Model {
558
  protected $__websiteType = 'Google_BucketWebsite';
559
  protected $__websiteDataType = '';
560
  public $website;
561
  public $kind;
562
  public $timeCreated;
563
  public $projectId;
564
  protected $__aclType = 'Google_BucketAccessControl';
565
  protected $__aclDataType = 'array';
566
  public $acl;
567
  protected $__defaultObjectAclType = 'Google_ObjectAccessControl';
568
  protected $__defaultObjectAclDataType = 'array';
569
  public $defaultObjectAcl;
570
  public $location;
571
  protected $__ownerType = 'Google_BucketOwner';
572
  protected $__ownerDataType = '';
573
  public $owner;
574
  public $id;
575
  public $selfLink;
576
  public function setWebsite(Google_BucketWebsite $website) {
577
    $this->website = $website;
578
  }
579
  public function getWebsite() {
580
    return $this->website;
581
  }
582
  public function setKind($kind) {
583
    $this->kind = $kind;
584
  }
585
  public function getKind() {
586
    return $this->kind;
587
  }
588
  public function setTimeCreated($timeCreated) {
589
    $this->timeCreated = $timeCreated;
590
  }
591
  public function getTimeCreated() {
592
    return $this->timeCreated;
593
  }
594
  public function setProjectId($projectId) {
595
    $this->projectId = $projectId;
596
  }
597
  public function getProjectId() {
598
    return $this->projectId;
599
  }
600
  public function setAcl(/* array(Google_BucketAccessControl) */ $acl) {
601
    $this->assertIsArray($acl, 'Google_BucketAccessControl', __METHOD__);
602
    $this->acl = $acl;
603
  }
604
  public function getAcl() {
605
    return $this->acl;
606
  }
607
  public function setDefaultObjectAcl(/* array(Google_ObjectAccessControl) */ $defaultObjectAcl) {
608
    $this->assertIsArray($defaultObjectAcl, 'Google_ObjectAccessControl', __METHOD__);
609
    $this->defaultObjectAcl = $defaultObjectAcl;
610
  }
611
  public function getDefaultObjectAcl() {
612
    return $this->defaultObjectAcl;
613
  }
614
  public function setLocation($location) {
615
    $this->location = $location;
616
  }
617
  public function getLocation() {
618
    return $this->location;
619
  }
620
  public function setOwner(Google_BucketOwner $owner) {
621
    $this->owner = $owner;
622
  }
623
  public function getOwner() {
624
    return $this->owner;
625
  }
626
  public function setId($id) {
627
    $this->id = $id;
628
  }
629
  public function getId() {
630
    return $this->id;
631
  }
632
  public function setSelfLink($selfLink) {
633
    $this->selfLink = $selfLink;
634
  }
635
  public function getSelfLink() {
636
    return $this->selfLink;
637
  }
638
}
639
 
640
class Google_BucketAccessControl extends Google_Model {
641
  public $domain;
642
  public $bucket;
643
  public $kind;
644
  public $id;
645
  public $role;
646
  public $entityId;
647
  public $entity;
648
  public $email;
649
  public $selfLink;
650
  public function setDomain($domain) {
651
    $this->domain = $domain;
652
  }
653
  public function getDomain() {
654
    return $this->domain;
655
  }
656
  public function setBucket($bucket) {
657
    $this->bucket = $bucket;
658
  }
659
  public function getBucket() {
660
    return $this->bucket;
661
  }
662
  public function setKind($kind) {
663
    $this->kind = $kind;
664
  }
665
  public function getKind() {
666
    return $this->kind;
667
  }
668
  public function setId($id) {
669
    $this->id = $id;
670
  }
671
  public function getId() {
672
    return $this->id;
673
  }
674
  public function setRole($role) {
675
    $this->role = $role;
676
  }
677
  public function getRole() {
678
    return $this->role;
679
  }
680
  public function setEntityId($entityId) {
681
    $this->entityId = $entityId;
682
  }
683
  public function getEntityId() {
684
    return $this->entityId;
685
  }
686
  public function setEntity($entity) {
687
    $this->entity = $entity;
688
  }
689
  public function getEntity() {
690
    return $this->entity;
691
  }
692
  public function setEmail($email) {
693
    $this->email = $email;
694
  }
695
  public function getEmail() {
696
    return $this->email;
697
  }
698
  public function setSelfLink($selfLink) {
699
    $this->selfLink = $selfLink;
700
  }
701
  public function getSelfLink() {
702
    return $this->selfLink;
703
  }
704
}
705
 
706
class Google_BucketAccessControls extends Google_Model {
707
  protected $__itemsType = 'Google_BucketAccessControl';
708
  protected $__itemsDataType = 'array';
709
  public $items;
710
  public $kind;
711
  public function setItems(/* array(Google_BucketAccessControl) */ $items) {
712
    $this->assertIsArray($items, 'Google_BucketAccessControl', __METHOD__);
713
    $this->items = $items;
714
  }
715
  public function getItems() {
716
    return $this->items;
717
  }
718
  public function setKind($kind) {
719
    $this->kind = $kind;
720
  }
721
  public function getKind() {
722
    return $this->kind;
723
  }
724
}
725
 
726
class Google_BucketOwner extends Google_Model {
727
  public $entityId;
728
  public $entity;
729
  public function setEntityId($entityId) {
730
    $this->entityId = $entityId;
731
  }
732
  public function getEntityId() {
733
    return $this->entityId;
734
  }
735
  public function setEntity($entity) {
736
    $this->entity = $entity;
737
  }
738
  public function getEntity() {
739
    return $this->entity;
740
  }
741
}
742
 
743
class Google_BucketWebsite extends Google_Model {
744
  public $notFoundPage;
745
  public $mainPageSuffix;
746
  public function setNotFoundPage($notFoundPage) {
747
    $this->notFoundPage = $notFoundPage;
748
  }
749
  public function getNotFoundPage() {
750
    return $this->notFoundPage;
751
  }
752
  public function setMainPageSuffix($mainPageSuffix) {
753
    $this->mainPageSuffix = $mainPageSuffix;
754
  }
755
  public function getMainPageSuffix() {
756
    return $this->mainPageSuffix;
757
  }
758
}
759
 
760
class Google_Buckets extends Google_Model {
761
  public $nextPageToken;
762
  protected $__itemsType = 'Google_Bucket';
763
  protected $__itemsDataType = 'array';
764
  public $items;
765
  public $kind;
766
  public function setNextPageToken($nextPageToken) {
767
    $this->nextPageToken = $nextPageToken;
768
  }
769
  public function getNextPageToken() {
770
    return $this->nextPageToken;
771
  }
772
  public function setItems(/* array(Google_Bucket) */ $items) {
773
    $this->assertIsArray($items, 'Google_Bucket', __METHOD__);
774
    $this->items = $items;
775
  }
776
  public function getItems() {
777
    return $this->items;
778
  }
779
  public function setKind($kind) {
780
    $this->kind = $kind;
781
  }
782
  public function getKind() {
783
    return $this->kind;
784
  }
785
}
786
 
787
class Google_ObjectAccessControl extends Google_Model {
788
  public $domain;
789
  public $object;
790
  public $bucket;
791
  public $kind;
792
  public $id;
793
  public $role;
794
  public $entityId;
795
  public $entity;
796
  public $email;
797
  public $selfLink;
798
  public function setDomain($domain) {
799
    $this->domain = $domain;
800
  }
801
  public function getDomain() {
802
    return $this->domain;
803
  }
804
  public function setObject($object) {
805
    $this->object = $object;
806
  }
807
  public function getObject() {
808
    return $this->object;
809
  }
810
  public function setBucket($bucket) {
811
    $this->bucket = $bucket;
812
  }
813
  public function getBucket() {
814
    return $this->bucket;
815
  }
816
  public function setKind($kind) {
817
    $this->kind = $kind;
818
  }
819
  public function getKind() {
820
    return $this->kind;
821
  }
822
  public function setId($id) {
823
    $this->id = $id;
824
  }
825
  public function getId() {
826
    return $this->id;
827
  }
828
  public function setRole($role) {
829
    $this->role = $role;
830
  }
831
  public function getRole() {
832
    return $this->role;
833
  }
834
  public function setEntityId($entityId) {
835
    $this->entityId = $entityId;
836
  }
837
  public function getEntityId() {
838
    return $this->entityId;
839
  }
840
  public function setEntity($entity) {
841
    $this->entity = $entity;
842
  }
843
  public function getEntity() {
844
    return $this->entity;
845
  }
846
  public function setEmail($email) {
847
    $this->email = $email;
848
  }
849
  public function getEmail() {
850
    return $this->email;
851
  }
852
  public function setSelfLink($selfLink) {
853
    $this->selfLink = $selfLink;
854
  }
855
  public function getSelfLink() {
856
    return $this->selfLink;
857
  }
858
}
859
 
860
class Google_ObjectAccessControls extends Google_Model {
861
  protected $__itemsType = 'Google_ObjectAccessControl';
862
  protected $__itemsDataType = 'array';
863
  public $items;
864
  public $kind;
865
  public function setItems(/* array(Google_ObjectAccessControl) */ $items) {
866
    $this->assertIsArray($items, 'Google_ObjectAccessControl', __METHOD__);
867
    $this->items = $items;
868
  }
869
  public function getItems() {
870
    return $this->items;
871
  }
872
  public function setKind($kind) {
873
    $this->kind = $kind;
874
  }
875
  public function getKind() {
876
    return $this->kind;
877
  }
878
}
879
 
880
class Google_Objects extends Google_Model {
881
  public $nextPageToken;
882
  protected $__itemsType = 'Google_StorageObject';
883
  protected $__itemsDataType = 'array';
884
  public $items;
885
  public $kind;
886
  public $prefixes;
887
  public function setNextPageToken($nextPageToken) {
888
    $this->nextPageToken = $nextPageToken;
889
  }
890
  public function getNextPageToken() {
891
    return $this->nextPageToken;
892
  }
893
  public function setItems(/* array(Google_StorageObject) */ $items) {
894
    $this->assertIsArray($items, 'Google_StorageObject', __METHOD__);
895
    $this->items = $items;
896
  }
897
  public function getItems() {
898
    return $this->items;
899
  }
900
  public function setKind($kind) {
901
    $this->kind = $kind;
902
  }
903
  public function getKind() {
904
    return $this->kind;
905
  }
906
  public function setPrefixes(/* array(Google_string) */ $prefixes) {
907
    $this->assertIsArray($prefixes, 'Google_string', __METHOD__);
908
    $this->prefixes = $prefixes;
909
  }
910
  public function getPrefixes() {
911
    return $this->prefixes;
912
  }
913
}
914
 
915
class Google_StorageObject extends Google_Model {
916
  public $kind;
917
  public $name;
918
  protected $__mediaType = 'Google_StorageObjectMedia';
919
  protected $__mediaDataType = '';
920
  public $media;
921
  public $bucket;
922
  public $contentEncoding;
923
  public $selfLink;
924
  protected $__ownerType = 'Google_StorageObjectOwner';
925
  protected $__ownerDataType = '';
926
  public $owner;
927
  public $cacheControl;
928
  protected $__aclType = 'Google_ObjectAccessControl';
929
  protected $__aclDataType = 'array';
930
  public $acl;
931
  public $id;
932
  public $contentDisposition;
933
  public $metadata;
934
  public function setKind($kind) {
935
    $this->kind = $kind;
936
  }
937
  public function getKind() {
938
    return $this->kind;
939
  }
940
  public function setName($name) {
941
    $this->name = $name;
942
  }
943
  public function getName() {
944
    return $this->name;
945
  }
946
  public function setMedia(Google_StorageObjectMedia $media) {
947
    $this->media = $media;
948
  }
949
  public function getMedia() {
950
    return $this->media;
951
  }
952
  public function setBucket($bucket) {
953
    $this->bucket = $bucket;
954
  }
955
  public function getBucket() {
956
    return $this->bucket;
957
  }
958
  public function setContentEncoding($contentEncoding) {
959
    $this->contentEncoding = $contentEncoding;
960
  }
961
  public function getContentEncoding() {
962
    return $this->contentEncoding;
963
  }
964
  public function setSelfLink($selfLink) {
965
    $this->selfLink = $selfLink;
966
  }
967
  public function getSelfLink() {
968
    return $this->selfLink;
969
  }
970
  public function setOwner(Google_StorageObjectOwner $owner) {
971
    $this->owner = $owner;
972
  }
973
  public function getOwner() {
974
    return $this->owner;
975
  }
976
  public function setCacheControl($cacheControl) {
977
    $this->cacheControl = $cacheControl;
978
  }
979
  public function getCacheControl() {
980
    return $this->cacheControl;
981
  }
982
  public function setAcl(/* array(Google_ObjectAccessControl) */ $acl) {
983
    $this->assertIsArray($acl, 'Google_ObjectAccessControl', __METHOD__);
984
    $this->acl = $acl;
985
  }
986
  public function getAcl() {
987
    return $this->acl;
988
  }
989
  public function setId($id) {
990
    $this->id = $id;
991
  }
992
  public function getId() {
993
    return $this->id;
994
  }
995
  public function setContentDisposition($contentDisposition) {
996
    $this->contentDisposition = $contentDisposition;
997
  }
998
  public function getContentDisposition() {
999
    return $this->contentDisposition;
1000
  }
1001
  public function setMetadata($metadata) {
1002
    $this->metadata = $metadata;
1003
  }
1004
  public function getMetadata() {
1005
    return $this->metadata;
1006
  }
1007
}
1008
 
1009
class Google_StorageObjectMedia extends Google_Model {
1010
  public $contentType;
1011
  public $timeCreated;
1012
  public $algorithm;
1013
  public $length;
1014
  public $link;
1015
  public $hash;
1016
  public $data;
1017
  public function setContentType($contentType) {
1018
    $this->contentType = $contentType;
1019
  }
1020
  public function getContentType() {
1021
    return $this->contentType;
1022
  }
1023
  public function setTimeCreated($timeCreated) {
1024
    $this->timeCreated = $timeCreated;
1025
  }
1026
  public function getTimeCreated() {
1027
    return $this->timeCreated;
1028
  }
1029
  public function setAlgorithm($algorithm) {
1030
    $this->algorithm = $algorithm;
1031
  }
1032
  public function getAlgorithm() {
1033
    return $this->algorithm;
1034
  }
1035
  public function setLength($length) {
1036
    $this->length = $length;
1037
  }
1038
  public function getLength() {
1039
    return $this->length;
1040
  }
1041
  public function setLink($link) {
1042
    $this->link = $link;
1043
  }
1044
  public function getLink() {
1045
    return $this->link;
1046
  }
1047
  public function setHash($hash) {
1048
    $this->hash = $hash;
1049
  }
1050
  public function getHash() {
1051
    return $this->hash;
1052
  }
1053
  public function setData($data) {
1054
    $this->data = $data;
1055
  }
1056
  public function getData() {
1057
    return $this->data;
1058
  }
1059
}
1060
 
1061
class Google_StorageObjectOwner extends Google_Model {
1062
  public $entityId;
1063
  public $entity;
1064
  public function setEntityId($entityId) {
1065
    $this->entityId = $entityId;
1066
  }
1067
  public function getEntityId() {
1068
    return $this->entityId;
1069
  }
1070
  public function setEntity($entity) {
1071
    $this->entity = $entity;
1072
  }
1073
  public function getEntity() {
1074
    return $this->entity;
1075
  }
1076
}