class Google::Cloud::Compute::V1::GlobalOrganizationOperations::Rest::Client::Configuration

Configuration class for the GlobalOrganizationOperations REST API.

This class represents the configuration for GlobalOrganizationOperations REST, providing control over credentials, timeouts, retry behavior, logging.

Configuration can be applied globally to all clients, or to a single client on construction.

# Examples

To modify the global config, setting the timeout for all calls to 10 seconds:

::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Client.configure do |config|
  config.timeout = 10.0
end

To apply the above configuration only to a new client:

client = ::Google::Cloud::Compute::V1::GlobalOrganizationOperations::Client.new do |config|
  config.timeout = 10.0
end

@!attribute [rw] endpoint

The hostname or hostname:port of the service endpoint.
Defaults to `"compute.googleapis.com"`.
@return [::String]

@!attribute [rw] credentials

Credentials to send with calls. You may provide any of the following types:
 *  (`String`) The path to a service account key file in JSON format
 *  (`Hash`) A service account key as a Hash
 *  (`Google::Auth::Credentials`) A googleauth credentials object
    (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
 *  (`Signet::OAuth2::Client`) A signet oauth2 client object
    (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
 *  (`nil`) indicating no credentials
@return [::Object]

@!attribute [rw] scope

The OAuth scopes
@return [::Array<::String>]

@!attribute [rw] lib_name

The library name as recorded in instrumentation and logging
@return [::String]

@!attribute [rw] lib_version

The library version as recorded in instrumentation and logging
@return [::String]

@!attribute [rw] timeout

The call timeout in seconds.
@return [::Numeric]

@!attribute [rw] metadata

Additional REST headers to be sent with the call.
@return [::Hash{::Symbol=>::String}]

Public Class Methods

new(parent_config = nil) { |self| ... } click to toggle source

@private

# File lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb, line 415
def initialize parent_config = nil
  @parent_config = parent_config unless parent_config.nil?

  yield self if block_given?
end

Public Instance Methods

rpcs() click to toggle source

Configurations for individual RPCs @return [Rpcs]

# File lib/google/cloud/compute/v1/global_organization_operations/rest/client.rb, line 425
def rpcs
  @rpcs ||= begin
    parent_rpcs = nil
    parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
    Rpcs.new parent_rpcs
  end
end