google-cloud-compute 1.10.0 → 1.11.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62168d2ce83dcc304605271f5373c3b90c2e254b878aa150c51daed26475f8e4
4
- data.tar.gz: 7976294ce3ad16b7ed1e2a194ce7cdf27dbfa61cea37cc8434ef25eceddbd9b0
3
+ metadata.gz: 8ab79b20f2c3789e2335f26762a93da37d6334e73e4437c3c5779e8edaea10b1
4
+ data.tar.gz: 5e4fa2f02143dd5fb234fa0b460bd74ab74741b5b7179485520dd9fc16d2032c
5
5
  SHA512:
6
- metadata.gz: b6d5b397ceb4bdd095d42c0f1e4b71ed9eba3e7a96f5b9d93d2ef8a01b57176fa7f272d2adf375997f37b839bd1d07d09a057ca5cb3846b237bddd0006cbcd20
7
- data.tar.gz: ef811608171be654e4602d4fc39d4c9302d1b377e2e60f847954c7e7efd5d3272b6b34d1305e4a7adf835f9fa522596f6bbdb3360f11dbccdfd3abc7d4c01a08
6
+ metadata.gz: 4eb1e27665c6cc756959eb60d96fbe08be5e26525b9a450b27a72d877bf99c0ea3463423fcd0b78c7e42a718dba5286500c7dd6d6ab037f39d903dc249349ba5
7
+ data.tar.gz: 823b0d2b14e0e073729454d816cc9fc4ce6af5735ed646c47d01b829279283e43a624ae97db72c05d5f0b859aa17d4de84c4cdcf949d5d6b58f2162e1bc932e8
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Compute
23
- VERSION = "1.10.0"
23
+ VERSION = "1.11.0"
24
24
  end
25
25
  end
26
26
  end
@@ -4645,6 +4645,69 @@ module Google
4645
4645
  false
4646
4646
  end
4647
4647
 
4648
+ ##
4649
+ # Create a new client object for ReservationBlocks.
4650
+ #
4651
+ # By default, this returns an instance of
4652
+ # [Google::Cloud::Compute::V1::ReservationBlocks::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-ReservationBlocks-Rest-Client)
4653
+ # for a REST client for version V1 of the API.
4654
+ # However, you can specify a different API version by passing it in the
4655
+ # `version` parameter. If the ReservationBlocks service is
4656
+ # supported by that API version, and the corresponding gem is available, the
4657
+ # appropriate versioned client will be returned.
4658
+ #
4659
+ # Raises an exception if the currently installed versioned client gem for the
4660
+ # given API version does not support the ReservationBlocks service.
4661
+ # You can determine whether the method will succeed by calling
4662
+ # {Google::Cloud::Compute.reservation_blocks_available?}.
4663
+ #
4664
+ # ## About ReservationBlocks
4665
+ #
4666
+ # The ReservationBlocks API.
4667
+ #
4668
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
4669
+ # Defaults to `:v1`.
4670
+ # @return [::Object] A client object for the specified version.
4671
+ #
4672
+ def self.reservation_blocks version: :v1, &block
4673
+ require "google/cloud/compute/#{version.to_s.downcase}"
4674
+
4675
+ package_name = Google::Cloud::Compute
4676
+ .constants
4677
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
4678
+ .first
4679
+ service_module = Google::Cloud::Compute.const_get(package_name).const_get(:ReservationBlocks)
4680
+ service_module.const_get(:Rest).const_get(:Client).new(&block)
4681
+ end
4682
+
4683
+ ##
4684
+ # Determines whether the ReservationBlocks service is supported by the current client.
4685
+ # If true, you can retrieve a client object by calling {Google::Cloud::Compute.reservation_blocks}.
4686
+ # If false, that method will raise an exception. This could happen if the given
4687
+ # API version does not exist or does not support the ReservationBlocks service,
4688
+ # or if the versioned client gem needs an update to support the ReservationBlocks service.
4689
+ #
4690
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
4691
+ # Defaults to `:v1`.
4692
+ # @return [boolean] Whether the service is available.
4693
+ #
4694
+ def self.reservation_blocks_available? version: :v1
4695
+ require "google/cloud/compute/#{version.to_s.downcase}"
4696
+ package_name = Google::Cloud::Compute
4697
+ .constants
4698
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
4699
+ .first
4700
+ return false unless package_name
4701
+ service_module = Google::Cloud::Compute.const_get package_name
4702
+ return false unless service_module.const_defined? :ReservationBlocks
4703
+ service_module = service_module.const_get :ReservationBlocks
4704
+ return false unless service_module.const_defined? :Rest
4705
+ service_module = service_module.const_get :Rest
4706
+ service_module.const_defined? :Client
4707
+ rescue ::LoadError
4708
+ false
4709
+ end
4710
+
4648
4711
  ##
4649
4712
  # Create a new client object for Reservations.
4650
4713
  #
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-compute
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-04-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-compute-v1
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.6.2
72
+ rubygems_version: 3.6.5
73
73
  specification_version: 4
74
74
  summary: API Client library for the Google Cloud Compute API
75
75
  test_files: []