1// Copyright 2022 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 15syntax = "proto3"; 16 17package google.storage.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/iam/v1/iam_policy.proto"; 21import "google/protobuf/field_mask.proto"; 22import "google/protobuf/wrappers.proto"; 23import "google/storage/v1/storage_resources.proto"; 24 25option go_package = "google.golang.org/genproto/googleapis/storage/v1;storage"; 26option java_multiple_files = true; 27option java_package = "com.google.storage.v1"; 28 29// Request message for DeleteBucketAccessControl. 30message DeleteBucketAccessControlRequest { 31 // Required. Name of a bucket. 32 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 33 34 // Required. The entity holding the permission. Can be one of: 35 // * `user-`*userId* 36 // * `user-`*emailAddress* 37 // * `group-`*groupId* 38 // * `group-`*emailAddress* 39 // * `allUsers` 40 // * `allAuthenticatedUsers` 41 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 42 43 // A set of parameters common to all Storage API requests. 44 CommonRequestParams common_request_params = 4; 45} 46 47// Request message for GetBucketAccessControl. 48message GetBucketAccessControlRequest { 49 // Required. Name of a bucket. 50 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 51 52 // Required. The entity holding the permission. Can be one of: 53 // * `user-`*userId* 54 // * `user-`*emailAddress* 55 // * `group-`*groupId* 56 // * `group-`*emailAddress* 57 // * `allUsers` 58 // * `allAuthenticatedUsers` 59 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 60 61 // A set of parameters common to all Storage API requests. 62 CommonRequestParams common_request_params = 4; 63} 64 65// Request message for InsertBucketAccessControl. 66message InsertBucketAccessControlRequest { 67 // Required. Name of a bucket. 68 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 69 70 // Properties of the new bucket access control being inserted. 71 BucketAccessControl bucket_access_control = 3; 72 73 // A set of parameters common to all Storage API requests. 74 CommonRequestParams common_request_params = 4; 75} 76 77// Request message for ListBucketAccessControl. 78message ListBucketAccessControlsRequest { 79 // Required. Name of a bucket. 80 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 81 82 // A set of parameters common to all Storage API requests. 83 CommonRequestParams common_request_params = 3; 84} 85 86// Request for PatchBucketAccessControl. 87message PatchBucketAccessControlRequest { 88 // Required. Name of a bucket. 89 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 90 91 // Required. The entity holding the permission. Can be one of: 92 // * `user-`*userId* 93 // * `user-`*emailAddress* 94 // * `group-`*groupId* 95 // * `group-`*emailAddress* 96 // * `allUsers` 97 // * `allAuthenticatedUsers` 98 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 99 100 // The BucketAccessControl for updating. 101 BucketAccessControl bucket_access_control = 4; 102 103 // List of fields to be updated. 104 // 105 // To specify ALL fields, equivalent to the JSON API's "update" function, 106 // specify a single field with the value `*`. 107 // 108 // 109 // Not specifying any fields is an error. 110 // Not specifying a field while setting that field to a non-default value is 111 // an error. 112 google.protobuf.FieldMask update_mask = 5; 113 114 // A set of parameters common to all Storage API requests. 115 CommonRequestParams common_request_params = 6; 116} 117 118// Request for UpdateBucketAccessControl. 119message UpdateBucketAccessControlRequest { 120 // Required. Name of a bucket. 121 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 122 123 // Required. The entity holding the permission. Can be one of: 124 // * `user-`*userId* 125 // * `user-`*emailAddress* 126 // * `group-`*groupId* 127 // * `group-`*emailAddress* 128 // * `allUsers` 129 // * `allAuthenticatedUsers` 130 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 131 132 // The BucketAccessControl for updating. 133 BucketAccessControl bucket_access_control = 4; 134 135 // A set of parameters common to all Storage API requests. 136 CommonRequestParams common_request_params = 5; 137} 138 139// Request message for DeleteBucket. 140message DeleteBucketRequest { 141 // Required. Name of a bucket. 142 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 143 144 // If set, only deletes the bucket if its metageneration matches this value. 145 google.protobuf.Int64Value if_metageneration_match = 2; 146 147 // If set, only deletes the bucket if its metageneration does not match this 148 // value. 149 google.protobuf.Int64Value if_metageneration_not_match = 3; 150 151 // A set of parameters common to all Storage API requests. 152 CommonRequestParams common_request_params = 5; 153} 154 155// Request message for GetBucket. 156message GetBucketRequest { 157 // Required. Name of a bucket. 158 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 159 160 // Makes the return of the bucket metadata conditional on whether the bucket's 161 // current metageneration matches the given value. 162 google.protobuf.Int64Value if_metageneration_match = 2; 163 164 // Makes the return of the bucket metadata conditional on whether the bucket's 165 // current metageneration does not match the given value. 166 google.protobuf.Int64Value if_metageneration_not_match = 3; 167 168 // Set of properties to return. Defaults to `NO_ACL`. 169 CommonEnums.Projection projection = 4; 170 171 // A set of parameters common to all Storage API requests. 172 CommonRequestParams common_request_params = 6; 173} 174 175// Request message for InsertBucket. 176message InsertBucketRequest { 177 // Apply a predefined set of access controls to this bucket. 178 CommonEnums.PredefinedBucketAcl predefined_acl = 1; 179 180 // Apply a predefined set of default object access controls to this bucket. 181 CommonEnums.PredefinedObjectAcl predefined_default_object_acl = 2; 182 183 // Required. A valid API project identifier. 184 string project = 3 [(google.api.field_behavior) = REQUIRED]; 185 186 // Set of properties to return. Defaults to `NO_ACL`, unless the 187 // bucket resource specifies `acl` or `defaultObjectAcl` 188 // properties, when it defaults to `FULL`. 189 CommonEnums.Projection projection = 4; 190 191 // Properties of the new bucket being inserted, including its name. 192 Bucket bucket = 6; 193 194 // A set of parameters common to all Storage API requests. 195 CommonRequestParams common_request_params = 7; 196} 197 198// Request message for ListChannels. 199message ListChannelsRequest { 200 // Required. Name of a bucket. 201 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 202 203 // A set of parameters common to all Storage API requests. 204 CommonRequestParams common_request_params = 3; 205} 206 207// Request message for ListBuckets. 208message ListBucketsRequest { 209 // Maximum number of buckets to return in a single response. The service will 210 // use this parameter or 1,000 items, whichever is smaller. 211 int32 max_results = 1; 212 213 // A previously-returned page token representing part of the larger set of 214 // results to view. 215 string page_token = 2; 216 217 // Filter results to buckets whose names begin with this prefix. 218 string prefix = 3; 219 220 // Required. A valid API project identifier. 221 string project = 4 [(google.api.field_behavior) = REQUIRED]; 222 223 // Set of properties to return. Defaults to `NO_ACL`. 224 CommonEnums.Projection projection = 5; 225 226 // A set of parameters common to all Storage API requests. 227 CommonRequestParams common_request_params = 7; 228} 229 230// Request message for LockRetentionPolicy. 231message LockRetentionPolicyRequest { 232 // Required. Name of a bucket. 233 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 234 235 // Makes the operation conditional on whether bucket's current metageneration 236 // matches the given value. Must be positive. 237 int64 if_metageneration_match = 2; 238 239 // A set of parameters common to all Storage API requests. 240 CommonRequestParams common_request_params = 4; 241} 242 243// Request for PatchBucket method. 244message PatchBucketRequest { 245 // Required. Name of a bucket. 246 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 247 248 // Makes the return of the bucket metadata conditional on whether the bucket's 249 // current metageneration matches the given value. 250 google.protobuf.Int64Value if_metageneration_match = 2; 251 252 // Makes the return of the bucket metadata conditional on whether the bucket's 253 // current metageneration does not match the given value. 254 google.protobuf.Int64Value if_metageneration_not_match = 3; 255 256 // Apply a predefined set of access controls to this bucket. 257 CommonEnums.PredefinedBucketAcl predefined_acl = 4; 258 259 // Apply a predefined set of default object access controls to this bucket. 260 CommonEnums.PredefinedObjectAcl predefined_default_object_acl = 5; 261 262 // Set of properties to return. Defaults to `FULL`. 263 CommonEnums.Projection projection = 6; 264 265 // The Bucket metadata for updating. 266 Bucket metadata = 8; 267 268 // List of fields to be updated. 269 // 270 // To specify ALL fields, equivalent to the JSON API's "update" function, 271 // specify a single field with the value `*`. Note: not recommended. If a new 272 // field is introduced at a later time, an older client updating with the `*` 273 // may accidentally reset the new field's value. 274 // 275 // Not specifying any fields is an error. 276 // Not specifying a field while setting that field to a non-default value is 277 // an error. 278 google.protobuf.FieldMask update_mask = 9; 279 280 // A set of parameters common to all Storage API requests. 281 CommonRequestParams common_request_params = 10; 282} 283 284// Request for UpdateBucket method. 285message UpdateBucketRequest { 286 // Required. Name of a bucket. 287 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 288 289 // Makes the return of the bucket metadata conditional on whether the bucket's 290 // current metageneration matches the given value. 291 google.protobuf.Int64Value if_metageneration_match = 2; 292 293 // Makes the return of the bucket metadata conditional on whether the bucket's 294 // current metageneration does not match the given value. 295 google.protobuf.Int64Value if_metageneration_not_match = 3; 296 297 // Apply a predefined set of access controls to this bucket. 298 CommonEnums.PredefinedBucketAcl predefined_acl = 4; 299 300 // Apply a predefined set of default object access controls to this bucket. 301 CommonEnums.PredefinedObjectAcl predefined_default_object_acl = 5; 302 303 // Set of properties to return. Defaults to `FULL`. 304 CommonEnums.Projection projection = 6; 305 306 // The Bucket metadata for updating. 307 Bucket metadata = 8; 308 309 // A set of parameters common to all Storage API requests. 310 CommonRequestParams common_request_params = 9; 311} 312 313// Request message for StopChannel. 314message StopChannelRequest { 315 // The channel to be stopped. 316 Channel channel = 1; 317 318 // A set of parameters common to all Storage API requests. 319 CommonRequestParams common_request_params = 2; 320} 321 322// Request message for DeleteDefaultObjectAccessControl. 323message DeleteDefaultObjectAccessControlRequest { 324 // Required. Name of a bucket. 325 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 326 327 // Required. The entity holding the permission. Can be one of: 328 // * `user-`*userId* 329 // * `user-`*emailAddress* 330 // * `group-`*groupId* 331 // * `group-`*emailAddress* 332 // * `allUsers` 333 // * `allAuthenticatedUsers` 334 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 335 336 // A set of parameters common to all Storage API requests. 337 CommonRequestParams common_request_params = 4; 338} 339 340// Request message for GetDefaultObjectAccessControl. 341message GetDefaultObjectAccessControlRequest { 342 // Required. Name of a bucket. 343 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 344 345 // Required. The entity holding the permission. Can be one of: 346 // * `user-`*userId* 347 // * `user-`*emailAddress* 348 // * `group-`*groupId* 349 // * `group-`*emailAddress* 350 // * `allUsers` 351 // * `allAuthenticatedUsers` 352 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 353 354 // A set of parameters common to all Storage API requests. 355 CommonRequestParams common_request_params = 4; 356} 357 358// Request message for InsertDefaultObjectAccessControl. 359message InsertDefaultObjectAccessControlRequest { 360 // Required. Name of a bucket. 361 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 362 363 // Properties of the object access control being inserted. 364 ObjectAccessControl object_access_control = 3; 365 366 // A set of parameters common to all Storage API requests. 367 CommonRequestParams common_request_params = 4; 368} 369 370// Request message for ListDefaultObjectAccessControls. 371message ListDefaultObjectAccessControlsRequest { 372 // Required. Name of a bucket. 373 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 374 375 // If present, only return default ACL listing if the bucket's current 376 // metageneration matches this value. 377 google.protobuf.Int64Value if_metageneration_match = 2; 378 379 // If present, only return default ACL listing if the bucket's current 380 // metageneration does not match the given value. 381 google.protobuf.Int64Value if_metageneration_not_match = 3; 382 383 // A set of parameters common to all Storage API requests. 384 CommonRequestParams common_request_params = 5; 385} 386 387// Request message for PatchDefaultObjectAccessControl. 388message PatchDefaultObjectAccessControlRequest { 389 // Required. Name of a bucket. 390 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 391 392 // Required. The entity holding the permission. Can be one of: 393 // * `user-`*userId* 394 // * `user-`*emailAddress* 395 // * `group-`*groupId* 396 // * `group-`*emailAddress* 397 // * `allUsers` 398 // * `allAuthenticatedUsers` 399 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 400 401 // The ObjectAccessControl for updating. 402 ObjectAccessControl object_access_control = 4; 403 404 // List of fields to be updated. 405 // 406 // To specify ALL fields, equivalent to the JSON API's "update" function, 407 // specify a single field with the value `*`. Note: not recommended. If a new 408 // field is introduced at a later time, an older client updating with the `*` 409 // may accidentally reset the new field's value. 410 // 411 // Not specifying any fields is an error. 412 // Not specifying a field while setting that field to a non-default value is 413 // an error. 414 google.protobuf.FieldMask update_mask = 5; 415 416 // A set of parameters common to all Storage API requests. 417 CommonRequestParams common_request_params = 6; 418} 419 420// Request message for UpdateDefaultObjectAccessControl. 421message UpdateDefaultObjectAccessControlRequest { 422 // Required. Name of a bucket. 423 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 424 425 // Required. The entity holding the permission. Can be one of: 426 // * `user-`*userId* 427 // * `user-`*emailAddress* 428 // * `group-`*groupId* 429 // * `group-`*emailAddress* 430 // * `allUsers` 431 // * `allAuthenticatedUsers` 432 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 433 434 // The ObjectAccessControl for updating. 435 ObjectAccessControl object_access_control = 4; 436 437 // A set of parameters common to all Storage API requests. 438 CommonRequestParams common_request_params = 5; 439} 440 441// Request message for DeleteNotification. 442message DeleteNotificationRequest { 443 // Required. The parent bucket of the notification. 444 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 445 446 // Required. ID of the notification to delete. 447 string notification = 2 [(google.api.field_behavior) = REQUIRED]; 448 449 // A set of parameters common to all Storage API requests. 450 CommonRequestParams common_request_params = 4; 451} 452 453// Request message for GetNotification. 454message GetNotificationRequest { 455 // Required. The parent bucket of the notification. 456 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 457 458 // Required. Notification ID. 459 // Required. 460 string notification = 2 [(google.api.field_behavior) = REQUIRED]; 461 462 // A set of parameters common to all Storage API requests. 463 CommonRequestParams common_request_params = 4; 464} 465 466// Request message for InsertNotification. 467message InsertNotificationRequest { 468 // Required. The parent bucket of the notification. 469 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 470 471 // Properties of the notification to be inserted. 472 Notification notification = 3; 473 474 // A set of parameters common to all Storage API requests. 475 CommonRequestParams common_request_params = 4; 476} 477 478// Request message for ListNotifications. 479message ListNotificationsRequest { 480 // Required. Name of a Google Cloud Storage bucket. 481 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 482 483 // A set of parameters common to all Storage API requests. 484 CommonRequestParams common_request_params = 3; 485} 486 487// Request message for DeleteObjectAccessControl. 488message DeleteObjectAccessControlRequest { 489 // Required. Name of a bucket. 490 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 491 492 // Required. The entity holding the permission. Can be one of: 493 // * `user-`*userId* 494 // * `user-`*emailAddress* 495 // * `group-`*groupId* 496 // * `group-`*emailAddress* 497 // * `allUsers` 498 // * `allAuthenticatedUsers` 499 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 500 501 // Required. Name of the object. 502 string object = 3 [(google.api.field_behavior) = REQUIRED]; 503 504 // If present, selects a specific revision of this object (as opposed to the 505 // latest version, the default). 506 int64 generation = 4; 507 508 // A set of parameters common to all Storage API requests. 509 CommonRequestParams common_request_params = 6; 510} 511 512// Request message for GetObjectAccessControl. 513message GetObjectAccessControlRequest { 514 // Required. Name of a bucket. 515 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 516 517 // Required. The entity holding the permission. Can be one of: 518 // * `user-`*userId* 519 // * `user-`*emailAddress* 520 // * `group-`*groupId* 521 // * `group-`*emailAddress* 522 // * `allUsers` 523 // * `allAuthenticatedUsers` 524 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 525 526 // Required. Name of the object. 527 string object = 3 [(google.api.field_behavior) = REQUIRED]; 528 529 // If present, selects a specific revision of this object (as opposed to the 530 // latest version, the default). 531 int64 generation = 4; 532 533 // A set of parameters common to all Storage API requests. 534 CommonRequestParams common_request_params = 6; 535} 536 537// Request message for InsertObjectAccessControl. 538message InsertObjectAccessControlRequest { 539 // Required. Name of a bucket. 540 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 541 542 // Required. Name of the object. 543 string object = 2 [(google.api.field_behavior) = REQUIRED]; 544 545 // If present, selects a specific revision of this object (as opposed to the 546 // latest version, the default). 547 int64 generation = 3; 548 549 // Properties of the object access control to be inserted. 550 ObjectAccessControl object_access_control = 5; 551 552 // A set of parameters common to all Storage API requests. 553 CommonRequestParams common_request_params = 6; 554} 555 556// Request message for ListObjectAccessControls. 557message ListObjectAccessControlsRequest { 558 // Required. Name of a bucket. 559 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 560 561 // Required. Name of the object. 562 string object = 2 [(google.api.field_behavior) = REQUIRED]; 563 564 // If present, selects a specific revision of this object (as opposed to the 565 // latest version, the default). 566 int64 generation = 3; 567 568 // A set of parameters common to all Storage API requests. 569 CommonRequestParams common_request_params = 5; 570} 571 572// Request message for PatchObjectAccessControl. 573message PatchObjectAccessControlRequest { 574 // Required. Name of a bucket. 575 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 576 577 // Required. The entity holding the permission. Can be one of: 578 // * `user-`*userId* 579 // * `user-`*emailAddress* 580 // * `group-`*groupId* 581 // * `group-`*emailAddress* 582 // * `allUsers` 583 // * `allAuthenticatedUsers` 584 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 585 586 // Required. Name of the object. 587 // Required. 588 string object = 3 [(google.api.field_behavior) = REQUIRED]; 589 590 // If present, selects a specific revision of this object (as opposed to the 591 // latest version, the default). 592 int64 generation = 4; 593 594 // The ObjectAccessControl for updating. 595 ObjectAccessControl object_access_control = 5; 596 597 // A set of parameters common to all Storage API requests. 598 CommonRequestParams common_request_params = 6; 599 600 // List of fields to be updated. 601 // 602 // To specify ALL fields, equivalent to the JSON API's "update" function, 603 // specify a single field with the value `*`. Note: not recommended. If a new 604 // field is introduced at a later time, an older client updating with the `*` 605 // may accidentally reset the new field's value. 606 // 607 // Not specifying any fields is an error. 608 // Not specifying a field while setting that field to a non-default value is 609 // an error. 610 google.protobuf.FieldMask update_mask = 7; 611} 612 613// Request message for UpdateObjectAccessControl. 614message UpdateObjectAccessControlRequest { 615 // Required. Name of a bucket. 616 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 617 618 // Required. The entity holding the permission. Can be one of: 619 // * `user-`*userId* 620 // * `user-`*emailAddress* 621 // * `group-`*groupId* 622 // * `group-`*emailAddress* 623 // * `allUsers` 624 // * `allAuthenticatedUsers` 625 string entity = 2 [(google.api.field_behavior) = REQUIRED]; 626 627 // Required. Name of the object. 628 // Required. 629 string object = 3 [(google.api.field_behavior) = REQUIRED]; 630 631 // If present, selects a specific revision of this object (as opposed to the 632 // latest version, the default). 633 int64 generation = 4; 634 635 // The ObjectAccessControl for updating. 636 ObjectAccessControl object_access_control = 6; 637 638 // A set of parameters common to all Storage API requests. 639 CommonRequestParams common_request_params = 7; 640 641 // List of fields to be updated. 642 // 643 // To specify ALL fields, equivalent to the JSON API's "update" function, 644 // specify a single field with the value `*`. Note: not recommended. If a new 645 // field is introduced at a later time, an older client updating with the `*` 646 // may accidentally reset the new field's value. 647 // 648 // Not specifying any fields is an error. 649 // Not specifying a field while setting that field to a non-default value is 650 // an error. 651 google.protobuf.FieldMask update_mask = 8; 652} 653 654// Request message for ComposeObject. 655message ComposeObjectRequest { 656 // Description of a source object for a composition request. 657 message SourceObjects { 658 // Preconditions for a source object of a composition request. 659 message ObjectPreconditions { 660 // Only perform the composition if the generation of the source object 661 // that would be used matches this value. If this value and a generation 662 // are both specified, they must be the same value or the call will fail. 663 google.protobuf.Int64Value if_generation_match = 1; 664 } 665 666 // The source object's name. All source objects must reside in the same 667 // bucket. 668 string name = 1; 669 670 // The generation of this object to use as the source. 671 int64 generation = 2; 672 673 // Conditions that must be met for this operation to execute. 674 ObjectPreconditions object_preconditions = 3; 675 } 676 677 // Required. Name of the bucket containing the source objects. The destination object is 678 // stored in this bucket. 679 string destination_bucket = 1 [(google.api.field_behavior) = REQUIRED]; 680 681 // Required. Name of the new object. 682 string destination_object = 2 [(google.api.field_behavior) = REQUIRED]; 683 684 // Apply a predefined set of access controls to the destination object. 685 CommonEnums.PredefinedObjectAcl destination_predefined_acl = 3; 686 687 // Properties of the resulting object. 688 Object destination = 11; 689 690 // The list of source objects that will be concatenated into a single object. 691 repeated SourceObjects source_objects = 12; 692 693 // Makes the operation conditional on whether the object's current generation 694 // matches the given value. Setting to 0 makes the operation succeed only if 695 // there are no live versions of the object. 696 google.protobuf.Int64Value if_generation_match = 4; 697 698 // Makes the operation conditional on whether the object's current 699 // metageneration matches the given value. 700 google.protobuf.Int64Value if_metageneration_match = 5; 701 702 // Resource name of the Cloud KMS key, of the form 703 // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, 704 // that will be used to encrypt the object. Overrides the object 705 // metadata's `kms_key_name` value, if any. 706 string kms_key_name = 6; 707 708 // A set of parameters common to Storage API requests concerning an object. 709 CommonObjectRequestParams common_object_request_params = 9; 710 711 // A set of parameters common to all Storage API requests. 712 CommonRequestParams common_request_params = 10; 713} 714 715// Request message for CopyObject. 716message CopyObjectRequest { 717 // Required. Name of the bucket in which to store the new object. Overrides the provided 718 // object 719 // metadata's `bucket` value, if any. 720 string destination_bucket = 1 [(google.api.field_behavior) = REQUIRED]; 721 722 // Required. Name of the new object. 723 // Required when the object metadata is not otherwise provided. Overrides the 724 // object metadata's `name` value, if any. 725 string destination_object = 2 [(google.api.field_behavior) = REQUIRED]; 726 727 // Apply a predefined set of access controls to the destination object. 728 CommonEnums.PredefinedObjectAcl destination_predefined_acl = 3; 729 730 // Makes the operation conditional on whether the destination object's current 731 // generation matches the given value. Setting to 0 makes the operation 732 // succeed only if there are no live versions of the object. 733 google.protobuf.Int64Value if_generation_match = 4; 734 735 // Makes the operation conditional on whether the destination object's current 736 // generation does not match the given value. If no live object exists, the 737 // precondition fails. Setting to 0 makes the operation succeed only if there 738 // is a live version of the object. 739 google.protobuf.Int64Value if_generation_not_match = 5; 740 741 // Makes the operation conditional on whether the destination object's current 742 // metageneration matches the given value. 743 google.protobuf.Int64Value if_metageneration_match = 6; 744 745 // Makes the operation conditional on whether the destination object's current 746 // metageneration does not match the given value. 747 google.protobuf.Int64Value if_metageneration_not_match = 7; 748 749 // Makes the operation conditional on whether the source object's current 750 // generation matches the given value. 751 google.protobuf.Int64Value if_source_generation_match = 8; 752 753 // Makes the operation conditional on whether the source object's current 754 // generation does not match the given value. 755 google.protobuf.Int64Value if_source_generation_not_match = 9; 756 757 // Makes the operation conditional on whether the source object's current 758 // metageneration matches the given value. 759 google.protobuf.Int64Value if_source_metageneration_match = 10; 760 761 // Makes the operation conditional on whether the source object's current 762 // metageneration does not match the given value. 763 google.protobuf.Int64Value if_source_metageneration_not_match = 11; 764 765 // Set of properties to return. Defaults to `NO_ACL`, unless the 766 // object resource specifies the `acl` property, when it defaults 767 // to `full`. 768 CommonEnums.Projection projection = 12; 769 770 // Required. Name of the bucket in which to find the source object. 771 string source_bucket = 13 [(google.api.field_behavior) = REQUIRED]; 772 773 // Required. Name of the source object. 774 string source_object = 14 [(google.api.field_behavior) = REQUIRED]; 775 776 // If present, selects a specific revision of the source object (as opposed to 777 // the latest version, the default). 778 int64 source_generation = 15; 779 780 // Properties of the resulting object. If not set, duplicate properties of 781 // source object. 782 Object destination = 17; 783 784 // Resource name of the Cloud KMS key, of the form 785 // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, 786 // that will be used to encrypt the object. Overrides the object 787 // metadata's `kms_key_name` value, if any. 788 string destination_kms_key_name = 20; 789 790 // A set of parameters common to Storage API requests concerning an object. 791 CommonObjectRequestParams common_object_request_params = 18; 792 793 // A set of parameters common to all Storage API requests. 794 CommonRequestParams common_request_params = 19; 795} 796 797// Message for deleting an object. 798// Either `bucket` and `object` *or* `upload_id` **must** be set (but not both). 799message DeleteObjectRequest { 800 // Required. Name of the bucket in which the object resides. 801 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 802 803 // Required. The name of the object to delete (when not using a resumable write). 804 string object = 2 [(google.api.field_behavior) = REQUIRED]; 805 806 // The resumable upload_id of the object to delete (when using a 807 // resumable write). This should be copied from the `upload_id` field of 808 // `StartResumableWriteResponse`. 809 string upload_id = 3; 810 811 // If present, permanently deletes a specific revision of this object (as 812 // opposed to the latest version, the default). 813 int64 generation = 4; 814 815 // Makes the operation conditional on whether the object's current generation 816 // matches the given value. Setting to 0 makes the operation succeed only if 817 // there are no live versions of the object. 818 google.protobuf.Int64Value if_generation_match = 5; 819 820 // Makes the operation conditional on whether the object's current generation 821 // does not match the given value. If no live object exists, the precondition 822 // fails. Setting to 0 makes the operation succeed only if there is a live 823 // version of the object. 824 google.protobuf.Int64Value if_generation_not_match = 6; 825 826 // Makes the operation conditional on whether the object's current 827 // metageneration matches the given value. 828 google.protobuf.Int64Value if_metageneration_match = 7; 829 830 // Makes the operation conditional on whether the object's current 831 // metageneration does not match the given value. 832 google.protobuf.Int64Value if_metageneration_not_match = 8; 833 834 // A set of parameters common to Storage API requests concerning an object. 835 CommonObjectRequestParams common_object_request_params = 10; 836 837 // A set of parameters common to all Storage API requests. 838 CommonRequestParams common_request_params = 11; 839} 840 841// Request message for GetObjectMedia. 842message GetObjectMediaRequest { 843 // The name of the bucket containing the object to read. 844 string bucket = 1; 845 846 // The name of the object to read. 847 string object = 2; 848 849 // If present, selects a specific revision of this object (as opposed 850 // to the latest version, the default). 851 int64 generation = 3; 852 853 // The offset for the first byte to return in the read, relative to the start 854 // of the object. 855 // 856 // A negative `read_offset` value will be interpreted as the number of bytes 857 // back from the end of the object to be returned. For example, if an object's 858 // length is 15 bytes, a GetObjectMediaRequest with `read_offset` = -5 and 859 // `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting 860 // a negative offset whose magnitude is larger than the size of the object 861 // will result in an error. 862 int64 read_offset = 4; 863 864 // The maximum number of `data` bytes the server is allowed to return in the 865 // sum of all `Object` messages. A `read_limit` of zero indicates that there 866 // is no limit, and a negative `read_limit` will cause an error. 867 // 868 // If the stream returns fewer bytes than allowed by the `read_limit` and no 869 // error occurred, the stream includes all data from the `read_offset` to the 870 // end of the resource. 871 int64 read_limit = 5; 872 873 // Makes the operation conditional on whether the object's current generation 874 // matches the given value. Setting to 0 makes the operation succeed only if 875 // there are no live versions of the object. 876 google.protobuf.Int64Value if_generation_match = 6; 877 878 // Makes the operation conditional on whether the object's current generation 879 // does not match the given value. If no live object exists, the precondition 880 // fails. Setting to 0 makes the operation succeed only if there is a live 881 // version of the object. 882 google.protobuf.Int64Value if_generation_not_match = 7; 883 884 // Makes the operation conditional on whether the object's current 885 // metageneration matches the given value. 886 google.protobuf.Int64Value if_metageneration_match = 8; 887 888 // Makes the operation conditional on whether the object's current 889 // metageneration does not match the given value. 890 google.protobuf.Int64Value if_metageneration_not_match = 9; 891 892 // A set of parameters common to Storage API requests concerning an object. 893 CommonObjectRequestParams common_object_request_params = 11; 894 895 // A set of parameters common to all Storage API requests. 896 CommonRequestParams common_request_params = 12; 897} 898 899// Request message for GetObject. 900message GetObjectRequest { 901 // Required. Name of the bucket in which the object resides. 902 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 903 904 // Required. Name of the object. 905 string object = 2 [(google.api.field_behavior) = REQUIRED]; 906 907 // If present, selects a specific revision of this object (as opposed to the 908 // latest version, the default). 909 int64 generation = 3; 910 911 // Makes the operation conditional on whether the object's current generation 912 // matches the given value. Setting to 0 makes the operation succeed only if 913 // there are no live versions of the object. 914 google.protobuf.Int64Value if_generation_match = 4; 915 916 // Makes the operation conditional on whether the object's current generation 917 // does not match the given value. If no live object exists, the precondition 918 // fails. Setting to 0 makes the operation succeed only if there is a live 919 // version of the object. 920 google.protobuf.Int64Value if_generation_not_match = 5; 921 922 // Makes the operation conditional on whether the object's current 923 // metageneration matches the given value. 924 google.protobuf.Int64Value if_metageneration_match = 6; 925 926 // Makes the operation conditional on whether the object's current 927 // metageneration does not match the given value. 928 google.protobuf.Int64Value if_metageneration_not_match = 7; 929 930 // Set of properties to return. Defaults to `NO_ACL`. 931 CommonEnums.Projection projection = 8; 932 933 // A set of parameters common to Storage API requests concerning an object. 934 CommonObjectRequestParams common_object_request_params = 10; 935 936 // A set of parameters common to all Storage API requests. 937 CommonRequestParams common_request_params = 11; 938} 939 940// Response message for GetObject. 941message GetObjectMediaResponse { 942 // A portion of the data for the object. The service **may** leave `data` 943 // empty for any given `ReadResponse`. This enables the service to inform the 944 // client that the request is still live while it is running an operation to 945 // generate more data. 946 ChecksummedData checksummed_data = 1; 947 948 // The checksums of the complete object. The client should compute one of 949 // these checksums over the downloaded object and compare it against the value 950 // provided here. 951 ObjectChecksums object_checksums = 2; 952 953 // If read_offset and or read_limit was specified on the 954 // GetObjectMediaRequest, ContentRange will be populated on the first 955 // GetObjectMediaResponse message of the read stream. 956 ContentRange content_range = 3; 957 958 // Metadata of the object whose media is being returned. 959 // Only populated in the first response in the stream. 960 Object metadata = 4; 961} 962 963// Describes an attempt to insert an object, possibly over multiple requests. 964message InsertObjectSpec { 965 // Destination object, including its name and its metadata. 966 Object resource = 1; 967 968 // Apply a predefined set of access controls to this object. 969 CommonEnums.PredefinedObjectAcl predefined_acl = 2; 970 971 // Makes the operation conditional on whether the object's current 972 // generation matches the given value. Setting to 0 makes the operation 973 // succeed only if there are no live versions of the object. 974 google.protobuf.Int64Value if_generation_match = 3; 975 976 // Makes the operation conditional on whether the object's current 977 // generation does not match the given value. If no live object exists, the 978 // precondition fails. Setting to 0 makes the operation succeed only if 979 // there is a live version of the object. 980 google.protobuf.Int64Value if_generation_not_match = 4; 981 982 // Makes the operation conditional on whether the object's current 983 // metageneration matches the given value. 984 google.protobuf.Int64Value if_metageneration_match = 5; 985 986 // Makes the operation conditional on whether the object's current 987 // metageneration does not match the given value. 988 google.protobuf.Int64Value if_metageneration_not_match = 6; 989 990 // Set of properties to return. Defaults to `NO_ACL`, unless the 991 // object resource specifies the `acl` property, when it defaults 992 // to `full`. 993 CommonEnums.Projection projection = 7; 994} 995 996// Message for writing an object. 997message InsertObjectRequest { 998 // The first message of each stream should set one of the following. 999 oneof first_message { 1000 // For resumable uploads. This should be the `upload_id` returned from a 1001 // call to `StartResumableWriteResponse`. 1002 string upload_id = 1; 1003 1004 // For non-resumable uploads. Describes the overall upload, including the 1005 // destination bucket and object name, preconditions, etc. 1006 InsertObjectSpec insert_object_spec = 2; 1007 } 1008 1009 // Required. The offset from the beginning of the object at which the data should be 1010 // written. 1011 // 1012 // In the first `InsertObjectRequest` of a `InsertObject()` action, it 1013 // indicates the initial offset for the `Insert()` call. The value **must** be 1014 // equal to the `committed_size` that a call to `QueryWriteStatus()` would 1015 // return (0 if this is the first write to the object). 1016 // 1017 // On subsequent calls, this value **must** be no larger than the sum of the 1018 // first `write_offset` and the sizes of all `data` chunks sent previously on 1019 // this stream. 1020 // 1021 // An incorrect value will cause an error. 1022 int64 write_offset = 3 [(google.api.field_behavior) = REQUIRED]; 1023 1024 // A portion of the data for the object. 1025 oneof data { 1026 // The data to insert. If a crc32c checksum is provided that doesn't match 1027 // the checksum computed by the service, the request will fail. 1028 ChecksummedData checksummed_data = 4; 1029 1030 // A reference to an existing object. This can be used to support 1031 // several use cases: 1032 // - Writing a sequence of data buffers supports the basic use case of 1033 // uploading a complete object, chunk by chunk. 1034 // - Writing a sequence of references to existing objects allows an 1035 // object to be composed from a collection of objects, which can be 1036 // used to support parallel object writes. 1037 // - Writing a single reference with a given offset and size can be used 1038 // to create an object from a slice of an existing object. 1039 // - Writing an object referencing a object slice (created as noted 1040 // above) followed by a data buffer followed by another object 1041 // slice can be used to support delta upload functionality. 1042 GetObjectMediaRequest reference = 5; 1043 } 1044 1045 // Checksums for the complete object. If the checksums computed by the service 1046 // don't match the specifified checksums the call will fail. May only be 1047 // provided in the first or last request (either with first_message, or 1048 // finish_write set). 1049 ObjectChecksums object_checksums = 6; 1050 1051 // If `true`, this indicates that the write is complete. Sending any 1052 // `InsertObjectRequest`s subsequent to one in which `finish_write` is `true` 1053 // will cause an error. 1054 // For a non-resumable write (where the upload_id was not set in the first 1055 // message), it is an error not to set this field in the final message of the 1056 // stream. 1057 bool finish_write = 7; 1058 1059 // A set of parameters common to Storage API requests concerning an object. 1060 CommonObjectRequestParams common_object_request_params = 8; 1061 1062 // A set of parameters common to all Storage API requests. 1063 CommonRequestParams common_request_params = 9; 1064} 1065 1066// Request message for ListObjects. 1067message ListObjectsRequest { 1068 // Required. Name of the bucket in which to look for objects. 1069 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 1070 1071 // Returns results in a directory-like mode. `items` will contain 1072 // only objects whose names, aside from the `prefix`, do not 1073 // contain `delimiter`. Objects whose names, aside from the 1074 // `prefix`, contain `delimiter` will have their name, 1075 // truncated after the `delimiter`, returned in 1076 // `prefixes`. Duplicate `prefixes` are omitted. 1077 string delimiter = 2; 1078 1079 // If true, objects that end in exactly one instance of `delimiter` 1080 // will have their metadata included in `items` in addition to 1081 // `prefixes`. 1082 bool include_trailing_delimiter = 3; 1083 1084 // Maximum number of `items` plus `prefixes` to return 1085 // in a single page of responses. As duplicate `prefixes` are 1086 // omitted, fewer total results may be returned than requested. The service 1087 // will use this parameter or 1,000 items, whichever is smaller. 1088 int32 max_results = 4; 1089 1090 // A previously-returned page token representing part of the larger set of 1091 // results to view. 1092 string page_token = 5; 1093 1094 // Filter results to objects whose names begin with this prefix. 1095 string prefix = 6; 1096 1097 // Set of properties to return. Defaults to `NO_ACL`. 1098 CommonEnums.Projection projection = 7; 1099 1100 // If `true`, lists all versions of an object as distinct results. 1101 // The default is `false`. For more information, see 1102 // [Object 1103 // Versioning](https://cloud.google.com/storage/docs/object-versioning). 1104 bool versions = 9; 1105 1106 // Filter results to objects whose names are lexicographically equal to or 1107 // after lexicographic_start. If lexicographic_end is also set, the objects 1108 // listed have names between lexicographic_start (inclusive) and 1109 // lexicographic_end (exclusive). 1110 string lexicographic_start = 11; 1111 1112 // Filter results to objects whose names are lexicographically before 1113 // lexicographic_end. If lexicographic_start is also set, the objects listed 1114 // have names between lexicographic_start (inclusive) and lexicographic_end 1115 // (exclusive). 1116 string lexicographic_end = 12; 1117 1118 // A set of parameters common to all Storage API requests. 1119 CommonRequestParams common_request_params = 10; 1120} 1121 1122// Request object for `QueryWriteStatus`. 1123message QueryWriteStatusRequest { 1124 // Required. The name of the resume token for the object whose write status is being 1125 // requested. 1126 string upload_id = 1 [(google.api.field_behavior) = REQUIRED]; 1127 1128 // A set of parameters common to Storage API requests concerning an object. 1129 CommonObjectRequestParams common_object_request_params = 2; 1130 1131 // A set of parameters common to all Storage API requests. 1132 CommonRequestParams common_request_params = 3; 1133} 1134 1135// Response object for `QueryWriteStatus`. 1136message QueryWriteStatusResponse { 1137 // The number of bytes that have been processed for the given object. 1138 int64 committed_size = 1; 1139 1140 // `complete` is `true` only if the client has sent a `InsertObjectRequest` 1141 // with `finish_write` set to true, and the server has processed that request. 1142 bool complete = 2; 1143 1144 // The metadata for the uploaded object. Only set if `complete` is `true`. 1145 Object resource = 3; 1146} 1147 1148// Request message for RewriteObject. 1149message RewriteObjectRequest { 1150 // Required. Name of the bucket in which to store the new object. Overrides the provided 1151 // object metadata's `bucket` value, if any. 1152 string destination_bucket = 1 [(google.api.field_behavior) = REQUIRED]; 1153 1154 // Required. Name of the new object. 1155 // Required when the object metadata is not otherwise provided. Overrides the 1156 // object metadata's `name` value, if any. 1157 string destination_object = 2 [(google.api.field_behavior) = REQUIRED]; 1158 1159 // Resource name of the Cloud KMS key, of the form 1160 // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, 1161 // that will be used to encrypt the object. Overrides the object 1162 // metadata's `kms_key_name` value, if any. 1163 string destination_kms_key_name = 3; 1164 1165 // Apply a predefined set of access controls to the destination object. 1166 CommonEnums.PredefinedObjectAcl destination_predefined_acl = 4; 1167 1168 // Makes the operation conditional on whether the object's current generation 1169 // matches the given value. Setting to 0 makes the operation succeed only if 1170 // there are no live versions of the object. 1171 google.protobuf.Int64Value if_generation_match = 5; 1172 1173 // Makes the operation conditional on whether the object's current generation 1174 // does not match the given value. If no live object exists, the precondition 1175 // fails. Setting to 0 makes the operation succeed only if there is a live 1176 // version of the object. 1177 google.protobuf.Int64Value if_generation_not_match = 6; 1178 1179 // Makes the operation conditional on whether the destination object's current 1180 // metageneration matches the given value. 1181 google.protobuf.Int64Value if_metageneration_match = 7; 1182 1183 // Makes the operation conditional on whether the destination object's current 1184 // metageneration does not match the given value. 1185 google.protobuf.Int64Value if_metageneration_not_match = 8; 1186 1187 // Makes the operation conditional on whether the source object's current 1188 // generation matches the given value. 1189 google.protobuf.Int64Value if_source_generation_match = 9; 1190 1191 // Makes the operation conditional on whether the source object's current 1192 // generation does not match the given value. 1193 google.protobuf.Int64Value if_source_generation_not_match = 10; 1194 1195 // Makes the operation conditional on whether the source object's current 1196 // metageneration matches the given value. 1197 google.protobuf.Int64Value if_source_metageneration_match = 11; 1198 1199 // Makes the operation conditional on whether the source object's current 1200 // metageneration does not match the given value. 1201 google.protobuf.Int64Value if_source_metageneration_not_match = 12; 1202 1203 // The maximum number of bytes that will be rewritten per rewrite request. 1204 // Most callers 1205 // shouldn't need to specify this parameter - it is primarily in place to 1206 // support testing. If specified the value must be an integral multiple of 1207 // 1 MiB (1048576). Also, this only applies to requests where the source and 1208 // destination span locations and/or storage classes. Finally, this value must 1209 // not change across rewrite calls else you'll get an error that the 1210 // `rewriteToken` is invalid. 1211 int64 max_bytes_rewritten_per_call = 13; 1212 1213 // Set of properties to return. Defaults to `NO_ACL`, unless the 1214 // object resource specifies the `acl` property, when it defaults 1215 // to `full`. 1216 CommonEnums.Projection projection = 14; 1217 1218 // Include this field (from the previous rewrite response) on each rewrite 1219 // request after the first one, until the rewrite response 'done' flag is 1220 // true. Calls that provide a rewriteToken can omit all other request fields, 1221 // but if included those fields must match the values provided in the first 1222 // rewrite request. 1223 string rewrite_token = 15; 1224 1225 // Required. Name of the bucket in which to find the source object. 1226 string source_bucket = 16 [(google.api.field_behavior) = REQUIRED]; 1227 1228 // Required. Name of the source object. 1229 string source_object = 17 [(google.api.field_behavior) = REQUIRED]; 1230 1231 // If present, selects a specific revision of the source object (as opposed to 1232 // the latest version, the default). 1233 int64 source_generation = 18; 1234 1235 // Properties of the destination, post-rewrite object. 1236 Object object = 20; 1237 1238 // The algorithm used to encrypt the source object, if any. 1239 string copy_source_encryption_algorithm = 21; 1240 1241 // The encryption key used to encrypt the source object, if any. 1242 string copy_source_encryption_key = 22; 1243 1244 // The SHA-256 hash of the key used to encrypt the source object, if any. 1245 string copy_source_encryption_key_sha256 = 23; 1246 1247 // A set of parameters common to Storage API requests concerning an object. 1248 CommonObjectRequestParams common_object_request_params = 24; 1249 1250 // A set of parameters common to all Storage API requests. 1251 CommonRequestParams common_request_params = 25; 1252} 1253 1254// A rewrite response. 1255message RewriteResponse { 1256 // The total bytes written so far, which can be used to provide a waiting user 1257 // with a progress indicator. This property is always present in the response. 1258 int64 total_bytes_rewritten = 1; 1259 1260 // The total size of the object being copied in bytes. This property is always 1261 // present in the response. 1262 int64 object_size = 2; 1263 1264 // `true` if the copy is finished; otherwise, `false` if 1265 // the copy is in progress. This property is always present in the response. 1266 bool done = 3; 1267 1268 // A token to use in subsequent requests to continue copying data. This token 1269 // is present in the response only when there is more data to copy. 1270 string rewrite_token = 4; 1271 1272 // A resource containing the metadata for the copied-to object. This property 1273 // is present in the response only when copying completes. 1274 Object resource = 5; 1275} 1276 1277// Request message StartResumableWrite. 1278message StartResumableWriteRequest { 1279 // The destination bucket, object, and metadata, as well as any preconditions. 1280 InsertObjectSpec insert_object_spec = 1; 1281 1282 // A set of parameters common to Storage API requests concerning an object. 1283 CommonObjectRequestParams common_object_request_params = 3; 1284 1285 // A set of parameters common to all Storage API requests. 1286 CommonRequestParams common_request_params = 4; 1287} 1288 1289// Response object for `StartResumableWrite`. 1290message StartResumableWriteResponse { 1291 // The upload_id of the newly started resumable write operation. This 1292 // value should be copied into the `InsertObjectRequest.upload_id` field. 1293 string upload_id = 1; 1294} 1295 1296// Request message for PatchObject. 1297message PatchObjectRequest { 1298 // Required. Name of the bucket in which the object resides. 1299 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 1300 1301 // Required. Name of the object. 1302 string object = 2 [(google.api.field_behavior) = REQUIRED]; 1303 1304 // If present, selects a specific revision of this object (as opposed to the 1305 // latest version, the default). 1306 int64 generation = 3; 1307 1308 // Makes the operation conditional on whether the object's current generation 1309 // matches the given value. Setting to 0 makes the operation succeed only if 1310 // there are no live versions of the object. 1311 google.protobuf.Int64Value if_generation_match = 4; 1312 1313 // Makes the operation conditional on whether the object's current generation 1314 // does not match the given value. If no live object exists, the precondition 1315 // fails. Setting to 0 makes the operation succeed only if there is a live 1316 // version of the object. 1317 google.protobuf.Int64Value if_generation_not_match = 5; 1318 1319 // Makes the operation conditional on whether the object's current 1320 // metageneration matches the given value. 1321 google.protobuf.Int64Value if_metageneration_match = 6; 1322 1323 // Makes the operation conditional on whether the object's current 1324 // metageneration does not match the given value. 1325 google.protobuf.Int64Value if_metageneration_not_match = 7; 1326 1327 // Apply a predefined set of access controls to this object. 1328 CommonEnums.PredefinedObjectAcl predefined_acl = 8; 1329 1330 // Set of properties to return. Defaults to `FULL`. 1331 CommonEnums.Projection projection = 9; 1332 1333 // The Object metadata for updating. 1334 Object metadata = 11; 1335 1336 // List of fields to be updated. 1337 // 1338 // To specify ALL fields, equivalent to the JSON API's "update" function, 1339 // specify a single field with the value `*`. Note: not recommended. If a new 1340 // field is introduced at a later time, an older client updating with the `*` 1341 // may accidentally reset the new field's value. 1342 // 1343 // Not specifying any fields is an error. 1344 // Not specifying a field while setting that field to a non-default value is 1345 // an error. 1346 google.protobuf.FieldMask update_mask = 12; 1347 1348 // A set of parameters common to Storage API requests concerning an object. 1349 CommonObjectRequestParams common_object_request_params = 13; 1350 1351 // A set of parameters common to all Storage API requests. 1352 CommonRequestParams common_request_params = 14; 1353} 1354 1355// Request message for UpdateObject. 1356message UpdateObjectRequest { 1357 // Required. Name of the bucket in which the object resides. 1358 string bucket = 1 [(google.api.field_behavior) = REQUIRED]; 1359 1360 // Required. Name of the object. 1361 string object = 2 [(google.api.field_behavior) = REQUIRED]; 1362 1363 // If present, selects a specific revision of this object (as opposed to the 1364 // latest version, the default). 1365 int64 generation = 3; 1366 1367 // Makes the operation conditional on whether the object's current generation 1368 // matches the given value. Setting to 0 makes the operation succeed only if 1369 // there are no live versions of the object. 1370 google.protobuf.Int64Value if_generation_match = 4; 1371 1372 // Makes the operation conditional on whether the object's current generation 1373 // does not match the given value. If no live object exists, the precondition 1374 // fails. Setting to 0 makes the operation succeed only if there is a live 1375 // version of the object. 1376 google.protobuf.Int64Value if_generation_not_match = 5; 1377 1378 // Makes the operation conditional on whether the object's current 1379 // metageneration matches the given value. 1380 google.protobuf.Int64Value if_metageneration_match = 6; 1381 1382 // Makes the operation conditional on whether the object's current 1383 // metageneration does not match the given value. 1384 google.protobuf.Int64Value if_metageneration_not_match = 7; 1385 1386 // Apply a predefined set of access controls to this object. 1387 CommonEnums.PredefinedObjectAcl predefined_acl = 8; 1388 1389 // Set of properties to return. Defaults to `FULL`. 1390 CommonEnums.Projection projection = 9; 1391 1392 // The Object metadata for updating. 1393 Object metadata = 11; 1394 1395 // A set of parameters common to Storage API requests concerning an object. 1396 CommonObjectRequestParams common_object_request_params = 12; 1397 1398 // A set of parameters common to all Storage API requests. 1399 CommonRequestParams common_request_params = 13; 1400} 1401 1402// Request message for WatchAllObjects. 1403message WatchAllObjectsRequest { 1404 // Name of the bucket in which to look for objects. 1405 string bucket = 1; 1406 1407 // If `true`, lists all versions of an object as distinct results. 1408 // The default is `false`. For more information, see 1409 // [Object 1410 // Versioning](https://cloud.google.com/storage/docs/object-versioning). 1411 bool versions = 2; 1412 1413 // Returns results in a directory-like mode. `items` will contain 1414 // only objects whose names, aside from the `prefix`, do not 1415 // contain `delimiter`. Objects whose names, aside from the 1416 // `prefix`, contain `delimiter` will have their name, 1417 // truncated after the `delimiter`, returned in 1418 // `prefixes`. Duplicate `prefixes` are omitted. 1419 string delimiter = 3; 1420 1421 // Maximum number of `items` plus `prefixes` to return 1422 // in a single page of responses. As duplicate `prefixes` are 1423 // omitted, fewer total results may be returned than requested. The service 1424 // will use this parameter or 1,000 items, whichever is smaller. 1425 int32 max_results = 4; 1426 1427 // Filter results to objects whose names begin with this prefix. 1428 string prefix = 5; 1429 1430 // If true, objects that end in exactly one instance of `delimiter` 1431 // will have their metadata included in `items` in addition to 1432 // `prefixes`. 1433 bool include_trailing_delimiter = 6; 1434 1435 // A previously-returned page token representing part of the larger set of 1436 // results to view. 1437 string page_token = 7; 1438 1439 // Set of properties to return. Defaults to `NO_ACL`. 1440 CommonEnums.Projection projection = 8; 1441 1442 // Properties of the channel to be inserted. 1443 Channel channel = 10; 1444 1445 // A set of parameters common to all Storage API requests. 1446 CommonRequestParams common_request_params = 11; 1447} 1448 1449// Request message for GetProjectServiceAccount. 1450message GetProjectServiceAccountRequest { 1451 // Required. Project ID. 1452 string project_id = 1 [(google.api.field_behavior) = REQUIRED]; 1453 1454 // A set of parameters common to all Storage API requests. 1455 CommonRequestParams common_request_params = 3; 1456} 1457 1458message CreateHmacKeyRequest { 1459 // Required. The project that the HMAC-owning service account lives in. 1460 string project_id = 1 [(google.api.field_behavior) = REQUIRED]; 1461 1462 // Required. The service account to create the HMAC for. 1463 string service_account_email = 2 [(google.api.field_behavior) = REQUIRED]; 1464 1465 // A set of parameters common to all Storage API requests. 1466 CommonRequestParams common_request_params = 3; 1467} 1468 1469// Create hmac response. The only time the secret for an HMAC will be returned. 1470message CreateHmacKeyResponse { 1471 // Key metadata. 1472 HmacKeyMetadata metadata = 1; 1473 1474 // HMAC key secret material. 1475 string secret = 2; 1476} 1477 1478// Request object to delete a given HMAC key. 1479message DeleteHmacKeyRequest { 1480 // Required. The identifying key for the HMAC to delete. 1481 string access_id = 1 [(google.api.field_behavior) = REQUIRED]; 1482 1483 // Required. The project id the HMAC key lies in. 1484 string project_id = 2 [(google.api.field_behavior) = REQUIRED]; 1485 1486 // A set of parameters common to all Storage API requests. 1487 CommonRequestParams common_request_params = 3; 1488} 1489 1490// Request object to get metadata on a given HMAC key. 1491message GetHmacKeyRequest { 1492 // Required. The identifying key for the HMAC to delete. 1493 string access_id = 1 [(google.api.field_behavior) = REQUIRED]; 1494 1495 // Required. The project id the HMAC key lies in. 1496 string project_id = 2 [(google.api.field_behavior) = REQUIRED]; 1497 1498 // A set of parameters common to all Storage API requests. 1499 CommonRequestParams common_request_params = 3; 1500} 1501 1502// Request to fetch a list of HMAC keys under a given project. 1503message ListHmacKeysRequest { 1504 // Required. The project id to list HMAC keys for. 1505 string project_id = 1 [(google.api.field_behavior) = REQUIRED]; 1506 1507 // An optional filter to only return HMAC keys for one service account. 1508 string service_account_email = 2; 1509 1510 // An optional bool to return deleted keys that have not been wiped out yet. 1511 bool show_deleted_keys = 3; 1512 1513 // The maximum number of keys to return. 1514 int32 max_results = 4; 1515 1516 // A previously returned token from ListHmacKeysResponse to get the next page. 1517 string page_token = 5; 1518 1519 // A set of parameters common to all Storage API requests. 1520 CommonRequestParams common_request_params = 6; 1521} 1522 1523// Hmac key list response with next page information. 1524message ListHmacKeysResponse { 1525 // The continuation token, used to page through large result sets. Provide 1526 // this value in a subsequent request to return the next page of results. 1527 string next_page_token = 1; 1528 1529 // The list of items. 1530 repeated HmacKeyMetadata items = 2; 1531} 1532 1533// Request object to update an HMAC key state. 1534message UpdateHmacKeyRequest { 1535 // Required. The id of the HMAC key. 1536 string access_id = 1 [(google.api.field_behavior) = REQUIRED]; 1537 1538 // Required. The project id the HMAC's service account lies in. 1539 string project_id = 2 [(google.api.field_behavior) = REQUIRED]; 1540 1541 // Required. The service account owner of the HMAC key. 1542 HmacKeyMetadata metadata = 3 [(google.api.field_behavior) = REQUIRED]; 1543 1544 // A set of parameters common to all Storage API requests. 1545 CommonRequestParams common_request_params = 5; 1546} 1547 1548// A wrapper around the IAM get policy request to support our 1549// common_request_params. 1550message GetIamPolicyRequest { 1551 // The request sent to IAM. 1552 google.iam.v1.GetIamPolicyRequest iam_request = 1; 1553 1554 // A set of parameters common to all Storage API requests. 1555 CommonRequestParams common_request_params = 2; 1556} 1557 1558// A wrapper around the IAM set policy request to support our 1559// common_request_params. 1560message SetIamPolicyRequest { 1561 // The request sent to IAM. 1562 google.iam.v1.SetIamPolicyRequest iam_request = 1; 1563 1564 // A set of parameters common to all Storage API requests. 1565 CommonRequestParams common_request_params = 2; 1566} 1567 1568// A wrapper around the IAM test iam permissions request to support our 1569// common_request_params. 1570message TestIamPermissionsRequest { 1571 // The request sent to IAM. 1572 google.iam.v1.TestIamPermissionsRequest iam_request = 1; 1573 1574 // A set of parameters common to all Storage API requests. 1575 CommonRequestParams common_request_params = 2; 1576} 1577 1578// Parameters that can be passed to any object request. 1579message CommonObjectRequestParams { 1580 // Encryption algorithm used with Customer-Supplied Encryption Keys feature. 1581 string encryption_algorithm = 1; 1582 1583 // Encryption key used with Customer-Supplied Encryption Keys feature. 1584 string encryption_key = 2; 1585 1586 // SHA256 hash of encryption key used with Customer-Supplied Encryption Keys 1587 // feature. 1588 string encryption_key_sha256 = 3; 1589} 1590 1591// Parameters that can be passed to any request. 1592message CommonRequestParams { 1593 // Required. Required when using buckets with Requestor Pays feature enabled. 1594 string user_project = 1 [(google.api.field_behavior) = REQUIRED]; 1595 1596 // Lets you enforce per-user quotas from a server-side application even in 1597 // cases when the user's IP address is unknown. This can occur, for example, 1598 // with applications that run cron jobs on App Engine on a user's behalf. 1599 // You can choose any arbitrary string that uniquely identifies a user, but it 1600 // is limited to 40 characters. 1601 string quota_user = 2; 1602 1603 // Subset of fields to include in the response. 1604 google.protobuf.FieldMask fields = 4; 1605} 1606