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="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#compose">compose(destinationBucket, destinationObject, body=None, destinationPredefinedAcl=None, ifGenerationMatch=None, ifMetagenerationMatch=None, kmsKeyName=None, provisionalUserProject=None, userProject=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=None, destinationKmsKeyName=None, destinationPredefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, ifSourceGenerationMatch=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationMatch=None, ifSourceMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, sourceGeneration=None, userProject=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="#delete">delete(bucket, object, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, provisionalUserProject=None, userProject=None)</a></code></p>
88<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>
89<p class="toc_element">
90  <code><a href="#get">get(bucket, object, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p>
91<p class="firstline">Retrieves an object or its metadata.</p>
92<p class="toc_element">
93  <code><a href="#getIamPolicy">getIamPolicy(bucket, object, generation=None, provisionalUserProject=None, userProject=None)</a></code></p>
94<p class="firstline">Returns an IAM policy for the specified object.</p>
95<p class="toc_element">
96  <code><a href="#get_media">get_media(bucket, object, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p>
97<p class="firstline">Retrieves an object or its metadata.</p>
98<p class="toc_element">
99  <code><a href="#insert">insert(bucket, body=None, contentEncoding=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, kmsKeyName=None, media_body=None, media_mime_type=None, name=None, predefinedAcl=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p>
100<p class="firstline">Stores a new object and metadata.</p>
101<p class="toc_element">
102  <code><a href="#list">list(bucket, delimiter=None, endOffset=None, includeTrailingDelimiter=None, maxResults=None, pageToken=None, prefix=None, projection=None, provisionalUserProject=None, startOffset=None, userProject=None, versions=None)</a></code></p>
103<p class="firstline">Retrieves a list of objects matching the criteria.</p>
104<p class="toc_element">
105  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
108  <code><a href="#patch">patch(bucket, object, body=None, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p>
109<p class="firstline">Patches an object's metadata.</p>
110<p class="toc_element">
111  <code><a href="#rewrite">rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, body=None, destinationKmsKeyName=None, destinationPredefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, ifSourceGenerationMatch=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationMatch=None, ifSourceMetagenerationNotMatch=None, maxBytesRewrittenPerCall=None, projection=None, provisionalUserProject=None, rewriteToken=None, sourceGeneration=None, userProject=None)</a></code></p>
112<p class="firstline">Rewrites a source object to a destination object. Optionally overrides metadata.</p>
113<p class="toc_element">
114  <code><a href="#setIamPolicy">setIamPolicy(bucket, object, body=None, generation=None, provisionalUserProject=None, userProject=None)</a></code></p>
115<p class="firstline">Updates an IAM policy for the specified object.</p>
116<p class="toc_element">
117  <code><a href="#testIamPermissions">testIamPermissions(bucket, object, permissions, generation=None, provisionalUserProject=None, userProject=None)</a></code></p>
118<p class="firstline">Tests a set of permissions on the given object to see which, if any, are held by the caller.</p>
119<p class="toc_element">
120  <code><a href="#update">update(bucket, object, body=None, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, projection=None, provisionalUserProject=None, userProject=None)</a></code></p>
121<p class="firstline">Updates an object's metadata.</p>
122<p class="toc_element">
123  <code><a href="#watchAll">watchAll(bucket, body=None, delimiter=None, endOffset=None, includeTrailingDelimiter=None, maxResults=None, pageToken=None, prefix=None, projection=None, provisionalUserProject=None, startOffset=None, userProject=None, versions=None)</a></code></p>
124<p class="firstline">Watch for changes on all objects in a bucket.</p>
125<h3>Method Details</h3>
126<div class="method">
127    <code class="details" id="close">close()</code>
128  <pre>Close httplib2 connections.</pre>
129</div>
130
131<div class="method">
132    <code class="details" id="compose">compose(destinationBucket, destinationObject, body=None, destinationPredefinedAcl=None, ifGenerationMatch=None, ifMetagenerationMatch=None, kmsKeyName=None, provisionalUserProject=None, userProject=None)</code>
133  <pre>Concatenates a list of existing objects into a new object in the same bucket.
134
135Args:
136  destinationBucket: string, Name of the bucket containing the source objects. The destination object is stored in this bucket. (required)
137  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)
138  body: object, The request body.
139    The object takes the form of:
140
141{ # A Compose request.
142  &quot;destination&quot;: { # An object. # Properties of the resulting object.
143    &quot;acl&quot;: [ # Access controls on the object.
144      { # An access-control entry.
145        &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
146        &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
147        &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
148        &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
149            # - user-userId
150            # - user-email
151            # - group-groupId
152            # - group-email
153            # - domain-domain
154            # - project-team-projectId
155            # - allUsers
156            # - allAuthenticatedUsers Examples:
157            # - The user [email protected] would be [email protected].
158            # - The group [email protected] would be [email protected].
159            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
160        &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
161        &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
162        &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
163        &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
164        &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
165        &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
166        &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
167          &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
168          &quot;team&quot;: &quot;A String&quot;, # The team.
169        },
170        &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
171        &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
172      },
173    ],
174    &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
175    &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
176    &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
177    &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
178    &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
179    &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
180    &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
181    &quot;crc32c&quot;: &quot;A String&quot;, # 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.
182    &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
183    &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
184      &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
185      &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
186    },
187    &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
188    &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
189    &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
190    &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
191    &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
192    &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
193    &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
194    &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
195    &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
196      &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
197    },
198    &quot;metageneration&quot;: &quot;A String&quot;, # 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.
199    &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
200    &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
201      &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
202      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
203    },
204    &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
205    &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
206    &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
207    &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
208    &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
209    &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
210    &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
211    &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
212    &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
213  },
214  &quot;kind&quot;: &quot;storage#composeRequest&quot;, # The kind of item this is.
215  &quot;sourceObjects&quot;: [ # The list of source objects that will be concatenated into a single object.
216    {
217      &quot;generation&quot;: &quot;A String&quot;, # The generation of this object to use as the source.
218      &quot;name&quot;: &quot;A String&quot;, # The source object&#x27;s name. All source objects must reside in the same bucket.
219      &quot;objectPreconditions&quot;: { # Conditions that must be met for this operation to execute.
220        &quot;ifGenerationMatch&quot;: &quot;A String&quot;, # 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.
221      },
222    },
223  ],
224}
225
226  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
227    Allowed values
228      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
229      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
230      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
231      private - Object owner gets OWNER access.
232      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
233      publicRead - Object owner gets OWNER access, and allUsers get READER access.
234  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
235  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
236  kmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata&#x27;s kms_key_name value, if any.
237  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
238  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
239
240Returns:
241  An object of the form:
242
243    { # An object.
244  &quot;acl&quot;: [ # Access controls on the object.
245    { # An access-control entry.
246      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
247      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
248      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
249      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
250          # - user-userId
251          # - user-email
252          # - group-groupId
253          # - group-email
254          # - domain-domain
255          # - project-team-projectId
256          # - allUsers
257          # - allAuthenticatedUsers Examples:
258          # - The user [email protected] would be [email protected].
259          # - The group [email protected] would be [email protected].
260          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
261      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
262      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
263      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
264      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
265      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
266      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
267      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
268        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
269        &quot;team&quot;: &quot;A String&quot;, # The team.
270      },
271      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
272      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
273    },
274  ],
275  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
276  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
277  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
278  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
279  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
280  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
281  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
282  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
283  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
284  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
285    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
286    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
287  },
288  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
289  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
290  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
291  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
292  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
293  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
294  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
295  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
296  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
297    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
298  },
299  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
300  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
301  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
302    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
303    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
304  },
305  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
306  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
307  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
308  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
309  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
310  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
311  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
312  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
313  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
314}</pre>
315</div>
316
317<div class="method">
318    <code class="details" id="copy">copy(sourceBucket, sourceObject, destinationBucket, destinationObject, body=None, destinationKmsKeyName=None, destinationPredefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, ifSourceGenerationMatch=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationMatch=None, ifSourceMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, sourceGeneration=None, userProject=None)</code>
319  <pre>Copies a source object to a destination object. Optionally overrides metadata.
320
321Args:
322  sourceBucket: string, Name of the bucket in which to find the source object. (required)
323  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)
324  destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata&#x27;s bucket value, if any.For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
325  destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata&#x27;s name value, if any. (required)
326  body: object, The request body.
327    The object takes the form of:
328
329{ # An object.
330  &quot;acl&quot;: [ # Access controls on the object.
331    { # An access-control entry.
332      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
333      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
334      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
335      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
336          # - user-userId
337          # - user-email
338          # - group-groupId
339          # - group-email
340          # - domain-domain
341          # - project-team-projectId
342          # - allUsers
343          # - allAuthenticatedUsers Examples:
344          # - The user [email protected] would be [email protected].
345          # - The group [email protected] would be [email protected].
346          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
347      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
348      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
349      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
350      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
351      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
352      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
353      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
354        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
355        &quot;team&quot;: &quot;A String&quot;, # The team.
356      },
357      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
358      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
359    },
360  ],
361  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
362  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
363  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
364  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
365  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
366  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
367  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
368  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
369  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
370  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
371    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
372    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
373  },
374  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
375  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
376  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
377  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
378  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
379  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
380  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
381  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
382  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
383    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
384  },
385  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
386  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
387  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
388    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
389    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
390  },
391  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
392  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
393  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
394  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
395  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
396  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
397  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
398  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
399  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
400}
401
402  destinationKmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata&#x27;s kms_key_name value, if any.
403  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
404    Allowed values
405      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
406      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
407      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
408      private - Object owner gets OWNER access.
409      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
410      publicRead - Object owner gets OWNER access, and allUsers get READER access.
411  ifGenerationMatch: string, Makes the operation conditional on whether the destination object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
412  ifGenerationNotMatch: string, Makes the operation conditional on whether the destination object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
413  ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object&#x27;s current metageneration matches the given value.
414  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object&#x27;s current metageneration does not match the given value.
415  ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object&#x27;s current generation matches the given value.
416  ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object&#x27;s current generation does not match the given value.
417  ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object&#x27;s current metageneration matches the given value.
418  ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object&#x27;s current metageneration does not match the given value.
419  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
420    Allowed values
421      full - Include all properties.
422      noAcl - Omit the owner, acl property.
423  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
424  sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default).
425  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
426
427Returns:
428  An object of the form:
429
430    { # An object.
431  &quot;acl&quot;: [ # Access controls on the object.
432    { # An access-control entry.
433      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
434      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
435      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
436      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
437          # - user-userId
438          # - user-email
439          # - group-groupId
440          # - group-email
441          # - domain-domain
442          # - project-team-projectId
443          # - allUsers
444          # - allAuthenticatedUsers Examples:
445          # - The user [email protected] would be [email protected].
446          # - The group [email protected] would be [email protected].
447          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
448      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
449      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
450      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
451      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
452      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
453      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
454      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
455        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
456        &quot;team&quot;: &quot;A String&quot;, # The team.
457      },
458      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
459      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
460    },
461  ],
462  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
463  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
464  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
465  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
466  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
467  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
468  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
469  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
470  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
471  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
472    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
473    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
474  },
475  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
476  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
477  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
478  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
479  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
480  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
481  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
482  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
483  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
484    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
485  },
486  &quot;metageneration&quot;: &quot;A String&quot;, # 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  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
488  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
489    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
490    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
491  },
492  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
493  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
494  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
495  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
496  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
497  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
498  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
499  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
500  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
501}</pre>
502</div>
503
504<div class="method">
505    <code class="details" id="delete">delete(bucket, object, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, provisionalUserProject=None, userProject=None)</code>
506  <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.
507
508Args:
509  bucket: string, Name of the bucket in which the object resides. (required)
510  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)
511  generation: string, If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).
512  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
513  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
514  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
515  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration does not match the given value.
516  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
517  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
518</pre>
519</div>
520
521<div class="method">
522    <code class="details" id="get">get(bucket, object, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, userProject=None)</code>
523  <pre>Retrieves an object or its metadata.
524
525Args:
526  bucket: string, Name of the bucket in which the object resides. (required)
527  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)
528  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
529  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
530  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
531  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
532  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration does not match the given value.
533  projection: string, Set of properties to return. Defaults to noAcl.
534    Allowed values
535      full - Include all properties.
536      noAcl - Omit the owner, acl property.
537  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
538  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
539
540Returns:
541  An object of the form:
542
543    { # An object.
544  &quot;acl&quot;: [ # Access controls on the object.
545    { # An access-control entry.
546      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
547      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
548      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
549      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
550          # - user-userId
551          # - user-email
552          # - group-groupId
553          # - group-email
554          # - domain-domain
555          # - project-team-projectId
556          # - allUsers
557          # - allAuthenticatedUsers Examples:
558          # - The user [email protected] would be [email protected].
559          # - The group [email protected] would be [email protected].
560          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
561      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
562      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
563      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
564      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
565      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
566      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
567      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
568        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
569        &quot;team&quot;: &quot;A String&quot;, # The team.
570      },
571      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
572      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
573    },
574  ],
575  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
576  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
577  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
578  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
579  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
580  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
581  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
582  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
583  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
584  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
585    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
586    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
587  },
588  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
589  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
590  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
591  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
592  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
593  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
594  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
595  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
596  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
597    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
598  },
599  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
600  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
601  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
602    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
603    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
604  },
605  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
606  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
607  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
608  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
609  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
610  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
611  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
612  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
613  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
614}</pre>
615</div>
616
617<div class="method">
618    <code class="details" id="getIamPolicy">getIamPolicy(bucket, object, generation=None, provisionalUserProject=None, userProject=None)</code>
619  <pre>Returns an IAM policy for the specified object.
620
621Args:
622  bucket: string, Name of the bucket in which the object resides. (required)
623  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)
624  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
625  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
626  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
627
628Returns:
629  An object of the form:
630
631    { # A bucket/object IAM policy.
632  &quot;bindings&quot;: [ # An association between a role, which comes with a set of permissions, and members who may assume that role.
633    {
634      &quot;condition&quot;: { # Represents an expression text. Example: title: &quot;User account presence&quot; description: &quot;Determines whether the request has a user account&quot; expression: &quot;size(request.user) &gt; 0&quot; # The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
635        &quot;description&quot;: &quot;A String&quot;, # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
636        &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
637        &quot;location&quot;: &quot;A String&quot;, # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
638        &quot;title&quot;: &quot;A String&quot;, # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
639      },
640      &quot;members&quot;: [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
641          # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
642          # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
643          # - user:emailid — An email address that represents a specific account. For example, user:[email protected] or user:[email protected].
644          # - serviceAccount:emailid — An email address that represents a service account. For example,  serviceAccount:[email protected] .
645          # - group:emailid — An email address that represents a Google group. For example, group:[email protected].
646          # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
647          # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
648          # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
649          # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
650        &quot;A String&quot;,
651      ],
652      &quot;role&quot;: &quot;A String&quot;, # 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.
653          # The new IAM roles are:
654          # - roles/storage.admin — Full control of Google Cloud Storage resources.
655          # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
656          # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
657          # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects.   The legacy IAM roles are:
658          # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
659          # - roles/storage.legacyObjectOwnerRead/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
660          # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
661          # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
662          # - 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.
663    },
664  ],
665  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1  Entity tag for the policy.
666  &quot;kind&quot;: &quot;storage#policy&quot;, # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.
667  &quot;resourceId&quot;: &quot;A String&quot;, # The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
668  &quot;version&quot;: 42, # The IAM policy format version.
669}</pre>
670</div>
671
672<div class="method">
673    <code class="details" id="get_media">get_media(bucket, object, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, projection=None, provisionalUserProject=None, userProject=None)</code>
674  <pre>Retrieves an object or its metadata.
675
676Args:
677  bucket: string, Name of the bucket in which the object resides. (required)
678  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)
679  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
680  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
681  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
682  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
683  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration does not match the given value.
684  projection: string, Set of properties to return. Defaults to noAcl.
685    Allowed values
686      full - Include all properties.
687      noAcl - Omit the owner, acl property.
688  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
689  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
690
691Returns:
692  The media object as a string.
693
694    </pre>
695</div>
696
697<div class="method">
698    <code class="details" id="insert">insert(bucket, body=None, contentEncoding=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, kmsKeyName=None, media_body=None, media_mime_type=None, name=None, predefinedAcl=None, projection=None, provisionalUserProject=None, userProject=None)</code>
699  <pre>Stores a new object and metadata.
700
701Args:
702  bucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata&#x27;s bucket value, if any. (required)
703  body: object, The request body.
704    The object takes the form of:
705
706{ # An object.
707  &quot;acl&quot;: [ # Access controls on the object.
708    { # An access-control entry.
709      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
710      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
711      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
712      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
713          # - user-userId
714          # - user-email
715          # - group-groupId
716          # - group-email
717          # - domain-domain
718          # - project-team-projectId
719          # - allUsers
720          # - allAuthenticatedUsers Examples:
721          # - The user [email protected] would be [email protected].
722          # - The group [email protected] would be [email protected].
723          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
724      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
725      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
726      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
727      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
728      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
729      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
730      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
731        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
732        &quot;team&quot;: &quot;A String&quot;, # The team.
733      },
734      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
735      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
736    },
737  ],
738  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
739  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
740  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
741  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
742  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
743  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
744  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
745  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
746  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
747  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
748    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
749    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
750  },
751  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
752  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
753  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
754  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
755  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
756  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
757  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
758  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
759  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
760    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
761  },
762  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
763  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
764  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
765    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
766    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
767  },
768  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
769  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
770  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
771  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
772  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
773  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
774  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
775  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
776  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
777}
778
779  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.
780  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
781  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
782  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
783  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration does not match the given value.
784  kmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata&#x27;s kms_key_name value, if any.
785  media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
786  media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
787  name: string, Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata&#x27;s name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.
788  predefinedAcl: string, Apply a predefined set of access controls to this object.
789    Allowed values
790      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
791      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
792      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
793      private - Object owner gets OWNER access.
794      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
795      publicRead - Object owner gets OWNER access, and allUsers get READER access.
796  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
797    Allowed values
798      full - Include all properties.
799      noAcl - Omit the owner, acl property.
800  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
801  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
802
803Returns:
804  An object of the form:
805
806    { # An object.
807  &quot;acl&quot;: [ # Access controls on the object.
808    { # An access-control entry.
809      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
810      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
811      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
812      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
813          # - user-userId
814          # - user-email
815          # - group-groupId
816          # - group-email
817          # - domain-domain
818          # - project-team-projectId
819          # - allUsers
820          # - allAuthenticatedUsers Examples:
821          # - The user [email protected] would be [email protected].
822          # - The group [email protected] would be [email protected].
823          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
824      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
825      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
826      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
827      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
828      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
829      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
830      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
831        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
832        &quot;team&quot;: &quot;A String&quot;, # The team.
833      },
834      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
835      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
836    },
837  ],
838  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
839  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
840  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
841  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
842  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
843  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
844  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
845  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
846  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
847  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
848    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
849    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
850  },
851  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
852  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
853  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
854  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
855  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
856  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
857  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
858  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
859  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
860    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
861  },
862  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
863  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
864  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
865    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
866    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
867  },
868  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
869  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
870  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
871  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
872  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
873  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
874  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
875  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
876  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
877}</pre>
878</div>
879
880<div class="method">
881    <code class="details" id="list">list(bucket, delimiter=None, endOffset=None, includeTrailingDelimiter=None, maxResults=None, pageToken=None, prefix=None, projection=None, provisionalUserProject=None, startOffset=None, userProject=None, versions=None)</code>
882  <pre>Retrieves a list of objects matching the criteria.
883
884Args:
885  bucket: string, Name of the bucket in which to look for objects. (required)
886  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.
887  endOffset: string, Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
888  includeTrailingDelimiter: boolean, If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.
889  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.
890  pageToken: string, A previously-returned page token representing part of the larger set of results to view.
891  prefix: string, Filter results to objects whose names begin with this prefix.
892  projection: string, Set of properties to return. Defaults to noAcl.
893    Allowed values
894      full - Include all properties.
895      noAcl - Omit the owner, acl property.
896  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
897  startOffset: string, Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
898  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
899  versions: boolean, If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.
900
901Returns:
902  An object of the form:
903
904    { # A list of objects.
905  &quot;items&quot;: [ # The list of items.
906    { # An object.
907      &quot;acl&quot;: [ # Access controls on the object.
908        { # An access-control entry.
909          &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
910          &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
911          &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
912          &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
913              # - user-userId
914              # - user-email
915              # - group-groupId
916              # - group-email
917              # - domain-domain
918              # - project-team-projectId
919              # - allUsers
920              # - allAuthenticatedUsers Examples:
921              # - The user [email protected] would be [email protected].
922              # - The group [email protected] would be [email protected].
923              # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
924          &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
925          &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
926          &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
927          &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
928          &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
929          &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
930          &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
931            &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
932            &quot;team&quot;: &quot;A String&quot;, # The team.
933          },
934          &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
935          &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
936        },
937      ],
938      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
939      &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
940      &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
941      &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
942      &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
943      &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
944      &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
945      &quot;crc32c&quot;: &quot;A String&quot;, # 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.
946      &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
947      &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
948        &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
949        &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
950      },
951      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
952      &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
953      &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
954      &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
955      &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
956      &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
957      &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
958      &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
959      &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
960        &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
961      },
962      &quot;metageneration&quot;: &quot;A String&quot;, # 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.
963      &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
964      &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
965        &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
966        &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
967      },
968      &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
969      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
970      &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
971      &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
972      &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
973      &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
974      &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
975      &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
976      &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
977    },
978  ],
979  &quot;kind&quot;: &quot;storage#objects&quot;, # The kind of item this is. For lists of objects, this is always storage#objects.
980  &quot;nextPageToken&quot;: &quot;A String&quot;, # The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.
981  &quot;prefixes&quot;: [ # The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.
982    &quot;A String&quot;,
983  ],
984}</pre>
985</div>
986
987<div class="method">
988    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
989  <pre>Retrieves the next page of results.
990
991Args:
992  previous_request: The request for the previous page. (required)
993  previous_response: The response from the request for the previous page. (required)
994
995Returns:
996  A request object that you can call &#x27;execute()&#x27; on to request the next
997  page. Returns None if there are no more items in the collection.
998    </pre>
999</div>
1000
1001<div class="method">
1002    <code class="details" id="patch">patch(bucket, object, body=None, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, projection=None, provisionalUserProject=None, userProject=None)</code>
1003  <pre>Patches an object&#x27;s metadata.
1004
1005Args:
1006  bucket: string, Name of the bucket in which the object resides. (required)
1007  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)
1008  body: object, The request body.
1009    The object takes the form of:
1010
1011{ # An object.
1012  &quot;acl&quot;: [ # Access controls on the object.
1013    { # An access-control entry.
1014      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
1015      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
1016      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
1017      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
1018          # - user-userId
1019          # - user-email
1020          # - group-groupId
1021          # - group-email
1022          # - domain-domain
1023          # - project-team-projectId
1024          # - allUsers
1025          # - allAuthenticatedUsers Examples:
1026          # - The user [email protected] would be [email protected].
1027          # - The group [email protected] would be [email protected].
1028          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1029      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
1030      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
1031      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
1032      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
1033      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1034      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
1035      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
1036        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
1037        &quot;team&quot;: &quot;A String&quot;, # The team.
1038      },
1039      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
1040      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
1041    },
1042  ],
1043  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
1044  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
1045  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1046  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
1047  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
1048  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
1049  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
1050  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
1051  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
1052  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1053    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
1054    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
1055  },
1056  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
1057  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
1058  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
1059  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
1060  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
1061  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
1062  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1063  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
1064  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
1065    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
1066  },
1067  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
1068  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
1069  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
1070    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
1071    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
1072  },
1073  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
1074  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
1075  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
1076  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
1077  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
1078  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
1079  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
1080  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
1081  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
1082}
1083
1084  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1085  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
1086  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
1087  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
1088  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration does not match the given value.
1089  predefinedAcl: string, Apply a predefined set of access controls to this object.
1090    Allowed values
1091      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1092      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1093      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1094      private - Object owner gets OWNER access.
1095      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1096      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1097  projection: string, Set of properties to return. Defaults to full.
1098    Allowed values
1099      full - Include all properties.
1100      noAcl - Omit the owner, acl property.
1101  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
1102  userProject: string, The project to be billed for this request, for Requester Pays buckets.
1103
1104Returns:
1105  An object of the form:
1106
1107    { # An object.
1108  &quot;acl&quot;: [ # Access controls on the object.
1109    { # An access-control entry.
1110      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
1111      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
1112      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
1113      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
1114          # - user-userId
1115          # - user-email
1116          # - group-groupId
1117          # - group-email
1118          # - domain-domain
1119          # - project-team-projectId
1120          # - allUsers
1121          # - allAuthenticatedUsers Examples:
1122          # - The user [email protected] would be [email protected].
1123          # - The group [email protected] would be [email protected].
1124          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1125      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
1126      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
1127      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
1128      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
1129      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1130      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
1131      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
1132        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
1133        &quot;team&quot;: &quot;A String&quot;, # The team.
1134      },
1135      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
1136      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
1137    },
1138  ],
1139  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
1140  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
1141  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1142  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
1143  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
1144  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
1145  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
1146  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
1147  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
1148  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1149    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
1150    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
1151  },
1152  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
1153  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
1154  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
1155  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
1156  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
1157  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
1158  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1159  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
1160  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
1161    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
1162  },
1163  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
1164  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
1165  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
1166    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
1167    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
1168  },
1169  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
1170  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
1171  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
1172  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
1173  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
1174  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
1175  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
1176  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
1177  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
1178}</pre>
1179</div>
1180
1181<div class="method">
1182    <code class="details" id="rewrite">rewrite(sourceBucket, sourceObject, destinationBucket, destinationObject, body=None, destinationKmsKeyName=None, destinationPredefinedAcl=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, ifSourceGenerationMatch=None, ifSourceGenerationNotMatch=None, ifSourceMetagenerationMatch=None, ifSourceMetagenerationNotMatch=None, maxBytesRewrittenPerCall=None, projection=None, provisionalUserProject=None, rewriteToken=None, sourceGeneration=None, userProject=None)</code>
1183  <pre>Rewrites a source object to a destination object. Optionally overrides metadata.
1184
1185Args:
1186  sourceBucket: string, Name of the bucket in which to find the source object. (required)
1187  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)
1188  destinationBucket: string, Name of the bucket in which to store the new object. Overrides the provided object metadata&#x27;s bucket value, if any. (required)
1189  destinationObject: string, Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata&#x27;s name value, if any. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts. (required)
1190  body: object, The request body.
1191    The object takes the form of:
1192
1193{ # An object.
1194  &quot;acl&quot;: [ # Access controls on the object.
1195    { # An access-control entry.
1196      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
1197      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
1198      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
1199      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
1200          # - user-userId
1201          # - user-email
1202          # - group-groupId
1203          # - group-email
1204          # - domain-domain
1205          # - project-team-projectId
1206          # - allUsers
1207          # - allAuthenticatedUsers Examples:
1208          # - The user [email protected] would be [email protected].
1209          # - The group [email protected] would be [email protected].
1210          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1211      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
1212      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
1213      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
1214      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
1215      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1216      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
1217      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
1218        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
1219        &quot;team&quot;: &quot;A String&quot;, # The team.
1220      },
1221      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
1222      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
1223    },
1224  ],
1225  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
1226  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
1227  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1228  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
1229  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
1230  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
1231  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
1232  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
1233  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
1234  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1235    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
1236    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
1237  },
1238  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
1239  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
1240  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
1241  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
1242  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
1243  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
1244  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1245  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
1246  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
1247    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
1248  },
1249  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
1250  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
1251  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
1252    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
1253    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
1254  },
1255  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
1256  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
1257  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
1258  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
1259  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
1260  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
1261  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
1262  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
1263  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
1264}
1265
1266  destinationKmsKeyName: string, Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata&#x27;s kms_key_name value, if any.
1267  destinationPredefinedAcl: string, Apply a predefined set of access controls to the destination object.
1268    Allowed values
1269      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1270      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1271      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1272      private - Object owner gets OWNER access.
1273      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1274      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1275  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
1276  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
1277  ifMetagenerationMatch: string, Makes the operation conditional on whether the destination object&#x27;s current metageneration matches the given value.
1278  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the destination object&#x27;s current metageneration does not match the given value.
1279  ifSourceGenerationMatch: string, Makes the operation conditional on whether the source object&#x27;s current generation matches the given value.
1280  ifSourceGenerationNotMatch: string, Makes the operation conditional on whether the source object&#x27;s current generation does not match the given value.
1281  ifSourceMetagenerationMatch: string, Makes the operation conditional on whether the source object&#x27;s current metageneration matches the given value.
1282  ifSourceMetagenerationNotMatch: string, Makes the operation conditional on whether the source object&#x27;s current metageneration does not match the given value.
1283  maxBytesRewrittenPerCall: string, The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn&#x27;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&#x27;ll get an error that the rewriteToken is invalid.
1284  projection: string, Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.
1285    Allowed values
1286      full - Include all properties.
1287      noAcl - Omit the owner, acl property.
1288  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
1289  rewriteToken: string, Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response &#x27;done&#x27; 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.
1290  sourceGeneration: string, If present, selects a specific revision of the source object (as opposed to the latest version, the default).
1291  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
1292
1293Returns:
1294  An object of the form:
1295
1296    { # A rewrite response.
1297  &quot;done&quot;: 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.
1298  &quot;kind&quot;: &quot;storage#rewriteResponse&quot;, # The kind of item this is.
1299  &quot;objectSize&quot;: &quot;A String&quot;, # The total size of the object being copied in bytes. This property is always present in the response.
1300  &quot;resource&quot;: { # An object. # A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes.
1301    &quot;acl&quot;: [ # Access controls on the object.
1302      { # An access-control entry.
1303        &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
1304        &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
1305        &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
1306        &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
1307            # - user-userId
1308            # - user-email
1309            # - group-groupId
1310            # - group-email
1311            # - domain-domain
1312            # - project-team-projectId
1313            # - allUsers
1314            # - allAuthenticatedUsers Examples:
1315            # - The user [email protected] would be [email protected].
1316            # - The group [email protected] would be [email protected].
1317            # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1318        &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
1319        &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
1320        &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
1321        &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
1322        &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1323        &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
1324        &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
1325          &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
1326          &quot;team&quot;: &quot;A String&quot;, # The team.
1327        },
1328        &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
1329        &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
1330      },
1331    ],
1332    &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
1333    &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
1334    &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1335    &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
1336    &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
1337    &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
1338    &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
1339    &quot;crc32c&quot;: &quot;A String&quot;, # 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.
1340    &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
1341    &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1342      &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
1343      &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
1344    },
1345    &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
1346    &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
1347    &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
1348    &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
1349    &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
1350    &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
1351    &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1352    &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
1353    &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
1354      &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
1355    },
1356    &quot;metageneration&quot;: &quot;A String&quot;, # 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.
1357    &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
1358    &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
1359      &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
1360      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
1361    },
1362    &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
1363    &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
1364    &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
1365    &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
1366    &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
1367    &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
1368    &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
1369    &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
1370    &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
1371  },
1372  &quot;rewriteToken&quot;: &quot;A String&quot;, # 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.
1373  &quot;totalBytesRewritten&quot;: &quot;A String&quot;, # 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.
1374}</pre>
1375</div>
1376
1377<div class="method">
1378    <code class="details" id="setIamPolicy">setIamPolicy(bucket, object, body=None, generation=None, provisionalUserProject=None, userProject=None)</code>
1379  <pre>Updates an IAM policy for the specified object.
1380
1381Args:
1382  bucket: string, Name of the bucket in which the object resides. (required)
1383  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)
1384  body: object, The request body.
1385    The object takes the form of:
1386
1387{ # A bucket/object IAM policy.
1388  &quot;bindings&quot;: [ # An association between a role, which comes with a set of permissions, and members who may assume that role.
1389    {
1390      &quot;condition&quot;: { # Represents an expression text. Example: title: &quot;User account presence&quot; description: &quot;Determines whether the request has a user account&quot; expression: &quot;size(request.user) &gt; 0&quot; # The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
1391        &quot;description&quot;: &quot;A String&quot;, # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1392        &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
1393        &quot;location&quot;: &quot;A String&quot;, # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1394        &quot;title&quot;: &quot;A String&quot;, # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1395      },
1396      &quot;members&quot;: [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
1397          # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
1398          # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
1399          # - user:emailid — An email address that represents a specific account. For example, user:[email protected] or user:[email protected].
1400          # - serviceAccount:emailid — An email address that represents a service account. For example,  serviceAccount:[email protected] .
1401          # - group:emailid — An email address that represents a Google group. For example, group:[email protected].
1402          # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
1403          # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
1404          # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
1405          # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
1406        &quot;A String&quot;,
1407      ],
1408      &quot;role&quot;: &quot;A String&quot;, # 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.
1409          # The new IAM roles are:
1410          # - roles/storage.admin — Full control of Google Cloud Storage resources.
1411          # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
1412          # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
1413          # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects.   The legacy IAM roles are:
1414          # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
1415          # - roles/storage.legacyObjectOwnerRead/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
1416          # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
1417          # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
1418          # - 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.
1419    },
1420  ],
1421  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1  Entity tag for the policy.
1422  &quot;kind&quot;: &quot;storage#policy&quot;, # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.
1423  &quot;resourceId&quot;: &quot;A String&quot;, # The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
1424  &quot;version&quot;: 42, # The IAM policy format version.
1425}
1426
1427  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1428  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
1429  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
1430
1431Returns:
1432  An object of the form:
1433
1434    { # A bucket/object IAM policy.
1435  &quot;bindings&quot;: [ # An association between a role, which comes with a set of permissions, and members who may assume that role.
1436    {
1437      &quot;condition&quot;: { # Represents an expression text. Example: title: &quot;User account presence&quot; description: &quot;Determines whether the request has a user account&quot; expression: &quot;size(request.user) &gt; 0&quot; # The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently.
1438        &quot;description&quot;: &quot;A String&quot;, # An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
1439        &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.
1440        &quot;location&quot;: &quot;A String&quot;, # An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
1441        &quot;title&quot;: &quot;A String&quot;, # An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
1442      },
1443      &quot;members&quot;: [ # A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows:
1444          # - allUsers — A special identifier that represents anyone on the internet; with or without a Google account.
1445          # - allAuthenticatedUsers — A special identifier that represents anyone who is authenticated with a Google account or a service account.
1446          # - user:emailid — An email address that represents a specific account. For example, user:[email protected] or user:[email protected].
1447          # - serviceAccount:emailid — An email address that represents a service account. For example,  serviceAccount:[email protected] .
1448          # - group:emailid — An email address that represents a Google group. For example, group:[email protected].
1449          # - domain:domain — A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com.
1450          # - projectOwner:projectid — Owners of the given project. For example, projectOwner:my-example-project
1451          # - projectEditor:projectid — Editors of the given project. For example, projectEditor:my-example-project
1452          # - projectViewer:projectid — Viewers of the given project. For example, projectViewer:my-example-project
1453        &quot;A String&quot;,
1454      ],
1455      &quot;role&quot;: &quot;A String&quot;, # 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.
1456          # The new IAM roles are:
1457          # - roles/storage.admin — Full control of Google Cloud Storage resources.
1458          # - roles/storage.objectViewer — Read-Only access to Google Cloud Storage objects.
1459          # - roles/storage.objectCreator — Access to create objects in Google Cloud Storage.
1460          # - roles/storage.objectAdmin — Full control of Google Cloud Storage objects.   The legacy IAM roles are:
1461          # - roles/storage.legacyObjectReader — Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role.
1462          # - roles/storage.legacyObjectOwnerRead/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role.
1463          # - roles/storage.legacyBucketReader — Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role.
1464          # - roles/storage.legacyBucketWriter — Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role.
1465          # - 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.
1466    },
1467  ],
1468  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1  Entity tag for the policy.
1469  &quot;kind&quot;: &quot;storage#policy&quot;, # The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.
1470  &quot;resourceId&quot;: &quot;A String&quot;, # The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/object for objects. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.
1471  &quot;version&quot;: 42, # The IAM policy format version.
1472}</pre>
1473</div>
1474
1475<div class="method">
1476    <code class="details" id="testIamPermissions">testIamPermissions(bucket, object, permissions, generation=None, provisionalUserProject=None, userProject=None)</code>
1477  <pre>Tests a set of permissions on the given object to see which, if any, are held by the caller.
1478
1479Args:
1480  bucket: string, Name of the bucket in which the object resides. (required)
1481  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)
1482  permissions: string, Permissions to test. (required) (repeated)
1483  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1484  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
1485  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
1486
1487Returns:
1488  An object of the form:
1489
1490    { # A storage.(buckets|objects).testIamPermissions response.
1491  &quot;kind&quot;: &quot;storage#testIamPermissionsResponse&quot;, # The kind of item this is.
1492  &quot;permissions&quot;: [ # 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:
1493      # - storage.buckets.delete — Delete bucket.
1494      # - storage.buckets.get — Read bucket metadata.
1495      # - storage.buckets.getIamPolicy — Read bucket IAM policy.
1496      # - storage.buckets.create — Create bucket.
1497      # - storage.buckets.list — List buckets.
1498      # - storage.buckets.setIamPolicy — Update bucket IAM policy.
1499      # - storage.buckets.update — Update bucket metadata.
1500      # - storage.objects.delete — Delete object.
1501      # - storage.objects.get — Read object data and metadata.
1502      # - storage.objects.getIamPolicy — Read object IAM policy.
1503      # - storage.objects.create — Create object.
1504      # - storage.objects.list — List objects.
1505      # - storage.objects.setIamPolicy — Update object IAM policy.
1506      # - storage.objects.update — Update object metadata.
1507    &quot;A String&quot;,
1508  ],
1509}</pre>
1510</div>
1511
1512<div class="method">
1513    <code class="details" id="update">update(bucket, object, body=None, generation=None, ifGenerationMatch=None, ifGenerationNotMatch=None, ifMetagenerationMatch=None, ifMetagenerationNotMatch=None, predefinedAcl=None, projection=None, provisionalUserProject=None, userProject=None)</code>
1514  <pre>Updates an object&#x27;s metadata.
1515
1516Args:
1517  bucket: string, Name of the bucket in which the object resides. (required)
1518  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)
1519  body: object, The request body.
1520    The object takes the form of:
1521
1522{ # An object.
1523  &quot;acl&quot;: [ # Access controls on the object.
1524    { # An access-control entry.
1525      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
1526      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
1527      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
1528      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
1529          # - user-userId
1530          # - user-email
1531          # - group-groupId
1532          # - group-email
1533          # - domain-domain
1534          # - project-team-projectId
1535          # - allUsers
1536          # - allAuthenticatedUsers Examples:
1537          # - The user [email protected] would be [email protected].
1538          # - The group [email protected] would be [email protected].
1539          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1540      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
1541      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
1542      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
1543      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
1544      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1545      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
1546      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
1547        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
1548        &quot;team&quot;: &quot;A String&quot;, # The team.
1549      },
1550      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
1551      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
1552    },
1553  ],
1554  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
1555  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
1556  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1557  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
1558  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
1559  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
1560  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
1561  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
1562  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
1563  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1564    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
1565    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
1566  },
1567  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
1568  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
1569  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
1570  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
1571  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
1572  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
1573  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1574  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
1575  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
1576    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
1577  },
1578  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
1579  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
1580  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
1581    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
1582    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
1583  },
1584  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
1585  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
1586  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
1587  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
1588  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
1589  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
1590  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
1591  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
1592  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
1593}
1594
1595  generation: string, If present, selects a specific revision of this object (as opposed to the latest version, the default).
1596  ifGenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.
1597  ifGenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.
1598  ifMetagenerationMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration matches the given value.
1599  ifMetagenerationNotMatch: string, Makes the operation conditional on whether the object&#x27;s current metageneration does not match the given value.
1600  predefinedAcl: string, Apply a predefined set of access controls to this object.
1601    Allowed values
1602      authenticatedRead - Object owner gets OWNER access, and allAuthenticatedUsers get READER access.
1603      bucketOwnerFullControl - Object owner gets OWNER access, and project team owners get OWNER access.
1604      bucketOwnerRead - Object owner gets OWNER access, and project team owners get READER access.
1605      private - Object owner gets OWNER access.
1606      projectPrivate - Object owner gets OWNER access, and project team members get access according to their roles.
1607      publicRead - Object owner gets OWNER access, and allUsers get READER access.
1608  projection: string, Set of properties to return. Defaults to full.
1609    Allowed values
1610      full - Include all properties.
1611      noAcl - Omit the owner, acl property.
1612  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
1613  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
1614
1615Returns:
1616  An object of the form:
1617
1618    { # An object.
1619  &quot;acl&quot;: [ # Access controls on the object.
1620    { # An access-control entry.
1621      &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket.
1622      &quot;domain&quot;: &quot;A String&quot;, # The domain associated with the entity, if any.
1623      &quot;email&quot;: &quot;A String&quot;, # The email address associated with the entity, if any.
1624      &quot;entity&quot;: &quot;A String&quot;, # The entity holding the permission, in one of the following forms:
1625          # - user-userId
1626          # - user-email
1627          # - group-groupId
1628          # - group-email
1629          # - domain-domain
1630          # - project-team-projectId
1631          # - allUsers
1632          # - allAuthenticatedUsers Examples:
1633          # - The user [email protected] would be [email protected].
1634          # - The group [email protected] would be [email protected].
1635          # - To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.
1636      &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity, if any.
1637      &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the access-control entry.
1638      &quot;generation&quot;: &quot;A String&quot;, # The content generation of the object, if applied to an object.
1639      &quot;id&quot;: &quot;A String&quot;, # The ID of the access-control entry.
1640      &quot;kind&quot;: &quot;storage#objectAccessControl&quot;, # The kind of item this is. For object access control entries, this is always storage#objectAccessControl.
1641      &quot;object&quot;: &quot;A String&quot;, # The name of the object, if applied to an object.
1642      &quot;projectTeam&quot;: { # The project team associated with the entity, if any.
1643        &quot;projectNumber&quot;: &quot;A String&quot;, # The project number.
1644        &quot;team&quot;: &quot;A String&quot;, # The team.
1645      },
1646      &quot;role&quot;: &quot;A String&quot;, # The access permission for the entity.
1647      &quot;selfLink&quot;: &quot;A String&quot;, # The link to this access-control entry.
1648    },
1649  ],
1650  &quot;bucket&quot;: &quot;A String&quot;, # The name of the bucket containing this object.
1651  &quot;cacheControl&quot;: &quot;A String&quot;, # 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.
1652  &quot;componentCount&quot;: 42, # Number of underlying components that make up this object. Components are accumulated by compose operations.
1653  &quot;contentDisposition&quot;: &quot;A String&quot;, # Content-Disposition of the object data.
1654  &quot;contentEncoding&quot;: &quot;A String&quot;, # Content-Encoding of the object data.
1655  &quot;contentLanguage&quot;: &quot;A String&quot;, # Content-Language of the object data.
1656  &quot;contentType&quot;: &quot;A String&quot;, # Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.
1657  &quot;crc32c&quot;: &quot;A String&quot;, # 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.
1658  &quot;customTime&quot;: &quot;A String&quot;, # A timestamp in RFC 3339 format specified by the user for an object.
1659  &quot;customerEncryption&quot;: { # Metadata of customer-supplied encryption key, if the object is encrypted by such a key.
1660    &quot;encryptionAlgorithm&quot;: &quot;A String&quot;, # The encryption algorithm.
1661    &quot;keySha256&quot;: &quot;A String&quot;, # SHA256 hash value of the encryption key.
1662  },
1663  &quot;etag&quot;: &quot;A String&quot;, # HTTP 1.1 Entity tag for the object.
1664  &quot;eventBasedHold&quot;: True or False, # Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold&#x27;s release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.
1665  &quot;generation&quot;: &quot;A String&quot;, # The content generation of this object. Used for object versioning.
1666  &quot;id&quot;: &quot;A String&quot;, # The ID of the object, including the bucket name, object name, and generation number.
1667  &quot;kind&quot;: &quot;storage#object&quot;, # The kind of item this is. For objects, this is always storage#object.
1668  &quot;kmsKeyName&quot;: &quot;A String&quot;, # Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.
1669  &quot;md5Hash&quot;: &quot;A String&quot;, # MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.
1670  &quot;mediaLink&quot;: &quot;A String&quot;, # Media download link.
1671  &quot;metadata&quot;: { # User-provided metadata, in key/value pairs.
1672    &quot;a_key&quot;: &quot;A String&quot;, # An individual metadata entry.
1673  },
1674  &quot;metageneration&quot;: &quot;A String&quot;, # 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.
1675  &quot;name&quot;: &quot;A String&quot;, # The name of the object. Required if not specified by URL parameter.
1676  &quot;owner&quot;: { # The owner of the object. This will always be the uploader of the object.
1677    &quot;entity&quot;: &quot;A String&quot;, # The entity, in the form user-userId.
1678    &quot;entityId&quot;: &quot;A String&quot;, # The ID for the entity.
1679  },
1680  &quot;retentionExpirationTime&quot;: &quot;A String&quot;, # A server-determined value that specifies the earliest time that the object&#x27;s retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).
1681  &quot;selfLink&quot;: &quot;A String&quot;, # The link to this object.
1682  &quot;size&quot;: &quot;A String&quot;, # Content-Length of the data in bytes.
1683  &quot;storageClass&quot;: &quot;A String&quot;, # Storage class of the object.
1684  &quot;temporaryHold&quot;: True or False, # Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.
1685  &quot;timeCreated&quot;: &quot;A String&quot;, # The creation time of the object in RFC 3339 format.
1686  &quot;timeDeleted&quot;: &quot;A String&quot;, # 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.
1687  &quot;timeStorageClassUpdated&quot;: &quot;A String&quot;, # The time at which the object&#x27;s storage class was last changed. When the object is initially created, it will be set to timeCreated.
1688  &quot;updated&quot;: &quot;A String&quot;, # The modification time of the object metadata in RFC 3339 format.
1689}</pre>
1690</div>
1691
1692<div class="method">
1693    <code class="details" id="watchAll">watchAll(bucket, body=None, delimiter=None, endOffset=None, includeTrailingDelimiter=None, maxResults=None, pageToken=None, prefix=None, projection=None, provisionalUserProject=None, startOffset=None, userProject=None, versions=None)</code>
1694  <pre>Watch for changes on all objects in a bucket.
1695
1696Args:
1697  bucket: string, Name of the bucket in which to look for objects. (required)
1698  body: object, The request body.
1699    The object takes the form of:
1700
1701{ # An notification channel used to watch for resource changes.
1702  &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
1703  &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
1704  &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
1705  &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
1706  &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
1707    &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
1708  },
1709  &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
1710  &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
1711  &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
1712  &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
1713  &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
1714}
1715
1716  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.
1717  endOffset: string, Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
1718  includeTrailingDelimiter: boolean, If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.
1719  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.
1720  pageToken: string, A previously-returned page token representing part of the larger set of results to view.
1721  prefix: string, Filter results to objects whose names begin with this prefix.
1722  projection: string, Set of properties to return. Defaults to noAcl.
1723    Allowed values
1724      full - Include all properties.
1725      noAcl - Omit the owner, acl property.
1726  provisionalUserProject: string, The project to be billed for this request if the target bucket is requester-pays bucket.
1727  startOffset: string, Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).
1728  userProject: string, The project to be billed for this request. Required for Requester Pays buckets.
1729  versions: boolean, If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.
1730
1731Returns:
1732  An object of the form:
1733
1734    { # An notification channel used to watch for resource changes.
1735  &quot;address&quot;: &quot;A String&quot;, # The address where notifications are delivered for this channel.
1736  &quot;expiration&quot;: &quot;A String&quot;, # Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.
1737  &quot;id&quot;: &quot;A String&quot;, # A UUID or similar unique string that identifies this channel.
1738  &quot;kind&quot;: &quot;api#channel&quot;, # Identifies this as a notification channel used to watch for changes to a resource, which is &quot;api#channel&quot;.
1739  &quot;params&quot;: { # Additional parameters controlling delivery channel behavior. Optional.
1740    &quot;a_key&quot;: &quot;A String&quot;, # Declares a new parameter by name.
1741  },
1742  &quot;payload&quot;: True or False, # A Boolean value to indicate whether payload is wanted. Optional.
1743  &quot;resourceId&quot;: &quot;A String&quot;, # An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.
1744  &quot;resourceUri&quot;: &quot;A String&quot;, # A version-specific identifier for the watched resource.
1745  &quot;token&quot;: &quot;A String&quot;, # An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.
1746  &quot;type&quot;: &quot;A String&quot;, # The type of delivery mechanism used for this channel.
1747}</pre>
1748</div>
1749
1750</body></html>