Class: MistApi::SettingSsr
- Defined in:
- lib/mist_api/models/setting_ssr.rb
Overview
SettingSsr Model.
Instance Attribute Summary collapse
-
#auto_upgrade ⇒ SettingSsrAutoUpgrade
auto_upgrade device first time it is onboarded.
-
#conductor_hosts ⇒ Array[String]
List of Conductor IP Addresses or Hosts to be used by the SSR Devices.
-
#conductor_token ⇒ String
Token to be used by the SSR Devices to connect to the Conductor.
-
#disable_stats ⇒ TrueClass | FalseClass
Disable stats collection on SSR devices.
-
#proxy ⇒ SsrProxy
SSR proxy configuration to talk to Mist.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(auto_upgrade = SKIP, conductor_hosts = SKIP, conductor_token = SKIP, disable_stats = SKIP, proxy = SKIP) ⇒ SettingSsr
constructor
A new instance of SettingSsr.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(auto_upgrade = SKIP, conductor_hosts = SKIP, conductor_token = SKIP, disable_stats = SKIP, proxy = SKIP) ⇒ SettingSsr
Returns a new instance of SettingSsr.
59 60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/setting_ssr.rb', line 59 def initialize(auto_upgrade = SKIP, conductor_hosts = SKIP, conductor_token = SKIP, disable_stats = SKIP, proxy = SKIP) @auto_upgrade = auto_upgrade unless auto_upgrade == SKIP @conductor_hosts = conductor_hosts unless conductor_hosts == SKIP @conductor_token = conductor_token unless conductor_token == SKIP @disable_stats = disable_stats unless disable_stats == SKIP @proxy = proxy unless proxy == SKIP end |
Instance Attribute Details
#auto_upgrade ⇒ SettingSsrAutoUpgrade
auto_upgrade device first time it is onboarded
14 15 16 |
# File 'lib/mist_api/models/setting_ssr.rb', line 14 def auto_upgrade @auto_upgrade end |
#conductor_hosts ⇒ Array[String]
List of Conductor IP Addresses or Hosts to be used by the SSR Devices
18 19 20 |
# File 'lib/mist_api/models/setting_ssr.rb', line 18 def conductor_hosts @conductor_hosts end |
#conductor_token ⇒ String
Token to be used by the SSR Devices to connect to the Conductor
22 23 24 |
# File 'lib/mist_api/models/setting_ssr.rb', line 22 def conductor_token @conductor_token end |
#disable_stats ⇒ TrueClass | FalseClass
Disable stats collection on SSR devices
26 27 28 |
# File 'lib/mist_api/models/setting_ssr.rb', line 26 def disable_stats @disable_stats end |
#proxy ⇒ SsrProxy
SSR proxy configuration to talk to Mist
30 31 32 |
# File 'lib/mist_api/models/setting_ssr.rb', line 30 def proxy @proxy end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/mist_api/models/setting_ssr.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auto_upgrade = SettingSsrAutoUpgrade.from_hash(hash['auto_upgrade']) if hash['auto_upgrade'] conductor_hosts = hash.key?('conductor_hosts') ? hash['conductor_hosts'] : SKIP conductor_token = hash.key?('conductor_token') ? hash['conductor_token'] : SKIP disable_stats = hash.key?('disable_stats') ? hash['disable_stats'] : SKIP proxy = SsrProxy.from_hash(hash['proxy']) if hash['proxy'] # Create object from extracted values. SettingSsr.new(auto_upgrade, conductor_hosts, conductor_token, disable_stats, proxy) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/mist_api/models/setting_ssr.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['auto_upgrade'] = 'auto_upgrade' @_hash['conductor_hosts'] = 'conductor_hosts' @_hash['conductor_token'] = 'conductor_token' @_hash['disable_stats'] = 'disable_stats' @_hash['proxy'] = 'proxy' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/mist_api/models/setting_ssr.rb', line 55 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 49 50 51 52 |
# File 'lib/mist_api/models/setting_ssr.rb', line 44 def self.optionals %w[ auto_upgrade conductor_hosts conductor_token disable_stats proxy ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
97 98 99 100 101 102 |
# File 'lib/mist_api/models/setting_ssr.rb', line 97 def inspect class_name = self.class.name.split('::').last "<#{class_name} auto_upgrade: #{@auto_upgrade.inspect}, conductor_hosts:"\ " #{@conductor_hosts.inspect}, conductor_token: #{@conductor_token.inspect}, disable_stats:"\ " #{@disable_stats.inspect}, proxy: #{@proxy.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
90 91 92 93 94 |
# File 'lib/mist_api/models/setting_ssr.rb', line 90 def to_s class_name = self.class.name.split('::').last "<#{class_name} auto_upgrade: #{@auto_upgrade}, conductor_hosts: #{@conductor_hosts},"\ " conductor_token: #{@conductor_token}, disable_stats: #{@disable_stats}, proxy: #{@proxy}>" end |