Class: Verizon::FlowInfo
- Defined in:
- lib/verizon/models/flow_info.rb
Overview
FlowInfo Model.
Instance Attribute Summary collapse
-
#flow_device ⇒ String
TODO: Write general description for this method.
-
#flow_direction ⇒ String
TODO: Write general description for this method.
-
#flow_protocol ⇒ String
TODO: Write general description for this method.
-
#flow_server ⇒ String
TODO: Write general description for this method.
-
#qci_option ⇒ String
TODO: Write general description for this method.
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(flow_server = SKIP, flow_device = SKIP, flow_direction = SKIP, flow_protocol = SKIP, qci_option = SKIP) ⇒ FlowInfo
constructor
A new instance of FlowInfo.
Methods inherited from BaseModel
Constructor Details
#initialize(flow_server = SKIP, flow_device = SKIP, flow_direction = SKIP, flow_protocol = SKIP, qci_option = SKIP) ⇒ FlowInfo
Returns a new instance of FlowInfo.
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/verizon/models/flow_info.rb', line 59 def initialize(flow_server = SKIP, flow_device = SKIP, flow_direction = SKIP, flow_protocol = SKIP, qci_option = SKIP) @flow_server = flow_server unless flow_server == SKIP @flow_device = flow_device unless flow_device == SKIP @flow_direction = flow_direction unless flow_direction == SKIP @flow_protocol = flow_protocol unless flow_protocol == SKIP @qci_option = qci_option unless qci_option == SKIP end |
Instance Attribute Details
#flow_device ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/verizon/models/flow_info.rb', line 18 def flow_device @flow_device end |
#flow_direction ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/verizon/models/flow_info.rb', line 22 def flow_direction @flow_direction end |
#flow_protocol ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/verizon/models/flow_info.rb', line 26 def flow_protocol @flow_protocol end |
#flow_server ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/verizon/models/flow_info.rb', line 14 def flow_server @flow_server end |
#qci_option ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/verizon/models/flow_info.rb', line 30 def qci_option @qci_option end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/verizon/models/flow_info.rb', line 72 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. flow_server = hash.key?('flowServer') ? hash['flowServer'] : SKIP flow_device = hash.key?('flowDevice') ? hash['flowDevice'] : SKIP flow_direction = hash.key?('flowDirection') ? hash['flowDirection'] : SKIP flow_protocol = hash.key?('flowProtocol') ? hash['flowProtocol'] : SKIP qci_option = hash.key?('qciOption') ? hash['qciOption'] : SKIP # Create object from extracted values. FlowInfo.new(flow_server, flow_device, flow_direction, flow_protocol, qci_option) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/verizon/models/flow_info.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['flow_server'] = 'flowServer' @_hash['flow_device'] = 'flowDevice' @_hash['flow_direction'] = 'flowDirection' @_hash['flow_protocol'] = 'flowProtocol' @_hash['qci_option'] = 'qciOption' @_hash end |
.nullables ⇒ Object
An array for nullable fields
55 56 57 |
# File 'lib/verizon/models/flow_info.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/verizon/models/flow_info.rb', line 44 def self.optionals %w[ flow_server flow_device flow_direction flow_protocol qci_option ] end |