1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="storage_v1.html">Cloud Storage JSON API</a> . <a href="storage_v1.objects.html">objects</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#compose">compose(destinationBucket, destinationObject, body, ifGenerationMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None)</a></code></p>
79<p class="firstline">Concatenates a list of existing objects into a new object in the same bucket.</p>
80<p class="toc_element">
81  <code><a href="#compose_media">compose_media(destinationBucket, destinationObject, body, ifGenerationMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None)</a></code></p>
82<p class="firstline">Concatenates a list of existing objects into a new object in the same bucket.</p>
83<p class="toc_element">
84  <code><a href="#copy">copy(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationNotMatch=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</a></code></p>
85<p class="firstline">Copies a source object to a destination object. Optionally overrides metadata.</p>
86<p class="toc_element">
87  <code><a href="#copy_media">copy_media(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationNotMatch=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</a></code></p>
88<p class="firstline">Copies a source object to a destination object. Optionally overrides metadata.</p>
89<p class="toc_element">
90  <code><a href="#delete">delete(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None)</a></code></p>
91<p class="firstline">Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.</p>
92<p class="toc_element">
93  <code><a href="#get">get(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None, projection=None)</a></code></p>
94<p class="firstline">Retrieves an object or its metadata.</p>
95<p class="toc_element">
96  <code><a href="#getIamPolicy">getIamPolicy(bucket, object, generation=None, userProject=None)</a></code></p>
97<p class="firstline">Returns an IAM policy for the specified object.</p>
98<p class="toc_element">
99  <code><a href="#get_media">get_media(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None, projection=None)</a></code></p>
100<p class="firstline">Retrieves an object or its metadata.</p>
101<p class="toc_element">
102  <code><a href="#insert">insert(bucket, body=None, projection=None, media_body=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, name=None, ifMetagenerationMatch=None, userProject=None, contentEncoding=None, media_mime_type=None, ifMetagenerationNotMatch=None)</a></code></p>
103<p class="firstline">Stores a new object and metadata.</p>
104<p class="toc_element">
105  <code><a href="#insert_media">insert_media(bucket, body=None, projection=None, media_body=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, name=None, ifMetagenerationMatch=None, userProject=None, contentEncoding=None, media_mime_type=None, ifMetagenerationNotMatch=None)</a></code></p>
106<p class="firstline">Stores a new object and metadata.</p>
107<p class="toc_element">
108  <code><a href="#list">list(bucket, projection=None, versions=None, userProject=None, delimiter=None, maxResults=None, pageToken=None, prefix=None)</a></code></p>
109<p class="firstline">Retrieves a list of objects matching the criteria.</p>
110<p class="toc_element">
111  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
112<p class="firstline">Retrieves the next page of results.</p>
113<p class="toc_element">
114  <code><a href="#patch">patch(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</a></code></p>
115<p class="firstline">Updates an object's metadata. This method supports patch semantics.</p>
116<p class="toc_element">
117  <code><a href="#rewrite">rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, maxBytesRewrittenPerCall=None, ifSourceGenerationNotMatch=None, ifGenerationMatch=None, ifSourceMetagenerationNotMatch=None, rewriteToken=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</a></code></p>
118<p class="firstline">Rewrites a source object to a destination object. Optionally overrides metadata.</p>
119<p class="toc_element">
120  <code><a href="#setIamPolicy">setIamPolicy(bucket, object, body, generation=None, userProject=None)</a></code></p>
121<p class="firstline">Updates an IAM policy for the specified object.</p>
122<p class="toc_element">
123  <code><a href="#testIamPermissions">testIamPermissions(bucket, object, permissions, userProject=None, generation=None)</a></code></p>
124<p class="firstline">Tests a set of permissions on the given object to see which, if any, are held by the caller.</p>
125<p class="toc_element">
126  <code><a href="#update">update(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</a></code></p>
127<p class="firstline">Updates an object's metadata.</p>
128<p class="toc_element">
129  <code><a href="#update_media">update_media(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</a></code></p>
130<p class="firstline">Updates an object's metadata.</p>
131<p class="toc_element">
132  <code><a href="#watchAll">watchAll(bucket, body, projection=None, versions=None, userProject=None, delimiter=None, maxResults=None, pageToken=None, prefix=None)</a></code></p>
133<p class="firstline">Watch for changes on all objects in a bucket.</p>
134<h3>Method Details</h3>
135<div class="method">
136    <code class="details" id="compose">compose(destinationBucket, destinationObject, body, ifGenerationMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None)</code>
137  <pre>Concatenates a list of existing objects into a new object in the same bucket.
138
139Args:
140  destinationBucket: string, Name of the bucket in which to store the new object. (required)
141  destinationObject: string, Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
142  body: object, The request body. (required)
143    The object takes the form of:
144
145{ # A Compose request.
146    "kind": "storage#composeRequest", # The kind of item this is.
147    "destination": { # An object. # Properties of the resulting object.
148        "generation": "A String", # The content generation of this object. Used for object versioning.
149        "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
150        "mediaLink": "A String", # Media download link.
151        "owner": { # The owner of the object. This will always be the uploader of the object.
152          "entityId": "A String", # The ID for the entity.
153          "entity": "A String", # The entity, in the form user-userId.
154        },
155        "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
156        "acl": [ # Access controls on the object.
157          { # An access-control entry.
158            "domain": "A String", # The domain associated with the entity, if any.
159            "generation": "A String", # The content generation of the object, if applied to an object.
160            "object": "A String", # The name of the object, if applied to an object.
161            "bucket": "A String", # The name of the bucket.
162            "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
163            "entity": "A String", # The entity holding the permission, in one of the following forms:
164                # - user-userId
165                # - user-email
166                # - group-groupId
167                # - group-email
168                # - domain-domain
169                # - project-team-projectId
170                # - allUsers
171                # - allAuthenticatedUsers Examples:
172                # - The user liz@example.com would be user-liz@example.com.
173                # - The group example@googlegroups.com would be group-example@googlegroups.com.
174                # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
175            "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
176            "role": "A String", # The access permission for the entity.
177            "id": "A String", # The ID of the access-control entry.
178            "entityId": "A String", # The ID for the entity, if any.
179            "projectTeam": { # The project team associated with the entity, if any.
180              "projectNumber": "A String", # The project number.
181              "team": "A String", # The team.
182            },
183            "email": "A String", # The email address associated with the entity, if any.
184            "selfLink": "A String", # The link to this access-control entry.
185          },
186        ],
187        "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
188        "size": "A String", # Content-Length of the data in bytes.
189        "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
190        "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
191        "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
192        "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
193        "etag": "A String", # HTTP 1.1 Entity tag for the object.
194        "metadata": { # User-provided metadata, in key/value pairs.
195          "a_key": "A String", # An individual metadata entry.
196        },
197        "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
198        "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
199        "contentLanguage": "A String", # Content-Language of the object data.
200        "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
201          "encryptionAlgorithm": "A String", # The encryption algorithm.
202          "keySha256": "A String", # SHA256 hash value of the encryption key.
203        },
204        "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
205        "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
206        "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
207        "name": "A String", # The name of the object. Required if not specified by URL parameter.
208        "bucket": "A String", # The name of the bucket containing this object.
209        "contentEncoding": "A String", # Content-Encoding of the object data.
210        "contentDisposition": "A String", # Content-Disposition of the object data.
211        "selfLink": "A String", # The link to this object.
212        "storageClass": "A String", # Storage class of the object.
213      },
214    "sourceObjects": [ # The list of source objects that will be concatenated into a single object.
215      {
216        "generation": "A String", # The generation of this object to use as the source.
217        "name": "A String", # The source object's name. The source object's bucket is implicitly the destination bucket.
218        "objectPreconditions": { # Conditions that must be met for this operation to execute.
219          "ifGenerationMatch": "A String", # Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.
220        },
221      },
222    ],
223  }
224
225  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
226  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
227  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
228  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
229    Allowed values
230      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
231      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
232      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
233      private - Object owner gets OWNER access.
234      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
235      publicRead - Object owner gets OWNER access, and allUsers get READER access.
236
237Returns:
238  An object of the form:
239
240    { # An object.
241      "generation": "A String", # The content generation of this object. Used for object versioning.
242      "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
243      "mediaLink": "A String", # Media download link.
244      "owner": { # The owner of the object. This will always be the uploader of the object.
245        "entityId": "A String", # The ID for the entity.
246        "entity": "A String", # The entity, in the form user-userId.
247      },
248      "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
249      "acl": [ # Access controls on the object.
250        { # An access-control entry.
251          "domain": "A String", # The domain associated with the entity, if any.
252          "generation": "A String", # The content generation of the object, if applied to an object.
253          "object": "A String", # The name of the object, if applied to an object.
254          "bucket": "A String", # The name of the bucket.
255          "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
256          "entity": "A String", # The entity holding the permission, in one of the following forms:
257              # - user-userId
258              # - user-email
259              # - group-groupId
260              # - group-email
261              # - domain-domain
262              # - project-team-projectId
263              # - allUsers
264              # - allAuthenticatedUsers Examples:
265              # - The user liz@example.com would be user-liz@example.com.
266              # - The group example@googlegroups.com would be group-example@googlegroups.com.
267              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
268          "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
269          "role": "A String", # The access permission for the entity.
270          "id": "A String", # The ID of the access-control entry.
271          "entityId": "A String", # The ID for the entity, if any.
272          "projectTeam": { # The project team associated with the entity, if any.
273            "projectNumber": "A String", # The project number.
274            "team": "A String", # The team.
275          },
276          "email": "A String", # The email address associated with the entity, if any.
277          "selfLink": "A String", # The link to this access-control entry.
278        },
279      ],
280      "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
281      "size": "A String", # Content-Length of the data in bytes.
282      "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
283      "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
284      "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
285      "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
286      "etag": "A String", # HTTP 1.1 Entity tag for the object.
287      "metadata": { # User-provided metadata, in key/value pairs.
288        "a_key": "A String", # An individual metadata entry.
289      },
290      "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
291      "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
292      "contentLanguage": "A String", # Content-Language of the object data.
293      "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
294        "encryptionAlgorithm": "A String", # The encryption algorithm.
295        "keySha256": "A String", # SHA256 hash value of the encryption key.
296      },
297      "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
298      "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
299      "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
300      "name": "A String", # The name of the object. Required if not specified by URL parameter.
301      "bucket": "A String", # The name of the bucket containing this object.
302      "contentEncoding": "A String", # Content-Encoding of the object data.
303      "contentDisposition": "A String", # Content-Disposition of the object data.
304      "selfLink": "A String", # The link to this object.
305      "storageClass": "A String", # Storage class of the object.
306    }</pre>
307</div>
308
309<div class="method">
310    <code class="details" id="compose_media">compose_media(destinationBucket, destinationObject, body, ifGenerationMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None)</code>
311  <pre>Concatenates a list of existing objects into a new object in the same bucket.
312
313Args:
314  destinationBucket: string, Name of the bucket in which to store the new object. (required)
315  destinationObject: string, Name of the new object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
316  body: object, The request body. (required)
317    The object takes the form of:
318
319{ # A Compose request.
320    "kind": "storage#composeRequest", # The kind of item this is.
321    "destination": { # An object. # Properties of the resulting object.
322        "generation": "A String", # The content generation of this object. Used for object versioning.
323        "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
324        "mediaLink": "A String", # Media download link.
325        "owner": { # The owner of the object. This will always be the uploader of the object.
326          "entityId": "A String", # The ID for the entity.
327          "entity": "A String", # The entity, in the form user-userId.
328        },
329        "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
330        "acl": [ # Access controls on the object.
331          { # An access-control entry.
332            "domain": "A String", # The domain associated with the entity, if any.
333            "generation": "A String", # The content generation of the object, if applied to an object.
334            "object": "A String", # The name of the object, if applied to an object.
335            "bucket": "A String", # The name of the bucket.
336            "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
337            "entity": "A String", # The entity holding the permission, in one of the following forms:
338                # - user-userId
339                # - user-email
340                # - group-groupId
341                # - group-email
342                # - domain-domain
343                # - project-team-projectId
344                # - allUsers
345                # - allAuthenticatedUsers Examples:
346                # - The user liz@example.com would be user-liz@example.com.
347                # - The group example@googlegroups.com would be group-example@googlegroups.com.
348                # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
349            "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
350            "role": "A String", # The access permission for the entity.
351            "id": "A String", # The ID of the access-control entry.
352            "entityId": "A String", # The ID for the entity, if any.
353            "projectTeam": { # The project team associated with the entity, if any.
354              "projectNumber": "A String", # The project number.
355              "team": "A String", # The team.
356            },
357            "email": "A String", # The email address associated with the entity, if any.
358            "selfLink": "A String", # The link to this access-control entry.
359          },
360        ],
361        "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
362        "size": "A String", # Content-Length of the data in bytes.
363        "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
364        "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
365        "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
366        "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
367        "etag": "A String", # HTTP 1.1 Entity tag for the object.
368        "metadata": { # User-provided metadata, in key/value pairs.
369          "a_key": "A String", # An individual metadata entry.
370        },
371        "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
372        "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
373        "contentLanguage": "A String", # Content-Language of the object data.
374        "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
375          "encryptionAlgorithm": "A String", # The encryption algorithm.
376          "keySha256": "A String", # SHA256 hash value of the encryption key.
377        },
378        "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
379        "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
380        "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
381        "name": "A String", # The name of the object. Required if not specified by URL parameter.
382        "bucket": "A String", # The name of the bucket containing this object.
383        "contentEncoding": "A String", # Content-Encoding of the object data.
384        "contentDisposition": "A String", # Content-Disposition of the object data.
385        "selfLink": "A String", # The link to this object.
386        "storageClass": "A String", # Storage class of the object.
387      },
388    "sourceObjects": [ # The list of source objects that will be concatenated into a single object.
389      {
390        "generation": "A String", # The generation of this object to use as the source.
391        "name": "A String", # The source object's name. The source object's bucket is implicitly the destination bucket.
392        "objectPreconditions": { # Conditions that must be met for this operation to execute.
393          "ifGenerationMatch": "A String", # Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.
394        },
395      },
396    ],
397  }
398
399  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
400  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
401  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
402  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
403    Allowed values
404      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
405      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
406      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
407      private - Object owner gets OWNER access.
408      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
409      publicRead - Object owner gets OWNER access, and allUsers get READER access.
410
411Returns:
412  The media object as a string.
413
414    </pre>
415</div>
416
417<div class="method">
418    <code class="details" id="copy">copy(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationNotMatch=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</code>
419  <pre>Copies a source object to a destination object. Optionally overrides metadata.
420
421Args:
422  sourceBucket: string, Name of the bucket in which to find the source object. (required)
423  sourceObject: string, Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
424  destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
425  destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. (required)
426  body: object, The request body. (required)
427    The object takes the form of:
428
429{ # An object.
430    "generation": "A String", # The content generation of this object. Used for object versioning.
431    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
432    "mediaLink": "A String", # Media download link.
433    "owner": { # The owner of the object. This will always be the uploader of the object.
434      "entityId": "A String", # The ID for the entity.
435      "entity": "A String", # The entity, in the form user-userId.
436    },
437    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
438    "acl": [ # Access controls on the object.
439      { # An access-control entry.
440        "domain": "A String", # The domain associated with the entity, if any.
441        "generation": "A String", # The content generation of the object, if applied to an object.
442        "object": "A String", # The name of the object, if applied to an object.
443        "bucket": "A String", # The name of the bucket.
444        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
445        "entity": "A String", # The entity holding the permission, in one of the following forms:
446            # - user-userId
447            # - user-email
448            # - group-groupId
449            # - group-email
450            # - domain-domain
451            # - project-team-projectId
452            # - allUsers
453            # - allAuthenticatedUsers Examples:
454            # - The user liz@example.com would be user-liz@example.com.
455            # - The group example@googlegroups.com would be group-example@googlegroups.com.
456            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
457        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
458        "role": "A String", # The access permission for the entity.
459        "id": "A String", # The ID of the access-control entry.
460        "entityId": "A String", # The ID for the entity, if any.
461        "projectTeam": { # The project team associated with the entity, if any.
462          "projectNumber": "A String", # The project number.
463          "team": "A String", # The team.
464        },
465        "email": "A String", # The email address associated with the entity, if any.
466        "selfLink": "A String", # The link to this access-control entry.
467      },
468    ],
469    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
470    "size": "A String", # Content-Length of the data in bytes.
471    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
472    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
473    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
474    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
475    "etag": "A String", # HTTP 1.1 Entity tag for the object.
476    "metadata": { # User-provided metadata, in key/value pairs.
477      "a_key": "A String", # An individual metadata entry.
478    },
479    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
480    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
481    "contentLanguage": "A String", # Content-Language of the object data.
482    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
483      "encryptionAlgorithm": "A String", # The encryption algorithm.
484      "keySha256": "A String", # SHA256 hash value of the encryption key.
485    },
486    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
487    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
488    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
489    "name": "A String", # The name of the object. Required if not specified by URL parameter.
490    "bucket": "A String", # The name of the bucket containing this object.
491    "contentEncoding": "A String", # Content-Encoding of the object data.
492    "contentDisposition": "A String", # Content-Disposition of the object data.
493    "selfLink": "A String", # The link to this object.
494    "storageClass": "A String", # Storage class of the object.
495  }
496
497  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
498    Allowed values
499      full - Include all properties.
500      noAcl - Omit the owner, acl property.
501  sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default).
502  ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object's generation does not match the given value.
503  ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object's current metageneration does not match the given value.
504  ifGenerationMatch: string, Makes the operation conditional on whether the destination object's current generation matches the given value.
505  ifGenerationNotMatch: string, Makes the operation conditional on whether the destination object's current generation does not match the given value.
506  ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object's current metageneration matches the given value.
507  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
508  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
509    Allowed values
510      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
511      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
512      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
513      private - Object owner gets OWNER access.
514      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
515      publicRead - Object owner gets OWNER access, and allUsers get READER access.
516  ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object's generation matches the given value.
517  ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object's current metageneration matches the given value.
518  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object's current metageneration does not match the given value.
519
520Returns:
521  An object of the form:
522
523    { # An object.
524      "generation": "A String", # The content generation of this object. Used for object versioning.
525      "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
526      "mediaLink": "A String", # Media download link.
527      "owner": { # The owner of the object. This will always be the uploader of the object.
528        "entityId": "A String", # The ID for the entity.
529        "entity": "A String", # The entity, in the form user-userId.
530      },
531      "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
532      "acl": [ # Access controls on the object.
533        { # An access-control entry.
534          "domain": "A String", # The domain associated with the entity, if any.
535          "generation": "A String", # The content generation of the object, if applied to an object.
536          "object": "A String", # The name of the object, if applied to an object.
537          "bucket": "A String", # The name of the bucket.
538          "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
539          "entity": "A String", # The entity holding the permission, in one of the following forms:
540              # - user-userId
541              # - user-email
542              # - group-groupId
543              # - group-email
544              # - domain-domain
545              # - project-team-projectId
546              # - allUsers
547              # - allAuthenticatedUsers Examples:
548              # - The user liz@example.com would be user-liz@example.com.
549              # - The group example@googlegroups.com would be group-example@googlegroups.com.
550              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
551          "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
552          "role": "A String", # The access permission for the entity.
553          "id": "A String", # The ID of the access-control entry.
554          "entityId": "A String", # The ID for the entity, if any.
555          "projectTeam": { # The project team associated with the entity, if any.
556            "projectNumber": "A String", # The project number.
557            "team": "A String", # The team.
558          },
559          "email": "A String", # The email address associated with the entity, if any.
560          "selfLink": "A String", # The link to this access-control entry.
561        },
562      ],
563      "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
564      "size": "A String", # Content-Length of the data in bytes.
565      "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
566      "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
567      "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
568      "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
569      "etag": "A String", # HTTP 1.1 Entity tag for the object.
570      "metadata": { # User-provided metadata, in key/value pairs.
571        "a_key": "A String", # An individual metadata entry.
572      },
573      "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
574      "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
575      "contentLanguage": "A String", # Content-Language of the object data.
576      "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
577        "encryptionAlgorithm": "A String", # The encryption algorithm.
578        "keySha256": "A String", # SHA256 hash value of the encryption key.
579      },
580      "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
581      "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
582      "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
583      "name": "A String", # The name of the object. Required if not specified by URL parameter.
584      "bucket": "A String", # The name of the bucket containing this object.
585      "contentEncoding": "A String", # Content-Encoding of the object data.
586      "contentDisposition": "A String", # Content-Disposition of the object data.
587      "selfLink": "A String", # The link to this object.
588      "storageClass": "A String", # Storage class of the object.
589    }</pre>
590</div>
591
592<div class="method">
593    <code class="details" id="copy_media">copy_media(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationNotMatch=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</code>
594  <pre>Copies a source object to a destination object. Optionally overrides metadata.
595
596Args:
597  sourceBucket: string, Name of the bucket in which to find the source object. (required)
598  sourceObject: string, Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
599  destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
600  destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. (required)
601  body: object, The request body. (required)
602    The object takes the form of:
603
604{ # An object.
605    "generation": "A String", # The content generation of this object. Used for object versioning.
606    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
607    "mediaLink": "A String", # Media download link.
608    "owner": { # The owner of the object. This will always be the uploader of the object.
609      "entityId": "A String", # The ID for the entity.
610      "entity": "A String", # The entity, in the form user-userId.
611    },
612    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
613    "acl": [ # Access controls on the object.
614      { # An access-control entry.
615        "domain": "A String", # The domain associated with the entity, if any.
616        "generation": "A String", # The content generation of the object, if applied to an object.
617        "object": "A String", # The name of the object, if applied to an object.
618        "bucket": "A String", # The name of the bucket.
619        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
620        "entity": "A String", # The entity holding the permission, in one of the following forms:
621            # - user-userId
622            # - user-email
623            # - group-groupId
624            # - group-email
625            # - domain-domain
626            # - project-team-projectId
627            # - allUsers
628            # - allAuthenticatedUsers Examples:
629            # - The user liz@example.com would be user-liz@example.com.
630            # - The group example@googlegroups.com would be group-example@googlegroups.com.
631            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
632        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
633        "role": "A String", # The access permission for the entity.
634        "id": "A String", # The ID of the access-control entry.
635        "entityId": "A String", # The ID for the entity, if any.
636        "projectTeam": { # The project team associated with the entity, if any.
637          "projectNumber": "A String", # The project number.
638          "team": "A String", # The team.
639        },
640        "email": "A String", # The email address associated with the entity, if any.
641        "selfLink": "A String", # The link to this access-control entry.
642      },
643    ],
644    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
645    "size": "A String", # Content-Length of the data in bytes.
646    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
647    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
648    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
649    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
650    "etag": "A String", # HTTP 1.1 Entity tag for the object.
651    "metadata": { # User-provided metadata, in key/value pairs.
652      "a_key": "A String", # An individual metadata entry.
653    },
654    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
655    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
656    "contentLanguage": "A String", # Content-Language of the object data.
657    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
658      "encryptionAlgorithm": "A String", # The encryption algorithm.
659      "keySha256": "A String", # SHA256 hash value of the encryption key.
660    },
661    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
662    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
663    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
664    "name": "A String", # The name of the object. Required if not specified by URL parameter.
665    "bucket": "A String", # The name of the bucket containing this object.
666    "contentEncoding": "A String", # Content-Encoding of the object data.
667    "contentDisposition": "A String", # Content-Disposition of the object data.
668    "selfLink": "A String", # The link to this object.
669    "storageClass": "A String", # Storage class of the object.
670  }
671
672  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
673    Allowed values
674      full - Include all properties.
675      noAcl - Omit the owner, acl property.
676  sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default).
677  ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object's generation does not match the given value.
678  ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object's current metageneration does not match the given value.
679  ifGenerationMatch: string, Makes the operation conditional on whether the destination object's current generation matches the given value.
680  ifGenerationNotMatch: string, Makes the operation conditional on whether the destination object's current generation does not match the given value.
681  ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object's current metageneration matches the given value.
682  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
683  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
684    Allowed values
685      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
686      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
687      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
688      private - Object owner gets OWNER access.
689      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
690      publicRead - Object owner gets OWNER access, and allUsers get READER access.
691  ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object's generation matches the given value.
692  ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object's current metageneration matches the given value.
693  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object's current metageneration does not match the given value.
694
695Returns:
696  The media object as a string.
697
698    </pre>
699</div>
700
701<div class="method">
702    <code class="details" id="delete">delete(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None)</code>
703  <pre>Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.
704
705Args:
706  bucket: string, Name of the bucket in which the object resides. (required)
707  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
708  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value.
709  generation: string, If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).
710  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
711  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
712  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
713  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
714</pre>
715</div>
716
717<div class="method">
718    <code class="details" id="get">get(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None, projection=None)</code>
719  <pre>Retrieves an object or its metadata.
720
721Args:
722  bucket: string, Name of the bucket in which the object resides. (required)
723  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
724  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's generation does not match the given value.
725  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
726  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
727  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
728  ifGenerationMatch: string, Makes the operation conditional on whether the object's generation matches the given value.
729  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
730  projection: string, Set of properties to return. Defaults to noAcl.
731    Allowed values
732      full - Include all properties.
733      noAcl - Omit the owner, acl property.
734
735Returns:
736  An object of the form:
737
738    { # An object.
739      "generation": "A String", # The content generation of this object. Used for object versioning.
740      "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
741      "mediaLink": "A String", # Media download link.
742      "owner": { # The owner of the object. This will always be the uploader of the object.
743        "entityId": "A String", # The ID for the entity.
744        "entity": "A String", # The entity, in the form user-userId.
745      },
746      "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
747      "acl": [ # Access controls on the object.
748        { # An access-control entry.
749          "domain": "A String", # The domain associated with the entity, if any.
750          "generation": "A String", # The content generation of the object, if applied to an object.
751          "object": "A String", # The name of the object, if applied to an object.
752          "bucket": "A String", # The name of the bucket.
753          "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
754          "entity": "A String", # The entity holding the permission, in one of the following forms:
755              # - user-userId
756              # - user-email
757              # - group-groupId
758              # - group-email
759              # - domain-domain
760              # - project-team-projectId
761              # - allUsers
762              # - allAuthenticatedUsers Examples:
763              # - The user liz@example.com would be user-liz@example.com.
764              # - The group example@googlegroups.com would be group-example@googlegroups.com.
765              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
766          "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
767          "role": "A String", # The access permission for the entity.
768          "id": "A String", # The ID of the access-control entry.
769          "entityId": "A String", # The ID for the entity, if any.
770          "projectTeam": { # The project team associated with the entity, if any.
771            "projectNumber": "A String", # The project number.
772            "team": "A String", # The team.
773          },
774          "email": "A String", # The email address associated with the entity, if any.
775          "selfLink": "A String", # The link to this access-control entry.
776        },
777      ],
778      "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
779      "size": "A String", # Content-Length of the data in bytes.
780      "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
781      "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
782      "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
783      "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
784      "etag": "A String", # HTTP 1.1 Entity tag for the object.
785      "metadata": { # User-provided metadata, in key/value pairs.
786        "a_key": "A String", # An individual metadata entry.
787      },
788      "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
789      "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
790      "contentLanguage": "A String", # Content-Language of the object data.
791      "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
792        "encryptionAlgorithm": "A String", # The encryption algorithm.
793        "keySha256": "A String", # SHA256 hash value of the encryption key.
794      },
795      "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
796      "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
797      "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
798      "name": "A String", # The name of the object. Required if not specified by URL parameter.
799      "bucket": "A String", # The name of the bucket containing this object.
800      "contentEncoding": "A String", # Content-Encoding of the object data.
801      "contentDisposition": "A String", # Content-Disposition of the object data.
802      "selfLink": "A String", # The link to this object.
803      "storageClass": "A String", # Storage class of the object.
804    }</pre>
805</div>
806
807<div class="method">
808    <code class="details" id="getIamPolicy">getIamPolicy(bucket, object, generation=None, userProject=None)</code>
809  <pre>Returns an IAM policy for the specified object.
810
811Args:
812  bucket: string, Name of the bucket in which the object resides. (required)
813  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
814  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
815  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
816
817Returns:
818  An object of the form:
819
820    { # A bucket/object IAM policy.
821    "resourceId": "A String", # The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
822    "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role.
823      {
824        "role": "A String", # The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.
825            # The new IAM roles are:
826            # - roles/storage.admin — Full control of Google Cloud Storage resources.
827            # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
828            # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
829            # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects.   The legacy IAM roles are:
830            # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
831            # - roles/storage.legacyObjectOwnerRead/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
832            # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
833            # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
834            # - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.
835        "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
836            # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
837            # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
838            # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com.
839            # - serviceAccount:emailid — An email address that represents a service account. For example,  serviceAccount:my-other-app@appspot.gserviceaccount.com .
840            # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com.
841            # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
842            # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
843            # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
844            # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
845          "A String",
846        ],
847      },
848    ],
849    "etag": "A String", # HTTP 1.1  Entity tag for the policy.
850    "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.
851  }</pre>
852</div>
853
854<div class="method">
855    <code class="details" id="get_media">get_media(bucket, object, ifGenerationNotMatch=None, generation=None, ifMetagenerationMatch=None, userProject=None, ifGenerationMatch=None, ifMetagenerationNotMatch=None, projection=None)</code>
856  <pre>Retrieves an object or its metadata.
857
858Args:
859  bucket: string, Name of the bucket in which the object resides. (required)
860  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
861  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's generation does not match the given value.
862  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
863  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
864  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
865  ifGenerationMatch: string, Makes the operation conditional on whether the object's generation matches the given value.
866  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
867  projection: string, Set of properties to return. Defaults to noAcl.
868    Allowed values
869      full - Include all properties.
870      noAcl - Omit the owner, acl property.
871
872Returns:
873  The media object as a string.
874
875    </pre>
876</div>
877
878<div class="method">
879    <code class="details" id="insert">insert(bucket, body=None, projection=None, media_body=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, name=None, ifMetagenerationMatch=None, userProject=None, contentEncoding=None, media_mime_type=None, ifMetagenerationNotMatch=None)</code>
880  <pre>Stores a new object and metadata.
881
882Args:
883  bucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. (required)
884  body: object, The request body.
885    The object takes the form of:
886
887{ # An object.
888    "generation": "A String", # The content generation of this object. Used for object versioning.
889    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
890    "mediaLink": "A String", # Media download link.
891    "owner": { # The owner of the object. This will always be the uploader of the object.
892      "entityId": "A String", # The ID for the entity.
893      "entity": "A String", # The entity, in the form user-userId.
894    },
895    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
896    "acl": [ # Access controls on the object.
897      { # An access-control entry.
898        "domain": "A String", # The domain associated with the entity, if any.
899        "generation": "A String", # The content generation of the object, if applied to an object.
900        "object": "A String", # The name of the object, if applied to an object.
901        "bucket": "A String", # The name of the bucket.
902        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
903        "entity": "A String", # The entity holding the permission, in one of the following forms:
904            # - user-userId
905            # - user-email
906            # - group-groupId
907            # - group-email
908            # - domain-domain
909            # - project-team-projectId
910            # - allUsers
911            # - allAuthenticatedUsers Examples:
912            # - The user liz@example.com would be user-liz@example.com.
913            # - The group example@googlegroups.com would be group-example@googlegroups.com.
914            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
915        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
916        "role": "A String", # The access permission for the entity.
917        "id": "A String", # The ID of the access-control entry.
918        "entityId": "A String", # The ID for the entity, if any.
919        "projectTeam": { # The project team associated with the entity, if any.
920          "projectNumber": "A String", # The project number.
921          "team": "A String", # The team.
922        },
923        "email": "A String", # The email address associated with the entity, if any.
924        "selfLink": "A String", # The link to this access-control entry.
925      },
926    ],
927    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
928    "size": "A String", # Content-Length of the data in bytes.
929    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
930    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
931    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
932    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
933    "etag": "A String", # HTTP 1.1 Entity tag for the object.
934    "metadata": { # User-provided metadata, in key/value pairs.
935      "a_key": "A String", # An individual metadata entry.
936    },
937    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
938    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
939    "contentLanguage": "A String", # Content-Language of the object data.
940    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
941      "encryptionAlgorithm": "A String", # The encryption algorithm.
942      "keySha256": "A String", # SHA256 hash value of the encryption key.
943    },
944    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
945    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
946    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
947    "name": "A String", # The name of the object. Required if not specified by URL parameter.
948    "bucket": "A String", # The name of the bucket containing this object.
949    "contentEncoding": "A String", # Content-Encoding of the object data.
950    "contentDisposition": "A String", # Content-Disposition of the object data.
951    "selfLink": "A String", # The link to this object.
952    "storageClass": "A String", # Storage class of the object.
953  }
954
955  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
956    Allowed values
957      full - Include all properties.
958      noAcl - Omit the owner, acl property.
959  media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
960  predefinedAcl: string, Apply a predefined set of access controls to this object.
961    Allowed values
962      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
963      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
964      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
965      private - Object owner gets OWNER access.
966      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
967      publicRead - Object owner gets OWNER access, and allUsers get READER access.
968  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
969  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value.
970  name: string, Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
971  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
972  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
973  contentEncoding: string, If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.
974  media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
975  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
976
977Returns:
978  An object of the form:
979
980    { # An object.
981      "generation": "A String", # The content generation of this object. Used for object versioning.
982      "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
983      "mediaLink": "A String", # Media download link.
984      "owner": { # The owner of the object. This will always be the uploader of the object.
985        "entityId": "A String", # The ID for the entity.
986        "entity": "A String", # The entity, in the form user-userId.
987      },
988      "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
989      "acl": [ # Access controls on the object.
990        { # An access-control entry.
991          "domain": "A String", # The domain associated with the entity, if any.
992          "generation": "A String", # The content generation of the object, if applied to an object.
993          "object": "A String", # The name of the object, if applied to an object.
994          "bucket": "A String", # The name of the bucket.
995          "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
996          "entity": "A String", # The entity holding the permission, in one of the following forms:
997              # - user-userId
998              # - user-email
999              # - group-groupId
1000              # - group-email
1001              # - domain-domain
1002              # - project-team-projectId
1003              # - allUsers
1004              # - allAuthenticatedUsers Examples:
1005              # - The user liz@example.com would be user-liz@example.com.
1006              # - The group example@googlegroups.com would be group-example@googlegroups.com.
1007              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1008          "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1009          "role": "A String", # The access permission for the entity.
1010          "id": "A String", # The ID of the access-control entry.
1011          "entityId": "A String", # The ID for the entity, if any.
1012          "projectTeam": { # The project team associated with the entity, if any.
1013            "projectNumber": "A String", # The project number.
1014            "team": "A String", # The team.
1015          },
1016          "email": "A String", # The email address associated with the entity, if any.
1017          "selfLink": "A String", # The link to this access-control entry.
1018        },
1019      ],
1020      "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1021      "size": "A String", # Content-Length of the data in bytes.
1022      "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1023      "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1024      "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1025      "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1026      "etag": "A String", # HTTP 1.1 Entity tag for the object.
1027      "metadata": { # User-provided metadata, in key/value pairs.
1028        "a_key": "A String", # An individual metadata entry.
1029      },
1030      "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1031      "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1032      "contentLanguage": "A String", # Content-Language of the object data.
1033      "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1034        "encryptionAlgorithm": "A String", # The encryption algorithm.
1035        "keySha256": "A String", # SHA256 hash value of the encryption key.
1036      },
1037      "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1038      "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1039      "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1040      "name": "A String", # The name of the object. Required if not specified by URL parameter.
1041      "bucket": "A String", # The name of the bucket containing this object.
1042      "contentEncoding": "A String", # Content-Encoding of the object data.
1043      "contentDisposition": "A String", # Content-Disposition of the object data.
1044      "selfLink": "A String", # The link to this object.
1045      "storageClass": "A String", # Storage class of the object.
1046    }</pre>
1047</div>
1048
1049<div class="method">
1050    <code class="details" id="insert_media">insert_media(bucket, body=None, projection=None, media_body=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, name=None, ifMetagenerationMatch=None, userProject=None, contentEncoding=None, media_mime_type=None, ifMetagenerationNotMatch=None)</code>
1051  <pre>Stores a new object and metadata.
1052
1053Args:
1054  bucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. (required)
1055  body: object, The request body.
1056    The object takes the form of:
1057
1058{ # An object.
1059    "generation": "A String", # The content generation of this object. Used for object versioning.
1060    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1061    "mediaLink": "A String", # Media download link.
1062    "owner": { # The owner of the object. This will always be the uploader of the object.
1063      "entityId": "A String", # The ID for the entity.
1064      "entity": "A String", # The entity, in the form user-userId.
1065    },
1066    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1067    "acl": [ # Access controls on the object.
1068      { # An access-control entry.
1069        "domain": "A String", # The domain associated with the entity, if any.
1070        "generation": "A String", # The content generation of the object, if applied to an object.
1071        "object": "A String", # The name of the object, if applied to an object.
1072        "bucket": "A String", # The name of the bucket.
1073        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1074        "entity": "A String", # The entity holding the permission, in one of the following forms:
1075            # - user-userId
1076            # - user-email
1077            # - group-groupId
1078            # - group-email
1079            # - domain-domain
1080            # - project-team-projectId
1081            # - allUsers
1082            # - allAuthenticatedUsers Examples:
1083            # - The user liz@example.com would be user-liz@example.com.
1084            # - The group example@googlegroups.com would be group-example@googlegroups.com.
1085            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1086        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1087        "role": "A String", # The access permission for the entity.
1088        "id": "A String", # The ID of the access-control entry.
1089        "entityId": "A String", # The ID for the entity, if any.
1090        "projectTeam": { # The project team associated with the entity, if any.
1091          "projectNumber": "A String", # The project number.
1092          "team": "A String", # The team.
1093        },
1094        "email": "A String", # The email address associated with the entity, if any.
1095        "selfLink": "A String", # The link to this access-control entry.
1096      },
1097    ],
1098    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1099    "size": "A String", # Content-Length of the data in bytes.
1100    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1101    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1102    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1103    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1104    "etag": "A String", # HTTP 1.1 Entity tag for the object.
1105    "metadata": { # User-provided metadata, in key/value pairs.
1106      "a_key": "A String", # An individual metadata entry.
1107    },
1108    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1109    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1110    "contentLanguage": "A String", # Content-Language of the object data.
1111    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1112      "encryptionAlgorithm": "A String", # The encryption algorithm.
1113      "keySha256": "A String", # SHA256 hash value of the encryption key.
1114    },
1115    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1116    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1117    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1118    "name": "A String", # The name of the object. Required if not specified by URL parameter.
1119    "bucket": "A String", # The name of the bucket containing this object.
1120    "contentEncoding": "A String", # Content-Encoding of the object data.
1121    "contentDisposition": "A String", # Content-Disposition of the object data.
1122    "selfLink": "A String", # The link to this object.
1123    "storageClass": "A String", # Storage class of the object.
1124  }
1125
1126  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
1127    Allowed values
1128      full - Include all properties.
1129      noAcl - Omit the owner, acl property.
1130  media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
1131  predefinedAcl: string, Apply a predefined set of access controls to this object.
1132    Allowed values
1133      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1134      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1135      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1136      private - Object owner gets OWNER access.
1137      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1138      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1139  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
1140  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value.
1141  name: string, Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
1142  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
1143  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1144  contentEncoding: string, If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.
1145  media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
1146  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
1147
1148Returns:
1149  The media object as a string.
1150
1151    </pre>
1152</div>
1153
1154<div class="method">
1155    <code class="details" id="list">list(bucket, projection=None, versions=None, userProject=None, delimiter=None, maxResults=None, pageToken=None, prefix=None)</code>
1156  <pre>Retrieves a list of objects matching the criteria.
1157
1158Args:
1159  bucket: string, Name of the bucket in which to look for objects. (required)
1160  projection: string, Set of properties to return. Defaults to noAcl.
1161    Allowed values
1162      full - Include all properties.
1163      noAcl - Omit the owner, acl property.
1164  versions: boolean, If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.
1165  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1166  delimiter: string, 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.
1167  maxResults: integer, Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.
1168  pageToken: string, A previously-returned page token representing part of the larger set of results to view.
1169  prefix: string, Filter results to objects whose names begin with this prefix.
1170
1171Returns:
1172  An object of the form:
1173
1174    { # A list of objects.
1175    "nextPageToken": "A String", # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
1176    "items": [ # The list of items.
1177      { # An object.
1178          "generation": "A String", # The content generation of this object. Used for object versioning.
1179          "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1180          "mediaLink": "A String", # Media download link.
1181          "owner": { # The owner of the object. This will always be the uploader of the object.
1182            "entityId": "A String", # The ID for the entity.
1183            "entity": "A String", # The entity, in the form user-userId.
1184          },
1185          "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1186          "acl": [ # Access controls on the object.
1187            { # An access-control entry.
1188              "domain": "A String", # The domain associated with the entity, if any.
1189              "generation": "A String", # The content generation of the object, if applied to an object.
1190              "object": "A String", # The name of the object, if applied to an object.
1191              "bucket": "A String", # The name of the bucket.
1192              "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1193              "entity": "A String", # The entity holding the permission, in one of the following forms:
1194                  # - user-userId
1195                  # - user-email
1196                  # - group-groupId
1197                  # - group-email
1198                  # - domain-domain
1199                  # - project-team-projectId
1200                  # - allUsers
1201                  # - allAuthenticatedUsers Examples:
1202                  # - The user liz@example.com would be user-liz@example.com.
1203                  # - The group example@googlegroups.com would be group-example@googlegroups.com.
1204                  # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1205              "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1206              "role": "A String", # The access permission for the entity.
1207              "id": "A String", # The ID of the access-control entry.
1208              "entityId": "A String", # The ID for the entity, if any.
1209              "projectTeam": { # The project team associated with the entity, if any.
1210                "projectNumber": "A String", # The project number.
1211                "team": "A String", # The team.
1212              },
1213              "email": "A String", # The email address associated with the entity, if any.
1214              "selfLink": "A String", # The link to this access-control entry.
1215            },
1216          ],
1217          "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1218          "size": "A String", # Content-Length of the data in bytes.
1219          "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1220          "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1221          "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1222          "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1223          "etag": "A String", # HTTP 1.1 Entity tag for the object.
1224          "metadata": { # User-provided metadata, in key/value pairs.
1225            "a_key": "A String", # An individual metadata entry.
1226          },
1227          "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1228          "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1229          "contentLanguage": "A String", # Content-Language of the object data.
1230          "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1231            "encryptionAlgorithm": "A String", # The encryption algorithm.
1232            "keySha256": "A String", # SHA256 hash value of the encryption key.
1233          },
1234          "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1235          "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1236          "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1237          "name": "A String", # The name of the object. Required if not specified by URL parameter.
1238          "bucket": "A String", # The name of the bucket containing this object.
1239          "contentEncoding": "A String", # Content-Encoding of the object data.
1240          "contentDisposition": "A String", # Content-Disposition of the object data.
1241          "selfLink": "A String", # The link to this object.
1242          "storageClass": "A String", # Storage class of the object.
1243        },
1244    ],
1245    "kind": "storage#objects", # The kind of item this is. For lists of objects, this is always storage#objects.
1246    "prefixes": [ # The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.
1247      "A String",
1248    ],
1249  }</pre>
1250</div>
1251
1252<div class="method">
1253    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1254  <pre>Retrieves the next page of results.
1255
1256Args:
1257  previous_request: The request for the previous page. (required)
1258  previous_response: The response from the request for the previous page. (required)
1259
1260Returns:
1261  A request object that you can call 'execute()' on to request the next
1262  page. Returns None if there are no more items in the collection.
1263    </pre>
1264</div>
1265
1266<div class="method">
1267    <code class="details" id="patch">patch(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</code>
1268  <pre>Updates an object's metadata. This method supports patch semantics.
1269
1270Args:
1271  bucket: string, Name of the bucket in which the object resides. (required)
1272  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1273  body: object, The request body. (required)
1274    The object takes the form of:
1275
1276{ # An object.
1277    "generation": "A String", # The content generation of this object. Used for object versioning.
1278    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1279    "mediaLink": "A String", # Media download link.
1280    "owner": { # The owner of the object. This will always be the uploader of the object.
1281      "entityId": "A String", # The ID for the entity.
1282      "entity": "A String", # The entity, in the form user-userId.
1283    },
1284    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1285    "acl": [ # Access controls on the object.
1286      { # An access-control entry.
1287        "domain": "A String", # The domain associated with the entity, if any.
1288        "generation": "A String", # The content generation of the object, if applied to an object.
1289        "object": "A String", # The name of the object, if applied to an object.
1290        "bucket": "A String", # The name of the bucket.
1291        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1292        "entity": "A String", # The entity holding the permission, in one of the following forms:
1293            # - user-userId
1294            # - user-email
1295            # - group-groupId
1296            # - group-email
1297            # - domain-domain
1298            # - project-team-projectId
1299            # - allUsers
1300            # - allAuthenticatedUsers Examples:
1301            # - The user liz@example.com would be user-liz@example.com.
1302            # - The group example@googlegroups.com would be group-example@googlegroups.com.
1303            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1304        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1305        "role": "A String", # The access permission for the entity.
1306        "id": "A String", # The ID of the access-control entry.
1307        "entityId": "A String", # The ID for the entity, if any.
1308        "projectTeam": { # The project team associated with the entity, if any.
1309          "projectNumber": "A String", # The project number.
1310          "team": "A String", # The team.
1311        },
1312        "email": "A String", # The email address associated with the entity, if any.
1313        "selfLink": "A String", # The link to this access-control entry.
1314      },
1315    ],
1316    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1317    "size": "A String", # Content-Length of the data in bytes.
1318    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1319    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1320    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1321    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1322    "etag": "A String", # HTTP 1.1 Entity tag for the object.
1323    "metadata": { # User-provided metadata, in key/value pairs.
1324      "a_key": "A String", # An individual metadata entry.
1325    },
1326    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1327    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1328    "contentLanguage": "A String", # Content-Language of the object data.
1329    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1330      "encryptionAlgorithm": "A String", # The encryption algorithm.
1331      "keySha256": "A String", # SHA256 hash value of the encryption key.
1332    },
1333    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1334    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1335    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1336    "name": "A String", # The name of the object. Required if not specified by URL parameter.
1337    "bucket": "A String", # The name of the bucket containing this object.
1338    "contentEncoding": "A String", # Content-Encoding of the object data.
1339    "contentDisposition": "A String", # Content-Disposition of the object data.
1340    "selfLink": "A String", # The link to this object.
1341    "storageClass": "A String", # Storage class of the object.
1342  }
1343
1344  projection: string, Set of properties to return. Defaults to full.
1345    Allowed values
1346      full - Include all properties.
1347      noAcl - Omit the owner, acl property.
1348  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1349  predefinedAcl: string, Apply a predefined set of access controls to this object.
1350    Allowed values
1351      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1352      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1353      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1354      private - Object owner gets OWNER access.
1355      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1356      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1357  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
1358  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value.
1359  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
1360  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1361  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
1362
1363Returns:
1364  An object of the form:
1365
1366    { # An object.
1367      "generation": "A String", # The content generation of this object. Used for object versioning.
1368      "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1369      "mediaLink": "A String", # Media download link.
1370      "owner": { # The owner of the object. This will always be the uploader of the object.
1371        "entityId": "A String", # The ID for the entity.
1372        "entity": "A String", # The entity, in the form user-userId.
1373      },
1374      "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1375      "acl": [ # Access controls on the object.
1376        { # An access-control entry.
1377          "domain": "A String", # The domain associated with the entity, if any.
1378          "generation": "A String", # The content generation of the object, if applied to an object.
1379          "object": "A String", # The name of the object, if applied to an object.
1380          "bucket": "A String", # The name of the bucket.
1381          "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1382          "entity": "A String", # The entity holding the permission, in one of the following forms:
1383              # - user-userId
1384              # - user-email
1385              # - group-groupId
1386              # - group-email
1387              # - domain-domain
1388              # - project-team-projectId
1389              # - allUsers
1390              # - allAuthenticatedUsers Examples:
1391              # - The user liz@example.com would be user-liz@example.com.
1392              # - The group example@googlegroups.com would be group-example@googlegroups.com.
1393              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1394          "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1395          "role": "A String", # The access permission for the entity.
1396          "id": "A String", # The ID of the access-control entry.
1397          "entityId": "A String", # The ID for the entity, if any.
1398          "projectTeam": { # The project team associated with the entity, if any.
1399            "projectNumber": "A String", # The project number.
1400            "team": "A String", # The team.
1401          },
1402          "email": "A String", # The email address associated with the entity, if any.
1403          "selfLink": "A String", # The link to this access-control entry.
1404        },
1405      ],
1406      "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1407      "size": "A String", # Content-Length of the data in bytes.
1408      "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1409      "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1410      "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1411      "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1412      "etag": "A String", # HTTP 1.1 Entity tag for the object.
1413      "metadata": { # User-provided metadata, in key/value pairs.
1414        "a_key": "A String", # An individual metadata entry.
1415      },
1416      "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1417      "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1418      "contentLanguage": "A String", # Content-Language of the object data.
1419      "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1420        "encryptionAlgorithm": "A String", # The encryption algorithm.
1421        "keySha256": "A String", # SHA256 hash value of the encryption key.
1422      },
1423      "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1424      "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1425      "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1426      "name": "A String", # The name of the object. Required if not specified by URL parameter.
1427      "bucket": "A String", # The name of the bucket containing this object.
1428      "contentEncoding": "A String", # Content-Encoding of the object data.
1429      "contentDisposition": "A String", # Content-Disposition of the object data.
1430      "selfLink": "A String", # The link to this object.
1431      "storageClass": "A String", # Storage class of the object.
1432    }</pre>
1433</div>
1434
1435<div class="method">
1436    <code class="details" id="rewrite">rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, body, projection=None, sourceGeneration=None, maxBytesRewrittenPerCall=None, ifSourceGenerationNotMatch=None, ifGenerationMatch=None, ifSourceMetagenerationNotMatch=None, rewriteToken=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, destinationPredefinedAcl=None, ifSourceGenerationMatch=None, ifSourceMetagenerationMatch=None, ifMetagenerationNotMatch=None)</code>
1437  <pre>Rewrites a source object to a destination object. Optionally overrides metadata.
1438
1439Args:
1440  sourceBucket: string, Name of the bucket in which to find the source object. (required)
1441  sourceObject: string, Name of the source object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1442  destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any. (required)
1443  destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1444  body: object, The request body. (required)
1445    The object takes the form of:
1446
1447{ # An object.
1448    "generation": "A String", # The content generation of this object. Used for object versioning.
1449    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1450    "mediaLink": "A String", # Media download link.
1451    "owner": { # The owner of the object. This will always be the uploader of the object.
1452      "entityId": "A String", # The ID for the entity.
1453      "entity": "A String", # The entity, in the form user-userId.
1454    },
1455    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1456    "acl": [ # Access controls on the object.
1457      { # An access-control entry.
1458        "domain": "A String", # The domain associated with the entity, if any.
1459        "generation": "A String", # The content generation of the object, if applied to an object.
1460        "object": "A String", # The name of the object, if applied to an object.
1461        "bucket": "A String", # The name of the bucket.
1462        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1463        "entity": "A String", # The entity holding the permission, in one of the following forms:
1464            # - user-userId
1465            # - user-email
1466            # - group-groupId
1467            # - group-email
1468            # - domain-domain
1469            # - project-team-projectId
1470            # - allUsers
1471            # - allAuthenticatedUsers Examples:
1472            # - The user liz@example.com would be user-liz@example.com.
1473            # - The group example@googlegroups.com would be group-example@googlegroups.com.
1474            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1475        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1476        "role": "A String", # The access permission for the entity.
1477        "id": "A String", # The ID of the access-control entry.
1478        "entityId": "A String", # The ID for the entity, if any.
1479        "projectTeam": { # The project team associated with the entity, if any.
1480          "projectNumber": "A String", # The project number.
1481          "team": "A String", # The team.
1482        },
1483        "email": "A String", # The email address associated with the entity, if any.
1484        "selfLink": "A String", # The link to this access-control entry.
1485      },
1486    ],
1487    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1488    "size": "A String", # Content-Length of the data in bytes.
1489    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1490    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1491    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1492    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1493    "etag": "A String", # HTTP 1.1 Entity tag for the object.
1494    "metadata": { # User-provided metadata, in key/value pairs.
1495      "a_key": "A String", # An individual metadata entry.
1496    },
1497    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1498    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1499    "contentLanguage": "A String", # Content-Language of the object data.
1500    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1501      "encryptionAlgorithm": "A String", # The encryption algorithm.
1502      "keySha256": "A String", # SHA256 hash value of the encryption key.
1503    },
1504    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1505    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1506    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1507    "name": "A String", # The name of the object. Required if not specified by URL parameter.
1508    "bucket": "A String", # The name of the bucket containing this object.
1509    "contentEncoding": "A String", # Content-Encoding of the object data.
1510    "contentDisposition": "A String", # Content-Disposition of the object data.
1511    "selfLink": "A String", # The link to this object.
1512    "storageClass": "A String", # Storage class of the object.
1513  }
1514
1515  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
1516    Allowed values
1517      full - Include all properties.
1518      noAcl - Omit the owner, acl property.
1519  sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default).
1520  maxBytesRewrittenPerCall: string, The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.
1521  ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object's generation does not match the given value.
1522  ifGenerationMatch: string, Makes the operation conditional on whether the destination object's current generation matches the given value.
1523  ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object's current metageneration does not match the given value.
1524  rewriteToken: string, Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.
1525  ifGenerationNotMatch: string, Makes the operation conditional on whether the destination object's current generation does not match the given value.
1526  ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object's current metageneration matches the given value.
1527  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1528  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
1529    Allowed values
1530      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1531      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1532      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1533      private - Object owner gets OWNER access.
1534      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1535      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1536  ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object's generation matches the given value.
1537  ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object's current metageneration matches the given value.
1538  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object's current metageneration does not match the given value.
1539
1540Returns:
1541  An object of the form:
1542
1543    { # A rewrite response.
1544    "objectSize": "A String", # The total size of the object being copied in bytes. This property is always present in the response.
1545    "kind": "storage#rewriteResponse", # The kind of item this is.
1546    "resource": { # An object. # A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.
1547        "generation": "A String", # The content generation of this object. Used for object versioning.
1548        "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1549        "mediaLink": "A String", # Media download link.
1550        "owner": { # The owner of the object. This will always be the uploader of the object.
1551          "entityId": "A String", # The ID for the entity.
1552          "entity": "A String", # The entity, in the form user-userId.
1553        },
1554        "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1555        "acl": [ # Access controls on the object.
1556          { # An access-control entry.
1557            "domain": "A String", # The domain associated with the entity, if any.
1558            "generation": "A String", # The content generation of the object, if applied to an object.
1559            "object": "A String", # The name of the object, if applied to an object.
1560            "bucket": "A String", # The name of the bucket.
1561            "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1562            "entity": "A String", # The entity holding the permission, in one of the following forms:
1563                # - user-userId
1564                # - user-email
1565                # - group-groupId
1566                # - group-email
1567                # - domain-domain
1568                # - project-team-projectId
1569                # - allUsers
1570                # - allAuthenticatedUsers Examples:
1571                # - The user liz@example.com would be user-liz@example.com.
1572                # - The group example@googlegroups.com would be group-example@googlegroups.com.
1573                # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1574            "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1575            "role": "A String", # The access permission for the entity.
1576            "id": "A String", # The ID of the access-control entry.
1577            "entityId": "A String", # The ID for the entity, if any.
1578            "projectTeam": { # The project team associated with the entity, if any.
1579              "projectNumber": "A String", # The project number.
1580              "team": "A String", # The team.
1581            },
1582            "email": "A String", # The email address associated with the entity, if any.
1583            "selfLink": "A String", # The link to this access-control entry.
1584          },
1585        ],
1586        "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1587        "size": "A String", # Content-Length of the data in bytes.
1588        "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1589        "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1590        "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1591        "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1592        "etag": "A String", # HTTP 1.1 Entity tag for the object.
1593        "metadata": { # User-provided metadata, in key/value pairs.
1594          "a_key": "A String", # An individual metadata entry.
1595        },
1596        "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1597        "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1598        "contentLanguage": "A String", # Content-Language of the object data.
1599        "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1600          "encryptionAlgorithm": "A String", # The encryption algorithm.
1601          "keySha256": "A String", # SHA256 hash value of the encryption key.
1602        },
1603        "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1604        "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1605        "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1606        "name": "A String", # The name of the object. Required if not specified by URL parameter.
1607        "bucket": "A String", # The name of the bucket containing this object.
1608        "contentEncoding": "A String", # Content-Encoding of the object data.
1609        "contentDisposition": "A String", # Content-Disposition of the object data.
1610        "selfLink": "A String", # The link to this object.
1611        "storageClass": "A String", # Storage class of the object.
1612      },
1613    "done": True or False, # true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response.
1614    "totalBytesRewritten": "A String", # The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.
1615    "rewriteToken": "A String", # A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.
1616  }</pre>
1617</div>
1618
1619<div class="method">
1620    <code class="details" id="setIamPolicy">setIamPolicy(bucket, object, body, generation=None, userProject=None)</code>
1621  <pre>Updates an IAM policy for the specified object.
1622
1623Args:
1624  bucket: string, Name of the bucket in which the object resides. (required)
1625  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1626  body: object, The request body. (required)
1627    The object takes the form of:
1628
1629{ # A bucket/object IAM policy.
1630  "resourceId": "A String", # The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
1631  "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role.
1632    {
1633      "role": "A String", # The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.
1634          # The new IAM roles are:
1635          # - roles/storage.admin — Full control of Google Cloud Storage resources.
1636          # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
1637          # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
1638          # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects.   The legacy IAM roles are:
1639          # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
1640          # - roles/storage.legacyObjectOwnerRead/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
1641          # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
1642          # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
1643          # - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.
1644      "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
1645          # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
1646          # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
1647          # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com.
1648          # - serviceAccount:emailid — An email address that represents a service account. For example,  serviceAccount:my-other-app@appspot.gserviceaccount.com .
1649          # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com.
1650          # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
1651          # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
1652          # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
1653          # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
1654        "A String",
1655      ],
1656    },
1657  ],
1658  "etag": "A String", # HTTP 1.1  Entity tag for the policy.
1659  "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.
1660}
1661
1662  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1663  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1664
1665Returns:
1666  An object of the form:
1667
1668    { # A bucket/object IAM policy.
1669    "resourceId": "A String", # The ID of the resource to which this policy belongs. Will be of the form buckets/bucket for buckets, and buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
1670    "bindings": [ # An association between a role, which comes with a set of permissions, and members who may assume that role.
1671      {
1672        "role": "A String", # The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.
1673            # The new IAM roles are:
1674            # - roles/storage.admin — Full control of Google Cloud Storage resources.
1675            # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
1676            # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
1677            # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects.   The legacy IAM roles are:
1678            # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
1679            # - roles/storage.legacyObjectOwnerRead/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
1680            # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
1681            # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
1682            # - roles/storage.legacyBucketOwner — Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.
1683        "members": [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
1684            # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
1685            # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
1686            # - user:emailid — An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com.
1687            # - serviceAccount:emailid — An email address that represents a service account. For example,  serviceAccount:my-other-app@appspot.gserviceaccount.com .
1688            # - group:emailid — An email address that represents a Google group. For example, group:admins@example.com.
1689            # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
1690            # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
1691            # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
1692            # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
1693          "A String",
1694        ],
1695      },
1696    ],
1697    "etag": "A String", # HTTP 1.1  Entity tag for the policy.
1698    "kind": "storage#policy", # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.
1699  }</pre>
1700</div>
1701
1702<div class="method">
1703    <code class="details" id="testIamPermissions">testIamPermissions(bucket, object, permissions, userProject=None, generation=None)</code>
1704  <pre>Tests a set of permissions on the given object to see which, if any, are held by the caller.
1705
1706Args:
1707  bucket: string, Name of the bucket in which the object resides. (required)
1708  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1709  permissions: string, Permissions to test. (required) (repeated)
1710  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1711  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1712
1713Returns:
1714  An object of the form:
1715
1716    { # A storage.(buckets|objects).testIamPermissions response.
1717    "kind": "storage#testIamPermissionsResponse", # The kind of item this is.
1718    "permissions": [ # The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets or objects. The supported permissions are as follows:
1719        # - storage.buckets.delete — Delete bucket.
1720        # - storage.buckets.get — Read bucket metadata.
1721        # - storage.buckets.getIamPolicy — Read bucket IAM policy.
1722        # - storage.buckets.create — Create bucket.
1723        # - storage.buckets.list — List buckets.
1724        # - storage.buckets.setIamPolicy — Update bucket IAM policy.
1725        # - storage.buckets.update — Update bucket metadata.
1726        # - storage.objects.delete — Delete object.
1727        # - storage.objects.get — Read object data and metadata.
1728        # - storage.objects.getIamPolicy — Read object IAM policy.
1729        # - storage.objects.create — Create object.
1730        # - storage.objects.list — List objects.
1731        # - storage.objects.setIamPolicy — Update object IAM policy.
1732        # - storage.objects.update — Update object metadata.
1733      "A String",
1734    ],
1735  }</pre>
1736</div>
1737
1738<div class="method">
1739    <code class="details" id="update">update(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</code>
1740  <pre>Updates an object's metadata.
1741
1742Args:
1743  bucket: string, Name of the bucket in which the object resides. (required)
1744  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1745  body: object, The request body. (required)
1746    The object takes the form of:
1747
1748{ # An object.
1749    "generation": "A String", # The content generation of this object. Used for object versioning.
1750    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1751    "mediaLink": "A String", # Media download link.
1752    "owner": { # The owner of the object. This will always be the uploader of the object.
1753      "entityId": "A String", # The ID for the entity.
1754      "entity": "A String", # The entity, in the form user-userId.
1755    },
1756    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1757    "acl": [ # Access controls on the object.
1758      { # An access-control entry.
1759        "domain": "A String", # The domain associated with the entity, if any.
1760        "generation": "A String", # The content generation of the object, if applied to an object.
1761        "object": "A String", # The name of the object, if applied to an object.
1762        "bucket": "A String", # The name of the bucket.
1763        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1764        "entity": "A String", # The entity holding the permission, in one of the following forms:
1765            # - user-userId
1766            # - user-email
1767            # - group-groupId
1768            # - group-email
1769            # - domain-domain
1770            # - project-team-projectId
1771            # - allUsers
1772            # - allAuthenticatedUsers Examples:
1773            # - The user liz@example.com would be user-liz@example.com.
1774            # - The group example@googlegroups.com would be group-example@googlegroups.com.
1775            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1776        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1777        "role": "A String", # The access permission for the entity.
1778        "id": "A String", # The ID of the access-control entry.
1779        "entityId": "A String", # The ID for the entity, if any.
1780        "projectTeam": { # The project team associated with the entity, if any.
1781          "projectNumber": "A String", # The project number.
1782          "team": "A String", # The team.
1783        },
1784        "email": "A String", # The email address associated with the entity, if any.
1785        "selfLink": "A String", # The link to this access-control entry.
1786      },
1787    ],
1788    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1789    "size": "A String", # Content-Length of the data in bytes.
1790    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1791    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1792    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1793    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1794    "etag": "A String", # HTTP 1.1 Entity tag for the object.
1795    "metadata": { # User-provided metadata, in key/value pairs.
1796      "a_key": "A String", # An individual metadata entry.
1797    },
1798    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1799    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1800    "contentLanguage": "A String", # Content-Language of the object data.
1801    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1802      "encryptionAlgorithm": "A String", # The encryption algorithm.
1803      "keySha256": "A String", # SHA256 hash value of the encryption key.
1804    },
1805    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1806    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1807    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1808    "name": "A String", # The name of the object. Required if not specified by URL parameter.
1809    "bucket": "A String", # The name of the bucket containing this object.
1810    "contentEncoding": "A String", # Content-Encoding of the object data.
1811    "contentDisposition": "A String", # Content-Disposition of the object data.
1812    "selfLink": "A String", # The link to this object.
1813    "storageClass": "A String", # Storage class of the object.
1814  }
1815
1816  projection: string, Set of properties to return. Defaults to full.
1817    Allowed values
1818      full - Include all properties.
1819      noAcl - Omit the owner, acl property.
1820  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1821  predefinedAcl: string, Apply a predefined set of access controls to this object.
1822    Allowed values
1823      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1824      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1825      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1826      private - Object owner gets OWNER access.
1827      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1828      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1829  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
1830  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value.
1831  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
1832  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
1833  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
1834
1835Returns:
1836  An object of the form:
1837
1838    { # An object.
1839      "generation": "A String", # The content generation of this object. Used for object versioning.
1840      "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1841      "mediaLink": "A String", # Media download link.
1842      "owner": { # The owner of the object. This will always be the uploader of the object.
1843        "entityId": "A String", # The ID for the entity.
1844        "entity": "A String", # The entity, in the form user-userId.
1845      },
1846      "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1847      "acl": [ # Access controls on the object.
1848        { # An access-control entry.
1849          "domain": "A String", # The domain associated with the entity, if any.
1850          "generation": "A String", # The content generation of the object, if applied to an object.
1851          "object": "A String", # The name of the object, if applied to an object.
1852          "bucket": "A String", # The name of the bucket.
1853          "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1854          "entity": "A String", # The entity holding the permission, in one of the following forms:
1855              # - user-userId
1856              # - user-email
1857              # - group-groupId
1858              # - group-email
1859              # - domain-domain
1860              # - project-team-projectId
1861              # - allUsers
1862              # - allAuthenticatedUsers Examples:
1863              # - The user liz@example.com would be user-liz@example.com.
1864              # - The group example@googlegroups.com would be group-example@googlegroups.com.
1865              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1866          "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1867          "role": "A String", # The access permission for the entity.
1868          "id": "A String", # The ID of the access-control entry.
1869          "entityId": "A String", # The ID for the entity, if any.
1870          "projectTeam": { # The project team associated with the entity, if any.
1871            "projectNumber": "A String", # The project number.
1872            "team": "A String", # The team.
1873          },
1874          "email": "A String", # The email address associated with the entity, if any.
1875          "selfLink": "A String", # The link to this access-control entry.
1876        },
1877      ],
1878      "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1879      "size": "A String", # Content-Length of the data in bytes.
1880      "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1881      "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1882      "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1883      "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1884      "etag": "A String", # HTTP 1.1 Entity tag for the object.
1885      "metadata": { # User-provided metadata, in key/value pairs.
1886        "a_key": "A String", # An individual metadata entry.
1887      },
1888      "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1889      "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1890      "contentLanguage": "A String", # Content-Language of the object data.
1891      "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1892        "encryptionAlgorithm": "A String", # The encryption algorithm.
1893        "keySha256": "A String", # SHA256 hash value of the encryption key.
1894      },
1895      "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1896      "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1897      "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1898      "name": "A String", # The name of the object. Required if not specified by URL parameter.
1899      "bucket": "A String", # The name of the bucket containing this object.
1900      "contentEncoding": "A String", # Content-Encoding of the object data.
1901      "contentDisposition": "A String", # Content-Disposition of the object data.
1902      "selfLink": "A String", # The link to this object.
1903      "storageClass": "A String", # Storage class of the object.
1904    }</pre>
1905</div>
1906
1907<div class="method">
1908    <code class="details" id="update_media">update_media(bucket, object, body, projection=None, generation=None, predefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, userProject=None, ifMetagenerationNotMatch=None)</code>
1909  <pre>Updates an object's metadata.
1910
1911Args:
1912  bucket: string, Name of the bucket in which the object resides. (required)
1913  object: string, Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1914  body: object, The request body. (required)
1915    The object takes the form of:
1916
1917{ # An object.
1918    "generation": "A String", # The content generation of this object. Used for object versioning.
1919    "componentCount": 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1920    "mediaLink": "A String", # Media download link.
1921    "owner": { # The owner of the object. This will always be the uploader of the object.
1922      "entityId": "A String", # The ID for the entity.
1923      "entity": "A String", # The entity, in the form user-userId.
1924    },
1925    "cacheControl": "A String", # Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.
1926    "acl": [ # Access controls on the object.
1927      { # An access-control entry.
1928        "domain": "A String", # The domain associated with the entity, if any.
1929        "generation": "A String", # The content generation of the object, if applied to an object.
1930        "object": "A String", # The name of the object, if applied to an object.
1931        "bucket": "A String", # The name of the bucket.
1932        "kind": "storage#objectAccessControl", # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1933        "entity": "A String", # The entity holding the permission, in one of the following forms:
1934            # - user-userId
1935            # - user-email
1936            # - group-groupId
1937            # - group-email
1938            # - domain-domain
1939            # - project-team-projectId
1940            # - allUsers
1941            # - allAuthenticatedUsers Examples:
1942            # - The user liz@example.com would be user-liz@example.com.
1943            # - The group example@googlegroups.com would be group-example@googlegroups.com.
1944            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1945        "etag": "A String", # HTTP 1.1 Entity tag for the access-control entry.
1946        "role": "A String", # The access permission for the entity.
1947        "id": "A String", # The ID of the access-control entry.
1948        "entityId": "A String", # The ID for the entity, if any.
1949        "projectTeam": { # The project team associated with the entity, if any.
1950          "projectNumber": "A String", # The project number.
1951          "team": "A String", # The team.
1952        },
1953        "email": "A String", # The email address associated with the entity, if any.
1954        "selfLink": "A String", # The link to this access-control entry.
1955      },
1956    ],
1957    "id": "A String", # The ID of the object, including the bucket name, object name, and generation number.
1958    "size": "A String", # Content-Length of the data in bytes.
1959    "timeDeleted": "A String", # The deletion time of the object in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.
1960    "timeCreated": "A String", # The creation time of the object in RFC 3339 format.
1961    "md5Hash": "A String", # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1962    "crc32c": "A String", # CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.
1963    "etag": "A String", # HTTP 1.1 Entity tag for the object.
1964    "metadata": { # User-provided metadata, in key/value pairs.
1965      "a_key": "A String", # An individual metadata entry.
1966    },
1967    "updated": "A String", # The modification time of the object metadata in RFC 3339 format.
1968    "contentType": "A String", # Content-Type of the object data. If contentType is not specified, object downloads will be served as application/octet-stream.
1969    "contentLanguage": "A String", # Content-Language of the object data.
1970    "customerEncryption": { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1971      "encryptionAlgorithm": "A String", # The encryption algorithm.
1972      "keySha256": "A String", # SHA256 hash value of the encryption key.
1973    },
1974    "metageneration": "A String", # The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.
1975    "timeStorageClassUpdated": "A String", # The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.
1976    "kind": "storage#object", # The kind of item this is. For objects, this is always storage#object.
1977    "name": "A String", # The name of the object. Required if not specified by URL parameter.
1978    "bucket": "A String", # The name of the bucket containing this object.
1979    "contentEncoding": "A String", # Content-Encoding of the object data.
1980    "contentDisposition": "A String", # Content-Disposition of the object data.
1981    "selfLink": "A String", # The link to this object.
1982    "storageClass": "A String", # Storage class of the object.
1983  }
1984
1985  projection: string, Set of properties to return. Defaults to full.
1986    Allowed values
1987      full - Include all properties.
1988      noAcl - Omit the owner, acl property.
1989  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1990  predefinedAcl: string, Apply a predefined set of access controls to this object.
1991    Allowed values
1992      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1993      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1994      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1995      private - Object owner gets OWNER access.
1996      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1997      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1998  ifGenerationMatch: string, Makes the operation conditional on whether the object's current generation matches the given value.
1999  ifGenerationNotMatch: string, Makes the operation conditional on whether the object's current generation does not match the given value.
2000  ifMetagenerationMatch: string, Makes the operation conditional on whether the object's current metageneration matches the given value.
2001  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
2002  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object's current metageneration does not match the given value.
2003
2004Returns:
2005  The media object as a string.
2006
2007    </pre>
2008</div>
2009
2010<div class="method">
2011    <code class="details" id="watchAll">watchAll(bucket, body, projection=None, versions=None, userProject=None, delimiter=None, maxResults=None, pageToken=None, prefix=None)</code>
2012  <pre>Watch for changes on all objects in a bucket.
2013
2014Args:
2015  bucket: string, Name of the bucket in which to look for objects. (required)
2016  body: object, The request body. (required)
2017    The object takes the form of:
2018
2019{ # An notification channel used to watch for resource changes.
2020    "resourceUri": "A String", # A version-specific identifier for the watched resource.
2021    "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
2022    "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2023    "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2024    "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2025    "params": { # Additional parameters controlling delivery channel behavior. Optional.
2026      "a_key": "A String", # Declares a new parameter by name.
2027    },
2028    "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2029    "address": "A String", # The address where notifications are delivered for this channel.
2030    "type": "A String", # The type of delivery mechanism used for this channel.
2031    "id": "A String", # A UUID or similar unique string that identifies this channel.
2032  }
2033
2034  projection: string, Set of properties to return. Defaults to noAcl.
2035    Allowed values
2036      full - Include all properties.
2037      noAcl - Omit the owner, acl property.
2038  versions: boolean, If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.
2039  userProject: string, The project number to be billed for this request, for Requester Pays buckets.
2040  delimiter: string, 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.
2041  maxResults: integer, Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.
2042  pageToken: string, A previously-returned page token representing part of the larger set of results to view.
2043  prefix: string, Filter results to objects whose names begin with this prefix.
2044
2045Returns:
2046  An object of the form:
2047
2048    { # An notification channel used to watch for resource changes.
2049      "resourceUri": "A String", # A version-specific identifier for the watched resource.
2050      "kind": "api#channel", # Identifies this as a notification channel used to watch for changes to a resource. Value: the fixed string "api#channel".
2051      "resourceId": "A String", # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
2052      "payload": True or False, # A Boolean value to indicate whether payload is wanted. Optional.
2053      "token": "A String", # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
2054      "params": { # Additional parameters controlling delivery channel behavior. Optional.
2055        "a_key": "A String", # Declares a new parameter by name.
2056      },
2057      "expiration": "A String", # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
2058      "address": "A String", # The address where notifications are delivered for this channel.
2059      "type": "A String", # The type of delivery mechanism used for this channel.
2060      "id": "A String", # A UUID or similar unique string that identifies this channel.
2061    }</pre>
2062</div>
2063
2064</body></html>