Class: MistApi::SwitchPortMirroringProperty
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::SwitchPortMirroringProperty
- Defined in:
- lib/mist_api/models/switch_port_mirroring_property.rb
Overview
SwitchPortMirroringProperty Model.
Instance Attribute Summary collapse
-
#input_networks_ingress ⇒ Array[String]
At least one of the ‘input_port_ids_ingress`, `input_port_ids_egress` or `input_networks_ingress ` should be specified.
-
#input_port_ids_egress ⇒ Array[String]
At least one of the ‘input_port_ids_ingress`, `input_port_ids_egress` or `input_networks_ingress ` should be specified.
-
#input_port_ids_ingress ⇒ Array[String]
At least one of the ‘input_port_ids_ingress`, `input_port_ids_egress` or `input_networks_ingress ` should be specified.
-
#output_ip_address ⇒ String
Exactly one of the ‘output_ip_address`, `output_port_id` or `output_network` should be provided.
-
#output_network ⇒ String
Exactly one of the ‘output_ip_address`, `output_port_id` or `output_network` should be provided.
-
#output_port_id ⇒ String
Exactly one of the ‘output_ip_address`, `output_port_id` or `output_network` should be provided.
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(input_networks_ingress = SKIP, input_port_ids_egress = SKIP, input_port_ids_ingress = SKIP, output_ip_address = SKIP, output_network = SKIP, output_port_id = SKIP) ⇒ SwitchPortMirroringProperty
constructor
A new instance of SwitchPortMirroringProperty.
-
#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(input_networks_ingress = SKIP, input_port_ids_egress = SKIP, input_port_ids_ingress = SKIP, output_ip_address = SKIP, output_network = SKIP, output_port_id = SKIP) ⇒ SwitchPortMirroringProperty
Returns a new instance of SwitchPortMirroringProperty.
71 72 73 74 75 76 77 78 79 80 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 71 def initialize(input_networks_ingress = SKIP, input_port_ids_egress = SKIP, input_port_ids_ingress = SKIP, output_ip_address = SKIP, output_network = SKIP, output_port_id = SKIP) @input_networks_ingress = input_networks_ingress unless input_networks_ingress == SKIP @input_port_ids_egress = input_port_ids_egress unless input_port_ids_egress == SKIP @input_port_ids_ingress = input_port_ids_ingress unless input_port_ids_ingress == SKIP @output_ip_address = output_ip_address unless output_ip_address == SKIP @output_network = output_network unless output_network == SKIP @output_port_id = output_port_id unless output_port_id == SKIP end |
Instance Attribute Details
#input_networks_ingress ⇒ Array[String]
At least one of the ‘input_port_ids_ingress`, `input_port_ids_egress` or `input_networks_ingress ` should be specified
15 16 17 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 15 def input_networks_ingress @input_networks_ingress end |
#input_port_ids_egress ⇒ Array[String]
At least one of the ‘input_port_ids_ingress`, `input_port_ids_egress` or `input_networks_ingress ` should be specified
20 21 22 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 20 def input_port_ids_egress @input_port_ids_egress end |
#input_port_ids_ingress ⇒ Array[String]
At least one of the ‘input_port_ids_ingress`, `input_port_ids_egress` or `input_networks_ingress ` should be specified
25 26 27 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 25 def input_port_ids_ingress @input_port_ids_ingress end |
#output_ip_address ⇒ String
Exactly one of the ‘output_ip_address`, `output_port_id` or `output_network` should be provided
30 31 32 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 30 def output_ip_address @output_ip_address end |
#output_network ⇒ String
Exactly one of the ‘output_ip_address`, `output_port_id` or `output_network` should be provided
35 36 37 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 35 def output_network @output_network end |
#output_port_id ⇒ String
Exactly one of the ‘output_ip_address`, `output_port_id` or `output_network` should be provided
40 41 42 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 40 def output_port_id @output_port_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 83 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. input_networks_ingress = hash.key?('input_networks_ingress') ? hash['input_networks_ingress'] : SKIP input_port_ids_egress = hash.key?('input_port_ids_egress') ? hash['input_port_ids_egress'] : SKIP input_port_ids_ingress = hash.key?('input_port_ids_ingress') ? hash['input_port_ids_ingress'] : SKIP output_ip_address = hash.key?('output_ip_address') ? hash['output_ip_address'] : SKIP output_network = hash.key?('output_network') ? hash['output_network'] : SKIP output_port_id = hash.key?('output_port_id') ? hash['output_port_id'] : SKIP # Create object from extracted values. SwitchPortMirroringProperty.new(input_networks_ingress, input_port_ids_egress, input_port_ids_ingress, output_ip_address, output_network, output_port_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 43 def self.names @_hash = {} if @_hash.nil? @_hash['input_networks_ingress'] = 'input_networks_ingress' @_hash['input_port_ids_egress'] = 'input_port_ids_egress' @_hash['input_port_ids_ingress'] = 'input_port_ids_ingress' @_hash['output_ip_address'] = 'output_ip_address' @_hash['output_network'] = 'output_network' @_hash['output_port_id'] = 'output_port_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 55 def self.optionals %w[ input_networks_ingress input_port_ids_egress input_port_ids_ingress output_ip_address output_network output_port_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
119 120 121 122 123 124 125 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 119 def inspect class_name = self.class.name.split('::').last "<#{class_name} input_networks_ingress: #{@input_networks_ingress.inspect},"\ " input_port_ids_egress: #{@input_port_ids_egress.inspect}, input_port_ids_ingress:"\ " #{@input_port_ids_ingress.inspect}, output_ip_address: #{@output_ip_address.inspect},"\ " output_network: #{@output_network.inspect}, output_port_id: #{@output_port_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/switch_port_mirroring_property.rb', line 110 def to_s class_name = self.class.name.split('::').last "<#{class_name} input_networks_ingress: #{@input_networks_ingress}, input_port_ids_egress:"\ " #{@input_port_ids_egress}, input_port_ids_ingress: #{@input_port_ids_ingress},"\ " output_ip_address: #{@output_ip_address}, output_network: #{@output_network},"\ " output_port_id: #{@output_port_id}>" end |