Class: MistApi::SynthetictestConfigVlan
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SynthetictestConfigVlan
- Defined in:
- lib/mist_api/models/synthetictest_config_vlan.rb
Overview
SynthetictestConfigVlan Model.
Instance Attribute Summary collapse
-
#custom_test_urls ⇒ Array[String]
TODO: Write general description for this method.
-
#disabled ⇒ TrueClass | FalseClass
For some vlans where we don’t want this to run.
-
#probes ⇒ Array[String]
app name comes from ‘custom_probes` above or /const/synthetic_test_probes.
-
#vlan_ids ⇒ Array[Object]
app name comes from ‘custom_probes` above or /const/synthetic_test_probes.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(custom_test_urls = SKIP, disabled = false, probes = SKIP, vlan_ids = SKIP) ⇒ SynthetictestConfigVlan
constructor
A new instance of SynthetictestConfigVlan.
-
#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(custom_test_urls = SKIP, disabled = false, probes = SKIP, vlan_ids = SKIP) ⇒ SynthetictestConfigVlan
Returns a new instance of SynthetictestConfigVlan.
53 54 55 56 57 58 59 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 53 def initialize(custom_test_urls = SKIP, disabled = false, probes = SKIP, vlan_ids = SKIP) @custom_test_urls = custom_test_urls unless custom_test_urls == SKIP @disabled = disabled unless disabled == SKIP @probes = probes unless probes == SKIP @vlan_ids = vlan_ids unless vlan_ids == SKIP end |
Instance Attribute Details
#custom_test_urls ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 14 def custom_test_urls @custom_test_urls end |
#disabled ⇒ TrueClass | FalseClass
For some vlans where we don’t want this to run
18 19 20 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 18 def disabled @disabled end |
#probes ⇒ Array[String]
app name comes from ‘custom_probes` above or /const/synthetic_test_probes
22 23 24 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 22 def probes @probes end |
#vlan_ids ⇒ Array[Object]
app name comes from ‘custom_probes` above or /const/synthetic_test_probes
26 27 28 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 26 def vlan_ids @vlan_ids end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. custom_test_urls = hash.key?('custom_test_urls') ? hash['custom_test_urls'] : SKIP disabled = hash['disabled'] ||= false probes = hash.key?('probes') ? hash['probes'] : SKIP vlan_ids = hash.key?('vlan_ids') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:VlanIdWithVariable), hash['vlan_ids'] ) : SKIP # Create object from extracted values. SynthetictestConfigVlan.new(custom_test_urls, disabled, probes, vlan_ids) end |
.names ⇒ Object
A mapping from model property names to API property names.
29 30 31 32 33 34 35 36 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 29 def self.names @_hash = {} if @_hash.nil? @_hash['custom_test_urls'] = 'custom_test_urls' @_hash['disabled'] = 'disabled' @_hash['probes'] = 'probes' @_hash['vlan_ids'] = 'vlan_ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
49 50 51 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 49 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 39 def self.optionals %w[ custom_test_urls disabled probes vlan_ids ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 83 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} custom_test_urls: #{@custom_test_urls.inspect}, disabled:"\ " #{@disabled.inspect}, probes: #{@probes.inspect}, vlan_ids: #{@vlan_ids.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/mist_api/models/synthetictest_config_vlan.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} custom_test_urls: #{@custom_test_urls}, disabled: #{@disabled}, probes:"\ " #{@probes}, vlan_ids: #{@vlan_ids}>" end |