Class: Falcon::DomainAPIDetectionDocument
- Inherits:
-
Object
- Object
- Falcon::DomainAPIDetectionDocument
- Defined in:
- lib/crimson-falcon/models/domain_api_detection_document.rb
Instance Attribute Summary collapse
-
#adversary_ids ⇒ Object
Returns the value of attribute adversary_ids.
-
#assigned_to_name ⇒ Object
Returns the value of attribute assigned_to_name.
-
#assigned_to_uid ⇒ Object
Returns the value of attribute assigned_to_uid.
-
#behaviors ⇒ Object
Returns the value of attribute behaviors.
-
#behaviors_processed ⇒ Object
Returns the value of attribute behaviors_processed.
-
#cid ⇒ Object
Returns the value of attribute cid.
-
#created_timestamp ⇒ Object
Returns the value of attribute created_timestamp.
-
#date_updated ⇒ Object
Returns the value of attribute date_updated.
-
#detection_id ⇒ Object
Returns the value of attribute detection_id.
-
#device ⇒ Object
Returns the value of attribute device.
-
#email_sent ⇒ Object
Returns the value of attribute email_sent.
-
#first_behavior ⇒ Object
Returns the value of attribute first_behavior.
-
#hostinfo ⇒ Object
Returns the value of attribute hostinfo.
-
#last_behavior ⇒ Object
Returns the value of attribute last_behavior.
-
#max_confidence ⇒ Object
Returns the value of attribute max_confidence.
-
#max_severity ⇒ Object
Returns the value of attribute max_severity.
-
#max_severity_displayname ⇒ Object
Returns the value of attribute max_severity_displayname.
-
#overwatch_notes ⇒ Object
Returns the value of attribute overwatch_notes.
-
#quarantined_files ⇒ Object
Returns the value of attribute quarantined_files.
-
#seconds_to_resolved ⇒ Object
Returns the value of attribute seconds_to_resolved.
-
#seconds_to_triaged ⇒ Object
Returns the value of attribute seconds_to_triaged.
-
#show_in_ui ⇒ Object
Returns the value of attribute show_in_ui.
-
#status ⇒ Object
Returns the value of attribute status.
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 = {}) ⇒ DomainAPIDetectionDocument
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 = {}) ⇒ DomainAPIDetectionDocument
Initializes the object
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 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 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 152 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainAPIDetectionDocument` 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::DomainAPIDetectionDocument`. 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?(:'adversary_ids') if (value = attributes[:'adversary_ids']).is_a?(Array) self.adversary_ids = value end end if attributes.key?(:'assigned_to_name') self.assigned_to_name = attributes[:'assigned_to_name'] end if attributes.key?(:'assigned_to_uid') self.assigned_to_uid = attributes[:'assigned_to_uid'] end if attributes.key?(:'behaviors') if (value = attributes[:'behaviors']).is_a?(Array) self.behaviors = value end end if attributes.key?(:'behaviors_processed') if (value = attributes[:'behaviors_processed']).is_a?(Array) self.behaviors_processed = value end end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'created_timestamp') self. = attributes[:'created_timestamp'] end if attributes.key?(:'date_updated') self.date_updated = attributes[:'date_updated'] end if attributes.key?(:'detection_id') self.detection_id = attributes[:'detection_id'] end if attributes.key?(:'device') self.device = attributes[:'device'] end if attributes.key?(:'email_sent') self.email_sent = attributes[:'email_sent'] end if attributes.key?(:'first_behavior') self.first_behavior = attributes[:'first_behavior'] end if attributes.key?(:'hostinfo') self.hostinfo = attributes[:'hostinfo'] end if attributes.key?(:'last_behavior') self.last_behavior = attributes[:'last_behavior'] end if attributes.key?(:'max_confidence') self.max_confidence = attributes[:'max_confidence'] end if attributes.key?(:'max_severity') self.max_severity = attributes[:'max_severity'] end if attributes.key?(:'max_severity_displayname') self.max_severity_displayname = attributes[:'max_severity_displayname'] end if attributes.key?(:'overwatch_notes') self.overwatch_notes = attributes[:'overwatch_notes'] end if attributes.key?(:'quarantined_files') if (value = attributes[:'quarantined_files']).is_a?(Array) self.quarantined_files = value end end if attributes.key?(:'seconds_to_resolved') self.seconds_to_resolved = attributes[:'seconds_to_resolved'] end if attributes.key?(:'seconds_to_triaged') self.seconds_to_triaged = attributes[:'seconds_to_triaged'] end if attributes.key?(:'show_in_ui') self.show_in_ui = attributes[:'show_in_ui'] end if attributes.key?(:'status') self.status = attributes[:'status'] end end |
Instance Attribute Details
#adversary_ids ⇒ Object
Returns the value of attribute adversary_ids.
35 36 37 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 35 def adversary_ids @adversary_ids end |
#assigned_to_name ⇒ Object
Returns the value of attribute assigned_to_name.
37 38 39 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 37 def assigned_to_name @assigned_to_name end |
#assigned_to_uid ⇒ Object
Returns the value of attribute assigned_to_uid.
39 40 41 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 39 def assigned_to_uid @assigned_to_uid end |
#behaviors ⇒ Object
Returns the value of attribute behaviors.
41 42 43 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 41 def behaviors @behaviors end |
#behaviors_processed ⇒ Object
Returns the value of attribute behaviors_processed.
43 44 45 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 43 def behaviors_processed @behaviors_processed end |
#cid ⇒ Object
Returns the value of attribute cid.
45 46 47 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 45 def cid @cid end |
#created_timestamp ⇒ Object
Returns the value of attribute created_timestamp.
47 48 49 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 47 def @created_timestamp end |
#date_updated ⇒ Object
Returns the value of attribute date_updated.
49 50 51 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 49 def date_updated @date_updated end |
#detection_id ⇒ Object
Returns the value of attribute detection_id.
51 52 53 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 51 def detection_id @detection_id end |
#device ⇒ Object
Returns the value of attribute device.
53 54 55 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 53 def device @device end |
#email_sent ⇒ Object
Returns the value of attribute email_sent.
55 56 57 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 55 def email_sent @email_sent end |
#first_behavior ⇒ Object
Returns the value of attribute first_behavior.
57 58 59 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 57 def first_behavior @first_behavior end |
#hostinfo ⇒ Object
Returns the value of attribute hostinfo.
59 60 61 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 59 def hostinfo @hostinfo end |
#last_behavior ⇒ Object
Returns the value of attribute last_behavior.
61 62 63 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 61 def last_behavior @last_behavior end |
#max_confidence ⇒ Object
Returns the value of attribute max_confidence.
63 64 65 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 63 def max_confidence @max_confidence end |
#max_severity ⇒ Object
Returns the value of attribute max_severity.
65 66 67 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 65 def max_severity @max_severity end |
#max_severity_displayname ⇒ Object
Returns the value of attribute max_severity_displayname.
67 68 69 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 67 def max_severity_displayname @max_severity_displayname end |
#overwatch_notes ⇒ Object
Returns the value of attribute overwatch_notes.
69 70 71 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 69 def overwatch_notes @overwatch_notes end |
#quarantined_files ⇒ Object
Returns the value of attribute quarantined_files.
71 72 73 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 71 def quarantined_files @quarantined_files end |
#seconds_to_resolved ⇒ Object
Returns the value of attribute seconds_to_resolved.
73 74 75 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 73 def seconds_to_resolved @seconds_to_resolved end |
#seconds_to_triaged ⇒ Object
Returns the value of attribute seconds_to_triaged.
75 76 77 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 75 def seconds_to_triaged @seconds_to_triaged end |
#show_in_ui ⇒ Object
Returns the value of attribute show_in_ui.
77 78 79 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 77 def show_in_ui @show_in_ui end |
#status ⇒ Object
Returns the value of attribute status.
79 80 81 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 79 def status @status end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
111 112 113 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 111 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 82 def self.attribute_map { :'adversary_ids' => :'adversary_ids', :'assigned_to_name' => :'assigned_to_name', :'assigned_to_uid' => :'assigned_to_uid', :'behaviors' => :'behaviors', :'behaviors_processed' => :'behaviors_processed', :'cid' => :'cid', :'created_timestamp' => :'created_timestamp', :'date_updated' => :'date_updated', :'detection_id' => :'detection_id', :'device' => :'device', :'email_sent' => :'email_sent', :'first_behavior' => :'first_behavior', :'hostinfo' => :'hostinfo', :'last_behavior' => :'last_behavior', :'max_confidence' => :'max_confidence', :'max_severity' => :'max_severity', :'max_severity_displayname' => :'max_severity_displayname', :'overwatch_notes' => :'overwatch_notes', :'quarantined_files' => :'quarantined_files', :'seconds_to_resolved' => :'seconds_to_resolved', :'seconds_to_triaged' => :'seconds_to_triaged', :'show_in_ui' => :'show_in_ui', :'status' => :'status' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
404 405 406 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 404 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
145 146 147 148 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 145 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 116 def self.openapi_types { :'adversary_ids' => :'Array<Integer>', :'assigned_to_name' => :'String', :'assigned_to_uid' => :'String', :'behaviors' => :'Array<DetectsBehavior>', :'behaviors_processed' => :'Array<String>', :'cid' => :'String', :'created_timestamp' => :'Time', :'date_updated' => :'String', :'detection_id' => :'String', :'device' => :'DetectsDeviceDetailIndexed', :'email_sent' => :'Boolean', :'first_behavior' => :'Time', :'hostinfo' => :'DetectsHostInfo', :'last_behavior' => :'Time', :'max_confidence' => :'Integer', :'max_severity' => :'Integer', :'max_severity_displayname' => :'String', :'overwatch_notes' => :'String', :'quarantined_files' => :'Array<DetectsQuarantinedFile>', :'seconds_to_resolved' => :'Integer', :'seconds_to_triaged' => :'Integer', :'show_in_ui' => :'Boolean', :'status' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 361 def ==(o) return true if self.equal?(o) self.class == o.class && adversary_ids == o.adversary_ids && assigned_to_name == o.assigned_to_name && assigned_to_uid == o.assigned_to_uid && behaviors == o.behaviors && behaviors_processed == o.behaviors_processed && cid == o.cid && == o. && date_updated == o.date_updated && detection_id == o.detection_id && device == o.device && email_sent == o.email_sent && first_behavior == o.first_behavior && hostinfo == o.hostinfo && last_behavior == o.last_behavior && max_confidence == o.max_confidence && max_severity == o.max_severity && max_severity_displayname == o.max_severity_displayname && overwatch_notes == o.overwatch_notes && quarantined_files == o.quarantined_files && seconds_to_resolved == o.seconds_to_resolved && seconds_to_triaged == o.seconds_to_triaged && show_in_ui == o.show_in_ui && status == o.status end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 435 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
506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 506 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
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 411 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
391 392 393 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 391 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
397 398 399 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 397 def hash [adversary_ids, assigned_to_name, assigned_to_uid, behaviors, behaviors_processed, cid, , date_updated, detection_id, device, email_sent, first_behavior, hostinfo, last_behavior, max_confidence, max_severity, max_severity_displayname, overwatch_notes, quarantined_files, seconds_to_resolved, seconds_to_triaged, show_in_ui, status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
268 269 270 271 272 273 274 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 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 268 def list_invalid_properties invalid_properties = Array.new if @behaviors_processed.nil? invalid_properties.push('invalid value for "behaviors_processed", behaviors_processed cannot be nil.') end if @cid.nil? invalid_properties.push('invalid value for "cid", cid cannot be nil.') end if @created_timestamp.nil? invalid_properties.push('invalid value for "created_timestamp", created_timestamp cannot be nil.') end if @detection_id.nil? invalid_properties.push('invalid value for "detection_id", detection_id cannot be nil.') end if @device.nil? invalid_properties.push('invalid value for "device", device cannot be nil.') end if @email_sent.nil? invalid_properties.push('invalid value for "email_sent", email_sent cannot be nil.') end if @first_behavior.nil? invalid_properties.push('invalid value for "first_behavior", first_behavior cannot be nil.') end if @hostinfo.nil? invalid_properties.push('invalid value for "hostinfo", hostinfo cannot be nil.') end if @last_behavior.nil? invalid_properties.push('invalid value for "last_behavior", last_behavior cannot be nil.') end if @max_confidence.nil? invalid_properties.push('invalid value for "max_confidence", max_confidence cannot be nil.') end if @max_severity.nil? invalid_properties.push('invalid value for "max_severity", max_severity cannot be nil.') end if @max_severity_displayname.nil? invalid_properties.push('invalid value for "max_severity_displayname", max_severity_displayname cannot be nil.') end if @seconds_to_resolved.nil? invalid_properties.push('invalid value for "seconds_to_resolved", seconds_to_resolved cannot be nil.') end if @seconds_to_triaged.nil? invalid_properties.push('invalid value for "seconds_to_triaged", seconds_to_triaged cannot be nil.') end if @show_in_ui.nil? invalid_properties.push('invalid value for "show_in_ui", show_in_ui cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
482 483 484 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 482 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 488 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
476 477 478 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 476 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/crimson-falcon/models/domain_api_detection_document.rb', line 339 def valid? return false if @behaviors_processed.nil? return false if @cid.nil? return false if @created_timestamp.nil? return false if @detection_id.nil? return false if @device.nil? return false if @email_sent.nil? return false if @first_behavior.nil? return false if @hostinfo.nil? return false if @last_behavior.nil? return false if @max_confidence.nil? return false if @max_severity.nil? return false if @max_severity_displayname.nil? return false if @seconds_to_resolved.nil? return false if @seconds_to_triaged.nil? return false if @show_in_ui.nil? return false if @status.nil? true end |