google-cloud-storage 1.43.0 → 1.44.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5dbc607cd09b7198bb96445d9ed85ef7b883a88660f4d320602837bbc543fc0
4
- data.tar.gz: 33ee9b85da98c870e73b0bfc6126087c59925693997c14b7c61e59ad652f551e
3
+ metadata.gz: 7829a0c2c9afddc17d897bd33e73af95e922a4767bfd6d6e8474eec0bac46194
4
+ data.tar.gz: 41f4328eb840bb9f2373cd291e2271e95d6f066db1a0dd62dbb7354e9e9c8c0e
5
5
  SHA512:
6
- metadata.gz: 7d70f656ac06a5c65b75a99883aa4298222dbf4cf2b9a9fbfa252d2c7800486bf1e7bf77b50ea0d64431dc50008f680b0525c0fb619f7244508fad07862941a8
7
- data.tar.gz: c4af126c15814b8a02e17282cb940067b2cd10e6cf5081b4c525a91e8993b7b717ab877d26c545ea5b7d66e0213e4edb7e65df8826369f21fa400017a6298f02
6
+ metadata.gz: ec55a9d4632ee6f5d3637e6b4dc5d156ba45fc01da7b20d7f2e69a1fa4945d55d300385ee6aafba2244edcdf8fe0f36be1340adb28c074920cfad4eca667af21
7
+ data.tar.gz: 2194c91da01d5719d35756e3a9e1aceb49bfd9e15fb0466ddd8a7c4fae64074e06be41ea14437d0ed8698c777ab7c81f5ea6d90d5932336603c7dd99c5907558
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.44.0 (2022-11-02)
4
+
5
+ #### Features
6
+
7
+ * support autoclass
8
+
3
9
  ### 1.43.0 (2022-09-30)
4
10
 
5
11
  #### Features
@@ -109,6 +109,15 @@ module Google
109
109
  @gapi.id
110
110
  end
111
111
 
112
+ ##
113
+ # The autoclass configuration of the bucket
114
+ #
115
+ # @return [Google::Apis::StorageV1::Bucket::Autoclass]
116
+ #
117
+ def autoclass
118
+ @gapi.autoclass
119
+ end
120
+
112
121
  ##
113
122
  # The name of the bucket.
114
123
  #
@@ -407,6 +416,43 @@ module Google
407
416
  patch_gapi! :storage_class
408
417
  end
409
418
 
419
+ ##
420
+ # Whether Autoclass is enabled for the bucket.
421
+ #
422
+ # @return [Boolean]
423
+ #
424
+ def autoclass_enabled
425
+ @gapi.autoclass&.enabled?
426
+ end
427
+
428
+ ##
429
+ # Toggle time of the autoclass
430
+ #
431
+ # @return [DateTime]
432
+ #
433
+ def autoclass_toggle_time
434
+ @gapi.autoclass&.toggle_time
435
+ end
436
+
437
+ ##
438
+ # Updates bucket's autoclass configuration. This defines the default class for objects in the
439
+ # bucket and down/up-grades the storage class of objects based on the access patterns.
440
+ # Accepted values are `:false`, and `:true`.
441
+ #
442
+ # For more information, see [Storage
443
+ # Classes](https://cloud.google.com/storage/docs/using-autoclass).
444
+ #
445
+ # Note: Only patch requests that disable autoclass are currently supported.
446
+ # To enable autoclass, you must set it at bucket creation time.
447
+ #
448
+ # @param [Boolean] toggle for autoclass configuration of the bucket.
449
+ #
450
+ def autoclass_enabled= toggle
451
+ @gapi.autoclass ||= API::Bucket::Autoclass.new
452
+ @gapi.autoclass.enabled = toggle
453
+ patch_gapi! :autoclass
454
+ end
455
+
410
456
  ##
411
457
  # Whether [Object
412
458
  # Versioning](https://cloud.google.com/storage/docs/object-versioning)
@@ -327,6 +327,11 @@ module Google
327
327
  # other than the current project, and that project is authorized for
328
328
  # the currently authenticated service account, transit costs will be
329
329
  # billed to the given project. The default is `nil`.
330
+ # @param [Boolean] autoclass_enabled The bucket's autoclass configuration.
331
+ # Buckets can have either StorageClass OLM rules or Autoclass, but
332
+ # not both. When Autoclass is enabled on a bucket, adding StorageClass
333
+ # OLM rules will result in failure. For more information, see
334
+ # [Autoclass](https://cloud.google.com/storage/docs/autoclass).
330
335
  #
331
336
  # The value provided will be applied to all operations on the returned
332
337
  # bucket instance and its files.
@@ -375,7 +380,8 @@ module Google
375
380
  website_404: nil,
376
381
  versioning: nil,
377
382
  requester_pays: nil,
378
- user_project: nil
383
+ user_project: nil,
384
+ autoclass_enabled: false
379
385
  params = {
380
386
  name: bucket_name,
381
387
  location: location,
@@ -386,6 +392,7 @@ module Google
386
392
  updater = Bucket::Updater.new(new_bucket).tap do |b|
387
393
  b.logging_bucket = logging_bucket unless logging_bucket.nil?
388
394
  b.logging_prefix = logging_prefix unless logging_prefix.nil?
395
+ b.autoclass_enabled = autoclass_enabled
389
396
  b.storage_class = storage_class unless storage_class.nil?
390
397
  b.website_main = website_main unless website_main.nil?
391
398
  b.website_404 = website_404 unless website_404.nil?
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Storage
19
- VERSION = "1.43.0".freeze
19
+ VERSION = "1.44.0".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.43.0
4
+ version: 1.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-09-30 00:00:00.000000000 Z
12
+ date: 2022-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -255,6 +255,20 @@ dependencies:
255
255
  - - "~>"
256
256
  - !ruby/object:Gem::Version
257
257
  version: 0.1.13
258
+ - !ruby/object:Gem::Dependency
259
+ name: retriable
260
+ requirement: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: 3.1.2
265
+ type: :development
266
+ prerelease: false
267
+ version_requirements: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: 3.1.2
258
272
  description: google-cloud-storage is the official library for Google Cloud Storage.
259
273
  email:
260
274
  - mike@blowmage.com