storage.proto 75 KB

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