storage.proto 61 KB

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