Class: Falcon::DomainIotImportedHost
- Inherits:
-
Object
- Object
- Falcon::DomainIotImportedHost
- Defined in:
- lib/crimson-falcon/models/domain_iot_imported_host.rb
Instance Attribute Summary collapse
-
#field_1 ⇒ Object
Returns the value of attribute field_1.
-
#field_10 ⇒ Object
Returns the value of attribute field_10.
-
#field_11 ⇒ Object
Returns the value of attribute field_11.
-
#field_12 ⇒ Object
Returns the value of attribute field_12.
-
#field_13 ⇒ Object
Returns the value of attribute field_13.
-
#field_14 ⇒ Object
Returns the value of attribute field_14.
-
#field_15 ⇒ Object
Returns the value of attribute field_15.
-
#field_16 ⇒ Object
Returns the value of attribute field_16.
-
#field_17 ⇒ Object
Returns the value of attribute field_17.
-
#field_18 ⇒ Object
Returns the value of attribute field_18.
-
#field_19 ⇒ Object
Returns the value of attribute field_19.
-
#field_2 ⇒ Object
Returns the value of attribute field_2.
-
#field_20 ⇒ Object
Returns the value of attribute field_20.
-
#field_3 ⇒ Object
Returns the value of attribute field_3.
-
#field_4 ⇒ Object
Returns the value of attribute field_4.
-
#field_5 ⇒ Object
Returns the value of attribute field_5.
-
#field_6 ⇒ Object
Returns the value of attribute field_6.
-
#field_7 ⇒ Object
Returns the value of attribute field_7.
-
#field_8 ⇒ Object
Returns the value of attribute field_8.
-
#field_9 ⇒ Object
Returns the value of attribute field_9.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DomainIotImportedHost
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ DomainIotImportedHost
Initializes the object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 139 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainIotImportedHost` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Falcon::DomainIotImportedHost`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'field_1') self.field_1 = attributes[:'field_1'] end if attributes.key?(:'field_10') self.field_10 = attributes[:'field_10'] end if attributes.key?(:'field_11') self.field_11 = attributes[:'field_11'] end if attributes.key?(:'field_12') self.field_12 = attributes[:'field_12'] end if attributes.key?(:'field_13') self.field_13 = attributes[:'field_13'] end if attributes.key?(:'field_14') self.field_14 = attributes[:'field_14'] end if attributes.key?(:'field_15') self.field_15 = attributes[:'field_15'] end if attributes.key?(:'field_16') self.field_16 = attributes[:'field_16'] end if attributes.key?(:'field_17') self.field_17 = attributes[:'field_17'] end if attributes.key?(:'field_18') self.field_18 = attributes[:'field_18'] end if attributes.key?(:'field_19') self.field_19 = attributes[:'field_19'] end if attributes.key?(:'field_2') self.field_2 = attributes[:'field_2'] end if attributes.key?(:'field_20') self.field_20 = attributes[:'field_20'] end if attributes.key?(:'field_3') self.field_3 = attributes[:'field_3'] end if attributes.key?(:'field_4') self.field_4 = attributes[:'field_4'] end if attributes.key?(:'field_5') self.field_5 = attributes[:'field_5'] end if attributes.key?(:'field_6') self.field_6 = attributes[:'field_6'] end if attributes.key?(:'field_7') self.field_7 = attributes[:'field_7'] end if attributes.key?(:'field_8') self.field_8 = attributes[:'field_8'] end if attributes.key?(:'field_9') self.field_9 = attributes[:'field_9'] end end |
Instance Attribute Details
#field_1 ⇒ Object
Returns the value of attribute field_1.
34 35 36 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 34 def field_1 @field_1 end |
#field_10 ⇒ Object
Returns the value of attribute field_10.
36 37 38 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 36 def field_10 @field_10 end |
#field_11 ⇒ Object
Returns the value of attribute field_11.
38 39 40 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 38 def field_11 @field_11 end |
#field_12 ⇒ Object
Returns the value of attribute field_12.
40 41 42 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 40 def field_12 @field_12 end |
#field_13 ⇒ Object
Returns the value of attribute field_13.
42 43 44 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 42 def field_13 @field_13 end |
#field_14 ⇒ Object
Returns the value of attribute field_14.
44 45 46 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 44 def field_14 @field_14 end |
#field_15 ⇒ Object
Returns the value of attribute field_15.
46 47 48 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 46 def field_15 @field_15 end |
#field_16 ⇒ Object
Returns the value of attribute field_16.
48 49 50 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 48 def field_16 @field_16 end |
#field_17 ⇒ Object
Returns the value of attribute field_17.
50 51 52 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 50 def field_17 @field_17 end |
#field_18 ⇒ Object
Returns the value of attribute field_18.
52 53 54 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 52 def field_18 @field_18 end |
#field_19 ⇒ Object
Returns the value of attribute field_19.
54 55 56 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 54 def field_19 @field_19 end |
#field_2 ⇒ Object
Returns the value of attribute field_2.
56 57 58 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 56 def field_2 @field_2 end |
#field_20 ⇒ Object
Returns the value of attribute field_20.
58 59 60 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 58 def field_20 @field_20 end |
#field_3 ⇒ Object
Returns the value of attribute field_3.
60 61 62 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 60 def field_3 @field_3 end |
#field_4 ⇒ Object
Returns the value of attribute field_4.
62 63 64 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 62 def field_4 @field_4 end |
#field_5 ⇒ Object
Returns the value of attribute field_5.
64 65 66 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 64 def field_5 @field_5 end |
#field_6 ⇒ Object
Returns the value of attribute field_6.
66 67 68 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 66 def field_6 @field_6 end |
#field_7 ⇒ Object
Returns the value of attribute field_7.
68 69 70 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 68 def field_7 @field_7 end |
#field_8 ⇒ Object
Returns the value of attribute field_8.
70 71 72 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 70 def field_8 @field_8 end |
#field_9 ⇒ Object
Returns the value of attribute field_9.
72 73 74 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 72 def field_9 @field_9 end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
101 102 103 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 101 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 75 def self.attribute_map { :'field_1' => :'field_1', :'field_10' => :'field_10', :'field_11' => :'field_11', :'field_12' => :'field_12', :'field_13' => :'field_13', :'field_14' => :'field_14', :'field_15' => :'field_15', :'field_16' => :'field_16', :'field_17' => :'field_17', :'field_18' => :'field_18', :'field_19' => :'field_19', :'field_2' => :'field_2', :'field_20' => :'field_20', :'field_3' => :'field_3', :'field_4' => :'field_4', :'field_5' => :'field_5', :'field_6' => :'field_6', :'field_7' => :'field_7', :'field_8' => :'field_8', :'field_9' => :'field_9' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
288 289 290 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 288 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
132 133 134 135 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 132 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 106 def self.openapi_types { :'field_1' => :'String', :'field_10' => :'String', :'field_11' => :'String', :'field_12' => :'String', :'field_13' => :'String', :'field_14' => :'String', :'field_15' => :'String', :'field_16' => :'String', :'field_17' => :'String', :'field_18' => :'String', :'field_19' => :'String', :'field_2' => :'String', :'field_20' => :'String', :'field_3' => :'String', :'field_4' => :'String', :'field_5' => :'String', :'field_6' => :'String', :'field_7' => :'String', :'field_8' => :'String', :'field_9' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 248 def ==(o) return true if self.equal?(o) self.class == o.class && field_1 == o.field_1 && field_10 == o.field_10 && field_11 == o.field_11 && field_12 == o.field_12 && field_13 == o.field_13 && field_14 == o.field_14 && field_15 == o.field_15 && field_16 == o.field_16 && field_17 == o.field_17 && field_18 == o.field_18 && field_19 == o.field_19 && field_2 == o.field_2 && field_20 == o.field_20 && field_3 == o.field_3 && field_4 == o.field_4 && field_5 == o.field_5 && field_6 == o.field_6 && field_7 == o.field_7 && field_8 == o.field_8 && field_9 == o.field_9 end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 319 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = Falcon.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 390 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 295 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
275 276 277 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 275 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
281 282 283 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 281 def hash [field_1, field_10, field_11, field_12, field_13, field_14, field_15, field_16, field_17, field_18, field_19, field_2, field_20, field_3, field_4, field_5, field_6, field_7, field_8, field_9].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
235 236 237 238 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 235 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
366 367 368 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 366 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 372 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
360 361 362 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 360 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
242 243 244 |
# File 'lib/crimson-falcon/models/domain_iot_imported_host.rb', line 242 def valid? true end |