storage_resources.proto 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872
  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/protobuf/timestamp.proto";
  17. import "google/protobuf/wrappers.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/storage/v1;storage";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "CloudStorageResourcesProto";
  21. option java_package = "com.google.storage.v1";
  22. // A bucket.
  23. message Bucket {
  24. // Billing properties of a bucket.
  25. message Billing {
  26. // When set to true, Requester Pays is enabled for this bucket.
  27. bool requester_pays = 1;
  28. }
  29. // Cross-Origin Response sharing (CORS) properties for a bucket.
  30. // For more on GCS and CORS, see
  31. // https://cloud.google.com/storage/docs/cross-origin.
  32. // For more on CORS in general, see https://tools.ietf.org/html/rfc6454.
  33. message Cors {
  34. // The list of Origins eligible to receive CORS response headers. See
  35. // [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
  36. // Note: "*" is permitted in the list of origins, and means "any Origin".
  37. repeated string origin = 1;
  38. // The list of HTTP methods on which to include CORS response headers,
  39. // (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
  40. // methods, and means "any method".
  41. repeated string method = 2;
  42. // The list of HTTP headers other than the
  43. // [https://www.w3.org/TR/cors/#simple-response-header][simple response
  44. // headers] to give permission for the user-agent to share across domains.
  45. repeated string response_header = 3;
  46. // The value, in seconds, to return in the
  47. // [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
  48. // header] used in preflight responses.
  49. int32 max_age_seconds = 4;
  50. }
  51. // Encryption properties of a bucket.
  52. message Encryption {
  53. // A Cloud KMS key that will be used to encrypt objects inserted into this
  54. // bucket, if no encryption method is specified.
  55. string default_kms_key_name = 1;
  56. }
  57. // Bucket restriction options currently enforced on the bucket.
  58. message IamConfiguration {
  59. message UniformBucketLevelAccess {
  60. // If set, access checks only use bucket-level IAM policies or above.
  61. bool enabled = 1;
  62. // The deadline time for changing
  63. // <code>iamConfiguration.uniformBucketLevelAccess.enabled</code> from
  64. // true to false in [https://tools.ietf.org/html/rfc3339][RFC 3339]. After
  65. // the deadline is passed the field is immutable.
  66. google.protobuf.Timestamp locked_time = 2;
  67. }
  68. UniformBucketLevelAccess uniform_bucket_level_access = 1;
  69. }
  70. // Lifecycle properties of a bucket.
  71. // For more information, see https://cloud.google.com/storage/docs/lifecycle.
  72. message Lifecycle {
  73. // A lifecycle Rule, combining an action to take on an object and a
  74. // condition which will trigger that action.
  75. message Rule {
  76. // An action to take on an object.
  77. message Action {
  78. // Type of the action. Currently, only `Delete` and
  79. // `SetStorageClass` are supported.
  80. string type = 1;
  81. // Target storage class. Required iff the type of the action is
  82. // SetStorageClass.
  83. string storage_class = 2;
  84. }
  85. // A condition of an object which triggers some action.
  86. message Condition {
  87. // Age of an object (in days). This condition is satisfied when an
  88. // object reaches the specified age.
  89. int32 age = 1;
  90. // A date in [RFC 3339][1] format with only the date part (for
  91. // instance, "2013-01-15"). This condition is satisfied when an
  92. // object is created before midnight of the specified date in UTC.
  93. // [1]: https://tools.ietf.org/html/rfc3339
  94. google.protobuf.Timestamp created_before = 2;
  95. // Relevant only for versioned objects. If the value is
  96. // `true`, this condition matches live objects; if the value
  97. // is `false`, it matches archived objects.
  98. google.protobuf.BoolValue is_live = 3;
  99. // Relevant only for versioned objects. If the value is N, this
  100. // condition is satisfied when there are at least N versions (including
  101. // the live version) newer than this version of the object.
  102. int32 num_newer_versions = 4;
  103. // Objects having any of the storage classes specified by this condition
  104. // will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
  105. // `NEARLINE`, `COLDLINE`, `STANDARD`, and
  106. // `DURABLE_REDUCED_AVAILABILITY`.
  107. repeated string matches_storage_class = 5;
  108. // A regular expression that satisfies the RE2 syntax. This condition is
  109. // satisfied when the name of the object matches the RE2 pattern. Note:
  110. // This feature is currently in the "Early Access" launch stage and is
  111. // only available to a whitelisted set of users; that means that this
  112. // feature may be changed in backward-incompatible ways and that it is
  113. // not guaranteed to be released.
  114. string matches_pattern = 6;
  115. }
  116. // The action to take.
  117. Action action = 1;
  118. // The condition(s) under which the action will be taken.
  119. Condition condition = 2;
  120. }
  121. // A lifecycle management rule, which is made of an action to take and the
  122. // condition(s) under which the action will be taken.
  123. repeated Rule rule = 1;
  124. }
  125. // Logging-related properties of a bucket.
  126. message Logging {
  127. // The destination bucket where the current bucket's logs should be placed.
  128. string log_bucket = 1;
  129. // A prefix for log object names.
  130. string log_object_prefix = 2;
  131. }
  132. // Retention policy properties of a bucket.
  133. message RetentionPolicy {
  134. // Server-determined value that indicates the time from which policy was
  135. // enforced and effective. This value is in
  136. // [https://tools.ietf.org/html/rfc3339][RFC 3339] format.
  137. google.protobuf.Timestamp effective_time = 1;
  138. // Once locked, an object retention policy cannot be modified.
  139. bool is_locked = 2;
  140. // The duration in seconds that objects need to be retained. Retention
  141. // duration must be greater than zero and less than 100 years. Note that
  142. // enforcement of retention periods less than a day is not guaranteed. Such
  143. // periods should only be used for testing purposes.
  144. int64 retention_period = 3;
  145. }
  146. // Properties of a bucket related to versioning.
  147. // For more on GCS versioning, see
  148. // https://cloud.google.com/storage/docs/object-versioning.
  149. message Versioning {
  150. // While set to true, versioning is fully enabled for this bucket.
  151. bool enabled = 1;
  152. }
  153. // Properties of a bucket related to accessing the contents as a static
  154. // website. For more on hosting a static website via GCS, see
  155. // https://cloud.google.com/storage/docs/hosting-static-website.
  156. message Website {
  157. // If the requested object path is missing, the service will ensure the path
  158. // has a trailing '/', append this suffix, and attempt to retrieve the
  159. // resulting object. This allows the creation of `index.html`
  160. // objects to represent directory pages.
  161. string main_page_suffix = 1;
  162. // If the requested object path is missing, and any
  163. // `mainPageSuffix` object is missing, if applicable, the service
  164. // will return the named object from this bucket as the content for a
  165. // [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
  166. // result.
  167. string not_found_page = 2;
  168. }
  169. // Access controls on the bucket.
  170. repeated BucketAccessControl acl = 1;
  171. // Default access controls to apply to new objects when no ACL is provided.
  172. repeated ObjectAccessControl default_object_acl = 2;
  173. // The bucket's lifecycle configuration. See
  174. // [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
  175. // for more information.
  176. Lifecycle lifecycle = 3;
  177. // The creation time of the bucket in
  178. // [https://tools.ietf.org/html/rfc3339][RFC 3339] format.
  179. // Attempting to set this field will result in an error.
  180. google.protobuf.Timestamp time_created = 4;
  181. // The ID of the bucket. For buckets, the `id` and `name` properties are the
  182. // same.
  183. // Attempting to update this field after the bucket is created will result in
  184. // an error.
  185. string id = 5;
  186. // The name of the bucket.
  187. // Attempting to update this field after the bucket is created will result in
  188. // an error.
  189. string name = 6;
  190. // The project number of the project the bucket belongs to.
  191. // Attempting to set this field will result in an error.
  192. int64 project_number = 7;
  193. // The metadata generation of this bucket.
  194. // Attempting to set this field will result in an error.
  195. int64 metageneration = 8;
  196. // The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
  197. // (CORS) configuration.
  198. repeated Cors cors = 9;
  199. // The location of the bucket. Object data for objects in the bucket resides
  200. // in physical storage within this region. Defaults to `US`. See the
  201. // [https://developers.google.com/storage/docs/concepts-techniques#specifyinglocations"][developer's
  202. // guide] for the authoritative list. Attempting to update this field after
  203. // the bucket is created will result in an error.
  204. string location = 10;
  205. // The bucket's default storage class, used whenever no storageClass is
  206. // specified for a newly-created object. This defines how objects in the
  207. // bucket are stored and determines the SLA and the cost of storage.
  208. // If this value is not specified when the bucket is created, it will default
  209. // to `STANDARD`. For more information, see
  210. // https://developers.google.com/storage/docs/storage-classes.
  211. string storage_class = 11;
  212. // HTTP 1.1 [https://tools.ietf.org/html/rfc7232#section-2.3"]Entity tag]
  213. // for the bucket.
  214. // Attempting to set this field will result in an error.
  215. string etag = 12;
  216. // The modification time of the bucket.
  217. // Attempting to set this field will result in an error.
  218. google.protobuf.Timestamp updated = 13;
  219. // The default value for event-based hold on newly created objects in this
  220. // bucket. Event-based hold is a way to retain objects indefinitely until an
  221. // event occurs, signified by the
  222. // hold's release. After being released, such objects will be subject to
  223. // bucket-level retention (if any). One sample use case of this flag is for
  224. // banks to hold loan documents for at least 3 years after loan is paid in
  225. // full. Here, bucket-level retention is 3 years and the event is loan being
  226. // paid in full. In this example, these objects will be held intact for any
  227. // number of years until the event has occurred (event-based hold on the
  228. // object is released) and then 3 more years after that. That means retention
  229. // duration of the objects begins from the moment event-based hold
  230. // transitioned from true to false. Objects under event-based hold cannot be
  231. // deleted, overwritten or archived until the hold is removed.
  232. bool default_event_based_hold = 14;
  233. // User-provided labels, in key/value pairs.
  234. map<string, string> labels = 15;
  235. // The bucket's website configuration, controlling how the service behaves
  236. // when accessing bucket contents as a web site. See the
  237. // [https://cloud.google.com/storage/docs/static-website][Static Website
  238. // Examples] for more information.
  239. Website website = 16;
  240. // The bucket's versioning configuration.
  241. Versioning versioning = 17;
  242. // The bucket's logging configuration, which defines the destination bucket
  243. // and optional name prefix for the current bucket's logs.
  244. Logging logging = 18;
  245. // The owner of the bucket. This is always the project team's owner group.
  246. Owner owner = 19;
  247. // Encryption configuration for a bucket.
  248. Encryption encryption = 20;
  249. // The bucket's billing configuration.
  250. Billing billing = 21;
  251. // The bucket's retention policy. The retention policy enforces a minimum
  252. // retention time for all objects contained in the bucket, based on their
  253. // creation time. Any attempt to overwrite or delete objects younger than the
  254. // retention period will result in a PERMISSION_DENIED error. An unlocked
  255. // retention policy can be modified or removed from the bucket via a
  256. // storage.buckets.update operation. A locked retention policy cannot be
  257. // removed or shortened in duration for the lifetime of the bucket.
  258. // Attempting to remove or decrease period of a locked retention policy will
  259. // result in a PERMISSION_DENIED error.
  260. RetentionPolicy retention_policy = 22;
  261. // The location type of the bucket (region, dual-region, multi-region, etc).
  262. string location_type = 23;
  263. // The bucket's IAM configuration.
  264. IamConfiguration iam_configuration = 24;
  265. // The zone or zones from which the bucket is intended to use zonal quota.
  266. // Requests for data from outside the specified affinities are still allowed
  267. // but won’t be able to use zonal quota. The values are case-insensitive.
  268. // Attempting to update this field after bucket is created will result in an
  269. // error.
  270. repeated string zone_affinity = 25;
  271. }
  272. // An access-control entry.
  273. message BucketAccessControl {
  274. // The access permission for the entity.
  275. string role = 1;
  276. // HTTP 1.1 ["https://tools.ietf.org/html/rfc7232#section-2.3][Entity tag]
  277. // for the access-control entry.
  278. string etag = 2;
  279. // The ID of the access-control entry.
  280. string id = 3;
  281. // The name of the bucket.
  282. string bucket = 4;
  283. // The entity holding the permission, in one of the following forms:
  284. // * `user-{userid}`
  285. // * `user-{email}`
  286. // * `group-{groupid}`
  287. // * `group-{email}`
  288. // * `domain-{domain}`
  289. // * `project-{team-projectid}`
  290. // * `allUsers`
  291. // * `allAuthenticatedUsers`
  292. // Examples:
  293. // * The user `liz@example.com` would be `user-liz@example.com`.
  294. // * The group `example@googlegroups.com` would be
  295. // `group-example@googlegroups.com`
  296. // * All members of the Google Apps for Business domain `example.com` would be
  297. // `domain-example.com`
  298. string entity = 6;
  299. // The ID for the entity, if any.
  300. string entity_id = 7;
  301. // The email address associated with the entity, if any.
  302. string email = 8;
  303. // The domain associated with the entity, if any.
  304. string domain = 9;
  305. // The project team associated with the entity, if any.
  306. ProjectTeam project_team = 10;
  307. }
  308. // The response to a call to BucketAccessControls.ListBucketAccessControls.
  309. message ListBucketAccessControlsResponse {
  310. // The list of items.
  311. repeated BucketAccessControl items = 1;
  312. }
  313. // The result of a call to Buckets.ListBuckets
  314. message ListBucketsResponse {
  315. // The list of items.
  316. repeated Bucket items = 1;
  317. // The continuation token, used to page through large result sets. Provide
  318. // this value in a subsequent request to return the next page of results.
  319. string next_page_token = 2;
  320. }
  321. // An notification channel used to watch for resource changes.
  322. message Channel {
  323. // A UUID or similar unique string that identifies this channel.
  324. string id = 1;
  325. // An opaque ID that identifies the resource being watched on this channel.
  326. // Stable across different API versions.
  327. string resource_id = 2;
  328. // A version-specific identifier for the watched resource.
  329. string resource_uri = 3;
  330. // An arbitrary string delivered to the target address with each notification
  331. // delivered over this channel. Optional.
  332. string token = 4;
  333. // Date and time of notification channel expiration. Optional.
  334. google.protobuf.Timestamp expiration = 5;
  335. // The type of delivery mechanism used for this channel.
  336. string type = 6;
  337. // The address where notifications are delivered for this channel.
  338. string address = 7;
  339. // Additional parameters controlling delivery channel behavior. Optional.
  340. map<string, string> params = 8;
  341. // A Boolean value to indicate whether payload is wanted. Optional.
  342. bool payload = 9;
  343. }
  344. // The result of a call to Channels.ListChannels
  345. message ListChannelsResponse {
  346. message Items {
  347. // User-specified name for a channel. Needed to unsubscribe.
  348. string channel_id = 1;
  349. // Opaque value generated by GCS representing a bucket. Needed to
  350. // unsubscribe.
  351. string resource_id = 2;
  352. // Url used to identify where notifications are sent to.
  353. string push_url = 3;
  354. // Email address of the subscriber.
  355. string subscriber_email = 4;
  356. // Time when the channel was created.
  357. google.protobuf.Timestamp creation_time = 5;
  358. }
  359. // The list of notification channels for a bucket.
  360. repeated Items items = 1;
  361. }
  362. // Message used to convey content being read or written, along with its
  363. // checksum.
  364. message ChecksummedData {
  365. // The data.
  366. bytes content = 1;
  367. // CRC32C digest of the contents.
  368. google.protobuf.UInt32Value crc32c = 2;
  369. }
  370. // Message used for storing full (not subrange) object checksums.
  371. message ObjectChecksums {
  372. // CRC32C digest of the object data. Computed by the GCS service for
  373. // all written objects, and validated by the GCS service against
  374. // client-supplied values if present in an InsertObjectRequest.
  375. google.protobuf.UInt32Value crc32c = 1;
  376. // Hex-encoded MD5 hash of the object data (hexdigest). Whether/how this
  377. // checksum is provided and validated is service-dependent.
  378. string md5_hash = 2;
  379. }
  380. // A collection of enums used in multiple places throughout the API.
  381. message CommonEnums {
  382. // A set of properties to return in a response.
  383. enum Projection {
  384. // No specified projection.
  385. PROJECTION_UNSPECIFIED = 0;
  386. // Omit `owner`, `acl`, and `defaultObjectAcl` properties.
  387. NO_ACL = 1;
  388. // Include all properties.
  389. FULL = 2;
  390. }
  391. // Predefined or "canned" aliases for sets of specific bucket ACL entries.
  392. enum PredefinedBucketAcl {
  393. // No predefined ACL.
  394. PREDEFINED_BUCKET_ACL_UNSPECIFIED = 0;
  395. // Project team owners get `OWNER` access, and
  396. // `allAuthenticatedUsers` get `READER` access.
  397. BUCKET_ACL_AUTHENTICATED_READ = 1;
  398. // Project team owners get `OWNER` access.
  399. BUCKET_ACL_PRIVATE = 2;
  400. // Project team members get access according to their roles.
  401. BUCKET_ACL_PROJECT_PRIVATE = 3;
  402. // Project team owners get `OWNER` access, and
  403. // `allUsers` get `READER` access.
  404. BUCKET_ACL_PUBLIC_READ = 4;
  405. // Project team owners get `OWNER` access, and
  406. // `allUsers` get `WRITER` access.
  407. BUCKET_ACL_PUBLIC_READ_WRITE = 5;
  408. }
  409. // Predefined or "canned" aliases for sets of specific object ACL entries.
  410. enum PredefinedObjectAcl {
  411. // No predefined ACL.
  412. PREDEFINED_OBJECT_ACL_UNSPECIFIED = 0;
  413. // Object owner gets `OWNER` access, and
  414. // `allAuthenticatedUsers` get `READER` access.
  415. OBJECT_ACL_AUTHENTICATED_READ = 1;
  416. // Object owner gets `OWNER` access, and project team owners get
  417. // `OWNER` access.
  418. OBJECT_ACL_BUCKET_OWNER_FULL_CONTROL = 2;
  419. // Object owner gets `OWNER` access, and project team owners get
  420. // `READER` access.
  421. OBJECT_ACL_BUCKET_OWNER_READ = 3;
  422. // Object owner gets `OWNER` access.
  423. OBJECT_ACL_PRIVATE = 4;
  424. // Object owner gets `OWNER` access, and project team members get
  425. // access according to their roles.
  426. OBJECT_ACL_PROJECT_PRIVATE = 5;
  427. // Object owner gets `OWNER` access, and `allUsers`
  428. // get `READER` access.
  429. OBJECT_ACL_PUBLIC_READ = 6;
  430. }
  431. }
  432. // Specifies a requested range of bytes to download.
  433. message ContentRange {
  434. // The starting offset of the object data.
  435. int64 start = 1;
  436. // The ending offset of the object data.
  437. int64 end = 2;
  438. // The complete length of the object data.
  439. int64 complete_length = 3;
  440. }
  441. // Hmac Key Metadata, which includes all information other than the secret.
  442. message HmacKeyMetadata {
  443. // Resource name ID of the key in the format <projectId>/<accessId>.
  444. string id = 1;
  445. // Globally unique id for keys.
  446. string access_id = 2;
  447. // The project ID that the hmac key is contained in.
  448. string project_id = 3;
  449. // Email of the service account the key authenticates as.
  450. string service_account_email = 4;
  451. // State of the key. One of ACTIVE, INACTIVE, or DELETED.
  452. string state = 5;
  453. // The creation time of the HMAC key in RFC 3339 format.
  454. google.protobuf.Timestamp time_created = 6;
  455. // The last modification time of the HMAC key metadata in RFC 3339 format.
  456. google.protobuf.Timestamp updated = 7;
  457. // Tag updated with each key update.
  458. string etag = 8;
  459. }
  460. // A subscription to receive Google PubSub notifications.
  461. message Notification {
  462. // The Cloud PubSub topic to which this subscription publishes. Formatted as:
  463. // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
  464. string topic = 1;
  465. // If present, only send notifications about listed event types. If empty,
  466. // sent notifications for all event types.
  467. repeated string event_types = 2;
  468. // An optional list of additional attributes to attach to each Cloud PubSub
  469. // message published for this notification subscription.
  470. map<string, string> custom_attributes = 3;
  471. // HTTP 1.1 [https://tools.ietf.org/html/rfc7232#section-2.3][Entity tag]
  472. // for this subscription notification.
  473. string etag = 4;
  474. // If present, only apply this notification configuration to object names that
  475. // begin with this prefix.
  476. string object_name_prefix = 5;
  477. // The desired content of the Payload.
  478. string payload_format = 6;
  479. // The ID of the notification.
  480. string id = 7;
  481. }
  482. // The result of a call to Notifications.ListNotifications
  483. message ListNotificationsResponse {
  484. // The list of items.
  485. repeated Notification items = 1;
  486. }
  487. // An object.
  488. message Object {
  489. // Describes the customer-specified mechanism used to store the data at rest.
  490. message CustomerEncryption {
  491. // The encryption algorithm.
  492. string encryption_algorithm = 1;
  493. // SHA256 hash value of the encryption key.
  494. string key_sha256 = 2;
  495. }
  496. // Content-Encoding of the object data, matching
  497. // [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
  498. string content_encoding = 1;
  499. // Content-Disposition of the object data, matching
  500. // [https://tools.ietf.org/html/rfc6266][RFC 6266].
  501. string content_disposition = 2;
  502. // Cache-Control directive for the object data, matching
  503. // [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
  504. // If omitted, and the object is accessible to all anonymous users, the
  505. // default will be `public, max-age=3600`.
  506. string cache_control = 3;
  507. // Access controls on the object.
  508. repeated ObjectAccessControl acl = 4;
  509. // Content-Language of the object data, matching
  510. // [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
  511. string content_language = 5;
  512. // The version of the metadata for this object at this generation. Used for
  513. // preconditions and for detecting changes in metadata. A metageneration
  514. // number is only meaningful in the context of a particular generation of a
  515. // particular object.
  516. // Attempting to set this field will result in an error.
  517. int64 metageneration = 6;
  518. // The deletion time of the object. Will be returned if and only if this
  519. // version of the object has been deleted.
  520. // Attempting to set this field will result in an error.
  521. google.protobuf.Timestamp time_deleted = 7;
  522. // Content-Type of the object data, matching
  523. // [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
  524. // If an object is stored without a Content-Type, it is served as
  525. // `application/octet-stream`.
  526. string content_type = 8;
  527. // Content-Length of the object data in bytes, matching
  528. // [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
  529. // Attempting to set this field will result in an error.
  530. int64 size = 9;
  531. // The creation time of the object.
  532. // Attempting to set this field will result in an error.
  533. google.protobuf.Timestamp time_created = 10;
  534. // CRC32c checksum. For more information about using the CRC32c
  535. // checksum, see
  536. // [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
  537. // ETags: Best Practices]. This is a server determined value and should not be
  538. // supplied by the user when sending an Object. The server will ignore any
  539. // value provided. Users should instead use the object_checksums field on the
  540. // InsertObjectRequest when uploading an object.
  541. google.protobuf.UInt32Value crc32c = 11;
  542. // Number of underlying components that make up this object. Components are
  543. // accumulated by compose operations.
  544. // Attempting to set this field will result in an error.
  545. int32 component_count = 12;
  546. // MD5 hash of the data; encoded using base64 as per
  547. // [https://tools.ietf.org/html/rfc4648#section-4][RFC 4648 §4]. For more
  548. // information about using the MD5 hash, see
  549. // [https://cloud.google.com/storage/docs/hashes-etags#_JSONAPI][Hashes and
  550. // ETags: Best Practices]. This is a server determined value and should not be
  551. // supplied by the user when sending an Object. The server will ignore any
  552. // value provided. Users should instead use the object_checksums field on the
  553. // InsertObjectRequest when uploading an object.
  554. string md5_hash = 13;
  555. // HTTP 1.1 Entity tag for the object. See
  556. // [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
  557. // Attempting to set this field will result in an error.
  558. string etag = 14;
  559. // The modification time of the object metadata.
  560. // Attempting to set this field will result in an error.
  561. google.protobuf.Timestamp updated = 15;
  562. // Storage class of the object.
  563. string storage_class = 16;
  564. // Cloud KMS Key used to encrypt this object, if the object is encrypted by
  565. // such a key.
  566. string kms_key_name = 17;
  567. // The time at which the object's storage class was last changed. When the
  568. // object is initially created, it will be set to time_created.
  569. // Attempting to set this field will result in an error.
  570. google.protobuf.Timestamp time_storage_class_updated = 18;
  571. // Whether an object is under temporary hold. While this flag is set to true,
  572. // the object is protected against deletion and overwrites. A common use case
  573. // of this flag is regulatory investigations where objects need to be retained
  574. // while the investigation is ongoing. Note that unlike event-based hold,
  575. // temporary hold does not impact retention expiration time of an object.
  576. bool temporary_hold = 19;
  577. // A server-determined value that specifies the earliest time that the
  578. // object's retention period expires. This value is in
  579. // [https://tools.ietf.org/html/rfc3339][RFC 3339] format.
  580. // Note 1: This field is not provided for objects with an active event-based
  581. // hold, since retention expiration is unknown until the hold is removed.
  582. // Note 2: This value can be provided even when temporary hold is set (so that
  583. // the user can reason about policy without having to first unset the
  584. // temporary hold).
  585. google.protobuf.Timestamp retention_expiration_time = 20;
  586. // User-provided metadata, in key/value pairs.
  587. map<string, string> metadata = 21;
  588. // Whether an object is under event-based hold. Event-based hold is a way to
  589. // retain objects until an event occurs, which is signified by the
  590. // hold's release (i.e. this value is set to false). After being released (set
  591. // to false), such objects will be subject to bucket-level retention (if any).
  592. // One sample use case of this flag is for banks to hold loan documents for at
  593. // least 3 years after loan is paid in full. Here, bucket-level retention is 3
  594. // years and the event is the loan being paid in full. In this example, these
  595. // objects will be held intact for any number of years until the event has
  596. // occurred (event-based hold on the object is released) and then 3 more years
  597. // after that. That means retention duration of the objects begins from the
  598. // moment event-based hold transitioned from true to false.
  599. google.protobuf.BoolValue event_based_hold = 29;
  600. // The name of the object.
  601. // Attempting to update this field after the object is created will result in
  602. // an error.
  603. string name = 23;
  604. // The ID of the object, including the bucket name, object name, and
  605. // generation number.
  606. // Attempting to update this field after the object is created will result in
  607. // an error.
  608. string id = 24;
  609. // The name of the bucket containing this object.
  610. // Attempting to update this field after the object is created will result in
  611. // an error.
  612. string bucket = 25;
  613. // The content generation of this object. Used for object versioning.
  614. // Attempting to set this field will result in an error.
  615. int64 generation = 26;
  616. // The owner of the object. This will always be the uploader of the object.
  617. // Attempting to set this field will result in an error.
  618. Owner owner = 27;
  619. // Metadata of customer-supplied encryption key, if the object is encrypted by
  620. // such a key.
  621. CustomerEncryption customer_encryption = 28;
  622. }
  623. // An access-control entry.
  624. message ObjectAccessControl {
  625. // The access permission for the entity.
  626. string role = 1;
  627. // HTTP 1.1 Entity tag for the access-control entry.
  628. // See [https://tools.ietf.org/html/rfc7232#section-2.3][RFC 7232 §2.3].
  629. string etag = 2;
  630. // The ID of the access-control entry.
  631. string id = 3;
  632. // The name of the bucket.
  633. string bucket = 4;
  634. // The name of the object, if applied to an object.
  635. string object = 5;
  636. // The content generation of the object, if applied to an object.
  637. int64 generation = 6;
  638. // The entity holding the permission, in one of the following forms:
  639. // * `user-{userid}`
  640. // * `user-{email}`
  641. // * `group-{groupid}`
  642. // * `group-{email}`
  643. // * `domain-{domain}`
  644. // * `project-{team-projectid}`
  645. // * `allUsers`
  646. // * `allAuthenticatedUsers`
  647. // Examples:
  648. // * The user `liz@example.com` would be `user-liz@example.com`.
  649. // * The group `example@googlegroups.com` would be
  650. // `group-example@googlegroups.com`.
  651. // * All members of the Google Apps for Business domain `example.com` would be
  652. // `domain-example.com`.
  653. string entity = 7;
  654. // The ID for the entity, if any.
  655. string entity_id = 8;
  656. // The email address associated with the entity, if any.
  657. string email = 9;
  658. // The domain associated with the entity, if any.
  659. string domain = 10;
  660. // The project team associated with the entity, if any.
  661. ProjectTeam project_team = 11;
  662. }
  663. // The result of a call to ObjectAccessControls.ListObjectAccessControls.
  664. message ListObjectAccessControlsResponse {
  665. // The list of items.
  666. repeated ObjectAccessControl items = 1;
  667. }
  668. // The result of a call to Objects.ListObjects
  669. message ListObjectsResponse {
  670. // The list of prefixes of objects matching-but-not-listed up to and including
  671. // the requested delimiter.
  672. repeated string prefixes = 1;
  673. // The list of items.
  674. repeated Object items = 2;
  675. // The continuation token, used to page through large result sets. Provide
  676. // this value in a subsequent request to return the next page of results.
  677. string next_page_token = 3;
  678. }
  679. // Represents the Viewers, Editors, or Owners of a given project.
  680. message ProjectTeam {
  681. // The project number.
  682. string project_number = 1;
  683. // The team.
  684. string team = 2;
  685. }
  686. // A subscription to receive Google PubSub notifications.
  687. message ServiceAccount {
  688. // The ID of the notification.
  689. string email_address = 1;
  690. }
  691. // The owner of a specific resource.
  692. message Owner {
  693. // The entity, in the form `user-`*userId*.
  694. string entity = 1;
  695. // The ID for the entity.
  696. string entity_id = 2;
  697. }