Method: Google::Cloud::VisionAI::V1::AppPlatform::Rest::Client.configure

Defined in:
lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb

.configure {|config| ... } ⇒ Client::Configuration

Configure the AppPlatform Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all AppPlatform clients
::Google::Cloud::VisionAI::V1::AppPlatform::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/google/cloud/vision_ai/v1/app_platform/rest/client.rb', line 66

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "VisionAI", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config
  end
  yield @configure if block_given?
  @configure
end