Class: Google::Gax::CallOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/google/gax/settings.rb

Overview

Encapsulates the overridable settings for a particular API call

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(timeout: :OPTION_INHERIT, retry_options: :OPTION_INHERIT, page_token: :OPTION_INHERIT, metadata: :OPTION_INHERIT, kwargs: :OPTION_INHERIT) ⇒ CallOptions

Returns a new instance of CallOptions.

Parameters:

  • timeout (Numeric, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    The client-side timeout for API calls.

  • retry_options (RetryOptions, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    The configuration for retrying upon transient error. If set to nil, this call will not retry.

  • page_token (Object, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    If set and the call is configured for page streaming, page streaming is starting with this page_token.

  • metadata (Hash, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    the request header params.

  • kwargs (Hash, :OPTION_INHERIT) (defaults to: :OPTION_INHERIT)

    Deprecated, if set this will be merged with the metadata field.



171
172
173
174
175
176
177
178
179
180
181
# File 'lib/google/gax/settings.rb', line 171

def initialize(timeout: :OPTION_INHERIT,
               retry_options: :OPTION_INHERIT,
               page_token: :OPTION_INHERIT,
               metadata: :OPTION_INHERIT,
               kwargs: :OPTION_INHERIT)
  @timeout = timeout
  @retry_options = retry_options
  @page_token = page_token
  @metadata = 
  @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash)
end

Instance Attribute Details

#metadataHash, :OPTION_INHERIT (readonly) Also known as: kwargs

Returns:

  • (Hash, :OPTION_INHERIT)


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/google/gax/settings.rb', line 156

class CallOptions
  attr_reader :timeout, :retry_options, :page_token, :metadata
  alias kwargs 

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param page_token [Object, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is starting with this page_token.
  # @param metadata [Hash, :OPTION_INHERIT] the request header params.
  # @param kwargs [Hash, :OPTION_INHERIT]
  #   Deprecated, if set this will be merged with the metadata field.
  def initialize(timeout: :OPTION_INHERIT,
                 retry_options: :OPTION_INHERIT,
                 page_token: :OPTION_INHERIT,
                 metadata: :OPTION_INHERIT,
                 kwargs: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @page_token = page_token
    @metadata = 
    @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash)
  end
end

#page_tokenObject, ... (readonly)

Returns:

  • (Object, :OPTION_INHERIT, :INITIAL_PAGE)


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/google/gax/settings.rb', line 156

class CallOptions
  attr_reader :timeout, :retry_options, :page_token, :metadata
  alias kwargs 

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param page_token [Object, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is starting with this page_token.
  # @param metadata [Hash, :OPTION_INHERIT] the request header params.
  # @param kwargs [Hash, :OPTION_INHERIT]
  #   Deprecated, if set this will be merged with the metadata field.
  def initialize(timeout: :OPTION_INHERIT,
                 retry_options: :OPTION_INHERIT,
                 page_token: :OPTION_INHERIT,
                 metadata: :OPTION_INHERIT,
                 kwargs: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @page_token = page_token
    @metadata = 
    @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash)
  end
end

#retry_optionsRetryOptions, :OPTION_INHERIT (readonly)

Returns:



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/google/gax/settings.rb', line 156

class CallOptions
  attr_reader :timeout, :retry_options, :page_token, :metadata
  alias kwargs 

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param page_token [Object, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is starting with this page_token.
  # @param metadata [Hash, :OPTION_INHERIT] the request header params.
  # @param kwargs [Hash, :OPTION_INHERIT]
  #   Deprecated, if set this will be merged with the metadata field.
  def initialize(timeout: :OPTION_INHERIT,
                 retry_options: :OPTION_INHERIT,
                 page_token: :OPTION_INHERIT,
                 metadata: :OPTION_INHERIT,
                 kwargs: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @page_token = page_token
    @metadata = 
    @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash)
  end
end

#timeoutNumeric, :OPTION_INHERIT (readonly)

Returns:

  • (Numeric, :OPTION_INHERIT)


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/google/gax/settings.rb', line 156

class CallOptions
  attr_reader :timeout, :retry_options, :page_token, :metadata
  alias kwargs 

  # @param timeout [Numeric, :OPTION_INHERIT]
  #   The client-side timeout for API calls.
  # @param retry_options [RetryOptions, :OPTION_INHERIT]
  #   The configuration for retrying upon transient error.
  #   If set to nil, this call will not retry.
  # @param page_token [Object, :OPTION_INHERIT]
  #   If set and the call is configured for page streaming, page streaming
  #   is starting with this page_token.
  # @param metadata [Hash, :OPTION_INHERIT] the request header params.
  # @param kwargs [Hash, :OPTION_INHERIT]
  #   Deprecated, if set this will be merged with the metadata field.
  def initialize(timeout: :OPTION_INHERIT,
                 retry_options: :OPTION_INHERIT,
                 page_token: :OPTION_INHERIT,
                 metadata: :OPTION_INHERIT,
                 kwargs: :OPTION_INHERIT)
    @timeout = timeout
    @retry_options = retry_options
    @page_token = page_token
    @metadata = 
    @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash)
  end
end