Class: Google::Apis::RequestOptions

Inherits:
Struct
  • Object
show all
Defined in:
lib/google/apis/options.rb,
lib/google/apis/options.rb

Overview

Request options

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#api_format_versionFixnum



63
64
65
# File 'lib/google/apis/options.rb', line 63

def api_format_version
  @api_format_version
end

#authorizationSignet::OAuth2::Client, #apply(Hash)



63
64
65
# File 'lib/google/apis/options.rb', line 63

def authorization
  @authorization
end

#headerHash<String,String] Additional HTTP headers to include in requests



63
64
65
# File 'lib/google/apis/options.rb', line 63

def header
  @header
end

#normalize_unicodeBoolean



63
64
65
# File 'lib/google/apis/options.rb', line 63

def normalize_unicode
  @normalize_unicode
end

#retriesFixnum



63
64
65
# File 'lib/google/apis/options.rb', line 63

def retries
  @retries
end

#skip_deserializationBoolean



63
64
65
# File 'lib/google/apis/options.rb', line 63

def skip_deserialization
  @skip_deserialization
end

#skip_serializationBoolean



63
64
65
# File 'lib/google/apis/options.rb', line 63

def skip_serialization
  @skip_serialization
end

#use_opencensusBoolean



63
64
65
# File 'lib/google/apis/options.rb', line 63

def use_opencensus
  @use_opencensus
end

Class Method Details

.defaultGoogle::Apis::RequestOptions

Get the default options



82
83
84
# File 'lib/google/apis/options.rb', line 82

def self.default
  @options ||= RequestOptions.new
end

Instance Method Details

#merge(options) ⇒ Object



86
87
88
89
90
91
92
93
94
95
# File 'lib/google/apis/options.rb', line 86

def merge(options)
  return self if options.nil?

  new_options = dup
  members.each do |opt|
    opt = opt.to_sym
    new_options[opt] = options[opt] unless options[opt].nil?
  end
  new_options
end