Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Apr 30, 2024
1 parent 6998726 commit 18f5f38
Show file tree
Hide file tree
Showing 20 changed files with 156 additions and 4,793 deletions.
120 changes: 120 additions & 0 deletions google-cloud-compute/lib/google/cloud/compute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,36 @@ def self.images version: :v1, &block
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for InstanceGroupManagerResizeRequests.
#
# By default, this returns an instance of
# [Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-InstanceGroupManagerResizeRequests-Rest-Client)
# for a REST client for version V1 of the API.
# However, you can specify a different API version by passing it in the
# `version` parameter. If the InstanceGroupManagerResizeRequests service is
# supported by that API version, and the corresponding gem is available, the
# appropriate versioned client will be returned.
#
# ## About InstanceGroupManagerResizeRequests
#
# The InstanceGroupManagerResizeRequests API.
#
# @param version [::String, ::Symbol] The API version to connect to. Optional.
# Defaults to `:v1`.
# @return [::Object] A client object for the specified version.
#
def self.instance_group_manager_resize_requests version: :v1, &block
require "google/cloud/compute/#{version.to_s.downcase}"

package_name = Google::Cloud::Compute
.constants
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
.first
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:InstanceGroupManagerResizeRequests)
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for InstanceGroupManagers.
#
Expand Down Expand Up @@ -706,6 +736,36 @@ def self.instance_groups version: :v1, &block
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for InstanceSettingsService.
#
# By default, this returns an instance of
# [Google::Cloud::Compute::V1::InstanceSettingsService::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-InstanceSettingsService-Rest-Client)
# for a REST client for version V1 of the API.
# However, you can specify a different API version by passing it in the
# `version` parameter. If the InstanceSettingsService service is
# supported by that API version, and the corresponding gem is available, the
# appropriate versioned client will be returned.
#
# ## About InstanceSettingsService
#
# The InstanceSettings API.
#
# @param version [::String, ::Symbol] The API version to connect to. Optional.
# Defaults to `:v1`.
# @return [::Object] A client object for the specified version.
#
def self.instance_settings_service version: :v1, &block
require "google/cloud/compute/#{version.to_s.downcase}"

package_name = Google::Cloud::Compute
.constants
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
.first
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:InstanceSettingsService)
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for InstanceTemplates.
#
Expand Down Expand Up @@ -2446,6 +2506,66 @@ def self.ssl_policies version: :v1, &block
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for StoragePoolTypes.
#
# By default, this returns an instance of
# [Google::Cloud::Compute::V1::StoragePoolTypes::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-StoragePoolTypes-Rest-Client)
# for a REST client for version V1 of the API.
# However, you can specify a different API version by passing it in the
# `version` parameter. If the StoragePoolTypes service is
# supported by that API version, and the corresponding gem is available, the
# appropriate versioned client will be returned.
#
# ## About StoragePoolTypes
#
# The StoragePoolTypes API.
#
# @param version [::String, ::Symbol] The API version to connect to. Optional.
# Defaults to `:v1`.
# @return [::Object] A client object for the specified version.
#
def self.storage_pool_types version: :v1, &block
require "google/cloud/compute/#{version.to_s.downcase}"

package_name = Google::Cloud::Compute
.constants
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
.first
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:StoragePoolTypes)
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for StoragePools.
#
# By default, this returns an instance of
# [Google::Cloud::Compute::V1::StoragePools::Rest::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-compute-v1/latest/Google-Cloud-Compute-V1-StoragePools-Rest-Client)
# for a REST client for version V1 of the API.
# However, you can specify a different API version by passing it in the
# `version` parameter. If the StoragePools service is
# supported by that API version, and the corresponding gem is available, the
# appropriate versioned client will be returned.
#
# ## About StoragePools
#
# The StoragePools API.
#
# @param version [::String, ::Symbol] The API version to connect to. Optional.
# Defaults to `:v1`.
# @return [::Object] A client object for the specified version.
#
def self.storage_pools version: :v1, &block
require "google/cloud/compute/#{version.to_s.downcase}"

package_name = Google::Cloud::Compute
.constants
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
.first
service_module = Google::Cloud::Compute.const_get(package_name).const_get(:StoragePools)
service_module.const_get(:Rest).const_get(:Client).new(&block)
end

##
# Create a new client object for Subnetworks.
#
Expand Down
36 changes: 36 additions & 0 deletions google-cloud-compute/test/google/cloud/compute/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,15 @@ def test_images_rest
end
end

def test_instance_group_manager_resize_requests_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.instance_group_manager_resize_requests do |config|
config.credentials = :dummy_credentials
end
assert_kind_of Google::Cloud::Compute::V1::InstanceGroupManagerResizeRequests::Rest::Client, client
end
end

def test_instance_group_managers_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.instance_group_managers do |config|
Expand All @@ -230,6 +239,15 @@ def test_instance_groups_rest
end
end

def test_instance_settings_service_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.instance_settings_service do |config|
config.credentials = :dummy_credentials
end
assert_kind_of Google::Cloud::Compute::V1::InstanceSettingsService::Rest::Client, client
end
end

def test_instance_templates_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.instance_templates do |config|
Expand Down Expand Up @@ -752,6 +770,24 @@ def test_ssl_policies_rest
end
end

def test_storage_pool_types_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.storage_pool_types do |config|
config.credentials = :dummy_credentials
end
assert_kind_of Google::Cloud::Compute::V1::StoragePoolTypes::Rest::Client, client
end
end

def test_storage_pools_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.storage_pools do |config|
config.credentials = :dummy_credentials
end
assert_kind_of Google::Cloud::Compute::V1::StoragePools::Rest::Client, client
end
end

def test_subnetworks_rest
Gapic::Rest::ClientStub.stub :new, DummyStub.new do
client = Google::Cloud::Compute.subnetworks do |config|
Expand Down
22 changes: 0 additions & 22 deletions owl-bot-staging/google-cloud-compute/.gitignore

This file was deleted.

18 changes: 0 additions & 18 deletions owl-bot-staging/google-cloud-compute/.repo-metadata.json

This file was deleted.

39 changes: 0 additions & 39 deletions owl-bot-staging/google-cloud-compute/.rubocop.yml

This file was deleted.

28 changes: 0 additions & 28 deletions owl-bot-staging/google-cloud-compute/.toys.rb

This file was deleted.

11 changes: 0 additions & 11 deletions owl-bot-staging/google-cloud-compute/.yardopts

This file was deleted.

0 comments on commit 18f5f38

Please sign in to comment.