google-apis-storage_v1 0.19.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,6 +22,127 @@ module Google
22
22
  module Apis
23
23
  module StorageV1
24
24
 
25
+ # An Anywhere Cache instance.
26
+ class AnywhereCache
27
+ include Google::Apis::Core::Hashable
28
+
29
+ # The cache-level entry admission policy.
30
+ # Corresponds to the JSON property `admissionPolicy`
31
+ # @return [String]
32
+ attr_accessor :admission_policy
33
+
34
+ # The ID of the Anywhere cache instance.
35
+ # Corresponds to the JSON property `anywhereCacheId`
36
+ # @return [String]
37
+ attr_accessor :anywhere_cache_id
38
+
39
+ # The name of the bucket containing this cache instance.
40
+ # Corresponds to the JSON property `bucket`
41
+ # @return [String]
42
+ attr_accessor :bucket
43
+
44
+ # The creation time of the cache instance in RFC 3339 format.
45
+ # Corresponds to the JSON property `createTime`
46
+ # @return [DateTime]
47
+ attr_accessor :create_time
48
+
49
+ # The ID of the resource, including the project number, bucket name and anywhere
50
+ # cache ID.
51
+ # Corresponds to the JSON property `id`
52
+ # @return [String]
53
+ attr_accessor :id
54
+
55
+ # The kind of item this is. For Anywhere Cache, this is always storage#
56
+ # anywhereCache.
57
+ # Corresponds to the JSON property `kind`
58
+ # @return [String]
59
+ attr_accessor :kind
60
+
61
+ # True if the cache instance has an active Update long-running operation.
62
+ # Corresponds to the JSON property `pendingUpdate`
63
+ # @return [Boolean]
64
+ attr_accessor :pending_update
65
+ alias_method :pending_update?, :pending_update
66
+
67
+ # The link to this cache instance.
68
+ # Corresponds to the JSON property `selfLink`
69
+ # @return [String]
70
+ attr_accessor :self_link
71
+
72
+ # The current state of the cache instance.
73
+ # Corresponds to the JSON property `state`
74
+ # @return [String]
75
+ attr_accessor :state
76
+
77
+ # The TTL of all cache entries in whole seconds. e.g., "7200s".
78
+ # Corresponds to the JSON property `ttl`
79
+ # @return [String]
80
+ attr_accessor :ttl
81
+
82
+ # The modification time of the cache instance metadata in RFC 3339 format.
83
+ # Corresponds to the JSON property `updateTime`
84
+ # @return [DateTime]
85
+ attr_accessor :update_time
86
+
87
+ # The zone in which the cache instance is running. For example, us-central1-a.
88
+ # Corresponds to the JSON property `zone`
89
+ # @return [String]
90
+ attr_accessor :zone
91
+
92
+ def initialize(**args)
93
+ update!(**args)
94
+ end
95
+
96
+ # Update properties of this object
97
+ def update!(**args)
98
+ @admission_policy = args[:admission_policy] if args.key?(:admission_policy)
99
+ @anywhere_cache_id = args[:anywhere_cache_id] if args.key?(:anywhere_cache_id)
100
+ @bucket = args[:bucket] if args.key?(:bucket)
101
+ @create_time = args[:create_time] if args.key?(:create_time)
102
+ @id = args[:id] if args.key?(:id)
103
+ @kind = args[:kind] if args.key?(:kind)
104
+ @pending_update = args[:pending_update] if args.key?(:pending_update)
105
+ @self_link = args[:self_link] if args.key?(:self_link)
106
+ @state = args[:state] if args.key?(:state)
107
+ @ttl = args[:ttl] if args.key?(:ttl)
108
+ @update_time = args[:update_time] if args.key?(:update_time)
109
+ @zone = args[:zone] if args.key?(:zone)
110
+ end
111
+ end
112
+
113
+ # A list of Anywhere Caches.
114
+ class AnywhereCaches
115
+ include Google::Apis::Core::Hashable
116
+
117
+ # The list of items.
118
+ # Corresponds to the JSON property `items`
119
+ # @return [Array<Google::Apis::StorageV1::AnywhereCache>]
120
+ attr_accessor :items
121
+
122
+ # The kind of item this is. For lists of Anywhere Caches, this is always storage#
123
+ # anywhereCaches.
124
+ # Corresponds to the JSON property `kind`
125
+ # @return [String]
126
+ attr_accessor :kind
127
+
128
+ # The continuation token, used to page through large result sets. Provide this
129
+ # value in a subsequent request to return the next page of results.
130
+ # Corresponds to the JSON property `nextPageToken`
131
+ # @return [String]
132
+ attr_accessor :next_page_token
133
+
134
+ def initialize(**args)
135
+ update!(**args)
136
+ end
137
+
138
+ # Update properties of this object
139
+ def update!(**args)
140
+ @items = args[:items] if args.key?(:items)
141
+ @kind = args[:kind] if args.key?(:kind)
142
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
143
+ end
144
+ end
145
+
25
146
  # A bucket.
26
147
  class Bucket
27
148
  include Google::Apis::Core::Hashable
@@ -83,6 +204,11 @@ module Google
83
204
  # @return [String]
84
205
  attr_accessor :etag
85
206
 
207
+ # The bucket's hierarchical namespace configuration.
208
+ # Corresponds to the JSON property `hierarchicalNamespace`
209
+ # @return [Google::Apis::StorageV1::Bucket::HierarchicalNamespace]
210
+ attr_accessor :hierarchical_namespace
211
+
86
212
  # The bucket's IAM configuration.
87
213
  # Corresponds to the JSON property `iamConfiguration`
88
214
  # @return [Google::Apis::StorageV1::Bucket::IamConfiguration]
@@ -137,6 +263,11 @@ module Google
137
263
  # @return [String]
138
264
  attr_accessor :name
139
265
 
266
+ # The bucket's object retention config.
267
+ # Corresponds to the JSON property `objectRetention`
268
+ # @return [Google::Apis::StorageV1::Bucket::ObjectRetention]
269
+ attr_accessor :object_retention
270
+
140
271
  # The owner of the bucket. This is always the project team's owner group.
141
272
  # Corresponds to the JSON property `owner`
142
273
  # @return [Google::Apis::StorageV1::Bucket::Owner]
@@ -177,6 +308,12 @@ module Google
177
308
  # @return [String]
178
309
  attr_accessor :self_link
179
310
 
311
+ # The bucket's soft delete policy, which defines the period of time that soft-
312
+ # deleted objects will be retained, and cannot be permanently deleted.
313
+ # Corresponds to the JSON property `softDeletePolicy`
314
+ # @return [Google::Apis::StorageV1::Bucket::SoftDeletePolicy]
315
+ attr_accessor :soft_delete_policy
316
+
180
317
  # The bucket's default storage class, used whenever no storageClass is specified
181
318
  # for a newly-created object. This defines how objects in the bucket are stored
182
319
  # and determines the SLA and the cost of storage. Values include MULTI_REGIONAL,
@@ -225,6 +362,7 @@ module Google
225
362
  @default_object_acl = args[:default_object_acl] if args.key?(:default_object_acl)
226
363
  @encryption = args[:encryption] if args.key?(:encryption)
227
364
  @etag = args[:etag] if args.key?(:etag)
365
+ @hierarchical_namespace = args[:hierarchical_namespace] if args.key?(:hierarchical_namespace)
228
366
  @iam_configuration = args[:iam_configuration] if args.key?(:iam_configuration)
229
367
  @id = args[:id] if args.key?(:id)
230
368
  @kind = args[:kind] if args.key?(:kind)
@@ -235,12 +373,14 @@ module Google
235
373
  @logging = args[:logging] if args.key?(:logging)
236
374
  @metageneration = args[:metageneration] if args.key?(:metageneration)
237
375
  @name = args[:name] if args.key?(:name)
376
+ @object_retention = args[:object_retention] if args.key?(:object_retention)
238
377
  @owner = args[:owner] if args.key?(:owner)
239
378
  @project_number = args[:project_number] if args.key?(:project_number)
240
379
  @retention_policy = args[:retention_policy] if args.key?(:retention_policy)
241
380
  @rpo = args[:rpo] if args.key?(:rpo)
242
381
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
243
382
  @self_link = args[:self_link] if args.key?(:self_link)
383
+ @soft_delete_policy = args[:soft_delete_policy] if args.key?(:soft_delete_policy)
244
384
  @storage_class = args[:storage_class] if args.key?(:storage_class)
245
385
  @time_created = args[:time_created] if args.key?(:time_created)
246
386
  @updated = args[:updated] if args.key?(:updated)
@@ -258,6 +398,19 @@ module Google
258
398
  attr_accessor :enabled
259
399
  alias_method :enabled?, :enabled
260
400
 
401
+ # The storage class that objects in the bucket eventually transition to if they
402
+ # are not read for a certain length of time. Valid values are NEARLINE and
403
+ # ARCHIVE.
404
+ # Corresponds to the JSON property `terminalStorageClass`
405
+ # @return [String]
406
+ attr_accessor :terminal_storage_class
407
+
408
+ # A date and time in RFC 3339 format representing the time of the most recent
409
+ # update to "terminalStorageClass".
410
+ # Corresponds to the JSON property `terminalStorageClassUpdateTime`
411
+ # @return [DateTime]
412
+ attr_accessor :terminal_storage_class_update_time
413
+
261
414
  # A date and time in RFC 3339 format representing the instant at which "enabled"
262
415
  # was last toggled.
263
416
  # Corresponds to the JSON property `toggleTime`
@@ -271,6 +424,8 @@ module Google
271
424
  # Update properties of this object
272
425
  def update!(**args)
273
426
  @enabled = args[:enabled] if args.key?(:enabled)
427
+ @terminal_storage_class = args[:terminal_storage_class] if args.key?(:terminal_storage_class)
428
+ @terminal_storage_class_update_time = args[:terminal_storage_class_update_time] if args.key?(:terminal_storage_class_update_time)
274
429
  @toggle_time = args[:toggle_time] if args.key?(:toggle_time)
275
430
  end
276
431
  end
@@ -376,6 +531,26 @@ module Google
376
531
  end
377
532
  end
378
533
 
534
+ # The bucket's hierarchical namespace configuration.
535
+ class HierarchicalNamespace
536
+ include Google::Apis::Core::Hashable
537
+
538
+ # When set to true, hierarchical namespace is enabled for this bucket.
539
+ # Corresponds to the JSON property `enabled`
540
+ # @return [Boolean]
541
+ attr_accessor :enabled
542
+ alias_method :enabled?, :enabled
543
+
544
+ def initialize(**args)
545
+ update!(**args)
546
+ end
547
+
548
+ # Update properties of this object
549
+ def update!(**args)
550
+ @enabled = args[:enabled] if args.key?(:enabled)
551
+ end
552
+ end
553
+
379
554
  # The bucket's IAM configuration.
380
555
  class IamConfiguration
381
556
  include Google::Apis::Core::Hashable
@@ -682,6 +857,25 @@ module Google
682
857
  end
683
858
  end
684
859
 
860
+ # The bucket's object retention config.
861
+ class ObjectRetention
862
+ include Google::Apis::Core::Hashable
863
+
864
+ # The bucket's object retention mode. Can be Enabled.
865
+ # Corresponds to the JSON property `mode`
866
+ # @return [String]
867
+ attr_accessor :mode
868
+
869
+ def initialize(**args)
870
+ update!(**args)
871
+ end
872
+
873
+ # Update properties of this object
874
+ def update!(**args)
875
+ @mode = args[:mode] if args.key?(:mode)
876
+ end
877
+ end
878
+
685
879
  # The owner of the bucket. This is always the project team's owner group.
686
880
  class Owner
687
881
  include Google::Apis::Core::Hashable
@@ -751,6 +945,34 @@ module Google
751
945
  end
752
946
  end
753
947
 
948
+ # The bucket's soft delete policy, which defines the period of time that soft-
949
+ # deleted objects will be retained, and cannot be permanently deleted.
950
+ class SoftDeletePolicy
951
+ include Google::Apis::Core::Hashable
952
+
953
+ # Server-determined value that indicates the time from which the policy, or one
954
+ # with a greater retention, was effective. This value is in RFC 3339 format.
955
+ # Corresponds to the JSON property `effectiveTime`
956
+ # @return [DateTime]
957
+ attr_accessor :effective_time
958
+
959
+ # The duration in seconds that soft-deleted objects in the bucket will be
960
+ # retained and cannot be permanently deleted.
961
+ # Corresponds to the JSON property `retentionDurationSeconds`
962
+ # @return [Fixnum]
963
+ attr_accessor :retention_duration_seconds
964
+
965
+ def initialize(**args)
966
+ update!(**args)
967
+ end
968
+
969
+ # Update properties of this object
970
+ def update!(**args)
971
+ @effective_time = args[:effective_time] if args.key?(:effective_time)
972
+ @retention_duration_seconds = args[:retention_duration_seconds] if args.key?(:retention_duration_seconds)
973
+ end
974
+ end
975
+
754
976
  # The bucket's versioning configuration.
755
977
  class Versioning
756
978
  include Google::Apis::Core::Hashable
@@ -947,6 +1169,95 @@ module Google
947
1169
  end
948
1170
  end
949
1171
 
1172
+ # The storage layout configuration of a bucket.
1173
+ class BucketStorageLayout
1174
+ include Google::Apis::Core::Hashable
1175
+
1176
+ # The name of the bucket.
1177
+ # Corresponds to the JSON property `bucket`
1178
+ # @return [String]
1179
+ attr_accessor :bucket
1180
+
1181
+ # The bucket's custom placement configuration for Custom Dual Regions.
1182
+ # Corresponds to the JSON property `customPlacementConfig`
1183
+ # @return [Google::Apis::StorageV1::BucketStorageLayout::CustomPlacementConfig]
1184
+ attr_accessor :custom_placement_config
1185
+
1186
+ # The bucket's hierarchical namespace configuration.
1187
+ # Corresponds to the JSON property `hierarchicalNamespace`
1188
+ # @return [Google::Apis::StorageV1::BucketStorageLayout::HierarchicalNamespace]
1189
+ attr_accessor :hierarchical_namespace
1190
+
1191
+ # The kind of item this is. For storage layout, this is always storage#
1192
+ # storageLayout.
1193
+ # Corresponds to the JSON property `kind`
1194
+ # @return [String]
1195
+ attr_accessor :kind
1196
+
1197
+ # The location of the bucket.
1198
+ # Corresponds to the JSON property `location`
1199
+ # @return [String]
1200
+ attr_accessor :location
1201
+
1202
+ # The type of the bucket location.
1203
+ # Corresponds to the JSON property `locationType`
1204
+ # @return [String]
1205
+ attr_accessor :location_type
1206
+
1207
+ def initialize(**args)
1208
+ update!(**args)
1209
+ end
1210
+
1211
+ # Update properties of this object
1212
+ def update!(**args)
1213
+ @bucket = args[:bucket] if args.key?(:bucket)
1214
+ @custom_placement_config = args[:custom_placement_config] if args.key?(:custom_placement_config)
1215
+ @hierarchical_namespace = args[:hierarchical_namespace] if args.key?(:hierarchical_namespace)
1216
+ @kind = args[:kind] if args.key?(:kind)
1217
+ @location = args[:location] if args.key?(:location)
1218
+ @location_type = args[:location_type] if args.key?(:location_type)
1219
+ end
1220
+
1221
+ # The bucket's custom placement configuration for Custom Dual Regions.
1222
+ class CustomPlacementConfig
1223
+ include Google::Apis::Core::Hashable
1224
+
1225
+ # The list of regional locations in which data is placed.
1226
+ # Corresponds to the JSON property `dataLocations`
1227
+ # @return [Array<String>]
1228
+ attr_accessor :data_locations
1229
+
1230
+ def initialize(**args)
1231
+ update!(**args)
1232
+ end
1233
+
1234
+ # Update properties of this object
1235
+ def update!(**args)
1236
+ @data_locations = args[:data_locations] if args.key?(:data_locations)
1237
+ end
1238
+ end
1239
+
1240
+ # The bucket's hierarchical namespace configuration.
1241
+ class HierarchicalNamespace
1242
+ include Google::Apis::Core::Hashable
1243
+
1244
+ # When set to true, hierarchical namespace is enabled for this bucket.
1245
+ # Corresponds to the JSON property `enabled`
1246
+ # @return [Boolean]
1247
+ attr_accessor :enabled
1248
+ alias_method :enabled?, :enabled
1249
+
1250
+ def initialize(**args)
1251
+ update!(**args)
1252
+ end
1253
+
1254
+ # Update properties of this object
1255
+ def update!(**args)
1256
+ @enabled = args[:enabled] if args.key?(:enabled)
1257
+ end
1258
+ end
1259
+ end
1260
+
950
1261
  # A list of buckets.
951
1262
  class Buckets
952
1263
  include Google::Apis::Core::Hashable
@@ -979,6 +1290,59 @@ module Google
979
1290
  end
980
1291
  end
981
1292
 
1293
+ # A bulk restore objects request.
1294
+ class BulkRestoreObjectsRequest
1295
+ include Google::Apis::Core::Hashable
1296
+
1297
+ # If false (default), the restore will not overwrite live objects with the same
1298
+ # name at the destination. This means some deleted objects may be skipped. If
1299
+ # true, live objects will be overwritten resulting in a noncurrent object (if
1300
+ # versioning is enabled). If versioning is not enabled, overwriting the object
1301
+ # will result in a soft-deleted object. In either case, if a noncurrent object
1302
+ # already exists with the same name, a live version can be written without issue.
1303
+ # Corresponds to the JSON property `allowOverwrite`
1304
+ # @return [Boolean]
1305
+ attr_accessor :allow_overwrite
1306
+ alias_method :allow_overwrite?, :allow_overwrite
1307
+
1308
+ # If true, copies the source object's ACL; otherwise, uses the bucket's default
1309
+ # object ACL. The default is false.
1310
+ # Corresponds to the JSON property `copySourceAcl`
1311
+ # @return [Boolean]
1312
+ attr_accessor :copy_source_acl
1313
+ alias_method :copy_source_acl?, :copy_source_acl
1314
+
1315
+ # Restores only the objects matching any of the specified glob(s). If this
1316
+ # parameter is not specified, all objects will be restored within the specified
1317
+ # time range.
1318
+ # Corresponds to the JSON property `matchGlobs`
1319
+ # @return [Array<String>]
1320
+ attr_accessor :match_globs
1321
+
1322
+ # Restores only the objects that were soft-deleted after this time.
1323
+ # Corresponds to the JSON property `softDeletedAfterTime`
1324
+ # @return [DateTime]
1325
+ attr_accessor :soft_deleted_after_time
1326
+
1327
+ # Restores only the objects that were soft-deleted before this time.
1328
+ # Corresponds to the JSON property `softDeletedBeforeTime`
1329
+ # @return [DateTime]
1330
+ attr_accessor :soft_deleted_before_time
1331
+
1332
+ def initialize(**args)
1333
+ update!(**args)
1334
+ end
1335
+
1336
+ # Update properties of this object
1337
+ def update!(**args)
1338
+ @allow_overwrite = args[:allow_overwrite] if args.key?(:allow_overwrite)
1339
+ @copy_source_acl = args[:copy_source_acl] if args.key?(:copy_source_acl)
1340
+ @match_globs = args[:match_globs] if args.key?(:match_globs)
1341
+ @soft_deleted_after_time = args[:soft_deleted_after_time] if args.key?(:soft_deleted_after_time)
1342
+ @soft_deleted_before_time = args[:soft_deleted_before_time] if args.key?(:soft_deleted_before_time)
1343
+ end
1344
+ end
1345
+
982
1346
  # An notification channel used to watch for resource changes.
983
1347
  class Channel
984
1348
  include Google::Apis::Core::Hashable
@@ -1184,6 +1548,271 @@ module Google
1184
1548
  end
1185
1549
  end
1186
1550
 
1551
+ # A folder. Only available in buckets with hierarchical namespace enabled.
1552
+ class Folder
1553
+ include Google::Apis::Core::Hashable
1554
+
1555
+ # The name of the bucket containing this folder.
1556
+ # Corresponds to the JSON property `bucket`
1557
+ # @return [String]
1558
+ attr_accessor :bucket
1559
+
1560
+ # The creation time of the folder in RFC 3339 format.
1561
+ # Corresponds to the JSON property `createTime`
1562
+ # @return [DateTime]
1563
+ attr_accessor :create_time
1564
+
1565
+ # The ID of the folder, including the bucket name, folder name.
1566
+ # Corresponds to the JSON property `id`
1567
+ # @return [String]
1568
+ attr_accessor :id
1569
+
1570
+ # The kind of item this is. For folders, this is always storage#folder.
1571
+ # Corresponds to the JSON property `kind`
1572
+ # @return [String]
1573
+ attr_accessor :kind
1574
+
1575
+ # The version of the metadata for this folder. Used for preconditions and for
1576
+ # detecting changes in metadata.
1577
+ # Corresponds to the JSON property `metageneration`
1578
+ # @return [Fixnum]
1579
+ attr_accessor :metageneration
1580
+
1581
+ # The name of the folder. Required if not specified by URL parameter.
1582
+ # Corresponds to the JSON property `name`
1583
+ # @return [String]
1584
+ attr_accessor :name
1585
+
1586
+ # Only present if the folder is part of an ongoing rename folder operation.
1587
+ # Contains information which can be used to query the operation status.
1588
+ # Corresponds to the JSON property `pendingRenameInfo`
1589
+ # @return [Google::Apis::StorageV1::Folder::PendingRenameInfo]
1590
+ attr_accessor :pending_rename_info
1591
+
1592
+ # The link to this folder.
1593
+ # Corresponds to the JSON property `selfLink`
1594
+ # @return [String]
1595
+ attr_accessor :self_link
1596
+
1597
+ # The modification time of the folder metadata in RFC 3339 format.
1598
+ # Corresponds to the JSON property `updateTime`
1599
+ # @return [DateTime]
1600
+ attr_accessor :update_time
1601
+
1602
+ def initialize(**args)
1603
+ update!(**args)
1604
+ end
1605
+
1606
+ # Update properties of this object
1607
+ def update!(**args)
1608
+ @bucket = args[:bucket] if args.key?(:bucket)
1609
+ @create_time = args[:create_time] if args.key?(:create_time)
1610
+ @id = args[:id] if args.key?(:id)
1611
+ @kind = args[:kind] if args.key?(:kind)
1612
+ @metageneration = args[:metageneration] if args.key?(:metageneration)
1613
+ @name = args[:name] if args.key?(:name)
1614
+ @pending_rename_info = args[:pending_rename_info] if args.key?(:pending_rename_info)
1615
+ @self_link = args[:self_link] if args.key?(:self_link)
1616
+ @update_time = args[:update_time] if args.key?(:update_time)
1617
+ end
1618
+
1619
+ # Only present if the folder is part of an ongoing rename folder operation.
1620
+ # Contains information which can be used to query the operation status.
1621
+ class PendingRenameInfo
1622
+ include Google::Apis::Core::Hashable
1623
+
1624
+ # The ID of the rename folder operation.
1625
+ # Corresponds to the JSON property `operationId`
1626
+ # @return [String]
1627
+ attr_accessor :operation_id
1628
+
1629
+ def initialize(**args)
1630
+ update!(**args)
1631
+ end
1632
+
1633
+ # Update properties of this object
1634
+ def update!(**args)
1635
+ @operation_id = args[:operation_id] if args.key?(:operation_id)
1636
+ end
1637
+ end
1638
+ end
1639
+
1640
+ # A list of folders.
1641
+ class Folders
1642
+ include Google::Apis::Core::Hashable
1643
+
1644
+ # The list of items.
1645
+ # Corresponds to the JSON property `items`
1646
+ # @return [Array<Google::Apis::StorageV1::Folder>]
1647
+ attr_accessor :items
1648
+
1649
+ # The kind of item this is. For lists of folders, this is always storage#folders.
1650
+ # Corresponds to the JSON property `kind`
1651
+ # @return [String]
1652
+ attr_accessor :kind
1653
+
1654
+ # The continuation token, used to page through large result sets. Provide this
1655
+ # value in a subsequent request to return the next page of results.
1656
+ # Corresponds to the JSON property `nextPageToken`
1657
+ # @return [String]
1658
+ attr_accessor :next_page_token
1659
+
1660
+ def initialize(**args)
1661
+ update!(**args)
1662
+ end
1663
+
1664
+ # Update properties of this object
1665
+ def update!(**args)
1666
+ @items = args[:items] if args.key?(:items)
1667
+ @kind = args[:kind] if args.key?(:kind)
1668
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1669
+ end
1670
+ end
1671
+
1672
+ # The response message for storage.buckets.operations.list.
1673
+ class GoogleLongrunningListOperationsResponse
1674
+ include Google::Apis::Core::Hashable
1675
+
1676
+ # The kind of item this is. For lists of operations, this is always storage#
1677
+ # operations.
1678
+ # Corresponds to the JSON property `kind`
1679
+ # @return [String]
1680
+ attr_accessor :kind
1681
+
1682
+ # The continuation token, used to page through large result sets. Provide this
1683
+ # value in a subsequent request to return the next page of results.
1684
+ # Corresponds to the JSON property `nextPageToken`
1685
+ # @return [String]
1686
+ attr_accessor :next_page_token
1687
+
1688
+ # A list of operations that matches the specified filter in the request.
1689
+ # Corresponds to the JSON property `operations`
1690
+ # @return [Array<Google::Apis::StorageV1::GoogleLongrunningOperation>]
1691
+ attr_accessor :operations
1692
+
1693
+ def initialize(**args)
1694
+ update!(**args)
1695
+ end
1696
+
1697
+ # Update properties of this object
1698
+ def update!(**args)
1699
+ @kind = args[:kind] if args.key?(:kind)
1700
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
1701
+ @operations = args[:operations] if args.key?(:operations)
1702
+ end
1703
+ end
1704
+
1705
+ # This resource represents a long-running operation that is the result of a
1706
+ # network API call.
1707
+ class GoogleLongrunningOperation
1708
+ include Google::Apis::Core::Hashable
1709
+
1710
+ # If the value is "false", it means the operation is still in progress. If "true"
1711
+ # , the operation is completed, and either "error" or "response" is available.
1712
+ # Corresponds to the JSON property `done`
1713
+ # @return [Boolean]
1714
+ attr_accessor :done
1715
+ alias_method :done?, :done
1716
+
1717
+ # The "Status" type defines a logical error model that is suitable for different
1718
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1719
+ # gRPC](https://github.com/grpc). Each "Status" message contains three pieces of
1720
+ # data: error code, error message, and error details. You can find out more
1721
+ # about this error model and how to work with it in the [API Design Guide](https:
1722
+ # //cloud.google.com/apis/design/errors).
1723
+ # Corresponds to the JSON property `error`
1724
+ # @return [Google::Apis::StorageV1::GoogleRpcStatus]
1725
+ attr_accessor :error
1726
+
1727
+ # The kind of item this is. For operations, this is always storage#operation.
1728
+ # Corresponds to the JSON property `kind`
1729
+ # @return [String]
1730
+ attr_accessor :kind
1731
+
1732
+ # Service-specific metadata associated with the operation. It typically contains
1733
+ # progress information and common metadata such as create time. Some services
1734
+ # might not provide such metadata. Any method that returns a long-running
1735
+ # operation should document the metadata type, if any.
1736
+ # Corresponds to the JSON property `metadata`
1737
+ # @return [Hash<String,Object>]
1738
+ attr_accessor :metadata
1739
+
1740
+ # The server-assigned name, which is only unique within the same service that
1741
+ # originally returns it. If you use the default HTTP mapping, the "name" should
1742
+ # be a resource name ending with "operations/`operationId`".
1743
+ # Corresponds to the JSON property `name`
1744
+ # @return [String]
1745
+ attr_accessor :name
1746
+
1747
+ # The normal response of the operation in case of success. If the original
1748
+ # method returns no data on success, such as "Delete", the response is google.
1749
+ # protobuf.Empty. If the original method is standard Get/Create/Update, the
1750
+ # response should be the resource. For other methods, the response should have
1751
+ # the type "XxxResponse", where "Xxx" is the original method name. For example,
1752
+ # if the original method name is "TakeSnapshot()", the inferred response type is
1753
+ # "TakeSnapshotResponse".
1754
+ # Corresponds to the JSON property `response`
1755
+ # @return [Hash<String,Object>]
1756
+ attr_accessor :response
1757
+
1758
+ # The link to this long running operation.
1759
+ # Corresponds to the JSON property `selfLink`
1760
+ # @return [String]
1761
+ attr_accessor :self_link
1762
+
1763
+ def initialize(**args)
1764
+ update!(**args)
1765
+ end
1766
+
1767
+ # Update properties of this object
1768
+ def update!(**args)
1769
+ @done = args[:done] if args.key?(:done)
1770
+ @error = args[:error] if args.key?(:error)
1771
+ @kind = args[:kind] if args.key?(:kind)
1772
+ @metadata = args[:metadata] if args.key?(:metadata)
1773
+ @name = args[:name] if args.key?(:name)
1774
+ @response = args[:response] if args.key?(:response)
1775
+ @self_link = args[:self_link] if args.key?(:self_link)
1776
+ end
1777
+ end
1778
+
1779
+ # The "Status" type defines a logical error model that is suitable for different
1780
+ # programming environments, including REST APIs and RPC APIs. It is used by [
1781
+ # gRPC](https://github.com/grpc). Each "Status" message contains three pieces of
1782
+ # data: error code, error message, and error details. You can find out more
1783
+ # about this error model and how to work with it in the [API Design Guide](https:
1784
+ # //cloud.google.com/apis/design/errors).
1785
+ class GoogleRpcStatus
1786
+ include Google::Apis::Core::Hashable
1787
+
1788
+ # The status code, which should be an enum value of google.rpc.Code.
1789
+ # Corresponds to the JSON property `code`
1790
+ # @return [Fixnum]
1791
+ attr_accessor :code
1792
+
1793
+ # A list of messages that carry the error details. There is a common set of
1794
+ # message types for APIs to use.
1795
+ # Corresponds to the JSON property `details`
1796
+ # @return [Array<Hash<String,Object>>]
1797
+ attr_accessor :details
1798
+
1799
+ # A developer-facing error message, which should be in English.
1800
+ # Corresponds to the JSON property `message`
1801
+ # @return [String]
1802
+ attr_accessor :message
1803
+
1804
+ def initialize(**args)
1805
+ update!(**args)
1806
+ end
1807
+
1808
+ # Update properties of this object
1809
+ def update!(**args)
1810
+ @code = args[:code] if args.key?(:code)
1811
+ @details = args[:details] if args.key?(:details)
1812
+ @message = args[:message] if args.key?(:message)
1813
+ end
1814
+ end
1815
+
1187
1816
  # JSON template to produce a JSON-style HMAC Key resource for Create responses.
1188
1817
  class HmacKey
1189
1818
  include Google::Apis::Core::Hashable
@@ -1322,6 +1951,103 @@ module Google
1322
1951
  end
1323
1952
  end
1324
1953
 
1954
+ # A managed folder.
1955
+ class ManagedFolder
1956
+ include Google::Apis::Core::Hashable
1957
+
1958
+ # The name of the bucket containing this managed folder.
1959
+ # Corresponds to the JSON property `bucket`
1960
+ # @return [String]
1961
+ attr_accessor :bucket
1962
+
1963
+ # The creation time of the managed folder in RFC 3339 format.
1964
+ # Corresponds to the JSON property `createTime`
1965
+ # @return [DateTime]
1966
+ attr_accessor :create_time
1967
+
1968
+ # The ID of the managed folder, including the bucket name and managed folder
1969
+ # name.
1970
+ # Corresponds to the JSON property `id`
1971
+ # @return [String]
1972
+ attr_accessor :id
1973
+
1974
+ # The kind of item this is. For managed folders, this is always storage#
1975
+ # managedFolder.
1976
+ # Corresponds to the JSON property `kind`
1977
+ # @return [String]
1978
+ attr_accessor :kind
1979
+
1980
+ # The version of the metadata for this managed folder. Used for preconditions
1981
+ # and for detecting changes in metadata.
1982
+ # Corresponds to the JSON property `metageneration`
1983
+ # @return [Fixnum]
1984
+ attr_accessor :metageneration
1985
+
1986
+ # The name of the managed folder. Required if not specified by URL parameter.
1987
+ # Corresponds to the JSON property `name`
1988
+ # @return [String]
1989
+ attr_accessor :name
1990
+
1991
+ # The link to this managed folder.
1992
+ # Corresponds to the JSON property `selfLink`
1993
+ # @return [String]
1994
+ attr_accessor :self_link
1995
+
1996
+ # The last update time of the managed folder metadata in RFC 3339 format.
1997
+ # Corresponds to the JSON property `updateTime`
1998
+ # @return [DateTime]
1999
+ attr_accessor :update_time
2000
+
2001
+ def initialize(**args)
2002
+ update!(**args)
2003
+ end
2004
+
2005
+ # Update properties of this object
2006
+ def update!(**args)
2007
+ @bucket = args[:bucket] if args.key?(:bucket)
2008
+ @create_time = args[:create_time] if args.key?(:create_time)
2009
+ @id = args[:id] if args.key?(:id)
2010
+ @kind = args[:kind] if args.key?(:kind)
2011
+ @metageneration = args[:metageneration] if args.key?(:metageneration)
2012
+ @name = args[:name] if args.key?(:name)
2013
+ @self_link = args[:self_link] if args.key?(:self_link)
2014
+ @update_time = args[:update_time] if args.key?(:update_time)
2015
+ end
2016
+ end
2017
+
2018
+ # A list of managed folders.
2019
+ class ManagedFolders
2020
+ include Google::Apis::Core::Hashable
2021
+
2022
+ # The list of items.
2023
+ # Corresponds to the JSON property `items`
2024
+ # @return [Array<Google::Apis::StorageV1::ManagedFolder>]
2025
+ attr_accessor :items
2026
+
2027
+ # The kind of item this is. For lists of managed folders, this is always storage#
2028
+ # managedFolders.
2029
+ # Corresponds to the JSON property `kind`
2030
+ # @return [String]
2031
+ attr_accessor :kind
2032
+
2033
+ # The continuation token, used to page through large result sets. Provide this
2034
+ # value in a subsequent request to return the next page of results.
2035
+ # Corresponds to the JSON property `nextPageToken`
2036
+ # @return [String]
2037
+ attr_accessor :next_page_token
2038
+
2039
+ def initialize(**args)
2040
+ update!(**args)
2041
+ end
2042
+
2043
+ # Update properties of this object
2044
+ def update!(**args)
2045
+ @items = args[:items] if args.key?(:items)
2046
+ @kind = args[:kind] if args.key?(:kind)
2047
+ @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
2048
+ end
2049
+ end
2050
+
1325
2051
  # A subscription to receive Google PubSub notifications.
1326
2052
  class Notification
1327
2053
  include Google::Apis::Core::Hashable
@@ -1511,6 +2237,13 @@ module Google
1511
2237
  # @return [Fixnum]
1512
2238
  attr_accessor :generation
1513
2239
 
2240
+ # This is the time (in the future) when the soft-deleted object will no longer
2241
+ # be restorable. It is equal to the soft delete time plus the current soft
2242
+ # delete retention duration of the bucket.
2243
+ # Corresponds to the JSON property `hardDeleteTime`
2244
+ # @return [DateTime]
2245
+ attr_accessor :hard_delete_time
2246
+
1514
2247
  # The ID of the object, including the bucket name, object name, and generation
1515
2248
  # number.
1516
2249
  # Corresponds to the JSON property `id`
@@ -1562,6 +2295,11 @@ module Google
1562
2295
  # @return [Google::Apis::StorageV1::Object::Owner]
1563
2296
  attr_accessor :owner
1564
2297
 
2298
+ # A collection of object level retention parameters.
2299
+ # Corresponds to the JSON property `retention`
2300
+ # @return [Google::Apis::StorageV1::Object::Retention]
2301
+ attr_accessor :retention
2302
+
1565
2303
  # A server-determined value that specifies the earliest time that the object's
1566
2304
  # retention period expires. This value is in RFC 3339 format. Note 1: This field
1567
2305
  # is not provided for objects with an active event-based hold, since retention
@@ -1582,6 +2320,11 @@ module Google
1582
2320
  # @return [Fixnum]
1583
2321
  attr_accessor :size
1584
2322
 
2323
+ # The time at which the object became soft-deleted in RFC 3339 format.
2324
+ # Corresponds to the JSON property `softDeleteTime`
2325
+ # @return [DateTime]
2326
+ attr_accessor :soft_delete_time
2327
+
1585
2328
  # Storage class of the object.
1586
2329
  # Corresponds to the JSON property `storageClass`
1587
2330
  # @return [String]
@@ -1602,8 +2345,8 @@ module Google
1602
2345
  # @return [DateTime]
1603
2346
  attr_accessor :time_created
1604
2347
 
1605
- # The deletion time of the object in RFC 3339 format. Will be returned if and
1606
- # only if this version of the object has been deleted.
2348
+ # The time at which the object became noncurrent in RFC 3339 format. Will be
2349
+ # returned if and only if this version of the object has been deleted.
1607
2350
  # Corresponds to the JSON property `timeDeleted`
1608
2351
  # @return [DateTime]
1609
2352
  attr_accessor :time_deleted
@@ -1643,6 +2386,7 @@ module Google
1643
2386
  @etag = args[:etag] if args.key?(:etag)
1644
2387
  @event_based_hold = args[:event_based_hold] if args.key?(:event_based_hold)
1645
2388
  @generation = args[:generation] if args.key?(:generation)
2389
+ @hard_delete_time = args[:hard_delete_time] if args.key?(:hard_delete_time)
1646
2390
  @id = args[:id] if args.key?(:id)
1647
2391
  @kind = args[:kind] if args.key?(:kind)
1648
2392
  @kms_key_name = args[:kms_key_name] if args.key?(:kms_key_name)
@@ -1652,9 +2396,11 @@ module Google
1652
2396
  @metageneration = args[:metageneration] if args.key?(:metageneration)
1653
2397
  @name = args[:name] if args.key?(:name)
1654
2398
  @owner = args[:owner] if args.key?(:owner)
2399
+ @retention = args[:retention] if args.key?(:retention)
1655
2400
  @retention_expiration_time = args[:retention_expiration_time] if args.key?(:retention_expiration_time)
1656
2401
  @self_link = args[:self_link] if args.key?(:self_link)
1657
2402
  @size = args[:size] if args.key?(:size)
2403
+ @soft_delete_time = args[:soft_delete_time] if args.key?(:soft_delete_time)
1658
2404
  @storage_class = args[:storage_class] if args.key?(:storage_class)
1659
2405
  @temporary_hold = args[:temporary_hold] if args.key?(:temporary_hold)
1660
2406
  @time_created = args[:time_created] if args.key?(:time_created)
@@ -1713,6 +2459,31 @@ module Google
1713
2459
  @entity_id = args[:entity_id] if args.key?(:entity_id)
1714
2460
  end
1715
2461
  end
2462
+
2463
+ # A collection of object level retention parameters.
2464
+ class Retention
2465
+ include Google::Apis::Core::Hashable
2466
+
2467
+ # The bucket's object retention mode, can only be Unlocked or Locked.
2468
+ # Corresponds to the JSON property `mode`
2469
+ # @return [String]
2470
+ attr_accessor :mode
2471
+
2472
+ # A time in RFC 3339 format until which object retention protects this object.
2473
+ # Corresponds to the JSON property `retainUntilTime`
2474
+ # @return [DateTime]
2475
+ attr_accessor :retain_until_time
2476
+
2477
+ def initialize(**args)
2478
+ update!(**args)
2479
+ end
2480
+
2481
+ # Update properties of this object
2482
+ def update!(**args)
2483
+ @mode = args[:mode] if args.key?(:mode)
2484
+ @retain_until_time = args[:retain_until_time] if args.key?(:retain_until_time)
2485
+ end
2486
+ end
1716
2487
  end
1717
2488
 
1718
2489
  # An access-control entry.
@@ -1909,7 +2680,7 @@ module Google
1909
2680
  end
1910
2681
  end
1911
2682
 
1912
- # A bucket/object IAM policy.
2683
+ # A bucket/object/managedFolder IAM policy.
1913
2684
  class Policy
1914
2685
  include Google::Apis::Core::Hashable
1915
2686
 
@@ -1932,11 +2703,11 @@ module Google
1932
2703
  attr_accessor :kind
1933
2704
 
1934
2705
  # The ID of the resource to which this policy belongs. Will be of the form
1935
- # projects/_/buckets/bucket for buckets, and projects/_/buckets/bucket/objects/
1936
- # object for objects. A specific generation may be specified by appending #
1937
- # generationNumber to the end of the object name, e.g. projects/_/buckets/my-
1938
- # bucket/objects/data.txt#17. The current generation can be denoted with #0.
1939
- # This field is ignored on input.
2706
+ # projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/
2707
+ # object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder.
2708
+ # A specific generation may be specified by appending #generationNumber to the
2709
+ # end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17.
2710
+ # The current generation can be denoted with #0. This field is ignored on input.
1940
2711
  # Corresponds to the JSON property `resourceId`
1941
2712
  # @return [String]
1942
2713
  attr_accessor :resource_id
@@ -2115,7 +2886,7 @@ module Google
2115
2886
  end
2116
2887
  end
2117
2888
 
2118
- # A storage.(buckets|objects).testIamPermissions response.
2889
+ # A storage.(buckets|objects|managedFolders).testIamPermissions response.
2119
2890
  class TestIamPermissionsResponse
2120
2891
  include Google::Apis::Core::Hashable
2121
2892
 
@@ -2125,8 +2896,8 @@ module Google
2125
2896
  attr_accessor :kind
2126
2897
 
2127
2898
  # The permissions held by the caller. Permissions are always of the format
2128
- # storage.resource.capability, where resource is one of buckets or objects. The
2129
- # supported permissions are as follows:
2899
+ # storage.resource.capability, where resource is one of buckets, objects, or
2900
+ # managedFolders. The supported permissions are as follows:
2130
2901
  # - storage.buckets.delete — Delete bucket.
2131
2902
  # - storage.buckets.get — Read bucket metadata.
2132
2903
  # - storage.buckets.getIamPolicy — Read bucket IAM policy.
@@ -2141,6 +2912,12 @@ module Google
2141
2912
  # - storage.objects.list — List objects.
2142
2913
  # - storage.objects.setIamPolicy — Update object IAM policy.
2143
2914
  # - storage.objects.update — Update object metadata.
2915
+ # - storage.managedFolders.delete — Delete managed folder.
2916
+ # - storage.managedFolders.get — Read managed folder metadata.
2917
+ # - storage.managedFolders.getIamPolicy — Read managed folder IAM policy.
2918
+ # - storage.managedFolders.create — Create managed folder.
2919
+ # - storage.managedFolders.list — List managed folders.
2920
+ # - storage.managedFolders.setIamPolicy — Update managed folder IAM policy.
2144
2921
  # Corresponds to the JSON property `permissions`
2145
2922
  # @return [Array<String>]
2146
2923
  attr_accessor :permissions