| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f163893 commit 844d0f7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,11 +90,23 @@ service Storage { | |||
| 90 | 90 | ||
| 91 | 91 | // Creates a new bucket. | |
| 92 | 92 | rpc CreateBucket(CreateBucketRequest) returns (Bucket) { | |
| 93 | + option (google.api.routing) = { | ||
| 94 | + routing_parameters { | ||
| 95 | + field: "parent" | ||
| 96 | + path_template: "{project=**}" | ||
| 97 | + } | ||
| 98 | + }; | ||
| 93 | 99 | option (google.api.method_signature) = "parent,bucket,bucket_id"; | |
| 94 | 100 | } | |
| 95 | 101 | ||
| 96 | 102 | // Retrieves a list of buckets for a given project. | |
| 97 | 103 | rpc ListBuckets(ListBucketsRequest) returns (ListBucketsResponse) { | |
| 104 | + option (google.api.routing) = { | ||
| 105 | + routing_parameters { | ||
| 106 | + field: "parent" | ||
| 107 | + path_template: "{project=**}" | ||
| 108 | + } | ||
| 109 | + }; | ||
| 98 | 110 | option (google.api.method_signature) = "parent"; | |
| 99 | 111 | } | |
| 100 | 112 | ||
@@ -411,31 +423,62 @@ service Storage { | |||
| 411 | 423 | ||
| 412 | 424 | // Retrieves the name of a project's Google Cloud Storage service account. | |
| 413 | 425 | rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) { | |
| 426 | + option (google.api.routing) = { | ||
| 427 | + routing_parameters { | ||
| 428 | + field: "project" | ||
| 429 | + } | ||
| 430 | + }; | ||
| 414 | 431 | option (google.api.method_signature) = "project"; | |
| 415 | 432 | } | |
| 416 | 433 | ||
| 417 | 434 | // Creates a new HMAC key for the given service account. | |
| 418 | 435 | rpc CreateHmacKey(CreateHmacKeyRequest) returns (CreateHmacKeyResponse) { | |
| 436 | + option (google.api.routing) = { | ||
| 437 | + routing_parameters { | ||
| 438 | + field: "project" | ||
| 439 | + } | ||
| 440 | + }; | ||
| 419 | 441 | option (google.api.method_signature) = "project,service_account_email"; | |
| 420 | 442 | } | |
| 421 | 443 | ||
| 422 | 444 | // Deletes a given HMAC key. Key must be in an INACTIVE state. | |
| 423 | 445 | rpc DeleteHmacKey(DeleteHmacKeyRequest) returns (google.protobuf.Empty) { | |
| 446 | + option (google.api.routing) = { | ||
| 447 | + routing_parameters { | ||
| 448 | + field: "project" | ||
| 449 | + } | ||
| 450 | + }; | ||
| 424 | 451 | option (google.api.method_signature) = "access_id,project"; | |
| 425 | 452 | } | |
| 426 | 453 | ||
| 427 | 454 | // Gets an existing HMAC key metadata for the given id. | |
| 428 | 455 | rpc GetHmacKey(GetHmacKeyRequest) returns (HmacKeyMetadata) { | |
| 456 | + option (google.api.routing) = { | ||
| 457 | + routing_parameters { | ||
| 458 | + field: "project" | ||
| 459 | + } | ||
| 460 | + }; | ||
| 429 | 461 | option (google.api.method_signature) = "access_id,project"; | |
| 430 | 462 | } | |
| 431 | 463 | ||
| 432 | 464 | // Lists HMAC keys under a given project with the additional filters provided. | |
| 433 | 465 | rpc ListHmacKeys(ListHmacKeysRequest) returns (ListHmacKeysResponse) { | |
| 466 | + option (google.api.routing) = { | ||
| 467 | + routing_parameters { | ||
| 468 | + field: "project" | ||
| 469 | + } | ||
| 470 | + }; | ||
| 434 | 471 | option (google.api.method_signature) = "project"; | |
| 435 | 472 | } | |
| 436 | 473 | ||
| 437 | 474 | // Updates a given HMAC key state between ACTIVE and INACTIVE. | |
| 438 | 475 | rpc UpdateHmacKey(UpdateHmacKeyRequest) returns (HmacKeyMetadata) { | |
| 476 | + option (google.api.routing) = { | ||
| 477 | + routing_parameters { | ||
| 478 | + field: "hmac_key.project" | ||
| 479 | + path_template: "{project=**}" | ||
| 480 | + } | ||
| 481 | + }; | ||
| 439 | 482 | option (google.api.method_signature) = "hmac_key,update_mask"; | |
| 440 | 483 | } | |
| 441 | 484 | } | |
@@ -492,11 +535,11 @@ message CreateBucketRequest { | |||
| 492 | 535 | } | |
| 493 | 536 | ]; | |
| 494 | 537 | ||
| 495 | - // Required. Properties of the new bucket being inserted. | ||
| 538 | + // Properties of the new bucket being inserted. | ||
| 496 | 539 | // The project and name of the bucket are specified in the parent and | |
| 497 | 540 | // bucket_id fields, respectively. Populating those fields in `bucket` will | |
| 498 | 541 | // result in an error. | |
| 499 | - Bucket bucket = 2 [(google.api.field_behavior) = REQUIRED]; | ||
| 542 | + Bucket bucket = 2; | ||
| 500 | 543 | ||
| 501 | 544 | // Required. The ID to use for this bucket, which will become the final component of | |
| 502 | 545 | // the bucket's resource name. For example, the value `foo` might result in | |
@@ -564,16 +607,16 @@ message LockBucketRetentionPolicyRequest { | |||
| 564 | 607 | } | |
| 565 | 608 | ]; | |
| 566 | 609 | ||
| 567 | - // Makes the operation conditional on whether bucket's current metageneration | ||
| 610 | + // Required. Makes the operation conditional on whether bucket's current metageneration | ||
| 568 | 611 | // matches the given value. Must be positive. | |
| 569 | - int64 if_metageneration_match = 2; | ||
| 612 | + int64 if_metageneration_match = 2 [(google.api.field_behavior) = REQUIRED]; | ||
| 570 | 613 | } | |
| 571 | 614 | ||
| 572 | 615 | // Request for UpdateBucket method. | |
| 573 | 616 | message UpdateBucketRequest { | |
| 574 | - // The bucket to update. | ||
| 617 | + // Required. The bucket to update. | ||
| 575 | 618 | // The bucket's `name` field will be used to identify the bucket. | |
| 576 | - Bucket bucket = 1; | ||
| 619 | + Bucket bucket = 1 [(google.api.field_behavior) = REQUIRED]; | ||
| 577 | 620 | ||
| 578 | 621 | // If set, will only modify the bucket if its metageneration matches this | |
| 579 | 622 | // value. | |
@@ -593,7 +636,7 @@ message UpdateBucketRequest { | |||
| 593 | 636 | // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". | |
| 594 | 637 | string predefined_default_object_acl = 9; | |
| 595 | 638 | ||
| 596 | - // List of fields to be updated. | ||
| 639 | + // Required. List of fields to be updated. | ||
| 597 | 640 | // | |
| 598 | 641 | // To specify ALL fields, equivalent to the JSON API's "update" function, | |
| 599 | 642 | // specify a single field with the value `*`. Note: not recommended. If a new | |
@@ -603,7 +646,7 @@ message UpdateBucketRequest { | |||
| 603 | 646 | // Not specifying any fields is an error. | |
| 604 | 647 | // Not specifying a field while setting that field to a non-default value is | |
| 605 | 648 | // an error. | |
| 606 | - google.protobuf.FieldMask update_mask = 6; | ||
| 649 | + google.protobuf.FieldMask update_mask = 6 [(google.api.field_behavior) = REQUIRED]; | ||
| 607 | 650 | } | |
| 608 | 651 | ||
| 609 | 652 | // Request message for DeleteNotification. | |
@@ -785,11 +828,11 @@ message CancelResumableWriteResponse { | |||
| 785 | 828 | ||
| 786 | 829 | // Request message for ReadObject. | |
| 787 | 830 | message ReadObjectRequest { | |
| 788 | - // The name of the bucket containing the object to read. | ||
| 789 | - string bucket = 1; | ||
| 831 | + // Required. The name of the bucket containing the object to read. | ||
| 832 | + string bucket = 1 [(google.api.field_behavior) = REQUIRED]; | ||
| 790 | 833 | ||
| 791 | - // The name of the object to read. | ||
| 792 | - string object = 2; | ||
| 834 | + // Required. The name of the object to read. | ||
| 835 | + string object = 2 [(google.api.field_behavior) = REQUIRED]; | ||
| 793 | 836 | ||
| 794 | 837 | // If present, selects a specific revision of this object (as opposed | |
| 795 | 838 | // to the latest version, the default). | |
@@ -911,8 +954,8 @@ message ReadObjectResponse { | |||
| 911 | 954 | ||
| 912 | 955 | // Describes an attempt to insert an object, possibly over multiple requests. | |
| 913 | 956 | message WriteObjectSpec { | |
| 914 | - // Destination object, including its name and its metadata. | ||
| 915 | - Object resource = 1; | ||
| 957 | + // Required. Destination object, including its name and its metadata. | ||
| 958 | + Object resource = 1 [(google.api.field_behavior) = REQUIRED]; | ||
| 916 | 959 | ||
| 917 | 960 | // Apply a predefined set of access controls to this object. | |
| 918 | 961 | // Valid values are "authenticatedRead", "bucketOwnerFullControl", | |
@@ -1113,17 +1156,21 @@ message QueryWriteStatusResponse { | |||
| 1113 | 1156 | // encryption_key_sha256_bytes fields of the | |
| 1114 | 1157 | // common_object_request_params.customer_encryption field. | |
| 1115 | 1158 | message RewriteObjectRequest { | |
| 1116 | - // Immutable. The name of the destination object. | ||
| 1159 | + // Required. Immutable. The name of the destination object. | ||
| 1117 | 1160 | // See the | |
| 1118 | 1161 | // [Naming Guidelines](https://cloud.google.com/storage/docs/naming-objects). | |
| 1119 | 1162 | // Example: `test.txt` | |
| 1120 | 1163 | // The `name` field by itself does not uniquely identify a Cloud Storage | |
| 1121 | 1164 | // object. A Cloud Storage object is uniquely identified by the tuple of | |
| 1122 | 1165 | // (bucket, object, generation). | |
| 1123 | - string destination_name = 24 [(google.api.field_behavior) = IMMUTABLE]; | ||
| 1166 | + string destination_name = 24 [ | ||
| 1167 | + (google.api.field_behavior) = REQUIRED, | ||
| 1168 | + (google.api.field_behavior) = IMMUTABLE | ||
| 1169 | + ]; | ||
| 1124 | 1170 | ||
| 1125 | - // Immutable. The name of the bucket containing the destination object. | ||
| 1171 | + // Required. Immutable. The name of the bucket containing the destination object. | ||
| 1126 | 1172 | string destination_bucket = 25 [ | |
| 1173 | + (google.api.field_behavior) = REQUIRED, | ||
| 1127 | 1174 | (google.api.field_behavior) = IMMUTABLE, | |
| 1128 | 1175 | (google.api.resource_reference) = { | |
| 1129 | 1176 | type: "storage.googleapis.com/Bucket" | |
@@ -1258,8 +1305,8 @@ message RewriteResponse { | |||
| 1258 | 1305 | ||
| 1259 | 1306 | // Request message StartResumableWrite. | |
| 1260 | 1307 | message StartResumableWriteRequest { | |
| 1261 | - // The destination bucket, object, and metadata, as well as any preconditions. | ||
| 1262 | - WriteObjectSpec write_object_spec = 1; | ||
| 1308 | + // Required. The destination bucket, object, and metadata, as well as any preconditions. | ||
| 1309 | + WriteObjectSpec write_object_spec = 1 [(google.api.field_behavior) = REQUIRED]; | ||
| 1263 | 1310 | ||
| 1264 | 1311 | // A set of parameters common to Storage API requests concerning an object. | |
| 1265 | 1312 | CommonObjectRequestParams common_object_request_params = 3; | |
@@ -1274,12 +1321,12 @@ message StartResumableWriteResponse { | |||
| 1274 | 1321 | ||
| 1275 | 1322 | // Request message for UpdateObject. | |
| 1276 | 1323 | message UpdateObjectRequest { | |
| 1277 | - // The object to update. | ||
| 1324 | + // Required. The object to update. | ||
| 1278 | 1325 | // The object's bucket and name fields are used to identify the object to | |
| 1279 | 1326 | // update. If present, the object's generation field selects a specific | |
| 1280 | 1327 | // revision of this object whose metadata should be updated. Otherwise, | |
| 1281 | 1328 | // assumes the live version of the object. | |
| 1282 | - Object object = 1; | ||
| 1329 | + Object object = 1 [(google.api.field_behavior) = REQUIRED]; | ||
| 1283 | 1330 | ||
| 1284 | 1331 | // Makes the operation conditional on whether the object's current generation | |
| 1285 | 1332 | // matches the given value. Setting to 0 makes the operation succeed only if | |
@@ -1305,7 +1352,7 @@ message UpdateObjectRequest { | |||
| 1305 | 1352 | // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". | |
| 1306 | 1353 | string predefined_acl = 10; | |
| 1307 | 1354 | ||
| 1308 | - // List of fields to be updated. | ||
| 1355 | + // Required. List of fields to be updated. | ||
| 1309 | 1356 | // | |
| 1310 | 1357 | // To specify ALL fields, equivalent to the JSON API's "update" function, | |
| 1311 | 1358 | // specify a single field with the value `*`. Note: not recommended. If a new | |
@@ -1315,7 +1362,7 @@ message UpdateObjectRequest { | |||
| 1315 | 1362 | // Not specifying any fields is an error. | |
| 1316 | 1363 | // Not specifying a field while setting that field to a non-default value is | |
| 1317 | 1364 | // an error. | |
| 1318 | - google.protobuf.FieldMask update_mask = 7; | ||
| 1365 | + google.protobuf.FieldMask update_mask = 7 [(google.api.field_behavior) = REQUIRED]; | ||
| 1319 | 1366 | ||
| 1320 | 1367 | // A set of parameters common to Storage API requests concerning an object. | |
| 1321 | 1368 | CommonObjectRequestParams common_object_request_params = 8; | |
@@ -1403,17 +1450,17 @@ message ListHmacKeysRequest { | |||
| 1403 | 1450 | } | |
| 1404 | 1451 | ]; | |
| 1405 | 1452 | ||
| 1406 | - // Optional. The maximum number of keys to return. | ||
| 1407 | - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; | ||
| 1453 | + // The maximum number of keys to return. | ||
| 1454 | + int32 page_size = 2; | ||
| 1408 | 1455 | ||
| 1409 | - // Optional. A previously returned token from ListHmacKeysResponse to get the next page. | ||
| 1410 | - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; | ||
| 1456 | + // A previously returned token from ListHmacKeysResponse to get the next page. | ||
| 1457 | + string page_token = 3; | ||
| 1411 | 1458 | ||
| 1412 | - // Optional. If set, filters to only return HMAC keys for specified service account. | ||
| 1413 | - string service_account_email = 4 [(google.api.field_behavior) = OPTIONAL]; | ||
| 1459 | + // If set, filters to only return HMAC keys for specified service account. | ||
| 1460 | + string service_account_email = 4; | ||
| 1414 | 1461 | ||
| 1415 | - // Optional. If set, return deleted keys that have not yet been wiped out. | ||
| 1416 | - bool show_deleted_keys = 5 [(google.api.field_behavior) = OPTIONAL]; | ||
| 1462 | + // If set, return deleted keys that have not yet been wiped out. | ||
| 1463 | + bool show_deleted_keys = 5; | ||
| 1417 | 1464 | } | |
| 1418 | 1465 | ||
| 1419 | 1466 | // Hmac key list response with next page information. | |
@@ -1723,7 +1770,7 @@ message Bucket { | |||
| 1723 | 1770 | // duration must be greater than zero and less than 100 years. Note that | |
| 1724 | 1771 | // enforcement of retention periods less than a day is not guaranteed. Such | |
| 1725 | 1772 | // periods should only be used for testing purposes. | |
| 1726 | - int64 retention_period = 3; | ||
| 1773 | + optional int64 retention_period = 3; | ||
| 1727 | 1774 | } | |
| 1728 | 1775 | ||
| 1729 | 1776 | // Properties of a bucket related to versioning. | |
@@ -1912,8 +1959,8 @@ message Bucket { | |||
| 1912 | 1959 | // Reserved for future use. | |
| 1913 | 1960 | bool satisfies_pzs = 25; | |
| 1914 | 1961 | ||
| 1915 | - // Configuration that, if present, specifies the data placement for a Custom | ||
| 1916 | - // Dual Region. | ||
| 1962 | + // Configuration that, if present, specifies the data placement for a | ||
| 1963 | + // [https://cloud.google.com/storage/docs/use-dual-regions][Dual Region]. | ||
| 1917 | 1964 | CustomPlacementConfig custom_placement_config = 26; | |
| 1918 | 1965 | ||
| 1919 | 1966 | // The bucket's Autoclass configuration. If there is no configuration, the | |
@@ -1935,7 +1982,8 @@ message BucketAccessControl { | |||
| 1935 | 1982 | // * `group-{groupid}` | |
| 1936 | 1983 | // * `group-{email}` | |
| 1937 | 1984 | // * `domain-{domain}` | |
| 1938 | - // * `project-{team-projectid}` | ||
| 1985 | + // * `project-{team}-{projectnumber}` | ||
| 1986 | + // * `project-{team}-{projectid}` | ||
| 1939 | 1987 | // * `allUsers` | |
| 1940 | 1988 | // * `allAuthenticatedUsers` | |
| 1941 | 1989 | // Examples: | |
@@ -1944,8 +1992,14 @@ message BucketAccessControl { | |||
| 1944 | 1992 | // `group-example@googlegroups.com` | |
| 1945 | 1993 | // * All members of the Google Apps for Business domain `example.com` would be | |
| 1946 | 1994 | // `domain-example.com` | |
| 1995 | + // For project entities, `project-{team}-{projectnumber}` format will be | ||
| 1996 | + // returned on response. | ||
| 1947 | 1997 | string entity = 3; | |
| 1948 | 1998 | ||
| 1999 | + // Output only. The alternative entity format, if exists. For project entities, | ||
| 2000 | + // `project-{team}-{projectid}` format will be returned on response. | ||
| 2001 | + string entity_alt = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; | ||
| 2002 | + | ||
| 1949 | 2003 | // The ID for the entity, if any. | |
| 1950 | 2004 | string entity_id = 4; | |
| 1951 | 2005 | ||
@@ -2052,17 +2106,17 @@ message Notification { | |||
| 2052 | 2106 | // only be performed if the etag matches that of the Notification. | |
| 2053 | 2107 | string etag = 7; | |
| 2054 | 2108 | ||
| 2055 | - // Optional. If present, only send notifications about listed event types. If empty, | ||
| 2109 | + // If present, only send notifications about listed event types. If empty, | ||
| 2056 | 2110 | // sent notifications for all event types. | |
| 2057 | - repeated string event_types = 3 [(google.api.field_behavior) = OPTIONAL]; | ||
| 2111 | + repeated string event_types = 3; | ||
| 2058 | 2112 | ||
| 2059 | - // Optional. An optional list of additional attributes to attach to each Pub/Sub | ||
| 2113 | + // A list of additional attributes to attach to each Pub/Sub | ||
| 2060 | 2114 | // message published for this notification subscription. | |
| 2061 | - map<string, string> custom_attributes = 4 [(google.api.field_behavior) = OPTIONAL]; | ||
| 2115 | + map<string, string> custom_attributes = 4; | ||
| 2062 | 2116 | ||
| 2063 | - // Optional. If present, only apply this notification config to object names that | ||
| 2117 | + // If present, only apply this notification config to object names that | ||
| 2064 | 2118 | // begin with this prefix. | |
| 2065 | - string object_name_prefix = 5 [(google.api.field_behavior) = OPTIONAL]; | ||
| 2119 | + string object_name_prefix = 5; | ||
| 2066 | 2120 | ||
| 2067 | 2121 | // Required. The desired content of the Payload. | |
| 2068 | 2122 | string payload_format = 6 [(google.api.field_behavior) = REQUIRED]; | |
@@ -2256,7 +2310,8 @@ message ObjectAccessControl { | |||
| 2256 | 2310 | // * `group-{groupid}` | |
| 2257 | 2311 | // * `group-{email}` | |
| 2258 | 2312 | // * `domain-{domain}` | |
| 2259 | - // * `project-{team-projectid}` | ||
| 2313 | + // * `project-{team}-{projectnumber}` | ||
| 2314 | + // * `project-{team}-{projectid}` | ||
| 2260 | 2315 | // * `allUsers` | |
| 2261 | 2316 | // * `allAuthenticatedUsers` | |
| 2262 | 2317 | // Examples: | |
@@ -2265,8 +2320,14 @@ message ObjectAccessControl { | |||
| 2265 | 2320 | // `group-example@googlegroups.com`. | |
| 2266 | 2321 | // * All members of the Google Apps for Business domain `example.com` would be | |
| 2267 | 2322 | // `domain-example.com`. | |
| 2323 | + // For project entities, `project-{team}-{projectnumber}` format will be | ||
| 2324 | + // returned on response. | ||
| 2268 | 2325 | string entity = 3; | |
| 2269 | 2326 | ||
| 2327 | + // Output only. The alternative entity format, if exists. For project entities, | ||
| 2328 | + // `project-{team}-{projectid}` format will be returned on response. | ||
| 2329 | + string entity_alt = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; | ||
| 2330 | + | ||
| 2270 | 2331 | // The ID for the entity, if any. | |
| 2271 | 2332 | string entity_id = 4; | |
| 2272 | 2333 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments