@google-cloud/storage-control 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -74
- package/build/protos/google/storage/v2/storage.proto +3161 -0
- package/build/protos/protos.d.ts +10641 -0
- package/build/protos/protos.js +28904 -0
- package/build/protos/protos.json +4286 -4
- package/build/src/index.d.ts +2 -3
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/storage_control_client.d.ts +2035 -0
- package/build/src/storage_control_client.js +1387 -0
- package/build/src/storage_control_client.js.map +1 -0
- package/build/src/util/ast_utils.d.ts +22 -0
- package/build/src/util/ast_utils.js +352 -0
- package/build/src/util/ast_utils.js.map +1 -0
- package/build/src/util/index_fix_utils.d.ts +15 -0
- package/build/src/util/index_fix_utils.js +86 -0
- package/build/src/util/index_fix_utils.js.map +1 -0
- package/build/src/util/proto_utils.d.ts +13 -0
- package/build/src/util/proto_utils.js +53 -0
- package/build/src/util/proto_utils.js.map +1 -0
- package/build/src/util/storage_control_utils.d.ts +1 -0
- package/build/src/util/storage_control_utils.js +31 -0
- package/build/src/util/storage_control_utils.js.map +1 -0
- package/build/src/util/uber_client_builder.d.ts +12 -0
- package/build/src/util/uber_client_builder.js +187 -0
- package/build/src/util/uber_client_builder.js.map +1 -0
- package/build/src/v2/index.d.ts +1 -0
- package/build/src/v2/index.js +3 -1
- package/build/src/v2/index.js.map +1 -1
- package/build/src/v2/storage_client.d.ts +614 -0
- package/build/src/v2/storage_client.js +911 -0
- package/build/src/v2/storage_client.js.map +1 -0
- package/build/src/v2/storage_client_config.json +65 -0
- package/build/src/v2/storage_control_client.d.ts +138 -138
- package/build/src/v2/storage_control_client.js +485 -231
- package/build/src/v2/storage_control_client.js.map +1 -1
- package/build/src/v2/storage_proto_list.json +3 -0
- package/package.json +4 -2
|
@@ -0,0 +1,3161 @@
|
|
|
1
|
+
// Copyright 2025 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.storage.v2;
|
|
18
|
+
|
|
19
|
+
import "google/api/client.proto";
|
|
20
|
+
import "google/api/field_behavior.proto";
|
|
21
|
+
import "google/api/resource.proto";
|
|
22
|
+
import "google/api/routing.proto";
|
|
23
|
+
import "google/iam/v1/iam_policy.proto";
|
|
24
|
+
import "google/iam/v1/policy.proto";
|
|
25
|
+
import "google/protobuf/duration.proto";
|
|
26
|
+
import "google/protobuf/empty.proto";
|
|
27
|
+
import "google/protobuf/field_mask.proto";
|
|
28
|
+
import "google/protobuf/timestamp.proto";
|
|
29
|
+
import "google/rpc/status.proto";
|
|
30
|
+
import "google/type/date.proto";
|
|
31
|
+
|
|
32
|
+
option go_package = "cloud.google.com/go/storage/internal/apiv2/storagepb;storagepb";
|
|
33
|
+
option java_multiple_files = true;
|
|
34
|
+
option java_outer_classname = "StorageProto";
|
|
35
|
+
option java_package = "com.google.storage.v2";
|
|
36
|
+
option (google.api.resource_definition) = {
|
|
37
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
38
|
+
pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// ## API Overview and Naming Syntax
|
|
42
|
+
//
|
|
43
|
+
// The Cloud Storage gRPC API allows applications to read and write data through
|
|
44
|
+
// the abstractions of buckets and objects. For a description of these
|
|
45
|
+
// abstractions please see [Cloud Storage
|
|
46
|
+
// documentation](https://cloud.google.com/storage/docs).
|
|
47
|
+
//
|
|
48
|
+
// Resources are named as follows:
|
|
49
|
+
//
|
|
50
|
+
// - Projects are referred to as they are defined by the Resource Manager API,
|
|
51
|
+
// using strings like `projects/123456` or `projects/my-string-id`.
|
|
52
|
+
// - Buckets are named using string names of the form:
|
|
53
|
+
// `projects/{project}/buckets/{bucket}`.
|
|
54
|
+
// For globally unique buckets, `_` might be substituted for the project.
|
|
55
|
+
// - Objects are uniquely identified by their name along with the name of the
|
|
56
|
+
// bucket they belong to, as separate strings in this API. For example:
|
|
57
|
+
//
|
|
58
|
+
// ```
|
|
59
|
+
// ReadObjectRequest {
|
|
60
|
+
// bucket: 'projects/_/buckets/my-bucket'
|
|
61
|
+
// object: 'my-object'
|
|
62
|
+
// }
|
|
63
|
+
// ```
|
|
64
|
+
//
|
|
65
|
+
// Note that object names can contain `/` characters, which are treated as
|
|
66
|
+
// any other character (no special directory semantics).
|
|
67
|
+
service Storage {
|
|
68
|
+
option (google.api.default_host) = "storage.googleapis.com";
|
|
69
|
+
option (google.api.oauth_scopes) =
|
|
70
|
+
"https://www.googleapis.com/auth/cloud-platform,"
|
|
71
|
+
"https://www.googleapis.com/auth/cloud-platform.read-only,"
|
|
72
|
+
"https://www.googleapis.com/auth/devstorage.full_control,"
|
|
73
|
+
"https://www.googleapis.com/auth/devstorage.read_only,"
|
|
74
|
+
"https://www.googleapis.com/auth/devstorage.read_write";
|
|
75
|
+
|
|
76
|
+
// Permanently deletes an empty bucket.
|
|
77
|
+
// The request fails if there are any live or
|
|
78
|
+
// noncurrent objects in the bucket, but the request succeeds if the
|
|
79
|
+
// bucket only contains soft-deleted objects or incomplete uploads, such
|
|
80
|
+
// as ongoing XML API multipart uploads. Does not permanently delete
|
|
81
|
+
// soft-deleted objects.
|
|
82
|
+
//
|
|
83
|
+
// When this API is used to delete a bucket containing an object that has a
|
|
84
|
+
// soft delete policy
|
|
85
|
+
// enabled, the object becomes soft deleted, and the
|
|
86
|
+
// `softDeleteTime` and `hardDeleteTime` properties are set on the
|
|
87
|
+
// object.
|
|
88
|
+
//
|
|
89
|
+
// Objects and multipart uploads that were in the bucket at the time of
|
|
90
|
+
// deletion are also retained for the specified retention duration. When
|
|
91
|
+
// a soft-deleted bucket reaches the end of its retention duration, it
|
|
92
|
+
// is permanently deleted. The `hardDeleteTime` of the bucket always
|
|
93
|
+
// equals
|
|
94
|
+
// or exceeds the expiration time of the last soft-deleted object in the
|
|
95
|
+
// bucket.
|
|
96
|
+
//
|
|
97
|
+
// **IAM Permissions**:
|
|
98
|
+
//
|
|
99
|
+
// Requires `storage.buckets.delete` IAM permission on the bucket.
|
|
100
|
+
rpc DeleteBucket(DeleteBucketRequest) returns (google.protobuf.Empty) {
|
|
101
|
+
option (google.api.routing) = {
|
|
102
|
+
routing_parameters { field: "name" path_template: "{bucket=**}" }
|
|
103
|
+
};
|
|
104
|
+
option (google.api.method_signature) = "name";
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Returns metadata for the specified bucket.
|
|
108
|
+
//
|
|
109
|
+
// **IAM Permissions**:
|
|
110
|
+
//
|
|
111
|
+
// Requires `storage.buckets.get`
|
|
112
|
+
// IAM permission on
|
|
113
|
+
// the bucket. Additionally, to return specific bucket metadata, the
|
|
114
|
+
// authenticated user must have the following permissions:
|
|
115
|
+
//
|
|
116
|
+
// - To return the IAM policies: `storage.buckets.getIamPolicy`
|
|
117
|
+
// - To return the bucket IP filtering rules: `storage.buckets.getIpFilter`
|
|
118
|
+
rpc GetBucket(GetBucketRequest) returns (Bucket) {
|
|
119
|
+
option (google.api.routing) = {
|
|
120
|
+
routing_parameters { field: "name" path_template: "{bucket=**}" }
|
|
121
|
+
};
|
|
122
|
+
option (google.api.method_signature) = "name";
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Creates a new bucket.
|
|
126
|
+
//
|
|
127
|
+
// **IAM Permissions**:
|
|
128
|
+
//
|
|
129
|
+
// Requires `storage.buckets.create` IAM permission on the bucket.
|
|
130
|
+
// Additionally, to enable specific bucket features, the authenticated user
|
|
131
|
+
// must have the following permissions:
|
|
132
|
+
//
|
|
133
|
+
// - To enable object retention using the `enableObjectRetention` query
|
|
134
|
+
// parameter: `storage.buckets.enableObjectRetention`
|
|
135
|
+
// - To set the bucket IP filtering rules: `storage.buckets.setIpFilter`
|
|
136
|
+
rpc CreateBucket(CreateBucketRequest) returns (Bucket) {
|
|
137
|
+
option (google.api.routing) = {
|
|
138
|
+
routing_parameters { field: "parent" path_template: "{project=**}" }
|
|
139
|
+
routing_parameters {
|
|
140
|
+
field: "bucket.project"
|
|
141
|
+
path_template: "{project=**}"
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
option (google.api.method_signature) = "parent,bucket,bucket_id";
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Retrieves a list of buckets for a given project, ordered
|
|
148
|
+
// lexicographically by name.
|
|
149
|
+
//
|
|
150
|
+
// **IAM Permissions**:
|
|
151
|
+
//
|
|
152
|
+
// Requires `storage.buckets.list` IAM permission on the bucket.
|
|
153
|
+
// Additionally, to enable specific bucket features, the authenticated
|
|
154
|
+
// user must have the following permissions:
|
|
155
|
+
//
|
|
156
|
+
// - To list the IAM policies: `storage.buckets.getIamPolicy`
|
|
157
|
+
// - To list the bucket IP filtering rules: `storage.buckets.getIpFilter`
|
|
158
|
+
rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) {
|
|
159
|
+
option (google.api.routing) = {
|
|
160
|
+
routing_parameters { field: "parent" path_template: "{project=**}" }
|
|
161
|
+
};
|
|
162
|
+
option (google.api.method_signature) = "parent";
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Permanently locks the retention
|
|
166
|
+
// policy that is
|
|
167
|
+
// currently applied to the specified bucket.
|
|
168
|
+
//
|
|
169
|
+
// Caution: Locking a bucket is an
|
|
170
|
+
// irreversible action. Once you lock a bucket:
|
|
171
|
+
//
|
|
172
|
+
// - You cannot remove the retention policy from the bucket.
|
|
173
|
+
// - You cannot decrease the retention period for the policy.
|
|
174
|
+
//
|
|
175
|
+
// Once locked, you must delete the entire bucket in order to remove the
|
|
176
|
+
// bucket's retention policy. However, before you can delete the bucket, you
|
|
177
|
+
// must delete all the objects in the bucket, which is only
|
|
178
|
+
// possible if all the objects have reached the retention period set by the
|
|
179
|
+
// retention policy.
|
|
180
|
+
//
|
|
181
|
+
// **IAM Permissions**:
|
|
182
|
+
//
|
|
183
|
+
// Requires `storage.buckets.update` IAM permission on the bucket.
|
|
184
|
+
rpc LockBucketRetentionPolicy(LockBucketRetentionPolicyRequest)
|
|
185
|
+
returns (Bucket) {
|
|
186
|
+
option (google.api.routing) = {
|
|
187
|
+
routing_parameters { field: "bucket" path_template: "{bucket=**}" }
|
|
188
|
+
};
|
|
189
|
+
option (google.api.method_signature) = "bucket";
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Gets the IAM policy for a specified bucket or managed folder.
|
|
193
|
+
// The `resource` field in the request should be
|
|
194
|
+
// `projects/_/buckets/{bucket}` for a bucket, or
|
|
195
|
+
// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
196
|
+
// for a managed folder.
|
|
197
|
+
//
|
|
198
|
+
// **IAM Permissions**:
|
|
199
|
+
//
|
|
200
|
+
// Requires `storage.buckets.getIamPolicy` on the bucket or
|
|
201
|
+
// `storage.managedFolders.getIamPolicy` IAM permission on the
|
|
202
|
+
// managed folder.
|
|
203
|
+
rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest)
|
|
204
|
+
returns (google.iam.v1.Policy) {
|
|
205
|
+
option (google.api.routing) = {
|
|
206
|
+
routing_parameters { field: "resource" path_template: "{bucket=**}" }
|
|
207
|
+
routing_parameters {
|
|
208
|
+
field: "resource"
|
|
209
|
+
path_template: "{bucket=projects/*/buckets/*}/**"
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
option (google.api.method_signature) = "resource";
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Updates an IAM policy for the specified bucket or managed folder.
|
|
216
|
+
// The `resource` field in the request should be
|
|
217
|
+
// `projects/_/buckets/{bucket}` for a bucket, or
|
|
218
|
+
// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
219
|
+
// for a managed folder.
|
|
220
|
+
rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest)
|
|
221
|
+
returns (google.iam.v1.Policy) {
|
|
222
|
+
option (google.api.routing) = {
|
|
223
|
+
routing_parameters { field: "resource" path_template: "{bucket=**}" }
|
|
224
|
+
routing_parameters {
|
|
225
|
+
field: "resource"
|
|
226
|
+
path_template: "{bucket=projects/*/buckets/*}/**"
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
option (google.api.method_signature) = "resource,policy";
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Tests a set of permissions on the given bucket, object, or managed folder
|
|
233
|
+
// to see which, if any, are held by the caller. The `resource` field in the
|
|
234
|
+
// request should be `projects/_/buckets/{bucket}` for a bucket,
|
|
235
|
+
// `projects/_/buckets/{bucket}/objects/{object}` for an object, or
|
|
236
|
+
// `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
|
|
237
|
+
// for a managed folder.
|
|
238
|
+
rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest)
|
|
239
|
+
returns (google.iam.v1.TestIamPermissionsResponse) {
|
|
240
|
+
option (google.api.routing) = {
|
|
241
|
+
routing_parameters { field: "resource" path_template: "{bucket=**}" }
|
|
242
|
+
routing_parameters {
|
|
243
|
+
field: "resource"
|
|
244
|
+
path_template: "{bucket=projects/*/buckets/*}/objects/**"
|
|
245
|
+
}
|
|
246
|
+
routing_parameters {
|
|
247
|
+
field: "resource"
|
|
248
|
+
path_template: "{bucket=projects/*/buckets/*}/managedFolders/**"
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
option (google.api.method_signature) = "resource,permissions";
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Updates a bucket. Changes to the bucket are readable immediately after
|
|
255
|
+
// writing, but configuration changes might take time to propagate. This
|
|
256
|
+
// method supports `patch` semantics.
|
|
257
|
+
//
|
|
258
|
+
// **IAM Permissions**:
|
|
259
|
+
//
|
|
260
|
+
// Requires `storage.buckets.update` IAM permission on the bucket.
|
|
261
|
+
// Additionally, to enable specific bucket features, the authenticated user
|
|
262
|
+
// must have the following permissions:
|
|
263
|
+
//
|
|
264
|
+
// - To set bucket IP filtering rules: `storage.buckets.setIpFilter`
|
|
265
|
+
// - To update public access prevention policies or access control lists
|
|
266
|
+
// (ACLs): `storage.buckets.setIamPolicy`
|
|
267
|
+
rpc UpdateBucket(UpdateBucketRequest) returns (Bucket) {
|
|
268
|
+
option (google.api.routing) = {
|
|
269
|
+
routing_parameters { field: "bucket.name" path_template: "{bucket=**}" }
|
|
270
|
+
};
|
|
271
|
+
option (google.api.method_signature) = "bucket,update_mask";
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Concatenates a list of existing objects into a new object in the same
|
|
275
|
+
// bucket. The existing source objects are unaffected by this operation.
|
|
276
|
+
//
|
|
277
|
+
// **IAM Permissions**:
|
|
278
|
+
//
|
|
279
|
+
// Requires the `storage.objects.create` and `storage.objects.get` IAM
|
|
280
|
+
// permissions to use this method. If the new composite object
|
|
281
|
+
// overwrites an existing object, the authenticated user must also have
|
|
282
|
+
// the `storage.objects.delete` permission. If the request body includes
|
|
283
|
+
// the retention property, the authenticated user must also have the
|
|
284
|
+
// `storage.objects.setRetention` IAM permission.
|
|
285
|
+
rpc ComposeObject(ComposeObjectRequest) returns (StorageObject) {
|
|
286
|
+
option (google.api.routing) = {
|
|
287
|
+
routing_parameters {
|
|
288
|
+
field: "destination.bucket"
|
|
289
|
+
path_template: "{bucket=**}"
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// Deletes an object and its metadata. Deletions are permanent if versioning
|
|
295
|
+
// is not enabled for the bucket, or if the generation parameter is used, or
|
|
296
|
+
// if soft delete is not
|
|
297
|
+
// enabled for the bucket.
|
|
298
|
+
// When this API is used to delete an object from a bucket that has soft
|
|
299
|
+
// delete policy enabled, the object becomes soft deleted, and the
|
|
300
|
+
// `softDeleteTime` and `hardDeleteTime` properties are set on the object.
|
|
301
|
+
// This API cannot be used to permanently delete soft-deleted objects.
|
|
302
|
+
// Soft-deleted objects are permanently deleted according to their
|
|
303
|
+
// `hardDeleteTime`.
|
|
304
|
+
//
|
|
305
|
+
// You can use the [`RestoreObject`][google.storage.v2.Storage.RestoreObject]
|
|
306
|
+
// API to restore soft-deleted objects until the soft delete retention period
|
|
307
|
+
// has passed.
|
|
308
|
+
//
|
|
309
|
+
// **IAM Permissions**:
|
|
310
|
+
//
|
|
311
|
+
// Requires `storage.objects.delete` IAM permission on the bucket.
|
|
312
|
+
rpc DeleteObject(DeleteObjectRequest) returns (google.protobuf.Empty) {
|
|
313
|
+
option (google.api.routing) = {
|
|
314
|
+
routing_parameters { field: "bucket" path_template: "{bucket=**}" }
|
|
315
|
+
};
|
|
316
|
+
option (google.api.method_signature) = "bucket,object";
|
|
317
|
+
option (google.api.method_signature) = "bucket,object,generation";
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// Restores a
|
|
321
|
+
// soft-deleted object.
|
|
322
|
+
// When a soft-deleted object is restored, a new copy of that object is
|
|
323
|
+
// created in the same bucket and inherits the same metadata as the
|
|
324
|
+
// soft-deleted object. The inherited metadata is the metadata that existed
|
|
325
|
+
// when the original object became soft deleted, with the following
|
|
326
|
+
// exceptions:
|
|
327
|
+
//
|
|
328
|
+
// - The `createTime` of the new object is set to the time at which the
|
|
329
|
+
// soft-deleted object was restored.
|
|
330
|
+
// - The `softDeleteTime` and `hardDeleteTime` values are cleared.
|
|
331
|
+
// - A new generation is assigned and the metageneration is reset to 1.
|
|
332
|
+
// - If the soft-deleted object was in a bucket that had Autoclass enabled,
|
|
333
|
+
// the new object is
|
|
334
|
+
// restored to Standard storage.
|
|
335
|
+
// - The restored object inherits the bucket's default object ACL, unless
|
|
336
|
+
// `copySourceAcl` is `true`.
|
|
337
|
+
//
|
|
338
|
+
// If a live object using the same name already exists in the bucket and
|
|
339
|
+
// becomes overwritten, the live object becomes a noncurrent object if StorageObject
|
|
340
|
+
// Versioning is enabled on the bucket. If StorageObject Versioning is not enabled,
|
|
341
|
+
// the live object becomes soft deleted.
|
|
342
|
+
//
|
|
343
|
+
// **IAM Permissions**:
|
|
344
|
+
//
|
|
345
|
+
// Requires the following IAM permissions to use this method:
|
|
346
|
+
//
|
|
347
|
+
// - `storage.objects.restore`
|
|
348
|
+
// - `storage.objects.create`
|
|
349
|
+
// - `storage.objects.delete` (only required if overwriting an existing
|
|
350
|
+
// object)
|
|
351
|
+
// - `storage.objects.getIamPolicy` (only required if `projection` is `full`
|
|
352
|
+
// and the relevant bucket
|
|
353
|
+
// has uniform bucket-level access disabled)
|
|
354
|
+
// - `storage.objects.setIamPolicy` (only required if `copySourceAcl` is
|
|
355
|
+
// `true` and the relevant
|
|
356
|
+
// bucket has uniform bucket-level access disabled)
|
|
357
|
+
rpc RestoreObject(RestoreObjectRequest) returns (StorageObject) {
|
|
358
|
+
option (google.api.routing) = {
|
|
359
|
+
routing_parameters { field: "bucket" path_template: "{bucket=**}" }
|
|
360
|
+
};
|
|
361
|
+
option (google.api.method_signature) = "bucket,object,generation";
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Cancels an in-progress resumable upload.
|
|
365
|
+
//
|
|
366
|
+
// Any attempts to write to the resumable upload after cancelling the upload
|
|
367
|
+
// fail.
|
|
368
|
+
//
|
|
369
|
+
// The behavior for any in-progress write operations is not guaranteed;
|
|
370
|
+
// they could either complete before the cancellation or fail if the
|
|
371
|
+
// cancellation completes first.
|
|
372
|
+
rpc CancelResumableWrite(CancelResumableWriteRequest)
|
|
373
|
+
returns (CancelResumableWriteResponse) {
|
|
374
|
+
option (google.api.routing) = {
|
|
375
|
+
routing_parameters {
|
|
376
|
+
field: "upload_id"
|
|
377
|
+
path_template: "{bucket=projects/*/buckets/*}/**"
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
option (google.api.method_signature) = "upload_id";
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Retrieves object metadata.
|
|
384
|
+
//
|
|
385
|
+
// **IAM Permissions**:
|
|
386
|
+
//
|
|
387
|
+
// Requires `storage.objects.get` IAM permission on the bucket.
|
|
388
|
+
// To return object ACLs, the authenticated user must also have
|
|
389
|
+
// the `storage.objects.getIamPolicy` permission.
|
|
390
|
+
rpc GetObject(GetObjectRequest) returns (StorageObject) {
|
|
391
|
+
option (google.api.routing) = {
|
|
392
|
+
routing_parameters { field: "bucket" path_template: "{bucket=**}" }
|
|
393
|
+
};
|
|
394
|
+
option (google.api.method_signature) = "bucket,object";
|
|
395
|
+
option (google.api.method_signature) = "bucket,object,generation";
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// Retrieves object data.
|
|
399
|
+
//
|
|
400
|
+
// **IAM Permissions**:
|
|
401
|
+
//
|
|
402
|
+
// Requires `storage.objects.get` IAM permission on the bucket.
|
|
403
|
+
rpc ReadObject(ReadObjectRequest) returns (stream ReadObjectResponse) {
|
|
404
|
+
option (google.api.routing) = {
|
|
405
|
+
routing_parameters { field: "bucket" path_template: "{bucket=**}" }
|
|
406
|
+
};
|
|
407
|
+
option (google.api.method_signature) = "bucket,object";
|
|
408
|
+
option (google.api.method_signature) = "bucket,object,generation";
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Reads an object's data.
|
|
412
|
+
//
|
|
413
|
+
// This bi-directional API reads data from an object, allowing you to
|
|
414
|
+
// request multiple data ranges within a single stream, even across
|
|
415
|
+
// several messages. If an error occurs with any request, the stream
|
|
416
|
+
// closes with a relevant error code. Since you can have multiple
|
|
417
|
+
// outstanding requests, the error response includes a
|
|
418
|
+
// `BidiReadObjectRangesError` field detailing the specific error for
|
|
419
|
+
// each pending `read_id`.
|
|
420
|
+
//
|
|
421
|
+
// **IAM Permissions**:
|
|
422
|
+
//
|
|
423
|
+
// Requires `storage.objects.get` IAM permission on the bucket.
|
|
424
|
+
//
|
|
425
|
+
rpc BidiReadObject(stream BidiReadObjectRequest)
|
|
426
|
+
returns (stream BidiReadObjectResponse) {
|
|
427
|
+
option (google.api.routing) = {
|
|
428
|
+
routing_parameters {
|
|
429
|
+
field: "read_object_spec.bucket"
|
|
430
|
+
path_template: "{bucket=**}"
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// Updates an object's metadata.
|
|
436
|
+
// Equivalent to JSON API's `storage.objects.patch` method.
|
|
437
|
+
//
|
|
438
|
+
// **IAM Permissions**:
|
|
439
|
+
//
|
|
440
|
+
// Requires `storage.objects.update` IAM permission on the bucket.
|
|
441
|
+
rpc UpdateObject(UpdateObjectRequest) returns (StorageObject) {
|
|
442
|
+
option (google.api.routing) = {
|
|
443
|
+
routing_parameters { field: "object.bucket" path_template: "{bucket=**}" }
|
|
444
|
+
};
|
|
445
|
+
option (google.api.method_signature) = "object,update_mask";
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// Stores a new object and metadata.
|
|
449
|
+
//
|
|
450
|
+
// An object can be written either in a single message stream or in a
|
|
451
|
+
// resumable sequence of message streams. To write using a single stream,
|
|
452
|
+
// the client should include in the first message of the stream an
|
|
453
|
+
// `WriteObjectSpec` describing the destination bucket, object, and any
|
|
454
|
+
// preconditions. Additionally, the final message must set 'finish_write' to
|
|
455
|
+
// true, or else it is an error.
|
|
456
|
+
//
|
|
457
|
+
// For a resumable write, the client should instead call
|
|
458
|
+
// `StartResumableWrite()`, populating a `WriteObjectSpec` into that request.
|
|
459
|
+
// They should then attach the returned `upload_id` to the first message of
|
|
460
|
+
// each following call to `WriteObject`. If the stream is closed before
|
|
461
|
+
// finishing the upload (either explicitly by the client or due to a network
|
|
462
|
+
// error or an error response from the server), the client should do as
|
|
463
|
+
// follows:
|
|
464
|
+
//
|
|
465
|
+
// - Check the result Status of the stream, to determine if writing can be
|
|
466
|
+
// resumed on this stream or must be restarted from scratch (by calling
|
|
467
|
+
// `StartResumableWrite()`). The resumable errors are `DEADLINE_EXCEEDED`,
|
|
468
|
+
// `INTERNAL`, and `UNAVAILABLE`. For each case, the client should use
|
|
469
|
+
// binary exponential backoff before retrying. Additionally, writes can
|
|
470
|
+
// be resumed after `RESOURCE_EXHAUSTED` errors, but only after taking
|
|
471
|
+
// appropriate measures, which might include reducing aggregate send rate
|
|
472
|
+
// across clients and/or requesting a quota increase for your project.
|
|
473
|
+
// - If the call to `WriteObject` returns `ABORTED`, that indicates
|
|
474
|
+
// concurrent attempts to update the resumable write, caused either by
|
|
475
|
+
// multiple racing clients or by a single client where the previous
|
|
476
|
+
// request was timed out on the client side but nonetheless reached the
|
|
477
|
+
// server. In this case the client should take steps to prevent further
|
|
478
|
+
// concurrent writes. For example, increase the timeouts and stop using
|
|
479
|
+
// more than one process to perform the upload. Follow the steps below for
|
|
480
|
+
// resuming the upload.
|
|
481
|
+
// - For resumable errors, the client should call `QueryWriteStatus()` and
|
|
482
|
+
// then continue writing from the returned `persisted_size`. This might be
|
|
483
|
+
// less than the amount of data the client previously sent. Note also that
|
|
484
|
+
// it is acceptable to send data starting at an offset earlier than the
|
|
485
|
+
// returned `persisted_size`; in this case, the service skips data at
|
|
486
|
+
// offsets that were already persisted (without checking that it matches
|
|
487
|
+
// the previously written data), and write only the data starting from the
|
|
488
|
+
// persisted offset. Even though the data isn't written, it might still
|
|
489
|
+
// incur a performance cost over resuming at the correct write offset.
|
|
490
|
+
// This behavior can make client-side handling simpler in some cases.
|
|
491
|
+
// - Clients must only send data that is a multiple of 256 KiB per message,
|
|
492
|
+
// unless the object is being finished with `finish_write` set to `true`.
|
|
493
|
+
//
|
|
494
|
+
// The service does not view the object as complete until the client has
|
|
495
|
+
// sent a `WriteObjectRequest` with `finish_write` set to `true`. Sending any
|
|
496
|
+
// requests on a stream after sending a request with `finish_write` set to
|
|
497
|
+
// `true` causes an error. The client must check the response it
|
|
498
|
+
// receives to determine how much data the service is able to commit and
|
|
499
|
+
// whether the service views the object as complete.
|
|
500
|
+
//
|
|
501
|
+
// Attempting to resume an already finalized object results in an `OK`
|
|
502
|
+
// status, with a `WriteObjectResponse` containing the finalized object's
|
|
503
|
+
// metadata.
|
|
504
|
+
//
|
|
505
|
+
// Alternatively, you can use the `BidiWriteObject` operation to write an
|
|
506
|
+
// object with controls over flushing and the ability to fetch the ability to
|
|
507
|
+
// determine the current persisted size.
|
|
508
|
+
//
|
|
509
|
+
// **IAM Permissions**:
|
|
510
|
+
//
|
|
511
|
+
// Requires `storage.objects.create`
|
|
512
|
+
// IAM permission on
|
|
513
|
+
// the bucket.
|
|
514
|
+
rpc WriteObject(stream WriteObjectRequest) returns (WriteObjectResponse) {}
|
|
515
|
+
|
|
516
|
+
// Stores a new object and metadata.
|
|
517
|
+
//
|
|
518
|
+
// This is similar to the `WriteObject` call with the added support for
|
|
519
|
+
// manual flushing of persisted state, and the ability to determine current
|
|
520
|
+
// persisted size without closing the stream.
|
|
521
|
+
//
|
|
522
|
+
// The client might specify one or both of the `state_lookup` and `flush`
|
|
523
|
+
// fields in each `BidiWriteObjectRequest`. If `flush` is specified, the data
|
|
524
|
+
// written so far is persisted to storage. If `state_lookup` is specified, the
|
|
525
|
+
// service responds with a `BidiWriteObjectResponse` that contains the
|
|
526
|
+
// persisted size. If both `flush` and `state_lookup` are specified, the flush
|
|
527
|
+
// always occurs before a `state_lookup`, so that both might be set in the
|
|
528
|
+
// same request and the returned state is the state of the object
|
|
529
|
+
// post-flush. When the stream is closed, a `BidiWriteObjectResponse`
|
|
530
|
+
// is always sent to the client, regardless of the value of `state_lookup`.
|
|
531
|
+
rpc BidiWriteObject(stream BidiWriteObjectRequest)
|
|
532
|
+
returns (stream BidiWriteObjectResponse) {}
|
|
533
|
+
|
|
534
|
+
// Retrieves a list of objects matching the criteria.
|
|
535
|
+
//
|
|
536
|
+
// **IAM Permissions**:
|
|
537
|
+
//
|
|
538
|
+
// The authenticated user requires `storage.objects.list`
|
|
539
|
+
// IAM permission to use this method. To return object ACLs, the
|
|
540
|
+
// authenticated user must also
|
|
541
|
+
// have the `storage.objects.getIamPolicy` permission.
|
|
542
|
+
rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse) {
|
|
543
|
+
option (google.api.routing) = {
|
|
544
|
+
routing_parameters { field: "parent" path_template: "{bucket=**}" }
|
|
545
|
+
};
|
|
546
|
+
option (google.api.method_signature) = "parent";
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// Rewrites a source object to a destination object. Optionally overrides
|
|
550
|
+
// metadata.
|
|
551
|
+
rpc RewriteObject(RewriteObjectRequest) returns (RewriteResponse) {
|
|
552
|
+
option (google.api.routing) = {
|
|
553
|
+
routing_parameters { field: "source_bucket" }
|
|
554
|
+
routing_parameters {
|
|
555
|
+
field: "destination_bucket"
|
|
556
|
+
path_template: "{bucket=**}"
|
|
557
|
+
}
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
// Starts a resumable write operation. This
|
|
562
|
+
// method is part of the Resumable
|
|
563
|
+
// upload feature.
|
|
564
|
+
// This allows you to upload large objects in multiple chunks, which is more
|
|
565
|
+
// resilient to network interruptions than a single upload. The validity
|
|
566
|
+
// duration of the write operation, and the consequences of it becoming
|
|
567
|
+
// invalid, are service-dependent.
|
|
568
|
+
//
|
|
569
|
+
// **IAM Permissions**:
|
|
570
|
+
//
|
|
571
|
+
// Requires `storage.objects.create` IAM permission on the bucket.
|
|
572
|
+
rpc StartResumableWrite(StartResumableWriteRequest)
|
|
573
|
+
returns (StartResumableWriteResponse) {
|
|
574
|
+
option (google.api.routing) = {
|
|
575
|
+
routing_parameters {
|
|
576
|
+
field: "write_object_spec.resource.bucket"
|
|
577
|
+
path_template: "{bucket=**}"
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// Determines the `persisted_size` of an object that is being written. This
|
|
583
|
+
// method is part of the resumable
|
|
584
|
+
// upload feature.
|
|
585
|
+
// The returned value is the size of the object that has been persisted so
|
|
586
|
+
// far. The value can be used as the `write_offset` for the next `Write()`
|
|
587
|
+
// call.
|
|
588
|
+
//
|
|
589
|
+
// If the object does not exist, meaning if it was deleted, or the
|
|
590
|
+
// first `Write()` has not yet reached the service, this method returns the
|
|
591
|
+
// error `NOT_FOUND`.
|
|
592
|
+
//
|
|
593
|
+
// This method is useful for clients that buffer data and need to know which
|
|
594
|
+
// data can be safely evicted. The client can call `QueryWriteStatus()` at any
|
|
595
|
+
// time to determine how much data has been logged for this object.
|
|
596
|
+
// For any sequence of `QueryWriteStatus()` calls for a given
|
|
597
|
+
// object name, the sequence of returned `persisted_size` values are
|
|
598
|
+
// non-decreasing.
|
|
599
|
+
rpc QueryWriteStatus(QueryWriteStatusRequest)
|
|
600
|
+
returns (QueryWriteStatusResponse) {
|
|
601
|
+
option (google.api.routing) = {
|
|
602
|
+
routing_parameters {
|
|
603
|
+
field: "upload_id"
|
|
604
|
+
path_template: "{bucket=projects/*/buckets/*}/**"
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
option (google.api.method_signature) = "upload_id";
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// Moves the source object to the destination object in the same bucket.
|
|
611
|
+
// This operation moves a source object to a destination object in the
|
|
612
|
+
// same bucket by renaming the object. The move itself is an atomic
|
|
613
|
+
// transaction, ensuring all steps either complete successfully or no
|
|
614
|
+
// changes are made.
|
|
615
|
+
//
|
|
616
|
+
// **IAM Permissions**:
|
|
617
|
+
//
|
|
618
|
+
// Requires the following IAM permissions to use this method:
|
|
619
|
+
//
|
|
620
|
+
// - `storage.objects.move`
|
|
621
|
+
// - `storage.objects.create`
|
|
622
|
+
// - `storage.objects.delete` (only required if overwriting an existing
|
|
623
|
+
// object)
|
|
624
|
+
rpc MoveObject(MoveObjectRequest) returns (StorageObject) {
|
|
625
|
+
option (google.api.routing) = {
|
|
626
|
+
routing_parameters { field: "bucket" path_template: "{bucket=**}" }
|
|
627
|
+
};
|
|
628
|
+
option (google.api.method_signature) =
|
|
629
|
+
"bucket,source_object,destination_object";
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// Request message for [DeleteBucket][google.storage.v2.Storage.DeleteBucket].
|
|
634
|
+
message DeleteBucketRequest {
|
|
635
|
+
// Required. Name of a bucket to delete.
|
|
636
|
+
string name = 1 [
|
|
637
|
+
(google.api.field_behavior) = REQUIRED,
|
|
638
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
639
|
+
];
|
|
640
|
+
|
|
641
|
+
// If set, only deletes the bucket if its metageneration matches this value.
|
|
642
|
+
optional int64 if_metageneration_match = 2;
|
|
643
|
+
|
|
644
|
+
// If set, only deletes the bucket if its metageneration does not match this
|
|
645
|
+
// value.
|
|
646
|
+
optional int64 if_metageneration_not_match = 3;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// Request message for [GetBucket][google.storage.v2.Storage.GetBucket].
|
|
650
|
+
message GetBucketRequest {
|
|
651
|
+
// Required. Name of a bucket.
|
|
652
|
+
string name = 1 [
|
|
653
|
+
(google.api.field_behavior) = REQUIRED,
|
|
654
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
655
|
+
];
|
|
656
|
+
|
|
657
|
+
// If set, only gets the bucket metadata if its metageneration matches this
|
|
658
|
+
// value.
|
|
659
|
+
optional int64 if_metageneration_match = 2;
|
|
660
|
+
|
|
661
|
+
// If set, and if the bucket's current metageneration matches the specified
|
|
662
|
+
// value, the request returns an error.
|
|
663
|
+
optional int64 if_metageneration_not_match = 3;
|
|
664
|
+
|
|
665
|
+
// Mask specifying which fields to read.
|
|
666
|
+
// A `*` field might be used to indicate all fields.
|
|
667
|
+
// If no mask is specified, it defaults to all fields.
|
|
668
|
+
optional google.protobuf.FieldMask read_mask = 5;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// Request message for [CreateBucket][google.storage.v2.Storage.CreateBucket].
|
|
672
|
+
message CreateBucketRequest {
|
|
673
|
+
// Required. The project to which this bucket belongs. This field must either
|
|
674
|
+
// be empty or `projects/_`. The project ID that owns this bucket should be
|
|
675
|
+
// specified in the `bucket.project` field.
|
|
676
|
+
string parent = 1 [
|
|
677
|
+
(google.api.field_behavior) = REQUIRED,
|
|
678
|
+
(google.api.resource_reference) = {
|
|
679
|
+
child_type: "storage.googleapis.com/Bucket"
|
|
680
|
+
}
|
|
681
|
+
];
|
|
682
|
+
|
|
683
|
+
// Optional. Properties of the new bucket being inserted.
|
|
684
|
+
// The name of the bucket is specified in the `bucket_id` field. Populating
|
|
685
|
+
// `bucket.name` field results in an error.
|
|
686
|
+
// The project of the bucket must be specified in the `bucket.project` field.
|
|
687
|
+
// This field must be in `projects/{projectIdentifier}` format,
|
|
688
|
+
// {projectIdentifier} can be the project ID or project number. The `parent`
|
|
689
|
+
// field must be either empty or `projects/_`.
|
|
690
|
+
Bucket bucket = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
691
|
+
|
|
692
|
+
// Required. The ID to use for this bucket, which becomes the final component
|
|
693
|
+
// of the bucket's resource name. For example, the value `foo` might result in
|
|
694
|
+
// a bucket with the name `projects/123456/buckets/foo`.
|
|
695
|
+
string bucket_id = 3 [(google.api.field_behavior) = REQUIRED];
|
|
696
|
+
|
|
697
|
+
// Optional. Apply a predefined set of access controls to this bucket.
|
|
698
|
+
// Valid values are `authenticatedRead`, `private`, `projectPrivate`,
|
|
699
|
+
// `publicRead`, or `publicReadWrite`.
|
|
700
|
+
string predefined_acl = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
701
|
+
|
|
702
|
+
// Optional. Apply a predefined set of default object access controls to this
|
|
703
|
+
// bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
704
|
+
// `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
705
|
+
string predefined_default_object_acl = 7
|
|
706
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
707
|
+
|
|
708
|
+
// Optional. If true, enable object retention on the bucket.
|
|
709
|
+
bool enable_object_retention = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
// Request message for [ListBuckets][google.storage.v2.Storage.ListBuckets].
|
|
713
|
+
message ListBucketsRequest {
|
|
714
|
+
// Required. The project whose buckets we are listing.
|
|
715
|
+
string parent = 1 [
|
|
716
|
+
(google.api.field_behavior) = REQUIRED,
|
|
717
|
+
(google.api.resource_reference) = {
|
|
718
|
+
child_type: "storage.googleapis.com/Bucket"
|
|
719
|
+
}
|
|
720
|
+
];
|
|
721
|
+
|
|
722
|
+
// Optional. Maximum number of buckets to return in a single response. The
|
|
723
|
+
// service uses this parameter or `1,000` items, whichever is smaller. If
|
|
724
|
+
// `acl` is present in the `read_mask`, the service uses this parameter of
|
|
725
|
+
// `200` items, whichever is smaller.
|
|
726
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
727
|
+
|
|
728
|
+
// Optional. A previously-returned page token representing part of the larger
|
|
729
|
+
// set of results to view.
|
|
730
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
731
|
+
|
|
732
|
+
// Optional. Filter results to buckets whose names begin with this prefix.
|
|
733
|
+
string prefix = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
734
|
+
|
|
735
|
+
// Mask specifying which fields to read from each result.
|
|
736
|
+
// If no mask is specified, it defaults to all fields except `items.
|
|
737
|
+
// owner`, `items.acl`, and `items.default_object_acl`.
|
|
738
|
+
// `*` might be used to mean "all fields".
|
|
739
|
+
optional google.protobuf.FieldMask read_mask = 5;
|
|
740
|
+
|
|
741
|
+
// Optional. Allows listing of buckets, even if there are buckets that are
|
|
742
|
+
// unreachable.
|
|
743
|
+
bool return_partial_success = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
// Response message for [ListBuckets][google.storage.v2.Storage.ListBuckets].
|
|
747
|
+
message ListBucketsResponse {
|
|
748
|
+
// The list of items.
|
|
749
|
+
repeated Bucket buckets = 1;
|
|
750
|
+
|
|
751
|
+
// The continuation token, used to page through large result sets. Provide
|
|
752
|
+
// this value in a subsequent request to return the next page of results.
|
|
753
|
+
string next_page_token = 2;
|
|
754
|
+
|
|
755
|
+
// Unreachable resources.
|
|
756
|
+
// This field can only be present if the caller specified
|
|
757
|
+
// return_partial_success to be true in the request to receive indications
|
|
758
|
+
// of temporarily missing resources.
|
|
759
|
+
// unreachable might be:
|
|
760
|
+
// unreachable = [
|
|
761
|
+
// "projects/_/buckets/bucket1",
|
|
762
|
+
// "projects/_/buckets/bucket2",
|
|
763
|
+
// "projects/_/buckets/bucket3",
|
|
764
|
+
// ]
|
|
765
|
+
repeated string unreachable = 3;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
// Request message for
|
|
769
|
+
// [LockBucketRetentionPolicy][google.storage.v2.Storage.LockBucketRetentionPolicy].
|
|
770
|
+
message LockBucketRetentionPolicyRequest {
|
|
771
|
+
// Required. Name of a bucket.
|
|
772
|
+
string bucket = 1 [
|
|
773
|
+
(google.api.field_behavior) = REQUIRED,
|
|
774
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
775
|
+
];
|
|
776
|
+
|
|
777
|
+
// Required. Makes the operation conditional on whether bucket's current
|
|
778
|
+
// metageneration matches the given value. Must be positive.
|
|
779
|
+
int64 if_metageneration_match = 2 [(google.api.field_behavior) = REQUIRED];
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
// Request for [UpdateBucket][google.storage.v2.Storage.UpdateBucket] method.
|
|
783
|
+
message UpdateBucketRequest {
|
|
784
|
+
// Required. The bucket to update.
|
|
785
|
+
// The bucket's `name` field is used to identify the bucket.
|
|
786
|
+
Bucket bucket = 1 [(google.api.field_behavior) = REQUIRED];
|
|
787
|
+
|
|
788
|
+
// If set, the request modifies the bucket if its metageneration matches this
|
|
789
|
+
// value.
|
|
790
|
+
optional int64 if_metageneration_match = 2;
|
|
791
|
+
|
|
792
|
+
// If set, the request modifies the bucket if its metageneration doesn't
|
|
793
|
+
// match this value.
|
|
794
|
+
optional int64 if_metageneration_not_match = 3;
|
|
795
|
+
|
|
796
|
+
// Optional. Apply a predefined set of access controls to this bucket.
|
|
797
|
+
// Valid values are `authenticatedRead`, `private`, `projectPrivate`,
|
|
798
|
+
// `publicRead`, or `publicReadWrite`.
|
|
799
|
+
string predefined_acl = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
800
|
+
|
|
801
|
+
// Optional. Apply a predefined set of default object access controls to this
|
|
802
|
+
// bucket. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
803
|
+
// `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
804
|
+
string predefined_default_object_acl = 9
|
|
805
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
806
|
+
|
|
807
|
+
// Required. List of fields to be updated.
|
|
808
|
+
//
|
|
809
|
+
// To specify ALL fields, equivalent to the JSON API's "update" function,
|
|
810
|
+
// specify a single field with the value `*`. Note: not recommended. If a new
|
|
811
|
+
// field is introduced at a later time, an older client updating with the `*`
|
|
812
|
+
// might accidentally reset the new field's value.
|
|
813
|
+
//
|
|
814
|
+
// Not specifying any fields is an error.
|
|
815
|
+
google.protobuf.FieldMask update_mask = 6
|
|
816
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// Request message for [ComposeObject][google.storage.v2.Storage.ComposeObject].
|
|
820
|
+
message ComposeObjectRequest {
|
|
821
|
+
// Description of a source object for a composition request.
|
|
822
|
+
message SourceObject {
|
|
823
|
+
// Preconditions for a source object of a composition request.
|
|
824
|
+
message ObjectPreconditions {
|
|
825
|
+
// Only perform the composition if the generation of the source object
|
|
826
|
+
// that would be used matches this value. If this value and a generation
|
|
827
|
+
// are both specified, they must be the same value or the call fails.
|
|
828
|
+
optional int64 if_generation_match = 1;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
// Required. The source object's name. All source objects must reside in the
|
|
832
|
+
// same bucket.
|
|
833
|
+
string name = 1 [(google.api.field_behavior) = REQUIRED];
|
|
834
|
+
|
|
835
|
+
// Optional. The generation of this object to use as the source.
|
|
836
|
+
int64 generation = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
837
|
+
|
|
838
|
+
// Optional. Conditions that must be met for this operation to execute.
|
|
839
|
+
ObjectPreconditions object_preconditions = 3
|
|
840
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
// Required. Properties of the resulting object.
|
|
844
|
+
StorageObject destination = 1 [(google.api.field_behavior) = REQUIRED];
|
|
845
|
+
|
|
846
|
+
// Optional. The list of source objects that is concatenated into a single
|
|
847
|
+
// object.
|
|
848
|
+
repeated SourceObject source_objects = 2
|
|
849
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
850
|
+
|
|
851
|
+
// Optional. Apply a predefined set of access controls to the destination
|
|
852
|
+
// object. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
853
|
+
// `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
854
|
+
string destination_predefined_acl = 9
|
|
855
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
856
|
+
|
|
857
|
+
// Makes the operation conditional on whether the object's current generation
|
|
858
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
859
|
+
// there are no live versions of the object.
|
|
860
|
+
optional int64 if_generation_match = 4;
|
|
861
|
+
|
|
862
|
+
// Makes the operation conditional on whether the object's current
|
|
863
|
+
// metageneration matches the given value.
|
|
864
|
+
optional int64 if_metageneration_match = 5;
|
|
865
|
+
|
|
866
|
+
// Optional. Resource name of the Cloud KMS key, of the form
|
|
867
|
+
// `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
|
|
868
|
+
// that is used to encrypt the object. Overrides the object
|
|
869
|
+
// metadata's `kms_key_name` value, if any.
|
|
870
|
+
string kms_key = 6 [
|
|
871
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
872
|
+
(google.api.resource_reference) = {
|
|
873
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
874
|
+
}
|
|
875
|
+
];
|
|
876
|
+
|
|
877
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
878
|
+
// object.
|
|
879
|
+
CommonObjectRequestParams common_object_request_params = 7
|
|
880
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
881
|
+
|
|
882
|
+
// Optional. The checksums of the complete object. This is validated against
|
|
883
|
+
// the combined checksums of the component objects.
|
|
884
|
+
ObjectChecksums object_checksums = 10
|
|
885
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
// Request message for deleting an object.
|
|
889
|
+
message DeleteObjectRequest {
|
|
890
|
+
// Required. Name of the bucket in which the object resides.
|
|
891
|
+
string bucket = 1 [
|
|
892
|
+
(google.api.field_behavior) = REQUIRED,
|
|
893
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
894
|
+
];
|
|
895
|
+
|
|
896
|
+
// Required. The name of the finalized object to delete.
|
|
897
|
+
// Note: If you want to delete an unfinalized resumable upload please use
|
|
898
|
+
// `CancelResumableWrite`.
|
|
899
|
+
string object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
900
|
+
|
|
901
|
+
// Optional. If present, permanently deletes a specific revision of this
|
|
902
|
+
// object (as opposed to the latest version, the default).
|
|
903
|
+
int64 generation = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
904
|
+
|
|
905
|
+
// Makes the operation conditional on whether the object's current generation
|
|
906
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
907
|
+
// there are no live versions of the object.
|
|
908
|
+
optional int64 if_generation_match = 5;
|
|
909
|
+
|
|
910
|
+
// Makes the operation conditional on whether the object's live generation
|
|
911
|
+
// does not match the given value. If no live object exists, the precondition
|
|
912
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
913
|
+
// version of the object.
|
|
914
|
+
optional int64 if_generation_not_match = 6;
|
|
915
|
+
|
|
916
|
+
// Makes the operation conditional on whether the object's current
|
|
917
|
+
// metageneration matches the given value.
|
|
918
|
+
optional int64 if_metageneration_match = 7;
|
|
919
|
+
|
|
920
|
+
// Makes the operation conditional on whether the object's current
|
|
921
|
+
// metageneration does not match the given value.
|
|
922
|
+
optional int64 if_metageneration_not_match = 8;
|
|
923
|
+
|
|
924
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
925
|
+
// object.
|
|
926
|
+
CommonObjectRequestParams common_object_request_params = 10
|
|
927
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
// Request message for
|
|
931
|
+
// [RestoreObject][google.storage.v2.Storage.RestoreObject].
|
|
932
|
+
// `bucket`, `object`, and `generation` **must** be set.
|
|
933
|
+
message RestoreObjectRequest {
|
|
934
|
+
// Required. Name of the bucket in which the object resides.
|
|
935
|
+
string bucket = 1 [
|
|
936
|
+
(google.api.field_behavior) = REQUIRED,
|
|
937
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
938
|
+
];
|
|
939
|
+
|
|
940
|
+
// Required. The name of the object to restore.
|
|
941
|
+
string object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
942
|
+
|
|
943
|
+
// Required. The specific revision of the object to restore.
|
|
944
|
+
int64 generation = 3 [(google.api.field_behavior) = REQUIRED];
|
|
945
|
+
|
|
946
|
+
// Optional. Restore token used to differentiate soft-deleted objects with the
|
|
947
|
+
// same name and generation. Only applicable for hierarchical namespace
|
|
948
|
+
// buckets. This parameter is optional, and is only required in the rare case
|
|
949
|
+
// when there are multiple soft-deleted objects with the same name and
|
|
950
|
+
// generation.
|
|
951
|
+
string restore_token = 11 [(google.api.field_behavior) = OPTIONAL];
|
|
952
|
+
|
|
953
|
+
// Makes the operation conditional on whether the object's current generation
|
|
954
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
955
|
+
// there are no live versions of the object.
|
|
956
|
+
optional int64 if_generation_match = 4;
|
|
957
|
+
|
|
958
|
+
// Makes the operation conditional on whether the object's live generation
|
|
959
|
+
// does not match the given value. If no live object exists, the precondition
|
|
960
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
961
|
+
// version of the object.
|
|
962
|
+
optional int64 if_generation_not_match = 5;
|
|
963
|
+
|
|
964
|
+
// Makes the operation conditional on whether the object's current
|
|
965
|
+
// metageneration matches the given value.
|
|
966
|
+
optional int64 if_metageneration_match = 6;
|
|
967
|
+
|
|
968
|
+
// Makes the operation conditional on whether the object's current
|
|
969
|
+
// metageneration does not match the given value.
|
|
970
|
+
optional int64 if_metageneration_not_match = 7;
|
|
971
|
+
|
|
972
|
+
// If false or unset, the bucket's default object ACL is used.
|
|
973
|
+
// If true, copy the source object's access controls.
|
|
974
|
+
// Return an error if bucket has UBLA enabled.
|
|
975
|
+
optional bool copy_source_acl = 9;
|
|
976
|
+
|
|
977
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
978
|
+
// object.
|
|
979
|
+
CommonObjectRequestParams common_object_request_params = 8
|
|
980
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
// Request message for
|
|
984
|
+
// [CancelResumableWrite][google.storage.v2.Storage.CancelResumableWrite].
|
|
985
|
+
message CancelResumableWriteRequest {
|
|
986
|
+
// Required. The upload_id of the resumable upload to cancel. This should be
|
|
987
|
+
// copied from the `upload_id` field of `StartResumableWriteResponse`.
|
|
988
|
+
string upload_id = 1 [(google.api.field_behavior) = REQUIRED];
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
// Empty response message for canceling an in-progress resumable upload, is
|
|
992
|
+
// extended as needed.
|
|
993
|
+
message CancelResumableWriteResponse {}
|
|
994
|
+
|
|
995
|
+
// Request message for [ReadObject][google.storage.v2.Storage.ReadObject].
|
|
996
|
+
message ReadObjectRequest {
|
|
997
|
+
// Required. The name of the bucket containing the object to read.
|
|
998
|
+
string bucket = 1 [
|
|
999
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1000
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1001
|
+
];
|
|
1002
|
+
|
|
1003
|
+
// Required. The name of the object to read.
|
|
1004
|
+
string object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1005
|
+
|
|
1006
|
+
// Optional. If present, selects a specific revision of this object (as
|
|
1007
|
+
// opposed to the latest version, the default).
|
|
1008
|
+
int64 generation = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1009
|
+
|
|
1010
|
+
// Optional. The offset for the first byte to return in the read, relative to
|
|
1011
|
+
// the start of the object.
|
|
1012
|
+
//
|
|
1013
|
+
// A negative `read_offset` value is interpreted as the number of bytes
|
|
1014
|
+
// back from the end of the object to be returned. For example, if an object's
|
|
1015
|
+
// length is `15` bytes, a `ReadObjectRequest` with `read_offset` = `-5` and
|
|
1016
|
+
// `read_limit` = `3` would return bytes `10` through `12` of the object.
|
|
1017
|
+
// Requesting a negative offset with magnitude larger than the size of the
|
|
1018
|
+
// object returns the entire object.
|
|
1019
|
+
int64 read_offset = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1020
|
+
|
|
1021
|
+
// Optional. The maximum number of `data` bytes the server is allowed to
|
|
1022
|
+
// return in the sum of all `StorageObject` messages. A `read_limit` of zero
|
|
1023
|
+
// indicates that there is no limit, and a negative `read_limit` causes an
|
|
1024
|
+
// error.
|
|
1025
|
+
//
|
|
1026
|
+
// If the stream returns fewer bytes than allowed by the `read_limit` and no
|
|
1027
|
+
// error occurred, the stream includes all data from the `read_offset` to the
|
|
1028
|
+
// end of the resource.
|
|
1029
|
+
int64 read_limit = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1030
|
+
|
|
1031
|
+
// Makes the operation conditional on whether the object's current generation
|
|
1032
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
1033
|
+
// there are no live versions of the object.
|
|
1034
|
+
optional int64 if_generation_match = 6;
|
|
1035
|
+
|
|
1036
|
+
// Makes the operation conditional on whether the object's live generation
|
|
1037
|
+
// does not match the given value. If no live object exists, the precondition
|
|
1038
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
1039
|
+
// version of the object.
|
|
1040
|
+
optional int64 if_generation_not_match = 7;
|
|
1041
|
+
|
|
1042
|
+
// Makes the operation conditional on whether the object's current
|
|
1043
|
+
// metageneration matches the given value.
|
|
1044
|
+
optional int64 if_metageneration_match = 8;
|
|
1045
|
+
|
|
1046
|
+
// Makes the operation conditional on whether the object's current
|
|
1047
|
+
// metageneration does not match the given value.
|
|
1048
|
+
optional int64 if_metageneration_not_match = 9;
|
|
1049
|
+
|
|
1050
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
1051
|
+
// object.
|
|
1052
|
+
CommonObjectRequestParams common_object_request_params = 10
|
|
1053
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1054
|
+
|
|
1055
|
+
// Mask specifying which fields to read.
|
|
1056
|
+
// The `checksummed_data` field and its children are always present.
|
|
1057
|
+
// If no mask is specified, it defaults to all fields except `metadata.
|
|
1058
|
+
// owner` and `metadata.acl`.
|
|
1059
|
+
// `*` might be used to mean "all fields".
|
|
1060
|
+
optional google.protobuf.FieldMask read_mask = 12;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
// Request message for [GetObject][google.storage.v2.Storage.GetObject].
|
|
1064
|
+
message GetObjectRequest {
|
|
1065
|
+
// Required. Name of the bucket in which the object resides.
|
|
1066
|
+
string bucket = 1 [
|
|
1067
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1068
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1069
|
+
];
|
|
1070
|
+
|
|
1071
|
+
// Required. Name of the object.
|
|
1072
|
+
string object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1073
|
+
|
|
1074
|
+
// Optional. If present, selects a specific revision of this object (as
|
|
1075
|
+
// opposed to the latest version, the default).
|
|
1076
|
+
int64 generation = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1077
|
+
|
|
1078
|
+
// If true, return the soft-deleted version of this object.
|
|
1079
|
+
optional bool soft_deleted = 11;
|
|
1080
|
+
|
|
1081
|
+
// Makes the operation conditional on whether the object's current generation
|
|
1082
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
1083
|
+
// there are no live versions of the object.
|
|
1084
|
+
optional int64 if_generation_match = 4;
|
|
1085
|
+
|
|
1086
|
+
// Makes the operation conditional on whether the object's live generation
|
|
1087
|
+
// does not match the given value. If no live object exists, the precondition
|
|
1088
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
1089
|
+
// version of the object.
|
|
1090
|
+
optional int64 if_generation_not_match = 5;
|
|
1091
|
+
|
|
1092
|
+
// Makes the operation conditional on whether the object's current
|
|
1093
|
+
// metageneration matches the given value.
|
|
1094
|
+
optional int64 if_metageneration_match = 6;
|
|
1095
|
+
|
|
1096
|
+
// Makes the operation conditional on whether the object's current
|
|
1097
|
+
// metageneration does not match the given value.
|
|
1098
|
+
optional int64 if_metageneration_not_match = 7;
|
|
1099
|
+
|
|
1100
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
1101
|
+
// object.
|
|
1102
|
+
CommonObjectRequestParams common_object_request_params = 8
|
|
1103
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1104
|
+
|
|
1105
|
+
// Mask specifying which fields to read.
|
|
1106
|
+
// If no mask is specified, it defaults to all fields except `metadata.
|
|
1107
|
+
// acl` and `metadata.owner`.
|
|
1108
|
+
// `*` might be used to mean "all fields".
|
|
1109
|
+
optional google.protobuf.FieldMask read_mask = 10;
|
|
1110
|
+
|
|
1111
|
+
// Optional. Restore token used to differentiate soft-deleted objects with the
|
|
1112
|
+
// same name and generation. Only applicable for hierarchical namespace
|
|
1113
|
+
// buckets and if `soft_deleted` is set to `true`. This parameter is optional,
|
|
1114
|
+
// and is only required in the rare case when there are multiple soft-deleted
|
|
1115
|
+
// objects with the same `name` and `generation`.
|
|
1116
|
+
string restore_token = 12 [(google.api.field_behavior) = OPTIONAL];
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
// Response message for [ReadObject][google.storage.v2.Storage.ReadObject].
|
|
1120
|
+
message ReadObjectResponse {
|
|
1121
|
+
// A portion of the data for the object. The service might leave `data`
|
|
1122
|
+
// empty for any given `ReadResponse`. This enables the service to inform the
|
|
1123
|
+
// client that the request is still live while it is running an operation to
|
|
1124
|
+
// generate more data.
|
|
1125
|
+
ChecksummedData checksummed_data = 1;
|
|
1126
|
+
|
|
1127
|
+
// The checksums of the complete object. If the object is downloaded in full,
|
|
1128
|
+
// the client should compute one of these checksums over the downloaded object
|
|
1129
|
+
// and compare it against the value provided here.
|
|
1130
|
+
ObjectChecksums object_checksums = 2;
|
|
1131
|
+
|
|
1132
|
+
// If `read_offset` and or `read_limit` is specified on the
|
|
1133
|
+
// `ReadObjectRequest`, `ContentRange` is populated on the first
|
|
1134
|
+
// `ReadObjectResponse` message of the read stream.
|
|
1135
|
+
ContentRange content_range = 3;
|
|
1136
|
+
|
|
1137
|
+
// Metadata of the object whose media is being returned.
|
|
1138
|
+
// Only populated in the first response in the stream.
|
|
1139
|
+
StorageObject metadata = 4;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
// Describes the object to read in a BidiReadObject request.
|
|
1143
|
+
message BidiReadObjectSpec {
|
|
1144
|
+
// Required. The name of the bucket containing the object to read.
|
|
1145
|
+
string bucket = 1 [
|
|
1146
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1147
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1148
|
+
];
|
|
1149
|
+
|
|
1150
|
+
// Required. The name of the object to read.
|
|
1151
|
+
string object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1152
|
+
|
|
1153
|
+
// Optional. If present, selects a specific revision of this object (as
|
|
1154
|
+
// opposed to the latest version, the default).
|
|
1155
|
+
int64 generation = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1156
|
+
|
|
1157
|
+
// Makes the operation conditional on whether the object's current generation
|
|
1158
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
1159
|
+
// there are no live versions of the object.
|
|
1160
|
+
optional int64 if_generation_match = 4;
|
|
1161
|
+
|
|
1162
|
+
// Makes the operation conditional on whether the object's live generation
|
|
1163
|
+
// does not match the given value. If no live object exists, the precondition
|
|
1164
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
1165
|
+
// version of the object.
|
|
1166
|
+
optional int64 if_generation_not_match = 5;
|
|
1167
|
+
|
|
1168
|
+
// Makes the operation conditional on whether the object's current
|
|
1169
|
+
// metageneration matches the given value.
|
|
1170
|
+
optional int64 if_metageneration_match = 6;
|
|
1171
|
+
|
|
1172
|
+
// Makes the operation conditional on whether the object's current
|
|
1173
|
+
// metageneration does not match the given value.
|
|
1174
|
+
optional int64 if_metageneration_not_match = 7;
|
|
1175
|
+
|
|
1176
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
1177
|
+
// object.
|
|
1178
|
+
CommonObjectRequestParams common_object_request_params = 8
|
|
1179
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1180
|
+
|
|
1181
|
+
// Mask specifying which fields to read.
|
|
1182
|
+
// The `checksummed_data` field and its children are always present.
|
|
1183
|
+
// If no mask is specified, it defaults to all fields except `metadata.
|
|
1184
|
+
// owner` and `metadata.acl`.
|
|
1185
|
+
// `*` might be used to mean "all fields".
|
|
1186
|
+
// As per https://google.aip.dev/161, this field is deprecated.
|
|
1187
|
+
// As an alternative, `grpc metadata` can be used:
|
|
1188
|
+
optional google.protobuf.FieldMask read_mask = 12 [deprecated = true];
|
|
1189
|
+
|
|
1190
|
+
// The client can optionally set this field. The read handle is an optimized
|
|
1191
|
+
// way of creating new streams. Read handles are generated and periodically
|
|
1192
|
+
// refreshed from prior reads.
|
|
1193
|
+
optional BidiReadHandle read_handle = 13;
|
|
1194
|
+
|
|
1195
|
+
// The routing token that influences request routing for the stream. Must be
|
|
1196
|
+
// provided if a BidiReadObjectRedirectedError is returned.
|
|
1197
|
+
optional string routing_token = 14;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// Request message for
|
|
1201
|
+
// [BidiReadObject][google.storage.v2.Storage.BidiReadObject].
|
|
1202
|
+
message BidiReadObjectRequest {
|
|
1203
|
+
// Optional. The first message of each stream should set this field. If this
|
|
1204
|
+
// is not the first message, an error is returned. Describes the object to
|
|
1205
|
+
// read.
|
|
1206
|
+
BidiReadObjectSpec read_object_spec = 1
|
|
1207
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1208
|
+
|
|
1209
|
+
// Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
|
|
1210
|
+
// single range is large enough to require multiple responses, they are
|
|
1211
|
+
// delivered in increasing offset order. There are no ordering guarantees
|
|
1212
|
+
// across ranges. When no ranges are provided, the response message
|
|
1213
|
+
// doesn't include `ObjectRangeData`. For full object downloads, the
|
|
1214
|
+
// offset and size can be set to `0`.
|
|
1215
|
+
repeated ReadRange read_ranges = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
// Response message for
|
|
1219
|
+
// [BidiReadObject][google.storage.v2.Storage.BidiReadObject].
|
|
1220
|
+
message BidiReadObjectResponse {
|
|
1221
|
+
// A portion of the object's data. The service might leave data
|
|
1222
|
+
// empty for any given `ReadResponse`. This enables the service to inform the
|
|
1223
|
+
// client that the request is still live while it is running an operation to
|
|
1224
|
+
// generate more data.
|
|
1225
|
+
// The service might pipeline multiple responses belonging to different read
|
|
1226
|
+
// requests. Each `ObjectRangeData` entry has a `read_id` that is set
|
|
1227
|
+
// to the same value as the corresponding source read request.
|
|
1228
|
+
repeated ObjectRangeData object_data_ranges = 6;
|
|
1229
|
+
|
|
1230
|
+
// Metadata of the object whose media is being returned.
|
|
1231
|
+
// Only populated in the first response in the stream and not populated when
|
|
1232
|
+
// the stream is opened with a read handle.
|
|
1233
|
+
StorageObject metadata = 4;
|
|
1234
|
+
|
|
1235
|
+
// This field is periodically refreshed, however it might not be set in
|
|
1236
|
+
// every response. It allows the client to more efficiently open subsequent
|
|
1237
|
+
// bidirectional streams to the same object.
|
|
1238
|
+
BidiReadHandle read_handle = 7;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
// Error proto containing details for a redirected read. This error might be
|
|
1242
|
+
// attached as details for an ABORTED response to BidiReadObject.
|
|
1243
|
+
message BidiReadObjectRedirectedError {
|
|
1244
|
+
// The read handle for the redirected read. If set, the client might use this
|
|
1245
|
+
// in the BidiReadObjectSpec when retrying the read stream.
|
|
1246
|
+
BidiReadHandle read_handle = 1;
|
|
1247
|
+
|
|
1248
|
+
// The routing token the client must use when retrying the read stream.
|
|
1249
|
+
// This value must be provided in the header `x-goog-request-params`, with key
|
|
1250
|
+
// `routing_token` and this string verbatim as the value.
|
|
1251
|
+
optional string routing_token = 2;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// Error proto containing details for a redirected write. This error might be
|
|
1255
|
+
// attached as details for an ABORTED response to BidiWriteObject.
|
|
1256
|
+
message BidiWriteObjectRedirectedError {
|
|
1257
|
+
// The routing token the client must use when retrying the write stream.
|
|
1258
|
+
// This value must be provided in the header `x-goog-request-params`, with key
|
|
1259
|
+
// `routing_token` and this string verbatim as the value.
|
|
1260
|
+
optional string routing_token = 1;
|
|
1261
|
+
|
|
1262
|
+
// Opaque value describing a previous write. If set, the client must use this
|
|
1263
|
+
// in an AppendObjectSpec first_message when retrying the write stream. If not
|
|
1264
|
+
// set, clients might retry the original request.
|
|
1265
|
+
optional BidiWriteHandle write_handle = 2;
|
|
1266
|
+
|
|
1267
|
+
// The generation of the object that triggered the redirect. This is set
|
|
1268
|
+
// iff `write_handle` is set. If set, the client must use this in an
|
|
1269
|
+
// `AppendObjectSpec` first_message when retrying the write stream.
|
|
1270
|
+
optional int64 generation = 3;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// Error extension proto containing details for all outstanding reads on the
|
|
1274
|
+
// failed stream
|
|
1275
|
+
message BidiReadObjectError {
|
|
1276
|
+
// The error code for each outstanding read_range
|
|
1277
|
+
repeated ReadRangeError read_range_errors = 1;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
// Error extension proto containing details for a single range read
|
|
1281
|
+
message ReadRangeError {
|
|
1282
|
+
// The id of the corresponding read_range
|
|
1283
|
+
int64 read_id = 1;
|
|
1284
|
+
|
|
1285
|
+
// The status which should be an enum value of [google.rpc.Code].
|
|
1286
|
+
google.rpc.Status status = 2;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
// Describes a range of bytes to read in a `BidiReadObjectRanges` request.
|
|
1290
|
+
message ReadRange {
|
|
1291
|
+
// Required. The offset for the first byte to return in the read, relative to
|
|
1292
|
+
// the start of the object.
|
|
1293
|
+
//
|
|
1294
|
+
// A negative read_offset value is interpreted as the number of bytes
|
|
1295
|
+
// back from the end of the object to be returned. For example, if an object's
|
|
1296
|
+
// length is 15 bytes, a `ReadObjectRequest` with `read_offset` = -5 and
|
|
1297
|
+
// `read_length` = 3 would return bytes 10 through 12 of the object.
|
|
1298
|
+
// Requesting a negative offset with magnitude larger than the size of the
|
|
1299
|
+
// object returns the entire object. A `read_offset` larger than the size
|
|
1300
|
+
// of the object results in an `OutOfRange` error.
|
|
1301
|
+
int64 read_offset = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1302
|
+
|
|
1303
|
+
// Optional. The maximum number of data bytes the server is allowed to return
|
|
1304
|
+
// across all response messages with the same `read_id`. A `read_length` of
|
|
1305
|
+
// zero indicates to read until the resource end, and a negative `read_length`
|
|
1306
|
+
// causes an error. If the stream returns fewer bytes than allowed by the
|
|
1307
|
+
// `read_length` and no error occurred, the stream includes all data from the
|
|
1308
|
+
// `read_offset` to the resource end.
|
|
1309
|
+
int64 read_length = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1310
|
+
|
|
1311
|
+
// Required. Read identifier provided by the client. When the client issues
|
|
1312
|
+
// more than one outstanding `ReadRange` on the same stream, responses can be
|
|
1313
|
+
// mapped back to their corresponding requests using this value. Clients must
|
|
1314
|
+
// ensure that all outstanding requests have different read_id values. The
|
|
1315
|
+
// server might close the stream with an error if this condition is not met.
|
|
1316
|
+
int64 read_id = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
// Contains data and metadata for a range of an object.
|
|
1320
|
+
message ObjectRangeData {
|
|
1321
|
+
// A portion of the data for the object.
|
|
1322
|
+
ChecksummedData checksummed_data = 1;
|
|
1323
|
+
|
|
1324
|
+
// The `ReadRange` describes the content being returned with `read_id` set to
|
|
1325
|
+
// the corresponding `ReadObjectRequest` in the stream. Multiple
|
|
1326
|
+
// `ObjectRangeData` messages might have the same read_id but increasing
|
|
1327
|
+
// offsets. `ReadObjectResponse` messages with the same `read_id` are
|
|
1328
|
+
// guaranteed to be delivered in increasing offset order.
|
|
1329
|
+
ReadRange read_range = 2;
|
|
1330
|
+
|
|
1331
|
+
// If set, indicates there are no more bytes to read for the given ReadRange.
|
|
1332
|
+
bool range_end = 3;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// `BidiReadHandle` contains a handle from a previous `BiDiReadObject`
|
|
1336
|
+
// invocation. The client can use this instead of `BidiReadObjectSpec` as an
|
|
1337
|
+
// optimized way of opening subsequent bidirectional streams to the same object.
|
|
1338
|
+
message BidiReadHandle {
|
|
1339
|
+
// Required. Opaque value describing a previous read.
|
|
1340
|
+
bytes handle = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
// `BidiWriteHandle` contains a handle from a previous `BidiWriteObject`
|
|
1344
|
+
// invocation. The client can use this instead of `BidiReadObjectSpec` as an
|
|
1345
|
+
// optimized way of opening subsequent bidirectional streams to the same object.
|
|
1346
|
+
message BidiWriteHandle {
|
|
1347
|
+
// Required. Opaque value describing a previous write.
|
|
1348
|
+
bytes handle = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
// Describes an attempt to insert an object, possibly over multiple requests.
|
|
1352
|
+
message WriteObjectSpec {
|
|
1353
|
+
// Required. Destination object, including its name and its metadata.
|
|
1354
|
+
StorageObject resource = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1355
|
+
|
|
1356
|
+
// Optional. Apply a predefined set of access controls to this object.
|
|
1357
|
+
// Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
1358
|
+
// `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
1359
|
+
string predefined_acl = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1360
|
+
|
|
1361
|
+
// Makes the operation conditional on whether the object's current
|
|
1362
|
+
// generation matches the given value. Setting to `0` makes the operation
|
|
1363
|
+
// succeed only if there are no live versions of the object.
|
|
1364
|
+
optional int64 if_generation_match = 3;
|
|
1365
|
+
|
|
1366
|
+
// Makes the operation conditional on whether the object's live
|
|
1367
|
+
// generation does not match the given value. If no live object exists, the
|
|
1368
|
+
// precondition fails. Setting to `0` makes the operation succeed only if
|
|
1369
|
+
// there is a live version of the object.
|
|
1370
|
+
optional int64 if_generation_not_match = 4;
|
|
1371
|
+
|
|
1372
|
+
// Makes the operation conditional on whether the object's current
|
|
1373
|
+
// metageneration matches the given value.
|
|
1374
|
+
optional int64 if_metageneration_match = 5;
|
|
1375
|
+
|
|
1376
|
+
// Makes the operation conditional on whether the object's current
|
|
1377
|
+
// metageneration does not match the given value.
|
|
1378
|
+
optional int64 if_metageneration_not_match = 6;
|
|
1379
|
+
|
|
1380
|
+
// The expected final object size being uploaded.
|
|
1381
|
+
// If this value is set, closing the stream after writing fewer or more than
|
|
1382
|
+
// `object_size` bytes results in an `OUT_OF_RANGE` error.
|
|
1383
|
+
//
|
|
1384
|
+
// This situation is considered a client error, and if such an error occurs
|
|
1385
|
+
// you must start the upload over from scratch, this time sending the correct
|
|
1386
|
+
// number of bytes.
|
|
1387
|
+
optional int64 object_size = 8;
|
|
1388
|
+
|
|
1389
|
+
// If `true`, the object is created in appendable mode.
|
|
1390
|
+
// This field might only be set when using `BidiWriteObject`.
|
|
1391
|
+
optional bool appendable = 9;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
// Request message for [WriteObject][google.storage.v2.Storage.WriteObject].
|
|
1395
|
+
message WriteObjectRequest {
|
|
1396
|
+
// The first message of each stream should set one of the following.
|
|
1397
|
+
oneof first_message {
|
|
1398
|
+
// For resumable uploads. This should be the `upload_id` returned from a
|
|
1399
|
+
// call to `StartResumableWriteResponse`.
|
|
1400
|
+
string upload_id = 1;
|
|
1401
|
+
|
|
1402
|
+
// For non-resumable uploads. Describes the overall upload, including the
|
|
1403
|
+
// destination bucket and object name, preconditions, etc.
|
|
1404
|
+
WriteObjectSpec write_object_spec = 2;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
// Required. The offset from the beginning of the object at which the data
|
|
1408
|
+
// should be written.
|
|
1409
|
+
//
|
|
1410
|
+
// In the first `WriteObjectRequest` of a `WriteObject()` action, it
|
|
1411
|
+
// indicates the initial offset for the `Write()` call. The value **must** be
|
|
1412
|
+
// equal to the `persisted_size` that a call to `QueryWriteStatus()` would
|
|
1413
|
+
// return (0 if this is the first write to the object).
|
|
1414
|
+
//
|
|
1415
|
+
// On subsequent calls, this value **must** be no larger than the sum of the
|
|
1416
|
+
// first `write_offset` and the sizes of all `data` chunks sent previously on
|
|
1417
|
+
// this stream.
|
|
1418
|
+
//
|
|
1419
|
+
// An incorrect value causes an error.
|
|
1420
|
+
int64 write_offset = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1421
|
+
|
|
1422
|
+
// A portion of the data for the object.
|
|
1423
|
+
oneof data {
|
|
1424
|
+
// The data to insert. If a crc32c checksum is provided that doesn't match
|
|
1425
|
+
// the checksum computed by the service, the request fails.
|
|
1426
|
+
ChecksummedData checksummed_data = 4;
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
// Optional. Checksums for the complete object. If the checksums computed by
|
|
1430
|
+
// the service don't match the specified checksums the call fails. This field
|
|
1431
|
+
// might only be provided in the first or last request (either with
|
|
1432
|
+
// `first_message`, or `finish_write` set).
|
|
1433
|
+
ObjectChecksums object_checksums = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
1434
|
+
|
|
1435
|
+
// Optional. If `true`, this indicates that the write is complete. Sending any
|
|
1436
|
+
// `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
|
|
1437
|
+
// causes an error.
|
|
1438
|
+
// For a non-resumable write (where the `upload_id` was not set in the first
|
|
1439
|
+
// message), it is an error not to set this field in the final message of the
|
|
1440
|
+
// stream.
|
|
1441
|
+
bool finish_write = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1442
|
+
|
|
1443
|
+
// Optional. A set of parameters common to Cloud Storage API requests
|
|
1444
|
+
// concerning an object.
|
|
1445
|
+
CommonObjectRequestParams common_object_request_params = 8
|
|
1446
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
// Response message for
|
|
1450
|
+
// [WriteObject][google.storage.v2.Storage.WriteObject].
|
|
1451
|
+
message WriteObjectResponse {
|
|
1452
|
+
// The response sets one of the following.
|
|
1453
|
+
oneof write_status {
|
|
1454
|
+
// The total number of bytes that have been processed for the given object
|
|
1455
|
+
// from all `WriteObject` calls. Only set if the upload has not finalized.
|
|
1456
|
+
int64 persisted_size = 1;
|
|
1457
|
+
|
|
1458
|
+
// A resource containing the metadata for the uploaded object. Only set if
|
|
1459
|
+
// the upload has finalized.
|
|
1460
|
+
StorageObject resource = 2;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
// Describes an attempt to append to an object, possibly over multiple requests.
|
|
1465
|
+
message AppendObjectSpec {
|
|
1466
|
+
// Required. The name of the bucket containing the object to write.
|
|
1467
|
+
string bucket = 1 [
|
|
1468
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1469
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1470
|
+
];
|
|
1471
|
+
|
|
1472
|
+
// Required. The name of the object to open for writing.
|
|
1473
|
+
string object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1474
|
+
|
|
1475
|
+
// Required. The generation number of the object to open for writing.
|
|
1476
|
+
int64 generation = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1477
|
+
|
|
1478
|
+
// Makes the operation conditional on whether the object's current
|
|
1479
|
+
// metageneration matches the given value.
|
|
1480
|
+
//
|
|
1481
|
+
// Note that metageneration preconditions are only checked if `write_handle`
|
|
1482
|
+
// is empty.
|
|
1483
|
+
optional int64 if_metageneration_match = 4;
|
|
1484
|
+
|
|
1485
|
+
// Makes the operation conditional on whether the object's current
|
|
1486
|
+
// metageneration does not match the given value.
|
|
1487
|
+
//
|
|
1488
|
+
// Note that metageneration preconditions are only checked if `write_handle`
|
|
1489
|
+
// is empty.
|
|
1490
|
+
optional int64 if_metageneration_not_match = 5;
|
|
1491
|
+
|
|
1492
|
+
// An optional routing token that influences request routing for the stream.
|
|
1493
|
+
// Must be provided if a `BidiWriteObjectRedirectedError` is returned.
|
|
1494
|
+
optional string routing_token = 6;
|
|
1495
|
+
|
|
1496
|
+
// An optional write handle returned from a previous BidiWriteObjectResponse
|
|
1497
|
+
// message or a BidiWriteObjectRedirectedError error.
|
|
1498
|
+
//
|
|
1499
|
+
// Note that metageneration preconditions are only checked if `write_handle`
|
|
1500
|
+
// is empty.
|
|
1501
|
+
optional BidiWriteHandle write_handle = 7;
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
// Request message for
|
|
1505
|
+
// [BidiWriteObject][google.storage.v2.Storage.BidiWriteObject].
|
|
1506
|
+
message BidiWriteObjectRequest {
|
|
1507
|
+
// The first message of each stream should set one of the following.
|
|
1508
|
+
oneof first_message {
|
|
1509
|
+
// For resumable uploads. This should be the `upload_id` returned from a
|
|
1510
|
+
// call to `StartResumableWriteResponse`.
|
|
1511
|
+
string upload_id = 1;
|
|
1512
|
+
|
|
1513
|
+
// For non-resumable uploads. Describes the overall upload, including the
|
|
1514
|
+
// destination bucket and object name, preconditions, etc.
|
|
1515
|
+
WriteObjectSpec write_object_spec = 2;
|
|
1516
|
+
|
|
1517
|
+
// For appendable uploads. Describes the object to append to.
|
|
1518
|
+
AppendObjectSpec append_object_spec = 11;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
// Required. The offset from the beginning of the object at which the data
|
|
1522
|
+
// should be written.
|
|
1523
|
+
//
|
|
1524
|
+
// In the first `WriteObjectRequest` of a `WriteObject()` action, it
|
|
1525
|
+
// indicates the initial offset for the `Write()` call. The value must be
|
|
1526
|
+
// equal to the `persisted_size` that a call to `QueryWriteStatus()` would
|
|
1527
|
+
// return (0 if this is the first write to the object).
|
|
1528
|
+
//
|
|
1529
|
+
// On subsequent calls, this value must be no larger than the sum of the
|
|
1530
|
+
// first `write_offset` and the sizes of all `data` chunks sent previously on
|
|
1531
|
+
// this stream.
|
|
1532
|
+
//
|
|
1533
|
+
// An invalid value causes an error.
|
|
1534
|
+
int64 write_offset = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1535
|
+
|
|
1536
|
+
// A portion of the data for the object.
|
|
1537
|
+
oneof data {
|
|
1538
|
+
// The data to insert. If a crc32c checksum is provided that doesn't match
|
|
1539
|
+
// the checksum computed by the service, the request fails.
|
|
1540
|
+
ChecksummedData checksummed_data = 4;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
// Optional. Checksums for the complete object. If the checksums computed by
|
|
1544
|
+
// the service don't match the specified checksums the call fails. Might only
|
|
1545
|
+
// be provided in the first request or the last request (with finish_write
|
|
1546
|
+
// set).
|
|
1547
|
+
ObjectChecksums object_checksums = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
1548
|
+
|
|
1549
|
+
// Optional. For each `BidiWriteObjectRequest` where `state_lookup` is `true`
|
|
1550
|
+
// or the client closes the stream, the service sends a
|
|
1551
|
+
// `BidiWriteObjectResponse` containing the current persisted size. The
|
|
1552
|
+
// persisted size sent in responses covers all the bytes the server has
|
|
1553
|
+
// persisted thus far and can be used to decide what data is safe for the
|
|
1554
|
+
// client to drop. Note that the object's current size reported by the
|
|
1555
|
+
// `BidiWriteObjectResponse` might lag behind the number of bytes written by
|
|
1556
|
+
// the client. This field is ignored if `finish_write` is set to true.
|
|
1557
|
+
bool state_lookup = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1558
|
+
|
|
1559
|
+
// Optional. Persists data written on the stream, up to and including the
|
|
1560
|
+
// current message, to permanent storage. This option should be used sparingly
|
|
1561
|
+
// as it might reduce performance. Ongoing writes are periodically persisted
|
|
1562
|
+
// on the server even when `flush` is not set. This field is ignored if
|
|
1563
|
+
// `finish_write` is set to true since there's no need to checkpoint or flush
|
|
1564
|
+
// if this message completes the write.
|
|
1565
|
+
bool flush = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
1566
|
+
|
|
1567
|
+
// Optional. If `true`, this indicates that the write is complete. Sending any
|
|
1568
|
+
// `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
|
|
1569
|
+
// causes an error.
|
|
1570
|
+
// For a non-resumable write (where the `upload_id` was not set in the first
|
|
1571
|
+
// message), it is an error not to set this field in the final message of the
|
|
1572
|
+
// stream.
|
|
1573
|
+
bool finish_write = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
1574
|
+
|
|
1575
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
1576
|
+
// object.
|
|
1577
|
+
CommonObjectRequestParams common_object_request_params = 10
|
|
1578
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
// Response message for BidiWriteObject.
|
|
1582
|
+
message BidiWriteObjectResponse {
|
|
1583
|
+
// The response sets one of the following.
|
|
1584
|
+
oneof write_status {
|
|
1585
|
+
// The total number of bytes that have been processed for the given object
|
|
1586
|
+
// from all `WriteObject` calls. Only set if the upload has not finalized.
|
|
1587
|
+
int64 persisted_size = 1;
|
|
1588
|
+
|
|
1589
|
+
// A resource containing the metadata for the uploaded object. Only set if
|
|
1590
|
+
// the upload has finalized.
|
|
1591
|
+
StorageObject resource = 2;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
// An optional write handle that is returned periodically in response
|
|
1595
|
+
// messages. Clients should save it for later use in establishing a new stream
|
|
1596
|
+
// if a connection is interrupted.
|
|
1597
|
+
optional BidiWriteHandle write_handle = 3;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
// Request message for [ListObjects][google.storage.v2.Storage.ListObjects].
|
|
1601
|
+
message ListObjectsRequest {
|
|
1602
|
+
// Required. Name of the bucket in which to look for objects.
|
|
1603
|
+
string parent = 1 [
|
|
1604
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1605
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1606
|
+
];
|
|
1607
|
+
|
|
1608
|
+
// Optional. Maximum number of `items` plus `prefixes` to return
|
|
1609
|
+
// in a single page of responses. As duplicate `prefixes` are
|
|
1610
|
+
// omitted, fewer total results might be returned than requested. The service
|
|
1611
|
+
// uses this parameter or 1,000 items, whichever is smaller.
|
|
1612
|
+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
1613
|
+
|
|
1614
|
+
// Optional. A previously-returned page token representing part of the larger
|
|
1615
|
+
// set of results to view.
|
|
1616
|
+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
1617
|
+
|
|
1618
|
+
// Optional. If set, returns results in a directory-like mode. `items`
|
|
1619
|
+
// contains only objects whose names, aside from the `prefix`, do not contain
|
|
1620
|
+
// `delimiter`. Objects whose names, aside from the `prefix`, contain
|
|
1621
|
+
// `delimiter` has their name, truncated after the `delimiter`, returned in
|
|
1622
|
+
// `prefixes`. Duplicate `prefixes` are omitted.
|
|
1623
|
+
string delimiter = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1624
|
+
|
|
1625
|
+
// Optional. If true, objects that end in exactly one instance of `delimiter`
|
|
1626
|
+
// has their metadata included in `items` in addition to
|
|
1627
|
+
// `prefixes`.
|
|
1628
|
+
bool include_trailing_delimiter = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1629
|
+
|
|
1630
|
+
// Optional. Filter results to objects whose names begin with this prefix.
|
|
1631
|
+
string prefix = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
1632
|
+
|
|
1633
|
+
// Optional. If `true`, lists all versions of an object as distinct results.
|
|
1634
|
+
bool versions = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
1635
|
+
|
|
1636
|
+
// Mask specifying which fields to read from each result.
|
|
1637
|
+
// If no mask is specified, defaults to all fields except `items.acl` and
|
|
1638
|
+
// `items.owner`.
|
|
1639
|
+
// `*` might be used to mean all fields.
|
|
1640
|
+
optional google.protobuf.FieldMask read_mask = 8;
|
|
1641
|
+
|
|
1642
|
+
// Optional. Filter results to objects whose names are lexicographically equal
|
|
1643
|
+
// to or after `lexicographic_start`. If `lexicographic_end` is also set, the
|
|
1644
|
+
// objects listed have names between `lexicographic_start` (inclusive) and
|
|
1645
|
+
// `lexicographic_end` (exclusive).
|
|
1646
|
+
string lexicographic_start = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
1647
|
+
|
|
1648
|
+
// Optional. Filter results to objects whose names are lexicographically
|
|
1649
|
+
// before `lexicographic_end`. If `lexicographic_start` is also set, the
|
|
1650
|
+
// objects listed have names between `lexicographic_start` (inclusive) and
|
|
1651
|
+
// `lexicographic_end` (exclusive).
|
|
1652
|
+
string lexicographic_end = 11 [(google.api.field_behavior) = OPTIONAL];
|
|
1653
|
+
|
|
1654
|
+
// Optional. If true, only list all soft-deleted versions of the object.
|
|
1655
|
+
// Soft delete policy is required to set this option.
|
|
1656
|
+
bool soft_deleted = 12 [(google.api.field_behavior) = OPTIONAL];
|
|
1657
|
+
|
|
1658
|
+
// Optional. If true, includes folders and managed folders (besides objects)
|
|
1659
|
+
// in the returned `prefixes`. Requires `delimiter` to be set to '/'.
|
|
1660
|
+
bool include_folders_as_prefixes = 13
|
|
1661
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1662
|
+
|
|
1663
|
+
// Optional. Filter results to objects and prefixes that match this glob
|
|
1664
|
+
// pattern. See [List objects using
|
|
1665
|
+
// glob](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob)
|
|
1666
|
+
// for the full syntax.
|
|
1667
|
+
string match_glob = 14 [(google.api.field_behavior) = OPTIONAL];
|
|
1668
|
+
|
|
1669
|
+
// Optional. An expression used to filter the returned objects by the
|
|
1670
|
+
// `context` field. For the full syntax, see [Filter objects by contexts
|
|
1671
|
+
// syntax](https://cloud.google.com/storage/docs/listing-objects#filter-by-object-contexts-syntax).
|
|
1672
|
+
// If a `delimiter` is set, the returned `prefixes` are exempt from this
|
|
1673
|
+
// filter.
|
|
1674
|
+
string filter = 15 [(google.api.field_behavior) = OPTIONAL];
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
// Request object for
|
|
1678
|
+
// [QueryWriteStatus][google.storage.v2.Storage.QueryWriteStatus].
|
|
1679
|
+
message QueryWriteStatusRequest {
|
|
1680
|
+
// Required. The name of the resume token for the object whose write status is
|
|
1681
|
+
// being requested.
|
|
1682
|
+
string upload_id = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1683
|
+
|
|
1684
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
1685
|
+
// object.
|
|
1686
|
+
CommonObjectRequestParams common_object_request_params = 2
|
|
1687
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// Response object for
|
|
1691
|
+
// [QueryWriteStatus][google.storage.v2.Storage.QueryWriteStatus].
|
|
1692
|
+
message QueryWriteStatusResponse {
|
|
1693
|
+
// The response sets one of the following.
|
|
1694
|
+
oneof write_status {
|
|
1695
|
+
// The total number of bytes that have been processed for the given object
|
|
1696
|
+
// from all `WriteObject` calls. This is the correct value for the
|
|
1697
|
+
// 'write_offset' field to use when resuming the `WriteObject` operation.
|
|
1698
|
+
// Only set if the upload has not finalized.
|
|
1699
|
+
int64 persisted_size = 1;
|
|
1700
|
+
|
|
1701
|
+
// A resource containing the metadata for the uploaded object. Only set if
|
|
1702
|
+
// the upload has finalized.
|
|
1703
|
+
StorageObject resource = 2;
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
// Request message for [RewriteObject][google.storage.v2.Storage.RewriteObject].
|
|
1708
|
+
// If the source object is encrypted using a Customer-Supplied Encryption Key
|
|
1709
|
+
// the key information must be provided in the
|
|
1710
|
+
// `copy_source_encryption_algorithm`, `copy_source_encryption_key_bytes`, and
|
|
1711
|
+
// `copy_source_encryption_key_sha256_bytes` fields. If the destination object
|
|
1712
|
+
// should be encrypted the keying information should be provided in the
|
|
1713
|
+
// `encryption_algorithm`, `encryption_key_bytes`, and
|
|
1714
|
+
// `encryption_key_sha256_bytes` fields of the
|
|
1715
|
+
// `common_object_request_params.customer_encryption` field.
|
|
1716
|
+
message RewriteObjectRequest {
|
|
1717
|
+
// Required. Immutable. The name of the destination object.
|
|
1718
|
+
// See the
|
|
1719
|
+
// [Naming Guidelines](https://cloud.google.com/storage/docs/objects#naming).
|
|
1720
|
+
// Example: `test.txt`
|
|
1721
|
+
// The `name` field by itself does not uniquely identify a Cloud Storage
|
|
1722
|
+
// object. A Cloud Storage object is uniquely identified by the tuple of
|
|
1723
|
+
// (bucket, object, generation).
|
|
1724
|
+
string destination_name = 24 [
|
|
1725
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1726
|
+
(google.api.field_behavior) = IMMUTABLE
|
|
1727
|
+
];
|
|
1728
|
+
|
|
1729
|
+
// Required. Immutable. The name of the bucket containing the destination
|
|
1730
|
+
// object.
|
|
1731
|
+
string destination_bucket = 25 [
|
|
1732
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1733
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
1734
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1735
|
+
];
|
|
1736
|
+
|
|
1737
|
+
// Optional. The name of the Cloud KMS key that is used to encrypt the
|
|
1738
|
+
// destination object. The Cloud KMS key must be located in same location as
|
|
1739
|
+
// the object. If the parameter is not specified, the request uses the
|
|
1740
|
+
// destination bucket's default encryption key, if any, or else the
|
|
1741
|
+
// Google-managed encryption key.
|
|
1742
|
+
string destination_kms_key = 27 [
|
|
1743
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
1744
|
+
(google.api.resource_reference) = {
|
|
1745
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
1746
|
+
}
|
|
1747
|
+
];
|
|
1748
|
+
|
|
1749
|
+
// Optional. Properties of the destination, post-rewrite object.
|
|
1750
|
+
// The `name`, `bucket` and `kms_key` fields must not be populated (these
|
|
1751
|
+
// values are specified in the `destination_name`, `destination_bucket`, and
|
|
1752
|
+
// `destination_kms_key` fields).
|
|
1753
|
+
// If `destination` is present it is used to construct the destination
|
|
1754
|
+
// object's metadata; otherwise the destination object's metadata is
|
|
1755
|
+
// copied from the source object.
|
|
1756
|
+
StorageObject destination = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
1757
|
+
|
|
1758
|
+
// Required. Name of the bucket in which to find the source object.
|
|
1759
|
+
string source_bucket = 2 [
|
|
1760
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1761
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1762
|
+
];
|
|
1763
|
+
|
|
1764
|
+
// Required. Name of the source object.
|
|
1765
|
+
string source_object = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1766
|
+
|
|
1767
|
+
// Optional. If present, selects a specific revision of the source object (as
|
|
1768
|
+
// opposed to the latest version, the default).
|
|
1769
|
+
int64 source_generation = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
1770
|
+
|
|
1771
|
+
// Optional. Include this field (from the previous rewrite response) on each
|
|
1772
|
+
// rewrite request after the first one, until the rewrite response 'done' flag
|
|
1773
|
+
// is true. Calls that provide a rewriteToken can omit all other request
|
|
1774
|
+
// fields, but if included those fields must match the values provided in the
|
|
1775
|
+
// first rewrite request.
|
|
1776
|
+
string rewrite_token = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1777
|
+
|
|
1778
|
+
// Optional. Apply a predefined set of access controls to the destination
|
|
1779
|
+
// object. Valid values are `authenticatedRead`, `bucketOwnerFullControl`,
|
|
1780
|
+
// `bucketOwnerRead`, `private`, `projectPrivate`, or `publicRead`.
|
|
1781
|
+
string destination_predefined_acl = 28
|
|
1782
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1783
|
+
|
|
1784
|
+
// Makes the operation conditional on whether the object's current generation
|
|
1785
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
1786
|
+
// there are no live versions of the object.
|
|
1787
|
+
optional int64 if_generation_match = 7;
|
|
1788
|
+
|
|
1789
|
+
// Makes the operation conditional on whether the object's live generation
|
|
1790
|
+
// does not match the given value. If no live object exists, the precondition
|
|
1791
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
1792
|
+
// version of the object.
|
|
1793
|
+
optional int64 if_generation_not_match = 8;
|
|
1794
|
+
|
|
1795
|
+
// Makes the operation conditional on whether the destination object's current
|
|
1796
|
+
// metageneration matches the given value.
|
|
1797
|
+
optional int64 if_metageneration_match = 9;
|
|
1798
|
+
|
|
1799
|
+
// Makes the operation conditional on whether the destination object's current
|
|
1800
|
+
// metageneration does not match the given value.
|
|
1801
|
+
optional int64 if_metageneration_not_match = 10;
|
|
1802
|
+
|
|
1803
|
+
// Makes the operation conditional on whether the source object's live
|
|
1804
|
+
// generation matches the given value.
|
|
1805
|
+
optional int64 if_source_generation_match = 11;
|
|
1806
|
+
|
|
1807
|
+
// Makes the operation conditional on whether the source object's live
|
|
1808
|
+
// generation does not match the given value.
|
|
1809
|
+
optional int64 if_source_generation_not_match = 12;
|
|
1810
|
+
|
|
1811
|
+
// Makes the operation conditional on whether the source object's current
|
|
1812
|
+
// metageneration matches the given value.
|
|
1813
|
+
optional int64 if_source_metageneration_match = 13;
|
|
1814
|
+
|
|
1815
|
+
// Makes the operation conditional on whether the source object's current
|
|
1816
|
+
// metageneration does not match the given value.
|
|
1817
|
+
optional int64 if_source_metageneration_not_match = 14;
|
|
1818
|
+
|
|
1819
|
+
// Optional. The maximum number of bytes that are rewritten per rewrite
|
|
1820
|
+
// request. Most callers shouldn't need to specify this parameter - it is
|
|
1821
|
+
// primarily in place to support testing. If specified the value must be an
|
|
1822
|
+
// integral multiple of 1 MiB (1048576). Also, this only applies to requests
|
|
1823
|
+
// where the source and destination span locations and/or storage classes.
|
|
1824
|
+
// Finally, this value must not change across rewrite calls else you'll get an
|
|
1825
|
+
// error that the `rewriteToken` is invalid.
|
|
1826
|
+
int64 max_bytes_rewritten_per_call = 15
|
|
1827
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1828
|
+
|
|
1829
|
+
// Optional. The algorithm used to encrypt the source object, if any. Used if
|
|
1830
|
+
// the source object was encrypted with a Customer-Supplied Encryption Key.
|
|
1831
|
+
string copy_source_encryption_algorithm = 16
|
|
1832
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1833
|
+
|
|
1834
|
+
// Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to
|
|
1835
|
+
// encrypt the source object, if it was encrypted with a Customer-Supplied
|
|
1836
|
+
// Encryption Key.
|
|
1837
|
+
bytes copy_source_encryption_key_bytes = 21
|
|
1838
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1839
|
+
|
|
1840
|
+
// Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption
|
|
1841
|
+
// key used to encrypt the source object, if it was encrypted with a
|
|
1842
|
+
// Customer-Supplied Encryption Key.
|
|
1843
|
+
bytes copy_source_encryption_key_sha256_bytes = 22
|
|
1844
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1845
|
+
|
|
1846
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
1847
|
+
// object.
|
|
1848
|
+
CommonObjectRequestParams common_object_request_params = 19
|
|
1849
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1850
|
+
|
|
1851
|
+
// Optional. The checksums of the complete object. This is used to validate
|
|
1852
|
+
// the destination object after rewriting.
|
|
1853
|
+
ObjectChecksums object_checksums = 29
|
|
1854
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
// A rewrite response.
|
|
1858
|
+
message RewriteResponse {
|
|
1859
|
+
// The total bytes written so far, which can be used to provide a waiting user
|
|
1860
|
+
// with a progress indicator. This property is always present in the response.
|
|
1861
|
+
int64 total_bytes_rewritten = 1;
|
|
1862
|
+
|
|
1863
|
+
// The total size of the object being copied in bytes. This property is always
|
|
1864
|
+
// present in the response.
|
|
1865
|
+
int64 object_size = 2;
|
|
1866
|
+
|
|
1867
|
+
// `true` if the copy is finished; otherwise, `false` if
|
|
1868
|
+
// the copy is in progress. This property is always present in the response.
|
|
1869
|
+
bool done = 3;
|
|
1870
|
+
|
|
1871
|
+
// A token to use in subsequent requests to continue copying data. This token
|
|
1872
|
+
// is present in the response only when there is more data to copy.
|
|
1873
|
+
string rewrite_token = 4;
|
|
1874
|
+
|
|
1875
|
+
// A resource containing the metadata for the copied-to object. This property
|
|
1876
|
+
// is present in the response only when copying completes.
|
|
1877
|
+
StorageObject resource = 5;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
// Request message for [MoveObject][google.storage.v2.Storage.MoveObject].
|
|
1881
|
+
message MoveObjectRequest {
|
|
1882
|
+
// Required. Name of the bucket in which the object resides.
|
|
1883
|
+
string bucket = 1 [
|
|
1884
|
+
(google.api.field_behavior) = REQUIRED,
|
|
1885
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
1886
|
+
];
|
|
1887
|
+
|
|
1888
|
+
// Required. Name of the source object.
|
|
1889
|
+
string source_object = 2 [(google.api.field_behavior) = REQUIRED];
|
|
1890
|
+
|
|
1891
|
+
// Required. Name of the destination object.
|
|
1892
|
+
string destination_object = 3 [(google.api.field_behavior) = REQUIRED];
|
|
1893
|
+
|
|
1894
|
+
// Optional. Makes the operation conditional on whether the source object's
|
|
1895
|
+
// current generation matches the given value. `if_source_generation_match`
|
|
1896
|
+
// and `if_source_generation_not_match` conditions are mutually exclusive:
|
|
1897
|
+
// it's an error for both of them to be set in the request.
|
|
1898
|
+
optional int64 if_source_generation_match = 4
|
|
1899
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1900
|
+
|
|
1901
|
+
// Optional. Makes the operation conditional on whether the source object's
|
|
1902
|
+
// current generation does not match the given value.
|
|
1903
|
+
// `if_source_generation_match` and `if_source_generation_not_match`
|
|
1904
|
+
// conditions are mutually exclusive: it's an error for both of them to be set
|
|
1905
|
+
// in the request.
|
|
1906
|
+
optional int64 if_source_generation_not_match = 5
|
|
1907
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1908
|
+
|
|
1909
|
+
// Optional. Makes the operation conditional on whether the source object's
|
|
1910
|
+
// current metageneration matches the given value.
|
|
1911
|
+
// `if_source_metageneration_match` and `if_source_metageneration_not_match`
|
|
1912
|
+
// conditions are mutually exclusive: it's an error for both of them to be set
|
|
1913
|
+
// in the request.
|
|
1914
|
+
optional int64 if_source_metageneration_match = 6
|
|
1915
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1916
|
+
|
|
1917
|
+
// Optional. Makes the operation conditional on whether the source object's
|
|
1918
|
+
// current metageneration does not match the given value.
|
|
1919
|
+
// `if_source_metageneration_match` and `if_source_metageneration_not_match`
|
|
1920
|
+
// conditions are mutually exclusive: it's an error for both of them to be set
|
|
1921
|
+
// in the request.
|
|
1922
|
+
optional int64 if_source_metageneration_not_match = 7
|
|
1923
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1924
|
+
|
|
1925
|
+
// Optional. Makes the operation conditional on whether the destination
|
|
1926
|
+
// object's current generation matches the given value. Setting to 0 makes the
|
|
1927
|
+
// operation succeed only if there are no live versions of the object.
|
|
1928
|
+
// `if_generation_match` and `if_generation_not_match` conditions are mutually
|
|
1929
|
+
// exclusive: it's an error for both of them to be set in the request.
|
|
1930
|
+
optional int64 if_generation_match = 8
|
|
1931
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1932
|
+
|
|
1933
|
+
// Optional. Makes the operation conditional on whether the destination
|
|
1934
|
+
// object's current generation does not match the given value. If no live
|
|
1935
|
+
// object exists, the precondition fails. Setting to 0 makes the operation
|
|
1936
|
+
// succeed only if there is a live version of the object.
|
|
1937
|
+
// `if_generation_match` and `if_generation_not_match` conditions are mutually
|
|
1938
|
+
// exclusive: it's an error for both of them to be set in the request.
|
|
1939
|
+
optional int64 if_generation_not_match = 9
|
|
1940
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1941
|
+
|
|
1942
|
+
// Optional. Makes the operation conditional on whether the destination
|
|
1943
|
+
// object's current metageneration matches the given value.
|
|
1944
|
+
// `if_metageneration_match` and `if_metageneration_not_match` conditions are
|
|
1945
|
+
// mutually exclusive: it's an error for both of them to be set in the
|
|
1946
|
+
// request.
|
|
1947
|
+
optional int64 if_metageneration_match = 10
|
|
1948
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1949
|
+
|
|
1950
|
+
// Optional. Makes the operation conditional on whether the destination
|
|
1951
|
+
// object's current metageneration does not match the given value.
|
|
1952
|
+
// `if_metageneration_match` and `if_metageneration_not_match` conditions are
|
|
1953
|
+
// mutually exclusive: it's an error for both of them to be set in the
|
|
1954
|
+
// request.
|
|
1955
|
+
optional int64 if_metageneration_not_match = 11
|
|
1956
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
// Request message for
|
|
1960
|
+
// [StartResumableWrite][google.storage.v2.Storage.StartResumableWrite].
|
|
1961
|
+
message StartResumableWriteRequest {
|
|
1962
|
+
// Required. Contains the information necessary to start a resumable write.
|
|
1963
|
+
WriteObjectSpec write_object_spec = 1
|
|
1964
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
1965
|
+
|
|
1966
|
+
// Optional. A set of parameters common to Storage API requests related to an
|
|
1967
|
+
// object.
|
|
1968
|
+
CommonObjectRequestParams common_object_request_params = 3
|
|
1969
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1970
|
+
|
|
1971
|
+
// Optional. The checksums of the complete object. This is used to validate
|
|
1972
|
+
// the uploaded object. For each upload, `object_checksums` can be provided
|
|
1973
|
+
// when initiating a resumable upload with`StartResumableWriteRequest` or when
|
|
1974
|
+
// completing a write with `WriteObjectRequest` with
|
|
1975
|
+
// `finish_write` set to `true`.
|
|
1976
|
+
ObjectChecksums object_checksums = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
// Response object for
|
|
1980
|
+
// [StartResumableWrite][google.storage.v2.Storage.StartResumableWrite].
|
|
1981
|
+
message StartResumableWriteResponse {
|
|
1982
|
+
// A unique identifier for the initiated resumable write operation.
|
|
1983
|
+
// As the ID grants write access, you should keep it confidential during
|
|
1984
|
+
// the upload to prevent unauthorized access and data tampering during your
|
|
1985
|
+
// upload. This ID should be included in subsequent `WriteObject` requests to
|
|
1986
|
+
// upload the object data.
|
|
1987
|
+
string upload_id = 1;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
// Request message for [UpdateObject][google.storage.v2.Storage.UpdateObject].
|
|
1991
|
+
message UpdateObjectRequest {
|
|
1992
|
+
// Required. The object to update.
|
|
1993
|
+
// The object's bucket and name fields are used to identify the object to
|
|
1994
|
+
// update. If present, the object's generation field selects a specific
|
|
1995
|
+
// revision of this object whose metadata should be updated. Otherwise,
|
|
1996
|
+
// assumes the live version of the object.
|
|
1997
|
+
StorageObject object = 1 [(google.api.field_behavior) = REQUIRED];
|
|
1998
|
+
|
|
1999
|
+
// Makes the operation conditional on whether the object's current generation
|
|
2000
|
+
// matches the given value. Setting to 0 makes the operation succeed only if
|
|
2001
|
+
// there are no live versions of the object.
|
|
2002
|
+
optional int64 if_generation_match = 2;
|
|
2003
|
+
|
|
2004
|
+
// Makes the operation conditional on whether the object's live generation
|
|
2005
|
+
// does not match the given value. If no live object exists, the precondition
|
|
2006
|
+
// fails. Setting to 0 makes the operation succeed only if there is a live
|
|
2007
|
+
// version of the object.
|
|
2008
|
+
optional int64 if_generation_not_match = 3;
|
|
2009
|
+
|
|
2010
|
+
// Makes the operation conditional on whether the object's current
|
|
2011
|
+
// metageneration matches the given value.
|
|
2012
|
+
optional int64 if_metageneration_match = 4;
|
|
2013
|
+
|
|
2014
|
+
// Makes the operation conditional on whether the object's current
|
|
2015
|
+
// metageneration does not match the given value.
|
|
2016
|
+
optional int64 if_metageneration_not_match = 5;
|
|
2017
|
+
|
|
2018
|
+
// Optional. Apply a predefined set of access controls to this object.
|
|
2019
|
+
// Valid values are "authenticatedRead", "bucketOwnerFullControl",
|
|
2020
|
+
// "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
|
|
2021
|
+
string predefined_acl = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
2022
|
+
|
|
2023
|
+
// Required. List of fields to be updated.
|
|
2024
|
+
//
|
|
2025
|
+
// To specify ALL fields, equivalent to the JSON API's "update" function,
|
|
2026
|
+
// specify a single field with the value `*`. Note: not recommended. If a new
|
|
2027
|
+
// field is introduced at a later time, an older client updating with the `*`
|
|
2028
|
+
// might accidentally reset the new field's value.
|
|
2029
|
+
//
|
|
2030
|
+
// Not specifying any fields is an error.
|
|
2031
|
+
google.protobuf.FieldMask update_mask = 7
|
|
2032
|
+
[(google.api.field_behavior) = REQUIRED];
|
|
2033
|
+
|
|
2034
|
+
// Optional. A set of parameters common to Storage API requests concerning an
|
|
2035
|
+
// object.
|
|
2036
|
+
CommonObjectRequestParams common_object_request_params = 8
|
|
2037
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2038
|
+
|
|
2039
|
+
// Optional. Overrides the unlocked retention config on the object.
|
|
2040
|
+
bool override_unlocked_retention = 11
|
|
2041
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
// Parameters that can be passed to any object request.
|
|
2045
|
+
message CommonObjectRequestParams {
|
|
2046
|
+
// Optional. Encryption algorithm used with the Customer-Supplied Encryption
|
|
2047
|
+
// Keys feature.
|
|
2048
|
+
string encryption_algorithm = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2049
|
+
|
|
2050
|
+
// Optional. Encryption key used with the Customer-Supplied Encryption Keys
|
|
2051
|
+
// feature. In raw bytes format (not base64-encoded).
|
|
2052
|
+
bytes encryption_key_bytes = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
2053
|
+
|
|
2054
|
+
// Optional. SHA256 hash of encryption key used with the Customer-supplied
|
|
2055
|
+
// encryption keys feature.
|
|
2056
|
+
bytes encryption_key_sha256_bytes = 5
|
|
2057
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
// Shared constants.
|
|
2061
|
+
message ServiceConstants {
|
|
2062
|
+
// A collection of constant values meaningful to the Storage API.
|
|
2063
|
+
enum Values {
|
|
2064
|
+
option allow_alias = true;
|
|
2065
|
+
|
|
2066
|
+
// Unused. Proto3 requires first enum to be 0.
|
|
2067
|
+
VALUES_UNSPECIFIED = 0;
|
|
2068
|
+
|
|
2069
|
+
// The maximum size chunk that can be returned in a single
|
|
2070
|
+
// `ReadRequest`.
|
|
2071
|
+
// 2 MiB.
|
|
2072
|
+
MAX_READ_CHUNK_BYTES = 2097152;
|
|
2073
|
+
|
|
2074
|
+
// The maximum size chunk that can be sent in a single WriteObjectRequest.
|
|
2075
|
+
// 2 MiB.
|
|
2076
|
+
MAX_WRITE_CHUNK_BYTES = 2097152;
|
|
2077
|
+
|
|
2078
|
+
// The maximum size of an object in MB - whether written in a single stream
|
|
2079
|
+
// or composed from multiple other objects.
|
|
2080
|
+
// 5 TiB.
|
|
2081
|
+
MAX_OBJECT_SIZE_MB = 5242880;
|
|
2082
|
+
|
|
2083
|
+
// The maximum length field name that can be sent in a single
|
|
2084
|
+
// custom metadata field.
|
|
2085
|
+
// 1 KiB.
|
|
2086
|
+
MAX_CUSTOM_METADATA_FIELD_NAME_BYTES = 1024;
|
|
2087
|
+
|
|
2088
|
+
// The maximum length field value that can be sent in a single
|
|
2089
|
+
// custom_metadata field.
|
|
2090
|
+
// 4 KiB.
|
|
2091
|
+
MAX_CUSTOM_METADATA_FIELD_VALUE_BYTES = 4096;
|
|
2092
|
+
|
|
2093
|
+
// The maximum total bytes that can be populated into all field names and
|
|
2094
|
+
// values of the custom_metadata for one object.
|
|
2095
|
+
// 8 KiB.
|
|
2096
|
+
MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES = 8192;
|
|
2097
|
+
|
|
2098
|
+
// The maximum total bytes that can be populated into all bucket metadata
|
|
2099
|
+
// fields.
|
|
2100
|
+
// 20 KiB.
|
|
2101
|
+
MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES = 20480;
|
|
2102
|
+
|
|
2103
|
+
// The maximum number of NotificationConfigs that can be registered
|
|
2104
|
+
// for a given bucket.
|
|
2105
|
+
MAX_NOTIFICATION_CONFIGS_PER_BUCKET = 100;
|
|
2106
|
+
|
|
2107
|
+
// The maximum number of LifecycleRules that can be registered for a given
|
|
2108
|
+
// bucket.
|
|
2109
|
+
MAX_LIFECYCLE_RULES_PER_BUCKET = 100;
|
|
2110
|
+
|
|
2111
|
+
// The maximum number of custom attributes per NotificationConfigs.
|
|
2112
|
+
MAX_NOTIFICATION_CUSTOM_ATTRIBUTES = 5;
|
|
2113
|
+
|
|
2114
|
+
// The maximum length of a custom attribute key included in
|
|
2115
|
+
// NotificationConfig.
|
|
2116
|
+
MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KEY_LENGTH = 256;
|
|
2117
|
+
|
|
2118
|
+
// The maximum length of a custom attribute value included in a
|
|
2119
|
+
// NotificationConfig.
|
|
2120
|
+
MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_VALUE_LENGTH = 1024;
|
|
2121
|
+
|
|
2122
|
+
// The maximum number of key/value entries per bucket label.
|
|
2123
|
+
MAX_LABELS_ENTRIES_COUNT = 64;
|
|
2124
|
+
|
|
2125
|
+
// The maximum character length of the key or value in a bucket
|
|
2126
|
+
// label map.
|
|
2127
|
+
MAX_LABELS_KEY_VALUE_LENGTH = 63;
|
|
2128
|
+
|
|
2129
|
+
// The maximum byte size of the key or value in a bucket label
|
|
2130
|
+
// map.
|
|
2131
|
+
MAX_LABELS_KEY_VALUE_BYTES = 128;
|
|
2132
|
+
|
|
2133
|
+
// The maximum number of object IDs that can be included in a
|
|
2134
|
+
// DeleteObjectsRequest.
|
|
2135
|
+
MAX_OBJECT_IDS_PER_DELETE_OBJECTS_REQUEST = 1000;
|
|
2136
|
+
|
|
2137
|
+
// The maximum number of days for which a token returned by the
|
|
2138
|
+
// GetListObjectsSplitPoints RPC is valid.
|
|
2139
|
+
SPLIT_TOKEN_MAX_VALID_DAYS = 14;
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
// A bucket.
|
|
2144
|
+
message Bucket {
|
|
2145
|
+
option (google.api.resource) = {
|
|
2146
|
+
type: "storage.googleapis.com/Bucket"
|
|
2147
|
+
pattern: "projects/{project}/buckets/{bucket}"
|
|
2148
|
+
plural: "buckets"
|
|
2149
|
+
singular: "bucket"
|
|
2150
|
+
};
|
|
2151
|
+
|
|
2152
|
+
// Billing properties of a bucket.
|
|
2153
|
+
message Billing {
|
|
2154
|
+
// Optional. When set to true, Requester Pays is enabled for this bucket.
|
|
2155
|
+
bool requester_pays = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
// Cross-Origin Response sharing (CORS) properties for a bucket.
|
|
2159
|
+
// For more on Cloud Storage and CORS, see
|
|
2160
|
+
// https://cloud.google.com/storage/docs/cross-origin.
|
|
2161
|
+
// For more on CORS in general, see https://tools.ietf.org/html/rfc6454.
|
|
2162
|
+
message Cors {
|
|
2163
|
+
// Optional. The list of origins eligible to receive CORS response headers.
|
|
2164
|
+
// For more information about origins, see [RFC
|
|
2165
|
+
// 6454](https://tools.ietf.org/html/rfc6454). Note: `*` is permitted in the
|
|
2166
|
+
// list of origins, and means `any origin`.
|
|
2167
|
+
repeated string origin = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2168
|
+
|
|
2169
|
+
// Optional. The list of HTTP methods on which to include CORS response
|
|
2170
|
+
// headers,
|
|
2171
|
+
// (`GET`, `OPTIONS`, `POST`, etc) Note: `*` is permitted in the list of
|
|
2172
|
+
// methods, and means "any method".
|
|
2173
|
+
repeated string method = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2174
|
+
|
|
2175
|
+
// Optional. The list of HTTP headers other than the [simple response
|
|
2176
|
+
// headers](https://www.w3.org/TR/cors/#simple-response-headers) to give
|
|
2177
|
+
// permission for the user-agent to share across domains.
|
|
2178
|
+
repeated string response_header = 3
|
|
2179
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2180
|
+
|
|
2181
|
+
// Optional. The value, in seconds, to return in the [Access-Control-Max-Age
|
|
2182
|
+
// header](https://www.w3.org/TR/cors/#access-control-max-age-response-header)
|
|
2183
|
+
// used in preflight responses.
|
|
2184
|
+
int32 max_age_seconds = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
// Encryption properties of a bucket.
|
|
2188
|
+
message Encryption {
|
|
2189
|
+
// Google Managed Encryption (GMEK) enforcement config of a bucket.
|
|
2190
|
+
message GoogleManagedEncryptionEnforcementConfig {
|
|
2191
|
+
// Restriction mode for google-managed encryption for new objects within
|
|
2192
|
+
// the bucket. Valid values are: `NotRestricted` and `FullyRestricted`.
|
|
2193
|
+
// If `NotRestricted` or unset, creation of new objects with
|
|
2194
|
+
// google-managed encryption is allowed.
|
|
2195
|
+
// If `FullyRestricted`, new objects can't be created using google-managed
|
|
2196
|
+
// encryption.
|
|
2197
|
+
optional string restriction_mode = 3;
|
|
2198
|
+
|
|
2199
|
+
// Time from which the config was effective. This is service-provided.
|
|
2200
|
+
optional google.protobuf.Timestamp effective_time = 2;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2203
|
+
// Customer Managed Encryption (CMEK) enforcement config of a bucket.
|
|
2204
|
+
message CustomerManagedEncryptionEnforcementConfig {
|
|
2205
|
+
// Restriction mode for customer-managed encryption for new objects within
|
|
2206
|
+
// the bucket. Valid values are: `NotRestricted` and `FullyRestricted`.
|
|
2207
|
+
// If `NotRestricted` or unset, creation of new objects with
|
|
2208
|
+
// customer-managed encryption is allowed.
|
|
2209
|
+
// If `FullyRestricted`, new objects can't be created using
|
|
2210
|
+
// customer-managed encryption.
|
|
2211
|
+
optional string restriction_mode = 3;
|
|
2212
|
+
|
|
2213
|
+
// Time from which the config was effective. This is service-provided.
|
|
2214
|
+
optional google.protobuf.Timestamp effective_time = 2;
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
// Customer Supplied Encryption (CSEK) enforcement config of a bucket.
|
|
2218
|
+
message CustomerSuppliedEncryptionEnforcementConfig {
|
|
2219
|
+
// Restriction mode for customer-supplied encryption for new objects
|
|
2220
|
+
// within the bucket. Valid values are: `NotRestricted` and
|
|
2221
|
+
// `FullyRestricted`.
|
|
2222
|
+
// If `NotRestricted` or unset, creation of new objects with
|
|
2223
|
+
// customer-supplied encryption is allowed.
|
|
2224
|
+
// If `FullyRestricted`, new objects can't be created using
|
|
2225
|
+
// customer-supplied encryption.
|
|
2226
|
+
optional string restriction_mode = 3;
|
|
2227
|
+
|
|
2228
|
+
// Time from which the config was effective. This is service-provided.
|
|
2229
|
+
optional google.protobuf.Timestamp effective_time = 2;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
// Optional. The name of the Cloud KMS key that is used to encrypt objects
|
|
2233
|
+
// inserted into this bucket, if no encryption method is specified.
|
|
2234
|
+
string default_kms_key = 1 [
|
|
2235
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
2236
|
+
(google.api.resource_reference) = {
|
|
2237
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
2238
|
+
}
|
|
2239
|
+
];
|
|
2240
|
+
|
|
2241
|
+
// Optional. If omitted, then new objects with GMEK encryption-type is
|
|
2242
|
+
// allowed. If set, then new objects created in this bucket must comply with
|
|
2243
|
+
// enforcement config. Changing this has no effect on existing objects; it
|
|
2244
|
+
// applies to new objects only.
|
|
2245
|
+
optional GoogleManagedEncryptionEnforcementConfig
|
|
2246
|
+
google_managed_encryption_enforcement_config = 2
|
|
2247
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2248
|
+
|
|
2249
|
+
// Optional. If omitted, then new objects with CMEK encryption-type is
|
|
2250
|
+
// allowed. If set, then new objects created in this bucket must comply with
|
|
2251
|
+
// enforcement config. Changing this has no effect on existing objects; it
|
|
2252
|
+
// applies to new objects only.
|
|
2253
|
+
optional CustomerManagedEncryptionEnforcementConfig
|
|
2254
|
+
customer_managed_encryption_enforcement_config = 3
|
|
2255
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2256
|
+
|
|
2257
|
+
// Optional. If omitted, then new objects with CSEK encryption-type is
|
|
2258
|
+
// allowed. If set, then new objects created in this bucket must comply with
|
|
2259
|
+
// enforcement config. Changing this has no effect on existing objects; it
|
|
2260
|
+
// applies to new objects only.
|
|
2261
|
+
optional CustomerSuppliedEncryptionEnforcementConfig
|
|
2262
|
+
customer_supplied_encryption_enforcement_config = 4
|
|
2263
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
// Bucket restriction options.
|
|
2267
|
+
message IamConfig {
|
|
2268
|
+
// Settings for Uniform Bucket level access.
|
|
2269
|
+
// See https://cloud.google.com/storage/docs/uniform-bucket-level-access.
|
|
2270
|
+
message UniformBucketLevelAccess {
|
|
2271
|
+
// Optional. If set, access checks only use bucket-level IAM policies or
|
|
2272
|
+
// above.
|
|
2273
|
+
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2274
|
+
|
|
2275
|
+
// Optional. The deadline time for changing
|
|
2276
|
+
// `iam_config.uniform_bucket_level_access.enabled` from `true` to
|
|
2277
|
+
// `false`. Mutable until the specified deadline is reached, but not
|
|
2278
|
+
// afterward.
|
|
2279
|
+
google.protobuf.Timestamp lock_time = 2
|
|
2280
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2281
|
+
}
|
|
2282
|
+
|
|
2283
|
+
// Optional. Bucket restriction options currently enforced on the bucket.
|
|
2284
|
+
UniformBucketLevelAccess uniform_bucket_level_access = 1
|
|
2285
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2286
|
+
|
|
2287
|
+
// Optional. Whether IAM enforces public access prevention. Valid values are
|
|
2288
|
+
// `enforced` or `inherited`.
|
|
2289
|
+
string public_access_prevention = 3
|
|
2290
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
// Lifecycle properties of a bucket.
|
|
2294
|
+
// For more information, see [StorageObject Lifecycle
|
|
2295
|
+
// Management](https://cloud.google.com/storage/docs/lifecycle).
|
|
2296
|
+
message Lifecycle {
|
|
2297
|
+
// A lifecycle Rule, combining an action to take on an object and a
|
|
2298
|
+
// condition which triggers that action.
|
|
2299
|
+
message Rule {
|
|
2300
|
+
// An action to take on an object.
|
|
2301
|
+
message Action {
|
|
2302
|
+
// Optional. Type of the action. Currently, only `Delete`,
|
|
2303
|
+
// `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
|
|
2304
|
+
// supported.
|
|
2305
|
+
string type = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2306
|
+
|
|
2307
|
+
// Optional. Target storage class. Required iff the type of the action
|
|
2308
|
+
// is SetStorageClass.
|
|
2309
|
+
string storage_class = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
// A condition of an object which triggers some action.
|
|
2313
|
+
message Condition {
|
|
2314
|
+
// Age of an object (in days). This condition is satisfied when an
|
|
2315
|
+
// object reaches the specified age.
|
|
2316
|
+
// A value of 0 indicates that all objects immediately match this
|
|
2317
|
+
// condition.
|
|
2318
|
+
optional int32 age_days = 1;
|
|
2319
|
+
|
|
2320
|
+
// Optional. This condition is satisfied when an object is created
|
|
2321
|
+
// before midnight of the specified date in UTC.
|
|
2322
|
+
google.type.Date created_before = 2
|
|
2323
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2324
|
+
|
|
2325
|
+
// Relevant only for versioned objects. If the value is
|
|
2326
|
+
// `true`, this condition matches live objects; if the value
|
|
2327
|
+
// is `false`, it matches archived objects.
|
|
2328
|
+
optional bool is_live = 3;
|
|
2329
|
+
|
|
2330
|
+
// Relevant only for versioned objects. If the value is N, this
|
|
2331
|
+
// condition is satisfied when there are at least N versions (including
|
|
2332
|
+
// the live version) newer than this version of the object.
|
|
2333
|
+
optional int32 num_newer_versions = 4;
|
|
2334
|
+
|
|
2335
|
+
// Optional. Objects having any of the storage classes specified by this
|
|
2336
|
+
// condition are matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
|
|
2337
|
+
// `NEARLINE`, `COLDLINE`, `STANDARD`, and
|
|
2338
|
+
// `DURABLE_REDUCED_AVAILABILITY`.
|
|
2339
|
+
repeated string matches_storage_class = 5
|
|
2340
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2341
|
+
|
|
2342
|
+
// Number of days that have elapsed since the custom timestamp set on an
|
|
2343
|
+
// object.
|
|
2344
|
+
// The value of the field must be a nonnegative integer.
|
|
2345
|
+
optional int32 days_since_custom_time = 7;
|
|
2346
|
+
|
|
2347
|
+
// Optional. An object matches this condition if the custom timestamp
|
|
2348
|
+
// set on the object is before the specified date in UTC.
|
|
2349
|
+
google.type.Date custom_time_before = 8
|
|
2350
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2351
|
+
|
|
2352
|
+
// This condition is relevant only for versioned objects. An object
|
|
2353
|
+
// version satisfies this condition only if these many days have been
|
|
2354
|
+
// passed since it became noncurrent. The value of the field must be a
|
|
2355
|
+
// nonnegative integer. If it's zero, the object version becomes
|
|
2356
|
+
// eligible for Lifecycle action as soon as it becomes noncurrent.
|
|
2357
|
+
optional int32 days_since_noncurrent_time = 9;
|
|
2358
|
+
|
|
2359
|
+
// Optional. This condition is relevant only for versioned objects. An
|
|
2360
|
+
// object version satisfies this condition only if it became noncurrent
|
|
2361
|
+
// before the specified date in UTC.
|
|
2362
|
+
google.type.Date noncurrent_time_before = 10
|
|
2363
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2364
|
+
|
|
2365
|
+
// Optional. List of object name prefixes. If any prefix exactly matches
|
|
2366
|
+
// the beginning of the object name, the condition evaluates to true.
|
|
2367
|
+
repeated string matches_prefix = 11
|
|
2368
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2369
|
+
|
|
2370
|
+
// Optional. List of object name suffixes. If any suffix exactly matches
|
|
2371
|
+
// the end of the object name, the condition evaluates to true.
|
|
2372
|
+
repeated string matches_suffix = 12
|
|
2373
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
// Optional. The action to take.
|
|
2377
|
+
Action action = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2378
|
+
|
|
2379
|
+
// Optional. The condition under which the action is taken.
|
|
2380
|
+
Condition condition = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
// Optional. A lifecycle management rule, which is made of an action to take
|
|
2384
|
+
// and the condition under which the action is taken.
|
|
2385
|
+
repeated Rule rule = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
// Logging-related properties of a bucket.
|
|
2389
|
+
message Logging {
|
|
2390
|
+
// Optional. The destination bucket where the current bucket's logs should
|
|
2391
|
+
// be placed, using path format (like `projects/123456/buckets/foo`).
|
|
2392
|
+
string log_bucket = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2393
|
+
|
|
2394
|
+
// Optional. A prefix for log object names.
|
|
2395
|
+
string log_object_prefix = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
// StorageObject Retention related properties of a bucket.
|
|
2399
|
+
message ObjectRetention {
|
|
2400
|
+
// Optional. Output only. If true, object retention is enabled for the
|
|
2401
|
+
// bucket.
|
|
2402
|
+
bool enabled = 1 [
|
|
2403
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
2404
|
+
(google.api.field_behavior) = OUTPUT_ONLY
|
|
2405
|
+
];
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
// Retention policy properties of a bucket.
|
|
2409
|
+
message RetentionPolicy {
|
|
2410
|
+
// Optional. Server-determined value that indicates the time from which
|
|
2411
|
+
// policy was enforced and effective.
|
|
2412
|
+
google.protobuf.Timestamp effective_time = 1
|
|
2413
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2414
|
+
|
|
2415
|
+
// Optional. Once locked, an object retention policy cannot be modified.
|
|
2416
|
+
bool is_locked = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2417
|
+
|
|
2418
|
+
// Optional. The duration that objects need to be retained. Retention
|
|
2419
|
+
// duration must be greater than zero and less than 100 years. Note that
|
|
2420
|
+
// enforcement of retention periods less than a day is not guaranteed. Such
|
|
2421
|
+
// periods should only be used for testing purposes. Any `nanos` value
|
|
2422
|
+
// specified is rounded down to the nearest second.
|
|
2423
|
+
google.protobuf.Duration retention_duration = 4
|
|
2424
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
// Soft delete policy properties of a bucket.
|
|
2428
|
+
message SoftDeletePolicy {
|
|
2429
|
+
// The period of time that soft-deleted objects in the bucket must be
|
|
2430
|
+
// retained and cannot be permanently deleted. The duration must be greater
|
|
2431
|
+
// than or equal to 7 days and less than 1 year.
|
|
2432
|
+
optional google.protobuf.Duration retention_duration = 1;
|
|
2433
|
+
|
|
2434
|
+
// Time from which the policy was effective. This is service-provided.
|
|
2435
|
+
optional google.protobuf.Timestamp effective_time = 2;
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
// Properties of a bucket related to versioning.
|
|
2439
|
+
// For more information about Cloud Storage versioning, see [StorageObject
|
|
2440
|
+
// versioning](https://cloud.google.com/storage/docs/object-versioning).
|
|
2441
|
+
message Versioning {
|
|
2442
|
+
// Optional. While set to true, versioning is fully enabled for this bucket.
|
|
2443
|
+
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
// Properties of a bucket related to accessing the contents as a static
|
|
2447
|
+
// website. For details, see [hosting a static website using Cloud
|
|
2448
|
+
// Storage](https://cloud.google.com/storage/docs/hosting-static-website).
|
|
2449
|
+
message Website {
|
|
2450
|
+
// Optional. If the requested object path is missing, the service ensures
|
|
2451
|
+
// the path has a trailing '/', append this suffix, and attempt to retrieve
|
|
2452
|
+
// the resulting object. This allows the creation of `index.html` objects to
|
|
2453
|
+
// represent directory pages.
|
|
2454
|
+
string main_page_suffix = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2455
|
+
|
|
2456
|
+
// Optional. If the requested object path is missing, and any
|
|
2457
|
+
// `mainPageSuffix` object is missing, if applicable, the service
|
|
2458
|
+
// returns the named object from this bucket as the content for a
|
|
2459
|
+
// [404 Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)
|
|
2460
|
+
// result.
|
|
2461
|
+
string not_found_page = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2462
|
+
}
|
|
2463
|
+
|
|
2464
|
+
// Configuration for [configurable dual-
|
|
2465
|
+
// regions](https://cloud.google.com/storage/docs/locations#configurable). It
|
|
2466
|
+
// should specify precisely two eligible regions within the same multi-region.
|
|
2467
|
+
// For details, see
|
|
2468
|
+
// [locations](https://cloud.google.com/storage/docs/locations).
|
|
2469
|
+
message CustomPlacementConfig {
|
|
2470
|
+
// Optional. List of locations to use for data placement.
|
|
2471
|
+
repeated string data_locations = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
// Configuration for a bucket's Autoclass feature.
|
|
2475
|
+
message Autoclass {
|
|
2476
|
+
// Optional. Enables Autoclass.
|
|
2477
|
+
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2478
|
+
|
|
2479
|
+
// Output only. Latest instant at which the `enabled` field was set to true
|
|
2480
|
+
// after being disabled/unconfigured or set to false after being enabled. If
|
|
2481
|
+
// Autoclass is enabled when the bucket is created, the value of the
|
|
2482
|
+
// `toggle_time` field is set to the bucket `create_time`.
|
|
2483
|
+
google.protobuf.Timestamp toggle_time = 2
|
|
2484
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2485
|
+
|
|
2486
|
+
// An object in an Autoclass bucket eventually cools down to the
|
|
2487
|
+
// terminal storage class if there is no access to the object.
|
|
2488
|
+
// The only valid values are NEARLINE and ARCHIVE.
|
|
2489
|
+
optional string terminal_storage_class = 3;
|
|
2490
|
+
|
|
2491
|
+
// Output only. Latest instant at which the autoclass terminal storage class
|
|
2492
|
+
// was updated.
|
|
2493
|
+
optional google.protobuf.Timestamp terminal_storage_class_update_time = 4
|
|
2494
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2495
|
+
}
|
|
2496
|
+
|
|
2497
|
+
// The [bucket IP
|
|
2498
|
+
// filtering](https://cloud.google.com/storage/docs/ip-filtering-overview)
|
|
2499
|
+
// configuration. Specifies the network sources that can access the bucket, as
|
|
2500
|
+
// well as its underlying objects.
|
|
2501
|
+
message IpFilter {
|
|
2502
|
+
// The public network IP address ranges that can access the bucket and its
|
|
2503
|
+
// data.
|
|
2504
|
+
message PublicNetworkSource {
|
|
2505
|
+
// Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
|
|
2506
|
+
// operate or access the bucket and its underlying objects.
|
|
2507
|
+
repeated string allowed_ip_cidr_ranges = 1
|
|
2508
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
// The list of VPC networks that can access the bucket.
|
|
2512
|
+
message VpcNetworkSource {
|
|
2513
|
+
// Name of the network.
|
|
2514
|
+
//
|
|
2515
|
+
// Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
|
|
2516
|
+
optional string network = 1;
|
|
2517
|
+
|
|
2518
|
+
// Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
|
|
2519
|
+
// can access the bucket. In the CIDR IP address block, the specified IP
|
|
2520
|
+
// address must be properly truncated, meaning all the host bits must be
|
|
2521
|
+
// zero or else the input is considered malformed. For example,
|
|
2522
|
+
// `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
|
|
2523
|
+
// IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
|
|
2524
|
+
repeated string allowed_ip_cidr_ranges = 2
|
|
2525
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
// The state of the IP filter configuration. Valid values are `Enabled` and
|
|
2529
|
+
// `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
|
|
2530
|
+
// bucket and all incoming requests to the bucket are evaluated against
|
|
2531
|
+
// these rules. When set to `Disabled`, IP filtering rules are not applied
|
|
2532
|
+
// to a bucket.
|
|
2533
|
+
optional string mode = 1;
|
|
2534
|
+
|
|
2535
|
+
// Public IPs allowed to operate or access the bucket.
|
|
2536
|
+
optional PublicNetworkSource public_network_source = 2;
|
|
2537
|
+
|
|
2538
|
+
// Optional. The list of network sources that are allowed to access
|
|
2539
|
+
// operations on the bucket or the underlying objects.
|
|
2540
|
+
repeated VpcNetworkSource vpc_network_sources = 3
|
|
2541
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2542
|
+
|
|
2543
|
+
// Optional. Whether or not to allow VPCs from orgs different than the
|
|
2544
|
+
// bucket's parent org to access the bucket. When set to true, validations
|
|
2545
|
+
// on the existence of the VPCs won't be performed. If set to false, each
|
|
2546
|
+
// VPC network source is checked to belong to the same org as the bucket as
|
|
2547
|
+
// well as validated for existence.
|
|
2548
|
+
bool allow_cross_org_vpcs = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
2549
|
+
|
|
2550
|
+
// Whether or not to allow all P4SA access to the bucket. When set to true,
|
|
2551
|
+
// IP filter config validation doesn't apply.
|
|
2552
|
+
optional bool allow_all_service_agent_access = 5;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
// Configuration for a bucket's hierarchical namespace feature.
|
|
2556
|
+
message HierarchicalNamespace {
|
|
2557
|
+
// Optional. Enables the hierarchical namespace feature.
|
|
2558
|
+
bool enabled = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
// Identifier. The name of the bucket.
|
|
2562
|
+
// Format: `projects/{project}/buckets/{bucket}`
|
|
2563
|
+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
|
|
2564
|
+
|
|
2565
|
+
// Output only. The user-chosen part of the bucket name. The `{bucket}`
|
|
2566
|
+
// portion of the `name` field. For globally unique buckets, this is equal to
|
|
2567
|
+
// the `bucket name` of other Cloud Storage APIs. Example: `pub`.
|
|
2568
|
+
string bucket_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2569
|
+
|
|
2570
|
+
// The etag of the bucket.
|
|
2571
|
+
// If included in the metadata of an `UpdateBucketRequest`, the operation is
|
|
2572
|
+
// only performed if the `etag` matches that of the bucket.
|
|
2573
|
+
string etag = 29;
|
|
2574
|
+
|
|
2575
|
+
// Immutable. The project which owns this bucket, in the format of
|
|
2576
|
+
// `projects/{projectIdentifier}`.
|
|
2577
|
+
// `{projectIdentifier}` can be the project ID or project number.
|
|
2578
|
+
// Output values are always in the project number format.
|
|
2579
|
+
string project = 3 [
|
|
2580
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
2581
|
+
(google.api.resource_reference) = {
|
|
2582
|
+
type: "cloudresourcemanager.googleapis.com/Project"
|
|
2583
|
+
}
|
|
2584
|
+
];
|
|
2585
|
+
|
|
2586
|
+
// Output only. The metadata generation of this bucket.
|
|
2587
|
+
int64 metageneration = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2588
|
+
|
|
2589
|
+
// Immutable. The location of the bucket. StorageObject data for objects in the
|
|
2590
|
+
// bucket resides in physical storage within this region. Defaults to `US`.
|
|
2591
|
+
// Attempting to update this field after the bucket is created results in an
|
|
2592
|
+
// error.
|
|
2593
|
+
string location = 5 [(google.api.field_behavior) = IMMUTABLE];
|
|
2594
|
+
|
|
2595
|
+
// Output only. The location type of the bucket (region, dual-region,
|
|
2596
|
+
// multi-region, etc).
|
|
2597
|
+
string location_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2598
|
+
|
|
2599
|
+
// Optional. The bucket's default storage class, used whenever no storageClass
|
|
2600
|
+
// is specified for a newly-created object. This defines how objects in the
|
|
2601
|
+
// bucket are stored and determines the SLA and the cost of storage.
|
|
2602
|
+
// If this value is not specified when the bucket is created, it defaults
|
|
2603
|
+
// to `STANDARD`. For more information, see [Storage
|
|
2604
|
+
// classes](https://developers.google.com/storage/docs/storage-classes).
|
|
2605
|
+
string storage_class = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
2606
|
+
|
|
2607
|
+
// Optional. The recovery point objective for cross-region replication of the
|
|
2608
|
+
// bucket. Applicable only for dual- and multi-region buckets. `DEFAULT` uses
|
|
2609
|
+
// default replication. `ASYNC_TURBO` enables turbo replication, valid for
|
|
2610
|
+
// dual-region buckets only. If rpo is not specified when the bucket is
|
|
2611
|
+
// created, it defaults to `DEFAULT`. For more information, see [Turbo
|
|
2612
|
+
// replication](https://cloud.google.com/storage/docs/availability-durability#turbo-replication).
|
|
2613
|
+
string rpo = 27 [(google.api.field_behavior) = OPTIONAL];
|
|
2614
|
+
|
|
2615
|
+
// Optional. Access controls on the bucket.
|
|
2616
|
+
// If `iam_config.uniform_bucket_level_access` is enabled on this bucket,
|
|
2617
|
+
// requests to set, read, or modify acl is an error.
|
|
2618
|
+
repeated BucketAccessControl acl = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
2619
|
+
|
|
2620
|
+
// Optional. Default access controls to apply to new objects when no ACL is
|
|
2621
|
+
// provided. If `iam_config.uniform_bucket_level_access` is enabled on this
|
|
2622
|
+
// bucket, requests to set, read, or modify acl is an error.
|
|
2623
|
+
repeated ObjectAccessControl default_object_acl = 9
|
|
2624
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2625
|
+
|
|
2626
|
+
// Optional. The bucket's lifecycle configuration. See [Lifecycle
|
|
2627
|
+
// Management](https://developers.google.com/storage/docs/lifecycle) for more
|
|
2628
|
+
// information.
|
|
2629
|
+
Lifecycle lifecycle = 10 [(google.api.field_behavior) = OPTIONAL];
|
|
2630
|
+
|
|
2631
|
+
// Output only. The creation time of the bucket.
|
|
2632
|
+
google.protobuf.Timestamp create_time = 11
|
|
2633
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2634
|
+
|
|
2635
|
+
// Optional. The bucket's [CORS](https://www.w3.org/TR/cors/)
|
|
2636
|
+
// configuration.
|
|
2637
|
+
repeated Cors cors = 12 [(google.api.field_behavior) = OPTIONAL];
|
|
2638
|
+
|
|
2639
|
+
// Output only. The modification time of the bucket.
|
|
2640
|
+
google.protobuf.Timestamp update_time = 13
|
|
2641
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2642
|
+
|
|
2643
|
+
// Optional. The default value for event-based hold on newly created objects
|
|
2644
|
+
// in this bucket. Event-based hold is a way to retain objects indefinitely
|
|
2645
|
+
// until an event occurs, signified by the hold's release. After being
|
|
2646
|
+
// released, such objects are subject to bucket-level retention (if any). One
|
|
2647
|
+
// sample use case of this flag is for banks to hold loan documents for at
|
|
2648
|
+
// least 3 years after loan is paid in full. Here, bucket-level retention is 3
|
|
2649
|
+
// years and the event is loan being paid in full. In this example, these
|
|
2650
|
+
// objects are held intact for any number of years until the event has
|
|
2651
|
+
// occurred (event-based hold on the object is released) and then 3 more years
|
|
2652
|
+
// after that. That means retention duration of the objects begins from the
|
|
2653
|
+
// moment event-based hold transitioned from true to false. Objects under
|
|
2654
|
+
// event-based hold cannot be deleted, overwritten or archived until the hold
|
|
2655
|
+
// is removed.
|
|
2656
|
+
bool default_event_based_hold = 14 [(google.api.field_behavior) = OPTIONAL];
|
|
2657
|
+
|
|
2658
|
+
// Optional. User-provided labels, in key/value pairs.
|
|
2659
|
+
map<string, string> labels = 15 [(google.api.field_behavior) = OPTIONAL];
|
|
2660
|
+
|
|
2661
|
+
// Optional. The bucket's website config, controlling how the service behaves
|
|
2662
|
+
// when accessing bucket contents as a web site. See the [Static website
|
|
2663
|
+
// examples](https://cloud.google.com/storage/docs/static-website) for more
|
|
2664
|
+
// information.
|
|
2665
|
+
Website website = 16 [(google.api.field_behavior) = OPTIONAL];
|
|
2666
|
+
|
|
2667
|
+
// Optional. The bucket's versioning configuration.
|
|
2668
|
+
Versioning versioning = 17 [(google.api.field_behavior) = OPTIONAL];
|
|
2669
|
+
|
|
2670
|
+
// Optional. The bucket's logging config, which defines the destination bucket
|
|
2671
|
+
// and name prefix (if any) for the current bucket's logs.
|
|
2672
|
+
Logging logging = 18 [(google.api.field_behavior) = OPTIONAL];
|
|
2673
|
+
|
|
2674
|
+
// Output only. The owner of the bucket. This is always the project team's
|
|
2675
|
+
// owner group.
|
|
2676
|
+
Owner owner = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2677
|
+
|
|
2678
|
+
// Optional. Encryption config for a bucket.
|
|
2679
|
+
Encryption encryption = 20 [(google.api.field_behavior) = OPTIONAL];
|
|
2680
|
+
|
|
2681
|
+
// Optional. The bucket's billing configuration.
|
|
2682
|
+
Billing billing = 21 [(google.api.field_behavior) = OPTIONAL];
|
|
2683
|
+
|
|
2684
|
+
// Optional. The bucket's retention policy. The retention policy enforces a
|
|
2685
|
+
// minimum retention time for all objects contained in the bucket, based on
|
|
2686
|
+
// their creation time. Any attempt to overwrite or delete objects younger
|
|
2687
|
+
// than the retention period results in a `PERMISSION_DENIED` error. An
|
|
2688
|
+
// unlocked retention policy can be modified or removed from the bucket via a
|
|
2689
|
+
// storage.buckets.update operation. A locked retention policy cannot be
|
|
2690
|
+
// removed or shortened in duration for the lifetime of the bucket.
|
|
2691
|
+
// Attempting to remove or decrease period of a locked retention policy
|
|
2692
|
+
// results in a `PERMISSION_DENIED` error.
|
|
2693
|
+
RetentionPolicy retention_policy = 22
|
|
2694
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2695
|
+
|
|
2696
|
+
// Optional. The bucket's IAM configuration.
|
|
2697
|
+
IamConfig iam_config = 23 [(google.api.field_behavior) = OPTIONAL];
|
|
2698
|
+
|
|
2699
|
+
// Optional. Reserved for future use.
|
|
2700
|
+
bool satisfies_pzs = 25 [(google.api.field_behavior) = OPTIONAL];
|
|
2701
|
+
|
|
2702
|
+
// Optional. Configuration that, if present, specifies the data placement for
|
|
2703
|
+
// a [configurable
|
|
2704
|
+
// dual-region](https://cloud.google.com/storage/docs/locations#location-dr).
|
|
2705
|
+
CustomPlacementConfig custom_placement_config = 26
|
|
2706
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2707
|
+
|
|
2708
|
+
// Optional. The bucket's Autoclass configuration. If there is no
|
|
2709
|
+
// configuration, the Autoclass feature is disabled and has no effect on the
|
|
2710
|
+
// bucket.
|
|
2711
|
+
Autoclass autoclass = 28 [(google.api.field_behavior) = OPTIONAL];
|
|
2712
|
+
|
|
2713
|
+
// Optional. The bucket's hierarchical namespace configuration. If there is no
|
|
2714
|
+
// configuration, the hierarchical namespace feature is disabled and has
|
|
2715
|
+
// no effect on the bucket.
|
|
2716
|
+
HierarchicalNamespace hierarchical_namespace = 32
|
|
2717
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2718
|
+
|
|
2719
|
+
// Optional. The bucket's soft delete policy. The soft delete policy prevents
|
|
2720
|
+
// soft-deleted objects from being permanently deleted.
|
|
2721
|
+
SoftDeletePolicy soft_delete_policy = 31
|
|
2722
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2723
|
+
|
|
2724
|
+
// Optional. The bucket's object retention configuration. Must be enabled
|
|
2725
|
+
// before objects in the bucket might have retention configured.
|
|
2726
|
+
ObjectRetention object_retention = 33
|
|
2727
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2728
|
+
|
|
2729
|
+
// Optional. The bucket's IP filter configuration.
|
|
2730
|
+
optional IpFilter ip_filter = 38 [(google.api.field_behavior) = OPTIONAL];
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
// An access-control entry.
|
|
2734
|
+
message BucketAccessControl {
|
|
2735
|
+
// Optional. The access permission for the entity.
|
|
2736
|
+
string role = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2737
|
+
|
|
2738
|
+
// Optional. The ID of the access-control entry.
|
|
2739
|
+
string id = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2740
|
+
|
|
2741
|
+
// Optional. The entity holding the permission, in one of the following forms:
|
|
2742
|
+
// * `user-{userid}`
|
|
2743
|
+
// * `user-{email}`
|
|
2744
|
+
// * `group-{groupid}`
|
|
2745
|
+
// * `group-{email}`
|
|
2746
|
+
// * `domain-{domain}`
|
|
2747
|
+
// * `project-{team}-{projectnumber}`
|
|
2748
|
+
// * `project-{team}-{projectid}`
|
|
2749
|
+
// * `allUsers`
|
|
2750
|
+
// * `allAuthenticatedUsers`
|
|
2751
|
+
// Examples:
|
|
2752
|
+
// * The user `liz@example.com` would be `user-liz@example.com`.
|
|
2753
|
+
// * The group `example@googlegroups.com` would be
|
|
2754
|
+
// `group-example@googlegroups.com`
|
|
2755
|
+
// * All members of the Google Apps for Business domain `example.com` would be
|
|
2756
|
+
// `domain-example.com`
|
|
2757
|
+
// For project entities, `project-{team}-{projectnumber}` format is
|
|
2758
|
+
// returned on response.
|
|
2759
|
+
string entity = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2760
|
+
|
|
2761
|
+
// Output only. The alternative entity format, if exists. For project
|
|
2762
|
+
// entities, `project-{team}-{projectid}` format is returned in the response.
|
|
2763
|
+
string entity_alt = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2764
|
+
|
|
2765
|
+
// Optional. The ID for the entity, if any.
|
|
2766
|
+
string entity_id = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
2767
|
+
|
|
2768
|
+
// Optional. The `etag` of the `BucketAccessControl`.
|
|
2769
|
+
// If included in the metadata of an update or delete request message, the
|
|
2770
|
+
// operation operation is only performed if the etag matches that of the
|
|
2771
|
+
// bucket's `BucketAccessControl`.
|
|
2772
|
+
string etag = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
2773
|
+
|
|
2774
|
+
// Optional. The email address associated with the entity, if any.
|
|
2775
|
+
string email = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
2776
|
+
|
|
2777
|
+
// Optional. The domain associated with the entity, if any.
|
|
2778
|
+
string domain = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
2779
|
+
|
|
2780
|
+
// Optional. The project team associated with the entity, if any.
|
|
2781
|
+
ProjectTeam project_team = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
// Message used to convey content being read or written, along with an optional
|
|
2785
|
+
// checksum.
|
|
2786
|
+
message ChecksummedData {
|
|
2787
|
+
// Optional. The data.
|
|
2788
|
+
bytes content = 1 [ctype = CORD, (google.api.field_behavior) = OPTIONAL];
|
|
2789
|
+
|
|
2790
|
+
// If set, the CRC32C digest of the content field.
|
|
2791
|
+
optional fixed32 crc32c = 2;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
// Message used for storing full (not subrange) object checksums.
|
|
2795
|
+
message ObjectChecksums {
|
|
2796
|
+
// CRC32C digest of the object data. Computed by the Cloud Storage service for
|
|
2797
|
+
// all written objects.
|
|
2798
|
+
// If set in a WriteObjectRequest, service validates that the stored
|
|
2799
|
+
// object matches this checksum.
|
|
2800
|
+
optional fixed32 crc32c = 1;
|
|
2801
|
+
|
|
2802
|
+
// Optional. 128 bit MD5 hash of the object data. For more information about
|
|
2803
|
+
// using the MD5 hash, see [Data validation and change
|
|
2804
|
+
// detection](https://cloud.google.com/storage/docs/data-validation). Not all
|
|
2805
|
+
// objects provide an MD5 hash. For example, composite objects provide only
|
|
2806
|
+
// crc32c hashes. This value is equivalent to running `cat object.txt |
|
|
2807
|
+
// openssl md5 -binary`
|
|
2808
|
+
bytes md5_hash = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
// The payload of a single user-defined object context.
|
|
2812
|
+
message ObjectCustomContextPayload {
|
|
2813
|
+
// Required. The value of the object context.
|
|
2814
|
+
string value = 1 [(google.api.field_behavior) = REQUIRED];
|
|
2815
|
+
|
|
2816
|
+
// Output only. The time at which the object context was created.
|
|
2817
|
+
google.protobuf.Timestamp create_time = 2
|
|
2818
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2819
|
+
|
|
2820
|
+
// Output only. The time at which the object context was last updated.
|
|
2821
|
+
google.protobuf.Timestamp update_time = 3
|
|
2822
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
// All contexts of an object grouped by type.
|
|
2826
|
+
message ObjectContexts {
|
|
2827
|
+
// Optional. User-defined object contexts.
|
|
2828
|
+
map<string, ObjectCustomContextPayload> custom = 1
|
|
2829
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
// Describes the customer-supplied encryption key mechanism used to store an
|
|
2833
|
+
// object's data at rest.
|
|
2834
|
+
message CustomerEncryption {
|
|
2835
|
+
// Optional. The encryption algorithm.
|
|
2836
|
+
string encryption_algorithm = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2837
|
+
|
|
2838
|
+
// Optional. SHA256 hash value of the encryption key.
|
|
2839
|
+
// In raw bytes format (not base64-encoded).
|
|
2840
|
+
bytes key_sha256_bytes = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
// An object.
|
|
2844
|
+
message StorageObject {
|
|
2845
|
+
// Specifies retention parameters of the object. Objects under retention
|
|
2846
|
+
// cannot be deleted or overwritten until their retention expires.
|
|
2847
|
+
message Retention {
|
|
2848
|
+
// Retention mode values.
|
|
2849
|
+
enum Mode {
|
|
2850
|
+
// No specified mode. StorageObject is not under retention.
|
|
2851
|
+
MODE_UNSPECIFIED = 0;
|
|
2852
|
+
|
|
2853
|
+
// Retention period might be decreased or increased.
|
|
2854
|
+
// The Retention configuration might be removed.
|
|
2855
|
+
// The mode might be changed to locked.
|
|
2856
|
+
UNLOCKED = 1;
|
|
2857
|
+
|
|
2858
|
+
// Retention period might be increased.
|
|
2859
|
+
// The Retention configuration cannot be removed.
|
|
2860
|
+
// The mode cannot be changed.
|
|
2861
|
+
LOCKED = 2;
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
// Optional. The mode of the Retention.
|
|
2865
|
+
Mode mode = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
2866
|
+
|
|
2867
|
+
// Optional. The timestamp that the object needs to be retained until.
|
|
2868
|
+
// Value cannot be set in the past or more than 100 years in the future.
|
|
2869
|
+
google.protobuf.Timestamp retain_until_time = 2
|
|
2870
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
// Immutable. The name of this object. Nearly any sequence of unicode
|
|
2874
|
+
// characters is valid. See
|
|
2875
|
+
// [Guidelines](https://cloud.google.com/storage/docs/objects#naming).
|
|
2876
|
+
// Example: `test.txt`
|
|
2877
|
+
// The `name` field by itself does not uniquely identify a Cloud Storage
|
|
2878
|
+
// object. A Cloud Storage object is uniquely identified by the tuple of
|
|
2879
|
+
// (bucket, object, generation).
|
|
2880
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
|
2881
|
+
|
|
2882
|
+
// Immutable. The name of the bucket containing this object.
|
|
2883
|
+
string bucket = 2 [
|
|
2884
|
+
(google.api.field_behavior) = IMMUTABLE,
|
|
2885
|
+
(google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" }
|
|
2886
|
+
];
|
|
2887
|
+
|
|
2888
|
+
// Optional. The `etag` of an object.
|
|
2889
|
+
// If included in the metadata of an update or delete request message, the
|
|
2890
|
+
// operation is only performed if the etag matches that of the live
|
|
2891
|
+
// object.
|
|
2892
|
+
string etag = 27 [(google.api.field_behavior) = OPTIONAL];
|
|
2893
|
+
|
|
2894
|
+
// Immutable. The content generation of this object. Used for object
|
|
2895
|
+
// versioning.
|
|
2896
|
+
int64 generation = 3 [(google.api.field_behavior) = IMMUTABLE];
|
|
2897
|
+
|
|
2898
|
+
// Output only. Restore token used to differentiate deleted objects with the
|
|
2899
|
+
// same name and generation. This field is output only, and only set for
|
|
2900
|
+
// deleted objects in HNS buckets.
|
|
2901
|
+
optional string restore_token = 35
|
|
2902
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2903
|
+
|
|
2904
|
+
// Output only. The version of the metadata for this generation of this
|
|
2905
|
+
// object. Used for preconditions and for detecting changes in metadata. A
|
|
2906
|
+
// metageneration number is only meaningful in the context of a particular
|
|
2907
|
+
// generation of a particular object.
|
|
2908
|
+
int64 metageneration = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2909
|
+
|
|
2910
|
+
// Optional. Storage class of the object.
|
|
2911
|
+
string storage_class = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
2912
|
+
|
|
2913
|
+
// Output only. Content-Length of the object data in bytes, matching
|
|
2914
|
+
// [RFC 7230 §3.3.2](https://tools.ietf.org/html/rfc7230#section-3.3.2]).
|
|
2915
|
+
int64 size = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2916
|
+
|
|
2917
|
+
// Optional. Content-Encoding of the object data, matching
|
|
2918
|
+
// [RFC 7231 §3.1.2.2](https://tools.ietf.org/html/rfc7231#section-3.1.2.2)
|
|
2919
|
+
string content_encoding = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
2920
|
+
|
|
2921
|
+
// Optional. Content-Disposition of the object data, matching
|
|
2922
|
+
// [RFC 6266](https://tools.ietf.org/html/rfc6266).
|
|
2923
|
+
string content_disposition = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
2924
|
+
|
|
2925
|
+
// Optional. Cache-Control directive for the object data, matching
|
|
2926
|
+
// [RFC 7234 §5.2](https://tools.ietf.org/html/rfc7234#section-5.2).
|
|
2927
|
+
// If omitted, and the object is accessible to all anonymous users, the
|
|
2928
|
+
// default is `public, max-age=3600`.
|
|
2929
|
+
string cache_control = 9 [(google.api.field_behavior) = OPTIONAL];
|
|
2930
|
+
|
|
2931
|
+
// Optional. Access controls on the object.
|
|
2932
|
+
// If `iam_config.uniform_bucket_level_access` is enabled on the parent
|
|
2933
|
+
// bucket, requests to set, read, or modify acl is an error.
|
|
2934
|
+
repeated ObjectAccessControl acl = 10
|
|
2935
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
2936
|
+
|
|
2937
|
+
// Optional. Content-Language of the object data, matching
|
|
2938
|
+
// [RFC 7231 §3.1.3.2](https://tools.ietf.org/html/rfc7231#section-3.1.3.2).
|
|
2939
|
+
string content_language = 11 [(google.api.field_behavior) = OPTIONAL];
|
|
2940
|
+
|
|
2941
|
+
// Output only. If this object is noncurrent, this is the time when the object
|
|
2942
|
+
// became noncurrent.
|
|
2943
|
+
google.protobuf.Timestamp delete_time = 12
|
|
2944
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2945
|
+
|
|
2946
|
+
// Output only. The time when the object was finalized.
|
|
2947
|
+
google.protobuf.Timestamp finalize_time = 36
|
|
2948
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2949
|
+
|
|
2950
|
+
// Optional. Content-Type of the object data, matching
|
|
2951
|
+
// [RFC 7231 §3.1.1.5](https://tools.ietf.org/html/rfc7231#section-3.1.1.5).
|
|
2952
|
+
// If an object is stored without a Content-Type, it is served as
|
|
2953
|
+
// `application/octet-stream`.
|
|
2954
|
+
string content_type = 13 [(google.api.field_behavior) = OPTIONAL];
|
|
2955
|
+
|
|
2956
|
+
// Output only. The creation time of the object.
|
|
2957
|
+
google.protobuf.Timestamp create_time = 14
|
|
2958
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2959
|
+
|
|
2960
|
+
// Output only. Number of underlying components that make up this object.
|
|
2961
|
+
// Components are accumulated by compose operations.
|
|
2962
|
+
int32 component_count = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2963
|
+
|
|
2964
|
+
// Output only. Hashes for the data part of this object. This field is used
|
|
2965
|
+
// for output only and is silently ignored if provided in requests. The
|
|
2966
|
+
// checksums of the complete object regardless of data range. If the object is
|
|
2967
|
+
// downloaded in full, the client should compute one of these checksums over
|
|
2968
|
+
// the downloaded object and compare it against the value provided here.
|
|
2969
|
+
ObjectChecksums checksums = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2970
|
+
|
|
2971
|
+
// Output only. The modification time of the object metadata.
|
|
2972
|
+
// Set initially to object creation time and then updated whenever any
|
|
2973
|
+
// metadata of the object changes. This includes changes made by a requester,
|
|
2974
|
+
// such as modifying custom metadata, as well as changes made by Cloud Storage
|
|
2975
|
+
// on behalf of a requester, such as changing the storage class based on an
|
|
2976
|
+
// StorageObject Lifecycle Configuration.
|
|
2977
|
+
google.protobuf.Timestamp update_time = 17
|
|
2978
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2979
|
+
|
|
2980
|
+
// Optional. Cloud KMS Key used to encrypt this object, if the object is
|
|
2981
|
+
// encrypted by such a key.
|
|
2982
|
+
string kms_key = 18 [
|
|
2983
|
+
(google.api.field_behavior) = OPTIONAL,
|
|
2984
|
+
(google.api.resource_reference) = {
|
|
2985
|
+
type: "cloudkms.googleapis.com/CryptoKey"
|
|
2986
|
+
}
|
|
2987
|
+
];
|
|
2988
|
+
|
|
2989
|
+
// Output only. The time at which the object's storage class was last changed.
|
|
2990
|
+
// When the object is initially created, it is set to `time_created`.
|
|
2991
|
+
google.protobuf.Timestamp update_storage_class_time = 19
|
|
2992
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
2993
|
+
|
|
2994
|
+
// Optional. Whether an object is under temporary hold. While this flag is set
|
|
2995
|
+
// to true, the object is protected against deletion and overwrites. A common
|
|
2996
|
+
// use case of this flag is regulatory investigations where objects need to be
|
|
2997
|
+
// retained while the investigation is ongoing. Note that unlike event-based
|
|
2998
|
+
// hold, temporary hold does not impact retention expiration time of an
|
|
2999
|
+
// object.
|
|
3000
|
+
bool temporary_hold = 20 [(google.api.field_behavior) = OPTIONAL];
|
|
3001
|
+
|
|
3002
|
+
// Optional. A server-determined value that specifies the earliest time that
|
|
3003
|
+
// the object's retention period expires. Note 1: This field is not provided
|
|
3004
|
+
// for objects with an active event-based hold, since retention expiration is
|
|
3005
|
+
// unknown until the hold is removed. Note 2: This value can be provided even
|
|
3006
|
+
// when temporary hold is set (so that the user can reason about policy
|
|
3007
|
+
// without having to first unset the temporary hold).
|
|
3008
|
+
google.protobuf.Timestamp retention_expire_time = 21
|
|
3009
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
3010
|
+
|
|
3011
|
+
// Optional. User-provided metadata, in key/value pairs.
|
|
3012
|
+
map<string, string> metadata = 22 [(google.api.field_behavior) = OPTIONAL];
|
|
3013
|
+
|
|
3014
|
+
// Optional. User-defined or system-defined object contexts. Each object
|
|
3015
|
+
// context is a key-payload pair, where the key provides the identification
|
|
3016
|
+
// and the payload holds the associated value and additional metadata.
|
|
3017
|
+
ObjectContexts contexts = 38 [(google.api.field_behavior) = OPTIONAL];
|
|
3018
|
+
|
|
3019
|
+
// Whether an object is under event-based hold.
|
|
3020
|
+
// An event-based hold is a way to force the retention of an object until
|
|
3021
|
+
// after some event occurs. Once the hold is released by explicitly setting
|
|
3022
|
+
// this field to `false`, the object becomes subject to any bucket-level
|
|
3023
|
+
// retention policy, except that the retention duration is calculated
|
|
3024
|
+
// from the time the event based hold was lifted, rather than the time the
|
|
3025
|
+
// object was created.
|
|
3026
|
+
//
|
|
3027
|
+
// In a `WriteObject` request, not setting this field implies that the value
|
|
3028
|
+
// should be taken from the parent bucket's `default_event_based_hold` field.
|
|
3029
|
+
// In a response, this field is always set to `true` or `false`.
|
|
3030
|
+
optional bool event_based_hold = 23;
|
|
3031
|
+
|
|
3032
|
+
// Output only. The owner of the object. This is always the uploader of the
|
|
3033
|
+
// object.
|
|
3034
|
+
Owner owner = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
3035
|
+
|
|
3036
|
+
// Optional. Metadata of customer-supplied encryption key, if the object is
|
|
3037
|
+
// encrypted by such a key.
|
|
3038
|
+
CustomerEncryption customer_encryption = 25
|
|
3039
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
3040
|
+
|
|
3041
|
+
// Optional. A user-specified timestamp set on an object.
|
|
3042
|
+
google.protobuf.Timestamp custom_time = 26
|
|
3043
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
3044
|
+
|
|
3045
|
+
// Output only. This is the time when the object became soft-deleted.
|
|
3046
|
+
//
|
|
3047
|
+
// Soft-deleted objects are only accessible if a soft_delete_policy is
|
|
3048
|
+
// enabled. Also see `hard_delete_time`.
|
|
3049
|
+
optional google.protobuf.Timestamp soft_delete_time = 28
|
|
3050
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
3051
|
+
|
|
3052
|
+
// Output only. The time when the object is permanently deleted.
|
|
3053
|
+
//
|
|
3054
|
+
// Only set when an object becomes soft-deleted with a `soft_delete_policy`.
|
|
3055
|
+
// Otherwise, the object is not accessible.
|
|
3056
|
+
optional google.protobuf.Timestamp hard_delete_time = 29
|
|
3057
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
3058
|
+
|
|
3059
|
+
// Optional. Retention configuration of this object.
|
|
3060
|
+
// Might only be configured if the bucket has object retention enabled.
|
|
3061
|
+
Retention retention = 30 [(google.api.field_behavior) = OPTIONAL];
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
// An access-control entry.
|
|
3065
|
+
message ObjectAccessControl {
|
|
3066
|
+
// Optional. The access permission for the entity. One of the following
|
|
3067
|
+
// values:
|
|
3068
|
+
// * `READER`
|
|
3069
|
+
// * `WRITER`
|
|
3070
|
+
// * `OWNER`
|
|
3071
|
+
string role = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
3072
|
+
|
|
3073
|
+
// Optional. The ID of the access-control entry.
|
|
3074
|
+
string id = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
3075
|
+
|
|
3076
|
+
// Optional. The entity holding the permission, in one of the following forms:
|
|
3077
|
+
// * `user-{userid}`
|
|
3078
|
+
// * `user-{email}`
|
|
3079
|
+
// * `group-{groupid}`
|
|
3080
|
+
// * `group-{email}`
|
|
3081
|
+
// * `domain-{domain}`
|
|
3082
|
+
// * `project-{team}-{projectnumber}`
|
|
3083
|
+
// * `project-{team}-{projectid}`
|
|
3084
|
+
// * `allUsers`
|
|
3085
|
+
// * `allAuthenticatedUsers`
|
|
3086
|
+
// Examples:
|
|
3087
|
+
// * The user `liz@example.com` would be `user-liz@example.com`.
|
|
3088
|
+
// * The group `example@googlegroups.com` would be
|
|
3089
|
+
// `group-example@googlegroups.com`.
|
|
3090
|
+
// * All members of the Google Apps for Business domain `example.com` would be
|
|
3091
|
+
// `domain-example.com`.
|
|
3092
|
+
// For project entities, `project-{team}-{projectnumber}` format is
|
|
3093
|
+
// returned in the response.
|
|
3094
|
+
string entity = 3 [(google.api.field_behavior) = OPTIONAL];
|
|
3095
|
+
|
|
3096
|
+
// Output only. The alternative entity format, if exists. For project
|
|
3097
|
+
// entities, `project-{team}-{projectid}` format is returned in the response.
|
|
3098
|
+
string entity_alt = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
3099
|
+
|
|
3100
|
+
// Optional. The ID for the entity, if any.
|
|
3101
|
+
string entity_id = 4 [(google.api.field_behavior) = OPTIONAL];
|
|
3102
|
+
|
|
3103
|
+
// Optional. The etag of the ObjectAccessControl.
|
|
3104
|
+
// If included in the metadata of an update or delete request message, the
|
|
3105
|
+
// operation is only performed if the etag matches that of the live
|
|
3106
|
+
// object's ObjectAccessControl.
|
|
3107
|
+
string etag = 8 [(google.api.field_behavior) = OPTIONAL];
|
|
3108
|
+
|
|
3109
|
+
// Optional. The email address associated with the entity, if any.
|
|
3110
|
+
string email = 5 [(google.api.field_behavior) = OPTIONAL];
|
|
3111
|
+
|
|
3112
|
+
// Optional. The domain associated with the entity, if any.
|
|
3113
|
+
string domain = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
3114
|
+
|
|
3115
|
+
// Optional. The project team associated with the entity, if any.
|
|
3116
|
+
ProjectTeam project_team = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
// The result of a call to Objects.ListObjects
|
|
3120
|
+
message ListObjectsResponse {
|
|
3121
|
+
// The list of items.
|
|
3122
|
+
repeated StorageObject objects = 1;
|
|
3123
|
+
|
|
3124
|
+
// The list of prefixes of objects matching-but-not-listed up to and including
|
|
3125
|
+
// the requested delimiter.
|
|
3126
|
+
repeated string prefixes = 2;
|
|
3127
|
+
|
|
3128
|
+
// The continuation token, used to page through large result sets. Provide
|
|
3129
|
+
// this value in a subsequent request to return the next page of results.
|
|
3130
|
+
string next_page_token = 3;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
// Represents the Viewers, Editors, or Owners of a given project.
|
|
3134
|
+
message ProjectTeam {
|
|
3135
|
+
// Optional. The project number.
|
|
3136
|
+
string project_number = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
3137
|
+
|
|
3138
|
+
// Optional. The team.
|
|
3139
|
+
string team = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
3140
|
+
}
|
|
3141
|
+
|
|
3142
|
+
// The owner of a specific resource.
|
|
3143
|
+
message Owner {
|
|
3144
|
+
// Optional. The entity, in the form `user-`*userId*.
|
|
3145
|
+
string entity = 1 [(google.api.field_behavior) = OPTIONAL];
|
|
3146
|
+
|
|
3147
|
+
// Optional. The ID for the entity.
|
|
3148
|
+
string entity_id = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
// Specifies a requested range of bytes to download.
|
|
3152
|
+
message ContentRange {
|
|
3153
|
+
// The starting offset of the object data. This value is inclusive.
|
|
3154
|
+
int64 start = 1;
|
|
3155
|
+
|
|
3156
|
+
// The ending offset of the object data. This value is exclusive.
|
|
3157
|
+
int64 end = 2;
|
|
3158
|
+
|
|
3159
|
+
// The complete length of the object data.
|
|
3160
|
+
int64 complete_length = 3;
|
|
3161
|
+
}
|