google-cloud-compute 1.10.0 → 1.11.1

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: 2ccdeed4c48cad03fbf16f24fa98f9bad3d51e8651482480f607613f20e3c914
4
+ data.tar.gz: 219108a9046d8bff83455ad647129846d9a5e14959feba65ec934ed5654f91a5
5
5
  SHA512:
6
- metadata.gz: b6d5b397ceb4bdd095d42c0f1e4b71ed9eba3e7a96f5b9d93d2ef8a01b57176fa7f272d2adf375997f37b839bd1d07d09a057ca5cb3846b237bddd0006cbcd20
7
- data.tar.gz: ef811608171be654e4602d4fc39d4c9302d1b377e2e60f847954c7e7efd5d3272b6b34d1305e4a7adf835f9fa522596f6bbdb3360f11dbccdfd3abc7d4c01a08
6
+ metadata.gz: f189ea882eac5d44e9bf2f41b8176ac2712e1070b82819ba730768a1b4f2dbdf233b33c37c4de4c250d7ac76aca61c9c5d75a3355cf0a1f3090f746ffc999a48
7
+ data.tar.gz: 942b941f71f1ad7c252185a2dd1bf77a9a232400df555c047102d6afa993fe152bac4c36b5e90ba4f03d8c69b9f5f116f70749037998beb506cd91840f5990e3
data/README.md CHANGED
@@ -7,7 +7,7 @@ google-cloud-compute is the official client library for the Google Cloud Compute
7
7
  Actual client classes for the various versions of this API are defined in
8
8
  _versioned_ client gems, with names of the form `google-cloud-compute-v*`.
9
9
  The gem `google-cloud-compute` is the main client library that brings the
10
- verisoned gems in as dependencies, and provides high-level methods for
10
+ versioned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
@@ -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.1"
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.1
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: 1980-01-02 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.8
73
73
  specification_version: 4
74
74
  summary: API Client library for the Google Cloud Compute API
75
75
  test_files: []