# Dialogflow V2 API - Class Google::Cloud::Dialogflow::V2::Tools::Rest::Client::Configuration (v1.16.1)

1.16.1 (latest) 1.16.0 1.15.0 1.14.0 1.13.0 1.12.1 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.0 1.5.0 1.4.1 1.3.0 1.2.0 1.1.1 1.0.0 0.34.0 0.33.0 0.32.2 0.31.0 0.30.0 0.29.0 0.28.0 0.27.0 0.26.2 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.0 0.15.2 0.14.0 0.13.0 0.12.0 Reference documentation and code samples for the Dialogflow V2 API class Google::Cloud::Dialogflow::V2::Tools::Rest::Client::Configuration.

Configuration class for the Tools REST API.


This class represents the configuration for Tools REST,
providing control over timeouts, retry behavior, logging, transport
parameters, and other low-level controls. Certain parameters can also be
applied individually to specific RPCs. See
[Rpcs](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Tools-Rest-Client-Configuration-Rpcs "Google::Cloud::Dialogflow::V2::Tools::Rest::Client::Configuration::Rpcs (class)")
for a list of RPCs that can be configured independently.

<br />

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

## Inherits

- Object

## Extended By

- Gapic::Config

## Example

```ruby
# Modify the global config, setting the timeout for
# create_tool to 20 seconds,
# and all remaining timeouts to 10 seconds.
::Google::Cloud::Dialogflow::V2::Tools::Rest::Client.configure do |config|
  config.timeout = 10.0
  config.rpcs.create_tool.timeout = 20.0
end

# Apply the above configuration only to a new client.
client = ::Google::Cloud::Dialogflow::V2::Tools::Rest::Client.new do |config|
  config.timeout = 10.0
  config.rpcs.create_tool.timeout = 20.0
end
```

## Methods

### #credentials

    def credentials() -> ::Object

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://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
- (`Signet::OAuth2::Client`) A signet oauth2 client object (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
- (`nil`) indicating no credentials

<br />

Warning: If you accept a credential configuration (JSON file or Hash) from an
external source for authentication to Google Cloud, you must validate it before
providing it to a Google API client library. Providing an unvalidated credential
configuration to Google APIs can compromise the security of your systems and data.
For more information, refer to [Validate credential configurations from external
sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
**Returns**

- (::Object)

### #credentials=

    def credentials=(value) -> ::Object

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://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
- (`Signet::OAuth2::Client`) A signet oauth2 client object (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
- (`nil`) indicating no credentials

<br />

Warning: If you accept a credential configuration (JSON file or Hash) from an
external source for authentication to Google Cloud, you must validate it before
providing it to a Google API client library. Providing an unvalidated credential
configuration to Google APIs can compromise the security of your systems and data.
For more information, refer to [Validate credential configurations from external
sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
**Parameter**

- **value** (::Object)
**Returns**

- (::Object)

### #endpoint

    def endpoint() -> ::String, nil

A custom service endpoint, as a hostname or hostname:port. The default is
nil, indicating to use the default endpoint in the current universe domain.
**Returns**

- (::String, nil)

### #endpoint=

    def endpoint=(value) -> ::String, nil

A custom service endpoint, as a hostname or hostname:port. The default is
nil, indicating to use the default endpoint in the current universe domain.
**Parameter**

- **value** (::String, nil)
**Returns**

- (::String, nil)

### #lib_name

    def lib_name() -> ::String

The library name as recorded in instrumentation and logging
**Returns**

- (::String)

### #lib_name=

    def lib_name=(value) -> ::String

The library name as recorded in instrumentation and logging
**Parameter**

- **value** (::String)
**Returns**

- (::String)

### #lib_version

    def lib_version() -> ::String

The library version as recorded in instrumentation and logging
**Returns**

- (::String)

### #lib_version=

    def lib_version=(value) -> ::String

The library version as recorded in instrumentation and logging
**Parameter**

- **value** (::String)
**Returns**

- (::String)

### #logger

    def logger() -> ::Logger, :default, nil

A custom logger to use for request/response debug logging, or the value
`:default` (the default) to construct a default logger, or `nil` to
explicitly disable logging.
**Returns**

- (::Logger, :default, nil)

### #logger=

    def logger=(value) -> ::Logger, :default, nil

A custom logger to use for request/response debug logging, or the value
`:default` (the default) to construct a default logger, or `nil` to
explicitly disable logging.
**Parameter**

- **value** (::Logger, :default, nil)
**Returns**

- (::Logger, :default, nil)

### #metadata

    def metadata() -> ::Hash{::Symbol=>::String}

Additional headers to be sent with the call.
**Returns**

- (::Hash{::Symbol=\>::String})

### #metadata=

    def metadata=(value) -> ::Hash{::Symbol=>::String}

Additional headers to be sent with the call.
**Parameter**

- **value** (::Hash{::Symbol=\>::String})
**Returns**

- (::Hash{::Symbol=\>::String})

### #quota_project

    def quota_project() -> ::String

A separate project against which to charge quota.
**Returns**

- (::String)

### #quota_project=

    def quota_project=(value) -> ::String

A separate project against which to charge quota.
**Parameter**

- **value** (::String)
**Returns**

- (::String)

### #retry_policy

    def retry_policy() -> ::Hash

The retry policy. The value is a hash with the following keys:

- `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
- `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
- `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
- `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
- `:retry_codes` (*type:* `Array<String>`) - The error codes that should trigger a retry.
**Returns**

- (::Hash)

### #retry_policy=

    def retry_policy=(value) -> ::Hash

The retry policy. The value is a hash with the following keys:

- `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
- `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
- `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
- `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
- `:retry_codes` (*type:* `Array<String>`) - The error codes that should trigger a retry.
**Parameter**

- **value** (::Hash)
**Returns**

- (::Hash)

### #rpcs

    def rpcs() -> Rpcs

Configurations for individual RPCs
**Returns**

- ([Rpcs](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-dialogflow-v2/latest/Google-Cloud-Dialogflow-V2-Tools-Rest-Client-Configuration-Rpcs))

### #scope

    def scope() -> ::Array<::String>

The OAuth scopes
**Returns**

- (::Array\<::String\>)

### #scope=

    def scope=(value) -> ::Array<::String>

The OAuth scopes
**Parameter**

- **value** (::Array\<::String\>)
**Returns**

- (::Array\<::String\>)

### #timeout

    def timeout() -> ::Numeric

The call timeout in seconds.
**Returns**

- (::Numeric)

### #timeout=

    def timeout=(value) -> ::Numeric

The call timeout in seconds.
**Parameter**

- **value** (::Numeric)
**Returns**

- (::Numeric)

### #universe_domain

    def universe_domain() -> ::String, nil

The universe domain within which to make requests. This determines the
default endpoint URL. The default value of nil uses the environment
universe (usually the default "googleapis.com" universe).
**Returns**

- (::String, nil)

### #universe_domain=

    def universe_domain=(value) -> ::String, nil

The universe domain within which to make requests. This determines the
default endpoint URL. The default value of nil uses the environment
universe (usually the default "googleapis.com" universe).
**Parameter**

- **value** (::String, nil)
**Returns**

- (::String, nil)