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, 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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# gapic-common - Class Gapic::CallOptions (v1.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions)\n- [1.0.1](/ruby/docs/reference/gapic-common/1.0.1/Gapic-CallOptions)\n- [0.26.0](/ruby/docs/reference/gapic-common/0.26.0/Gapic-CallOptions)\n- [0.25.0](/ruby/docs/reference/gapic-common/0.25.0/Gapic-CallOptions)\n- [0.24.0](/ruby/docs/reference/gapic-common/0.24.0/Gapic-CallOptions) \nReference documentation and code samples for the gapic-common class Gapic::CallOptions.\n\nEncapsulates the overridable settings for a particular RPC call. \n\nInherits\n--------\n\n- Object\n\nMethods\n-------\n\n### #initialize\n\n def initialize(timeout: nil, metadata: nil, retry_policy: nil) -\u003e CallOptions\n\nCreate a new Options object instance. \n**Parameters**\n\n- **timeout** (Numeric) *(defaults to: nil)* --- The client-side timeout for RPC calls.\n- **metadata** (Hash) *(defaults to: nil)* --- The request header params.\n- **retry_policy** (Hash, [RetryPolicy](./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](/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions-RetryPolicy#Gapic__CallOptions__RetryPolicy_initialize_instance_ \"Gapic::CallOptions::RetryPolicy#initialize (method)\").\n\n\n A Proc object can also be provided. The Proc should accept an error as an argument, and return `true` if the\n error should be retried or `false` if not. If the error is to be retried, the Proc object must also block\nwith an incremental delay before returning `true`. \n**Returns**\n\n- ([CallOptions](./Gapic-CallOptions)) --- a new instance of CallOptions\n\n### #merge\n\n def merge(**kwargs) -\u003e CallOptions\n\nReturn a new CallOptions with the given modifications. The current object\nis not modified. \n**Parameter**\n\n- **kwargs** (keywords) --- Updated fields. See [#initialize](/ruby/docs/reference/gapic-common/latest/Gapic-CallOptions#Gapic__CallOptions_initialize_instance_ \"Gapic::CallOptions#initialize (method)\") for details. \n**Returns**\n\n- ([CallOptions](./Gapic-CallOptions)) --- A new CallOptions object.\n\n### #metadata\n\n def metadata() -\u003e Hash\n\n**Returns**\n\n- (Hash)\n\n### #retry_policy\n\n def retry_policy() -\u003e RetryPolicy, Object\n\n**Returns**\n\n- ([RetryPolicy](./Gapic-CallOptions-RetryPolicy), Object)\n\n### #timeout\n\n def timeout() -\u003e Numeric, nil\n\n**Returns**\n\n- (Numeric, nil)\n\n### #to_h\n\n def to_h() -\u003e Hash\n\nConvert to hash form. \n**Returns**\n\n- (Hash)"]]