Class: Falcon::ModelsAPICustomerAndImage
- Inherits:
-
Object
- Object
- Falcon::ModelsAPICustomerAndImage
- Defined in:
- lib/crimson-falcon/models/models_api_customer_and_image.rb
Instance Attribute Summary collapse
-
#ai_related ⇒ Object
Returns the value of attribute ai_related.
-
#base_image_id ⇒ Object
Returns the value of attribute base_image_id.
-
#base_os ⇒ Object
Returns the value of attribute base_os.
-
#base_os_version ⇒ Object
Returns the value of attribute base_os_version.
-
#cid ⇒ Object
Returns the value of attribute cid.
-
#config ⇒ Object
Returns the value of attribute config.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#crowdstrike_user ⇒ Object
Returns the value of attribute crowdstrike_user.
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#eol_date ⇒ Object
Returns the value of attribute eol_date.
-
#first_scanned ⇒ Object
Returns the value of attribute first_scanned.
-
#image_id ⇒ Object
Returns the value of attribute image_id.
-
#image_scanning_active ⇒ Object
Returns the value of attribute image_scanning_active.
-
#image_size ⇒ Object
Returns the value of attribute image_size.
-
#index_digest ⇒ Object
Returns the value of attribute index_digest.
-
#is_base_image ⇒ Object
Returns the value of attribute is_base_image.
-
#multi_arch ⇒ Object
Returns the value of attribute multi_arch.
-
#registry ⇒ Object
Returns the value of attribute registry.
-
#repository ⇒ Object
Returns the value of attribute repository.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_base_image ⇒ Object
Returns the value of attribute source_base_image.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
-
#warning ⇒ Object
Returns the value of attribute warning.
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 = {}) ⇒ ModelsAPICustomerAndImage
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 = {}) ⇒ ModelsAPICustomerAndImage
Initializes the object
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 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 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/models_api_customer_and_image.rb', line 159 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsAPICustomerAndImage` 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::ModelsAPICustomerAndImage`. 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?(:'ai_related') self. = attributes[:'ai_related'] end if attributes.key?(:'base_image_id') self.base_image_id = attributes[:'base_image_id'] end if attributes.key?(:'base_os') self.base_os = attributes[:'base_os'] end if attributes.key?(:'base_os_version') self.base_os_version = attributes[:'base_os_version'] end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'config') self.config = attributes[:'config'] end if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end if attributes.key?(:'crowdstrike_user') self.crowdstrike_user = attributes[:'crowdstrike_user'] end if attributes.key?(:'digest') self.digest = attributes[:'digest'] end if attributes.key?(:'eol_date') self.eol_date = attributes[:'eol_date'] end if attributes.key?(:'first_scanned') self.first_scanned = attributes[:'first_scanned'] end if attributes.key?(:'image_id') self.image_id = attributes[:'image_id'] end if attributes.key?(:'image_scanning_active') self.image_scanning_active = attributes[:'image_scanning_active'] end if attributes.key?(:'image_size') self.image_size = attributes[:'image_size'] end if attributes.key?(:'index_digest') self.index_digest = attributes[:'index_digest'] end if attributes.key?(:'is_base_image') self.is_base_image = attributes[:'is_base_image'] end if attributes.key?(:'multi_arch') self.multi_arch = attributes[:'multi_arch'] end if attributes.key?(:'registry') self.registry = attributes[:'registry'] end if attributes.key?(:'repository') self.repository = attributes[:'repository'] end if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'source_base_image') self.source_base_image = attributes[:'source_base_image'] end if attributes.key?(:'tag') self.tag = attributes[:'tag'] end if attributes.key?(:'updated_at') self.updated_at = attributes[:'updated_at'] end if attributes.key?(:'uuid') self.uuid = attributes[:'uuid'] end if attributes.key?(:'warning') self.warning = attributes[:'warning'] end end |
Instance Attribute Details
#ai_related ⇒ Object
Returns the value of attribute ai_related.
34 35 36 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 34 def @ai_related end |
#base_image_id ⇒ Object
Returns the value of attribute base_image_id.
36 37 38 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 36 def base_image_id @base_image_id end |
#base_os ⇒ Object
Returns the value of attribute base_os.
38 39 40 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 38 def base_os @base_os end |
#base_os_version ⇒ Object
Returns the value of attribute base_os_version.
40 41 42 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 40 def base_os_version @base_os_version end |
#cid ⇒ Object
Returns the value of attribute cid.
42 43 44 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 42 def cid @cid end |
#config ⇒ Object
Returns the value of attribute config.
44 45 46 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 44 def config @config end |
#created_at ⇒ Object
Returns the value of attribute created_at.
46 47 48 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 46 def created_at @created_at end |
#crowdstrike_user ⇒ Object
Returns the value of attribute crowdstrike_user.
48 49 50 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 48 def crowdstrike_user @crowdstrike_user end |
#digest ⇒ Object
Returns the value of attribute digest.
50 51 52 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 50 def digest @digest end |
#eol_date ⇒ Object
Returns the value of attribute eol_date.
52 53 54 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 52 def eol_date @eol_date end |
#first_scanned ⇒ Object
Returns the value of attribute first_scanned.
54 55 56 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 54 def first_scanned @first_scanned end |
#image_id ⇒ Object
Returns the value of attribute image_id.
56 57 58 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 56 def image_id @image_id end |
#image_scanning_active ⇒ Object
Returns the value of attribute image_scanning_active.
58 59 60 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 58 def image_scanning_active @image_scanning_active end |
#image_size ⇒ Object
Returns the value of attribute image_size.
60 61 62 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 60 def image_size @image_size end |
#index_digest ⇒ Object
Returns the value of attribute index_digest.
62 63 64 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 62 def index_digest @index_digest end |
#is_base_image ⇒ Object
Returns the value of attribute is_base_image.
64 65 66 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 64 def is_base_image @is_base_image end |
#multi_arch ⇒ Object
Returns the value of attribute multi_arch.
66 67 68 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 66 def multi_arch @multi_arch end |
#registry ⇒ Object
Returns the value of attribute registry.
68 69 70 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 68 def registry @registry end |
#repository ⇒ Object
Returns the value of attribute repository.
70 71 72 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 70 def repository @repository end |
#source ⇒ Object
Returns the value of attribute source.
72 73 74 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 72 def source @source end |
#source_base_image ⇒ Object
Returns the value of attribute source_base_image.
74 75 76 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 74 def source_base_image @source_base_image end |
#tag ⇒ Object
Returns the value of attribute tag.
76 77 78 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 76 def tag @tag end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
78 79 80 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 78 def updated_at @updated_at end |
#uuid ⇒ Object
Returns the value of attribute uuid.
80 81 82 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 80 def uuid @uuid end |
#warning ⇒ Object
Returns the value of attribute warning.
82 83 84 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 82 def warning @warning end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
116 117 118 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 116 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 85 def self.attribute_map { :'ai_related' => :'ai_related', :'base_image_id' => :'base_image_id', :'base_os' => :'base_os', :'base_os_version' => :'base_os_version', :'cid' => :'cid', :'config' => :'config', :'created_at' => :'created_at', :'crowdstrike_user' => :'crowdstrike_user', :'digest' => :'digest', :'eol_date' => :'eol_date', :'first_scanned' => :'first_scanned', :'image_id' => :'image_id', :'image_scanning_active' => :'image_scanning_active', :'image_size' => :'image_size', :'index_digest' => :'index_digest', :'is_base_image' => :'is_base_image', :'multi_arch' => :'multi_arch', :'registry' => :'registry', :'repository' => :'repository', :'source' => :'source', :'source_base_image' => :'source_base_image', :'tag' => :'tag', :'updated_at' => :'updated_at', :'uuid' => :'uuid', :'warning' => :'warning' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
443 444 445 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 443 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
152 153 154 155 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 152 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 121 def self.openapi_types { :'ai_related' => :'Boolean', :'base_image_id' => :'String', :'base_os' => :'String', :'base_os_version' => :'String', :'cid' => :'String', :'config' => :'ModelsLightWeightConfig', :'created_at' => :'String', :'crowdstrike_user' => :'String', :'digest' => :'String', :'eol_date' => :'String', :'first_scanned' => :'String', :'image_id' => :'String', :'image_scanning_active' => :'Boolean', :'image_size' => :'Integer', :'index_digest' => :'String', :'is_base_image' => :'Boolean', :'multi_arch' => :'Boolean', :'registry' => :'String', :'repository' => :'String', :'source' => :'String', :'source_base_image' => :'ModelsImageDetails', :'tag' => :'String', :'updated_at' => :'String', :'uuid' => :'String', :'warning' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 398 def ==(o) return true if self.equal?(o) self.class == o.class && == o. && base_image_id == o.base_image_id && base_os == o.base_os && base_os_version == o.base_os_version && cid == o.cid && config == o.config && created_at == o.created_at && crowdstrike_user == o.crowdstrike_user && digest == o.digest && eol_date == o.eol_date && first_scanned == o.first_scanned && image_id == o.image_id && image_scanning_active == o.image_scanning_active && image_size == o.image_size && index_digest == o.index_digest && is_base_image == o.is_base_image && multi_arch == o.multi_arch && registry == o.registry && repository == o.repository && source == o.source && source_base_image == o.source_base_image && tag == o.tag && updated_at == o.updated_at && uuid == o.uuid && warning == o.warning end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 474 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
545 546 547 548 549 550 551 552 553 554 555 556 557 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 545 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
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 450 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
430 431 432 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 430 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
436 437 438 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 436 def hash [, base_image_id, base_os, base_os_version, cid, config, created_at, crowdstrike_user, digest, eol_date, first_scanned, image_id, image_scanning_active, image_size, index_digest, is_base_image, multi_arch, registry, repository, source, source_base_image, tag, updated_at, uuid, warning].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 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 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 275 def list_invalid_properties invalid_properties = Array.new if @ai_related.nil? invalid_properties.push('invalid value for "ai_related", ai_related cannot be nil.') end if @base_os.nil? invalid_properties.push('invalid value for "base_os", base_os cannot be nil.') end if @base_os_version.nil? invalid_properties.push('invalid value for "base_os_version", base_os_version cannot be nil.') end if @cid.nil? invalid_properties.push('invalid value for "cid", cid cannot be nil.') end if @created_at.nil? invalid_properties.push('invalid value for "created_at", created_at cannot be nil.') end if @crowdstrike_user.nil? invalid_properties.push('invalid value for "crowdstrike_user", crowdstrike_user cannot be nil.') end if @digest.nil? invalid_properties.push('invalid value for "digest", digest cannot be nil.') end if @eol_date.nil? invalid_properties.push('invalid value for "eol_date", eol_date cannot be nil.') end if @first_scanned.nil? invalid_properties.push('invalid value for "first_scanned", first_scanned cannot be nil.') end if @image_id.nil? invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') end if @image_scanning_active.nil? invalid_properties.push('invalid value for "image_scanning_active", image_scanning_active cannot be nil.') end if @image_size.nil? invalid_properties.push('invalid value for "image_size", image_size cannot be nil.') end if @is_base_image.nil? invalid_properties.push('invalid value for "is_base_image", is_base_image cannot be nil.') end if @multi_arch.nil? invalid_properties.push('invalid value for "multi_arch", multi_arch cannot be nil.') end if @registry.nil? invalid_properties.push('invalid value for "registry", registry cannot be nil.') end if @repository.nil? invalid_properties.push('invalid value for "repository", repository cannot be nil.') end if @source.nil? invalid_properties.push('invalid value for "source", source cannot be nil.') end if @source_base_image.nil? invalid_properties.push('invalid value for "source_base_image", source_base_image cannot be nil.') end if @tag.nil? invalid_properties.push('invalid value for "tag", tag cannot be nil.') end if @updated_at.nil? invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.') end if @uuid.nil? invalid_properties.push('invalid value for "uuid", uuid cannot be nil.') end if @warning.nil? invalid_properties.push('invalid value for "warning", warning cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
521 522 523 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 521 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
527 528 529 530 531 532 533 534 535 536 537 538 539 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 527 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
515 516 517 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 515 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
# File 'lib/crimson-falcon/models/models_api_customer_and_image.rb', line 370 def valid? return false if @ai_related.nil? return false if @base_os.nil? return false if @base_os_version.nil? return false if @cid.nil? return false if @created_at.nil? return false if @crowdstrike_user.nil? return false if @digest.nil? return false if @eol_date.nil? return false if @first_scanned.nil? return false if @image_id.nil? return false if @image_scanning_active.nil? return false if @image_size.nil? return false if @is_base_image.nil? return false if @multi_arch.nil? return false if @registry.nil? return false if @repository.nil? return false if @source.nil? return false if @source_base_image.nil? return false if @tag.nil? return false if @updated_at.nil? return false if @uuid.nil? return false if @warning.nil? true end |