google-cloud-storage 1.39.0 → 1.40.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: a376f2dab9dec5118be28f8fa76c2684e0606aee749fa8387eb6672ba5fb8023
4
- data.tar.gz: 1dc9bcc3f0c2cee2ee822211ea8a67f740fdd30f827715da6a8e50b98a64b21b
3
+ metadata.gz: 7eae657ab195e86fc8c483f9920ffc030e19b3754d118b13d49053f7f3fdc544
4
+ data.tar.gz: 259b1d1c5138ad671e06a88cb461ed18e03bc6872dfe3d66f90bc3a01eb6907a
5
5
  SHA512:
6
- metadata.gz: 26b8b0c1544f7e0b1d20b82e539ddaf9431caeb359b177f637f3642eccb58b089b4a9e6202b3c9f051d6c75b01b31cba4b53870b9bf3e190934c0b2d3767e302
7
- data.tar.gz: 7d1b0bcfc59f1ad50831489bf2c6f1740ddae969869e221eb809be0b9107f66170f14cb9ed16d50b6d73d76621e59c6b2f5bbb8018725b2d50643fa665645177
6
+ metadata.gz: bac1d42f4566defbfb79814ec6d1d6aa440b4facf26cd860b1b956bb34d832b0109cf0ef1ffe706fba78f447be8eda3c3b29c9ad3e55b30204354538c2675b99
7
+ data.tar.gz: 8c90e04918e20961dd33f1e734c65f3d942f3600484cb9ccc697016b3843cc138cb9cd0cb8db0c760f0fcfde655759ce15dad9748115a603cde8a7201e9064c6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 1.40.0 (2022-09-13)
4
+
5
+ #### Features
6
+
7
+ * Update all patch bucket helper methods to accept preconditions ([#19117](https://github.com/googleapis/google-cloud-ruby/issues/19117))
8
+
3
9
  ### 1.39.0 (2022-08-24)
4
10
 
5
11
  #### Features
@@ -349,8 +349,8 @@ module Google
349
349
  #
350
350
  # bucket.acl.auth!
351
351
  #
352
- def auth!
353
- update_predefined_acl! "authenticatedRead"
352
+ def auth! if_metageneration_match: nil
353
+ update_predefined_acl! "authenticatedRead", if_metageneration_match: if_metageneration_match
354
354
  end
355
355
  alias authenticatedRead! auth!
356
356
  alias auth_read! auth!
@@ -370,8 +370,8 @@ module Google
370
370
  #
371
371
  # bucket.acl.private!
372
372
  #
373
- def private!
374
- update_predefined_acl! "private"
373
+ def private! if_metageneration_match: nil
374
+ update_predefined_acl! "private", if_metageneration_match: if_metageneration_match
375
375
  end
376
376
 
377
377
  ##
@@ -387,8 +387,8 @@ module Google
387
387
  #
388
388
  # bucket.acl.project_private!
389
389
  #
390
- def project_private!
391
- update_predefined_acl! "projectPrivate"
390
+ def project_private! if_metageneration_match: nil
391
+ update_predefined_acl! "projectPrivate", if_metageneration_match: if_metageneration_match
392
392
  end
393
393
  alias projectPrivate! project_private!
394
394
 
@@ -405,8 +405,8 @@ module Google
405
405
  #
406
406
  # bucket.acl.public!
407
407
  #
408
- def public!
409
- update_predefined_acl! "publicRead"
408
+ def public! if_metageneration_match: nil
409
+ update_predefined_acl! "publicRead", if_metageneration_match: if_metageneration_match
410
410
  end
411
411
  alias publicRead! public!
412
412
  alias public_read! public!
@@ -423,8 +423,8 @@ module Google
423
423
  #
424
424
  # bucket.acl.public_write!
425
425
  #
426
- def public_write!
427
- update_predefined_acl! "publicReadWrite"
426
+ def public_write! if_metageneration_match: nil
427
+ update_predefined_acl! "publicReadWrite", if_metageneration_match: if_metageneration_match
428
428
  end
429
429
  alias publicReadWrite! public_write!
430
430
 
@@ -437,9 +437,10 @@ module Google
437
437
  self
438
438
  end
439
439
 
440
- def update_predefined_acl! acl_role
440
+ def update_predefined_acl! acl_role, if_metageneration_match: nil
441
441
  @service.patch_bucket @bucket, predefined_acl: acl_role,
442
- user_project: user_project
442
+ user_project: user_project,
443
+ if_metageneration_match: if_metageneration_match
443
444
  clear!
444
445
  end
445
446
 
@@ -714,8 +715,8 @@ module Google
714
715
  #
715
716
  # bucket.default_acl.auth!
716
717
  #
717
- def auth!
718
- update_predefined_default_acl! "authenticatedRead"
718
+ def auth! if_metageneration_match: nil
719
+ update_predefined_default_acl! "authenticatedRead", if_metageneration_match: if_metageneration_match
719
720
  end
720
721
  alias authenticatedRead! auth!
721
722
  alias auth_read! auth!
@@ -735,8 +736,8 @@ module Google
735
736
  #
736
737
  # bucket.default_acl.owner_full!
737
738
  #
738
- def owner_full!
739
- update_predefined_default_acl! "bucketOwnerFullControl"
739
+ def owner_full! if_metageneration_match: nil
740
+ update_predefined_default_acl! "bucketOwnerFullControl", if_metageneration_match: if_metageneration_match
740
741
  end
741
742
  alias bucketOwnerFullControl! owner_full!
742
743
 
@@ -753,8 +754,8 @@ module Google
753
754
  #
754
755
  # bucket.default_acl.owner_read!
755
756
  #
756
- def owner_read!
757
- update_predefined_default_acl! "bucketOwnerRead"
757
+ def owner_read! if_metageneration_match: nil
758
+ update_predefined_default_acl! "bucketOwnerRead", if_metageneration_match: if_metageneration_match
758
759
  end
759
760
  alias bucketOwnerRead! owner_read!
760
761
 
@@ -771,8 +772,8 @@ module Google
771
772
  #
772
773
  # bucket.default_acl.private!
773
774
  #
774
- def private!
775
- update_predefined_default_acl! "private"
775
+ def private! if_metageneration_match: nil
776
+ update_predefined_default_acl! "private", if_metageneration_match: if_metageneration_match
776
777
  end
777
778
 
778
779
  ##
@@ -788,8 +789,8 @@ module Google
788
789
  #
789
790
  # bucket.default_acl.project_private!
790
791
  #
791
- def project_private!
792
- update_predefined_default_acl! "projectPrivate"
792
+ def project_private! if_metageneration_match: nil
793
+ update_predefined_default_acl! "projectPrivate", if_metageneration_match: if_metageneration_match
793
794
  end
794
795
  alias projectPrivate! project_private!
795
796
 
@@ -806,8 +807,8 @@ module Google
806
807
  #
807
808
  # bucket.default_acl.public!
808
809
  #
809
- def public!
810
- update_predefined_default_acl! "publicRead"
810
+ def public! if_metageneration_match: nil
811
+ update_predefined_default_acl! "publicRead", if_metageneration_match: if_metageneration_match
811
812
  end
812
813
  alias publicRead! public!
813
814
  alias public_read! public!
@@ -820,9 +821,10 @@ module Google
820
821
  self
821
822
  end
822
823
 
823
- def update_predefined_default_acl! acl_role
824
+ def update_predefined_default_acl! acl_role, if_metageneration_match: nil
824
825
  @service.patch_bucket @bucket, predefined_default_acl: acl_role,
825
- user_project: user_project
826
+ user_project: user_project,
827
+ if_metageneration_match: if_metageneration_match
826
828
  clear!
827
829
  end
828
830
 
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Storage
19
- VERSION = "1.39.0".freeze
19
+ VERSION = "1.40.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.39.0
4
+ version: 1.40.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-08-24 00:00:00.000000000 Z
12
+ date: 2022-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core