Class: MistApi::SiteSettingJuniperSrx
- Defined in:
- lib/mist_api/models/site_setting_juniper_srx.rb
Overview
SiteSettingJuniperSrx Model.
Instance Attribute Summary collapse
-
#auto_upgrade ⇒ JuniperSrxAutoUpgrade
auto_upgrade device first time it is onboarded.
-
#gateways ⇒ Array[SiteSettingJuniperSrxGateway]
auto_upgrade device first time it is onboarded.
-
#send_mist_nac_user_info ⇒ TrueClass | FalseClass
auto_upgrade device first time it is onboarded.
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, gateways = SKIP, send_mist_nac_user_info = SKIP) ⇒ SiteSettingJuniperSrx
constructor
A new instance of SiteSettingJuniperSrx.
-
#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, gateways = SKIP, send_mist_nac_user_info = SKIP) ⇒ SiteSettingJuniperSrx
Returns a new instance of SiteSettingJuniperSrx.
47 48 49 50 51 52 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 47 def initialize(auto_upgrade = SKIP, gateways = SKIP, send_mist_nac_user_info = SKIP) @auto_upgrade = auto_upgrade unless auto_upgrade == SKIP @gateways = gateways unless gateways == SKIP @send_mist_nac_user_info = send_mist_nac_user_info unless send_mist_nac_user_info == SKIP end |
Instance Attribute Details
#auto_upgrade ⇒ JuniperSrxAutoUpgrade
auto_upgrade device first time it is onboarded
14 15 16 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 14 def auto_upgrade @auto_upgrade end |
#gateways ⇒ Array[SiteSettingJuniperSrxGateway]
auto_upgrade device first time it is onboarded
18 19 20 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 18 def gateways @gateways end |
#send_mist_nac_user_info ⇒ TrueClass | FalseClass
auto_upgrade device first time it is onboarded
22 23 24 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 22 def send_mist_nac_user_info @send_mist_nac_user_info end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 55 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auto_upgrade = JuniperSrxAutoUpgrade.from_hash(hash['auto_upgrade']) if hash['auto_upgrade'] # Parameter is an array, so we need to iterate through it gateways = nil unless hash['gateways'].nil? gateways = [] hash['gateways'].each do |structure| gateways << (SiteSettingJuniperSrxGateway.from_hash(structure) if structure) end end gateways = SKIP unless hash.key?('gateways') send_mist_nac_user_info = hash.key?('send_mist_nac_user_info') ? hash['send_mist_nac_user_info'] : SKIP # Create object from extracted values. SiteSettingJuniperSrx.new(auto_upgrade, gateways, send_mist_nac_user_info) end |
.names ⇒ Object
A mapping from model property names to API property names.
25 26 27 28 29 30 31 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 25 def self.names @_hash = {} if @_hash.nil? @_hash['auto_upgrade'] = 'auto_upgrade' @_hash['gateways'] = 'gateways' @_hash['send_mist_nac_user_info'] = 'send_mist_nac_user_info' @_hash end |
.nullables ⇒ Object
An array for nullable fields
43 44 45 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 43 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
34 35 36 37 38 39 40 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 34 def self.optionals %w[ auto_upgrade gateways send_mist_nac_user_info ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
87 88 89 90 91 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 87 def inspect class_name = self.class.name.split('::').last "<#{class_name} auto_upgrade: #{@auto_upgrade.inspect}, gateways: #{@gateways.inspect},"\ " send_mist_nac_user_info: #{@send_mist_nac_user_info.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
80 81 82 83 84 |
# File 'lib/mist_api/models/site_setting_juniper_srx.rb', line 80 def to_s class_name = self.class.name.split('::').last "<#{class_name} auto_upgrade: #{@auto_upgrade}, gateways: #{@gateways},"\ " send_mist_nac_user_info: #{@send_mist_nac_user_info}>" end |