1.5.0 (latest) 1.4.1 1.3.0 1.2.0 1.1.0 1.0.1 0.26.0 0.25.0 0.24.0 Reference documentation and code samples for the gapic-common class Gapic::CallOptions.

Encapsulates the overridable settings for a particular RPC call.

## Inherits

- Object

## Methods

### #initialize

    def initialize(timeout: nil, metadata: nil, retry_policy: nil) -> CallOptions

Create a new Options object instance.
**Parameters**

- **timeout** (Numeric) *(defaults to: nil)* --- The client-side timeout for RPC calls.
- **metadata** (Hash) *(defaults to: nil)* --- The request header params.
- **retry_policy** (Hash, [RetryPolicy](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions-RetryPolicy), Proc) *(defaults to: nil)* --- The policy for error retry. A Hash can be provided to customize the policy object, using keys that match the arguments for [RetryPolicy#initialize](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions-RetryPolicy#Gapic__CallOptions__RetryPolicy_initialize_instance_ "Gapic::CallOptions::RetryPolicy#initialize (method)").


  A Proc object can also be provided. The Proc should accept an error as an argument, and return `true` if the
  error should be retried or `false` if not. If the error is to be retried, the Proc object must also block
  with an incremental delay before returning `true`.
**Returns**

- ([CallOptions](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions)) --- a new instance of CallOptions

### #merge

    def merge(**kwargs) -> CallOptions

Return a new CallOptions with the given modifications. The current object
is not modified.
**Parameter**

- **kwargs** (keywords) --- Updated fields. See [#initialize](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions#Gapic__CallOptions_initialize_instance_ "Gapic::CallOptions#initialize (method)") for details.
**Returns**

- ([CallOptions](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions)) --- A new CallOptions object.

### #metadata

    def metadata() -> Hash

**Returns**

- (Hash)

### #retry_policy

    def retry_policy() -> RetryPolicy, Object

**Returns**

- ([RetryPolicy](https://docs.cloud.google.com/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions-RetryPolicy), Object)

### #timeout

    def timeout() -> Numeric, nil

**Returns**

- (Numeric, nil)

### #to_h

    def to_h() -> Hash

Convert to hash form.
**Returns**

- (Hash)