Class: Falcon::ModelsInventoryScanRequestType
- Inherits:
-
Object
- Object
- Falcon::ModelsInventoryScanRequestType
- Defined in:
- lib/crimson-falcon/models/models_inventory_scan_request_type.rb
Instance Attribute Summary collapse
-
#agent_uuid ⇒ Object
Returns the value of attribute agent_uuid.
-
#agent_version ⇒ Object
Returns the value of attribute agent_version.
-
#agent_version_hash ⇒ Object
Returns the value of attribute agent_version_hash.
-
#cluster_id ⇒ Object
Returns the value of attribute cluster_id.
-
#cluster_name ⇒ Object
Returns the value of attribute cluster_name.
-
#container_id ⇒ Object
Returns the value of attribute container_id.
-
#ephemeral_scan ⇒ Object
Returns the value of attribute ephemeral_scan.
-
#helm_version ⇒ Object
Returns the value of attribute helm_version.
-
#high_entropy_strings ⇒ Object
Returns the value of attribute high_entropy_strings.
-
#host_ip ⇒ Object
Returns the value of attribute host_ip.
-
#host_name ⇒ Object
Returns the value of attribute host_name.
-
#inventory ⇒ Object
Returns the value of attribute inventory.
-
#original_image_name ⇒ Object
Returns the value of attribute original_image_name.
-
#pod_id ⇒ Object
Returns the value of attribute pod_id.
-
#pod_name ⇒ Object
Returns the value of attribute pod_name.
-
#pod_namespace ⇒ Object
Returns the value of attribute pod_namespace.
-
#runmode ⇒ Object
Returns the value of attribute runmode.
-
#runtime_type ⇒ Object
Returns the value of attribute runtime_type.
-
#scan_request ⇒ Object
Returns the value of attribute scan_request.
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 = {}) ⇒ ModelsInventoryScanRequestType
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 = {}) ⇒ ModelsInventoryScanRequestType
Initializes the object
136 137 138 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 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 136 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::ModelsInventoryScanRequestType` 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::ModelsInventoryScanRequestType`. 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?(:'agent_uuid') self.agent_uuid = attributes[:'agent_uuid'] end if attributes.key?(:'agent_version') self.agent_version = attributes[:'agent_version'] end if attributes.key?(:'agent_version_hash') self.agent_version_hash = attributes[:'agent_version_hash'] end if attributes.key?(:'cluster_id') self.cluster_id = attributes[:'cluster_id'] end if attributes.key?(:'cluster_name') self.cluster_name = attributes[:'cluster_name'] end if attributes.key?(:'container_id') self.container_id = attributes[:'container_id'] end if attributes.key?(:'ephemeral_scan') self.ephemeral_scan = attributes[:'ephemeral_scan'] end if attributes.key?(:'helm_version') self.helm_version = attributes[:'helm_version'] end if attributes.key?(:'high_entropy_strings') if (value = attributes[:'high_entropy_strings']).is_a?(Array) self.high_entropy_strings = value end end if attributes.key?(:'host_ip') self.host_ip = attributes[:'host_ip'] end if attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] end if attributes.key?(:'inventory') self.inventory = attributes[:'inventory'] end if attributes.key?(:'original_image_name') self.original_image_name = attributes[:'original_image_name'] end if attributes.key?(:'pod_id') self.pod_id = attributes[:'pod_id'] end if attributes.key?(:'pod_name') self.pod_name = attributes[:'pod_name'] end if attributes.key?(:'pod_namespace') self.pod_namespace = attributes[:'pod_namespace'] end if attributes.key?(:'runmode') self.runmode = attributes[:'runmode'] end if attributes.key?(:'runtime_type') self.runtime_type = attributes[:'runtime_type'] end if attributes.key?(:'scan_request') self.scan_request = attributes[:'scan_request'] end end |
Instance Attribute Details
#agent_uuid ⇒ Object
Returns the value of attribute agent_uuid.
35 36 37 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 35 def agent_uuid @agent_uuid end |
#agent_version ⇒ Object
Returns the value of attribute agent_version.
37 38 39 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 37 def agent_version @agent_version end |
#agent_version_hash ⇒ Object
Returns the value of attribute agent_version_hash.
39 40 41 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 39 def agent_version_hash @agent_version_hash end |
#cluster_id ⇒ Object
Returns the value of attribute cluster_id.
41 42 43 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 41 def cluster_id @cluster_id end |
#cluster_name ⇒ Object
Returns the value of attribute cluster_name.
43 44 45 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 43 def cluster_name @cluster_name end |
#container_id ⇒ Object
Returns the value of attribute container_id.
45 46 47 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 45 def container_id @container_id end |
#ephemeral_scan ⇒ Object
Returns the value of attribute ephemeral_scan.
47 48 49 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 47 def ephemeral_scan @ephemeral_scan end |
#helm_version ⇒ Object
Returns the value of attribute helm_version.
49 50 51 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 49 def helm_version @helm_version end |
#high_entropy_strings ⇒ Object
Returns the value of attribute high_entropy_strings.
51 52 53 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 51 def high_entropy_strings @high_entropy_strings end |
#host_ip ⇒ Object
Returns the value of attribute host_ip.
53 54 55 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 53 def host_ip @host_ip end |
#host_name ⇒ Object
Returns the value of attribute host_name.
55 56 57 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 55 def host_name @host_name end |
#inventory ⇒ Object
Returns the value of attribute inventory.
57 58 59 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 57 def inventory @inventory end |
#original_image_name ⇒ Object
Returns the value of attribute original_image_name.
59 60 61 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 59 def original_image_name @original_image_name end |
#pod_id ⇒ Object
Returns the value of attribute pod_id.
61 62 63 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 61 def pod_id @pod_id end |
#pod_name ⇒ Object
Returns the value of attribute pod_name.
63 64 65 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 63 def pod_name @pod_name end |
#pod_namespace ⇒ Object
Returns the value of attribute pod_namespace.
65 66 67 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 65 def pod_namespace @pod_namespace end |
#runmode ⇒ Object
Returns the value of attribute runmode.
67 68 69 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 67 def runmode @runmode end |
#runtime_type ⇒ Object
Returns the value of attribute runtime_type.
69 70 71 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 69 def runtime_type @runtime_type end |
#scan_request ⇒ Object
Returns the value of attribute scan_request.
71 72 73 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 71 def scan_request @scan_request end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
99 100 101 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 99 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 74 def self.attribute_map { :'agent_uuid' => :'agent_uuid', :'agent_version' => :'agent_version', :'agent_version_hash' => :'agent_version_hash', :'cluster_id' => :'cluster_id', :'cluster_name' => :'cluster_name', :'container_id' => :'container_id', :'ephemeral_scan' => :'ephemeral_scan', :'helm_version' => :'helm_version', :'high_entropy_strings' => :'high_entropy_strings', :'host_ip' => :'host_ip', :'host_name' => :'host_name', :'inventory' => :'inventory', :'original_image_name' => :'original_image_name', :'pod_id' => :'pod_id', :'pod_name' => :'pod_name', :'pod_namespace' => :'pod_namespace', :'runmode' => :'runmode', :'runtime_type' => :'runtime_type', :'scan_request' => :'scan_request' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
342 343 344 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 342 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
129 130 131 132 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 129 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 104 def self.openapi_types { :'agent_uuid' => :'String', :'agent_version' => :'String', :'agent_version_hash' => :'String', :'cluster_id' => :'String', :'cluster_name' => :'String', :'container_id' => :'String', :'ephemeral_scan' => :'Boolean', :'helm_version' => :'String', :'high_entropy_strings' => :'Array<ModelsHEStringFileInfoType>', :'host_ip' => :'String', :'host_name' => :'String', :'inventory' => :'ModelsInventoryType', :'original_image_name' => :'String', :'pod_id' => :'String', :'pod_name' => :'String', :'pod_namespace' => :'String', :'runmode' => :'String', :'runtime_type' => :'String', :'scan_request' => :'ModelsScanRequestType' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 303 def ==(o) return true if self.equal?(o) self.class == o.class && agent_uuid == o.agent_uuid && agent_version == o.agent_version && agent_version_hash == o.agent_version_hash && cluster_id == o.cluster_id && cluster_name == o.cluster_name && container_id == o.container_id && ephemeral_scan == o.ephemeral_scan && helm_version == o.helm_version && high_entropy_strings == o.high_entropy_strings && host_ip == o.host_ip && host_name == o.host_name && inventory == o.inventory && original_image_name == o.original_image_name && pod_id == o.pod_id && pod_name == o.pod_name && pod_namespace == o.pod_namespace && runmode == o.runmode && runtime_type == o.runtime_type && scan_request == o.scan_request end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 373 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
444 445 446 447 448 449 450 451 452 453 454 455 456 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 444 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
349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 349 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
329 330 331 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 329 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
335 336 337 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 335 def hash [agent_uuid, agent_version, agent_version_hash, cluster_id, cluster_name, container_id, ephemeral_scan, helm_version, high_entropy_strings, host_ip, host_name, inventory, original_image_name, pod_id, pod_name, pod_namespace, runmode, runtime_type, scan_request].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 230 def list_invalid_properties invalid_properties = Array.new if @agent_uuid.nil? invalid_properties.push('invalid value for "agent_uuid", agent_uuid cannot be nil.') end if @agent_version.nil? invalid_properties.push('invalid value for "agent_version", agent_version cannot be nil.') end if @agent_version_hash.nil? invalid_properties.push('invalid value for "agent_version_hash", agent_version_hash cannot be nil.') end if @cluster_id.nil? invalid_properties.push('invalid value for "cluster_id", cluster_id cannot be nil.') end if @cluster_name.nil? invalid_properties.push('invalid value for "cluster_name", cluster_name cannot be nil.') end if @helm_version.nil? invalid_properties.push('invalid value for "helm_version", helm_version cannot be nil.') end if @host_ip.nil? invalid_properties.push('invalid value for "host_ip", host_ip cannot be nil.') end if @host_name.nil? invalid_properties.push('invalid value for "host_name", host_name cannot be nil.') end if @inventory.nil? invalid_properties.push('invalid value for "inventory", inventory cannot be nil.') end if @original_image_name.nil? invalid_properties.push('invalid value for "original_image_name", original_image_name cannot be nil.') end if @runmode.nil? invalid_properties.push('invalid value for "runmode", runmode cannot be nil.') end if @scan_request.nil? invalid_properties.push('invalid value for "scan_request", scan_request cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
420 421 422 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 420 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 426 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
414 415 416 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 414 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
# File 'lib/crimson-falcon/models/models_inventory_scan_request_type.rb', line 285 def valid? return false if @agent_uuid.nil? return false if @agent_version.nil? return false if @agent_version_hash.nil? return false if @cluster_id.nil? return false if @cluster_name.nil? return false if @helm_version.nil? return false if @host_ip.nil? return false if @host_name.nil? return false if @inventory.nil? return false if @original_image_name.nil? return false if @runmode.nil? return false if @scan_request.nil? true end |