google-cloud-storage 1.42.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: 24a6e0506ffc44db974accb0e91b5d9efd1f9898a07b15bb286d8d9428c83ec1
4
- data.tar.gz: f51a2efcd382bb9bc5b2c04503456eca85cdf400897995a32a3612e56839e6e9
3
+ metadata.gz: 7829a0c2c9afddc17d897bd33e73af95e922a4767bfd6d6e8474eec0bac46194
4
+ data.tar.gz: 41f4328eb840bb9f2373cd291e2271e95d6f066db1a0dd62dbb7354e9e9c8c0e
5
5
  SHA512:
6
- metadata.gz: 4ccaa608e3aa4e9ffc214885ce11a798d622d216a18a686f80972e6f6b469b6763535871228b6eb75af7c1e1a0b918c2343f15c114f9422925da8c7ae13b5c5e
7
- data.tar.gz: 2c7b4e5b998be2a49f10077024590d6898384da1dcc44a4e5995cf0a55419be421671fe6e78c669844c79ea1193566dbe303a34f208dd3d29ee0fba900f8b036
6
+ metadata.gz: ec55a9d4632ee6f5d3637e6b4dc5d156ba45fc01da7b20d7f2e69a1fa4945d55d300385ee6aafba2244edcdf8fe0f36be1340adb28c074920cfad4eca667af21
7
+ data.tar.gz: 2194c91da01d5719d35756e3a9e1aceb49bfd9e15fb0466ddd8a7c4fae64074e06be41ea14437d0ed8698c777ab7c81f5ea6d90d5932336603c7dd99c5907558
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History
2
2
 
3
+ ### 1.44.0 (2022-11-02)
4
+
5
+ #### Features
6
+
7
+ * support autoclass
8
+
9
+ ### 1.43.0 (2022-09-30)
10
+
11
+ #### Features
12
+
13
+ * Add retry conformance test ([#18230](https://github.com/googleapis/google-cloud-ruby/issues/18230))
14
+
3
15
  ### 1.42.0 (2022-09-21)
4
16
 
5
17
  #### 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.42.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.42.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-21 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
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 0.17.0
48
+ version: 0.19.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 0.17.0
55
+ version: 0.19.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: googleauth
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -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