Class: UntitledApi::ApiV1ConstTrafficTypesResponse1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- UntitledApi::ApiV1ConstTrafficTypesResponse1
- Defined in:
- lib/untitled_api/models/api_v1_const_traffic_types_response1.rb
Overview
ApiV1ConstTrafficTypesResponse1 Model.
Instance Attribute Summary collapse
-
#display ⇒ String
TODO: Write general description for this method.
-
#dscp ⇒ Float
TODO: Write general description for this method.
-
#failover_policy ⇒ String
TODO: Write general description for this method.
-
#max_latency ⇒ Float
TODO: Write general description for this method.
-
#max_loss ⇒ Float
TODO: Write general description for this method.
-
#name ⇒ String
TODO: Write general description for this method.
-
#traffic_class ⇒ 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(name = SKIP, display = SKIP, failover_policy = SKIP, max_loss = SKIP, max_latency = SKIP, traffic_class = SKIP, dscp = SKIP) ⇒ ApiV1ConstTrafficTypesResponse1
constructor
A new instance of ApiV1ConstTrafficTypesResponse1.
Methods inherited from BaseModel
Constructor Details
#initialize(name = SKIP, display = SKIP, failover_policy = SKIP, max_loss = SKIP, max_latency = SKIP, traffic_class = SKIP, dscp = SKIP) ⇒ ApiV1ConstTrafficTypesResponse1
Returns a new instance of ApiV1ConstTrafficTypesResponse1.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 71 def initialize(name = SKIP, display = SKIP, failover_policy = SKIP, max_loss = SKIP, max_latency = SKIP, traffic_class = SKIP, dscp = SKIP) @name = name unless name == SKIP @display = display unless display == SKIP @failover_policy = failover_policy unless failover_policy == SKIP @max_loss = max_loss unless max_loss == SKIP @max_latency = max_latency unless max_latency == SKIP @traffic_class = traffic_class unless traffic_class == SKIP @dscp = dscp unless dscp == SKIP end |
Instance Attribute Details
#display ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 18 def display @display end |
#dscp ⇒ Float
TODO: Write general description for this method
38 39 40 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 38 def dscp @dscp end |
#failover_policy ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 22 def failover_policy @failover_policy end |
#max_latency ⇒ Float
TODO: Write general description for this method
30 31 32 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 30 def max_latency @max_latency end |
#max_loss ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 26 def max_loss @max_loss end |
#name ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 14 def name @name end |
#traffic_class ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 34 def traffic_class @traffic_class end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 88 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP display = hash.key?('display') ? hash['display'] : SKIP failover_policy = hash.key?('failover_policy') ? hash['failover_policy'] : SKIP max_loss = hash.key?('max_loss') ? hash['max_loss'] : SKIP max_latency = hash.key?('max_latency') ? hash['max_latency'] : SKIP traffic_class = hash.key?('traffic_class') ? hash['traffic_class'] : SKIP dscp = hash.key?('dscp') ? hash['dscp'] : SKIP # Create object from extracted values. ApiV1ConstTrafficTypesResponse1.new(name, display, failover_policy, max_loss, max_latency, traffic_class, dscp) end |
.names ⇒ Object
A mapping from model property names to API property names.
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['display'] = 'display' @_hash['failover_policy'] = 'failover_policy' @_hash['max_loss'] = 'max_loss' @_hash['max_latency'] = 'max_latency' @_hash['traffic_class'] = 'traffic_class' @_hash['dscp'] = 'dscp' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/untitled_api/models/api_v1_const_traffic_types_response1.rb', line 54 def self.optionals %w[ name display failover_policy max_loss max_latency traffic_class dscp ] end |