Class: Google::Gax::CallOptions
- Inherits:
-
Object
- Object
- Google::Gax::CallOptions
- Defined in:
- lib/google/gax/settings.rb
Overview
Encapsulates the overridable settings for a particular API call
Instance Attribute Summary collapse
- #metadata ⇒ Hash, :OPTION_INHERIT (also: #kwargs) readonly
- #page_token ⇒ Object, ... readonly
- #retry_options ⇒ RetryOptions, :OPTION_INHERIT readonly
- #timeout ⇒ Numeric, :OPTION_INHERIT readonly
Instance Method Summary collapse
-
#initialize(timeout: :OPTION_INHERIT, retry_options: :OPTION_INHERIT, page_token: :OPTION_INHERIT, metadata: :OPTION_INHERIT, kwargs: :OPTION_INHERIT) ⇒ CallOptions
constructor
A new instance of CallOptions.
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.
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 = @page_token = page_token @metadata = @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash) end |
Instance Attribute Details
#metadata ⇒ Hash, :OPTION_INHERIT (readonly) Also known as: kwargs
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 = @page_token = page_token @metadata = @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash) end end |
#page_token ⇒ Object, ... (readonly)
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 = @page_token = page_token @metadata = @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash) end end |
#retry_options ⇒ RetryOptions, :OPTION_INHERIT (readonly)
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 = @page_token = page_token @metadata = @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash) end end |
#timeout ⇒ Numeric, :OPTION_INHERIT (readonly)
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 = @page_token = page_token @metadata = @metadata.merge!(kwargs) if kwargs.is_a?(Hash) && .is_a?(Hash) end end |