Class: Falcon::DetectsExternalAlert
- Inherits:
-
Object
- Object
- Falcon::DetectsExternalAlert
- Defined in:
- lib/crimson-falcon/models/detects_external_alert.rb
Instance Attribute Summary collapse
-
#agent_id ⇒ Object
Device or sensor ID for which the Alert was generated.
-
#aggregate_id ⇒ Object
Common linkage between multiple Alerts that belong to the same detection bouquet.
-
#assigned_to_name ⇒ Object
Name of the person this Alert is assigned to.
-
#assigned_to_uid ⇒ Object
UserID to which this Alert is assigned to.
-
#assigned_to_uuid ⇒ Object
UUID to which this Alert is assigned to.
-
#cid ⇒ Object
Unique ID of CrowdStrike customers.
-
#composite_id ⇒ Object
An opaque internal identifier that can uniquely identify an Alert.
-
#confidence ⇒ Object
Confidence is a 1-100 integer value denoting the confidence that, when this Alert fires, it is indicative of malicious activity.
-
#crawled_timestamp ⇒ Object
indicates when ThreatGraph was crawled to gather info for this alert creation/update.
-
#created_timestamp ⇒ Object
indicates when the Alert was first written to backend store.
-
#data_domains ⇒ Object
Data Domains represents domains to which this alert belongs to.
-
#description ⇒ Object
Short, customer-visible summary of the detected activity.
-
#display_name ⇒ Object
Customer visible name for the Alert’s pattern.
-
#email_sent ⇒ Object
Boolean to know if we sent email regarding this Alert.
-
#external ⇒ Object
Boolean indicating if this Alert is internal or external.
-
#id ⇒ Object
Vertex key which triggers the formation of the Alert.
-
#linked_case_ids ⇒ Object
Linked Case Ids are cases that are associated with this alert.
-
#mitre_attack ⇒ Object
References to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures.
-
#name ⇒ Object
Pattern Name coming either from Taxonomy or directly from the ingested Alert.
-
#objective ⇒ Object
End goal that an attack adversary intends to achieve according to MITRE.
-
#pattern_id ⇒ Object
Taxonomy patternID for this Alert.
-
#platform ⇒ Object
Platform that this Alert was triggered on e.g.
-
#product ⇒ Object
Product specifies the SKU that this Alert belongs to e.g.
-
#resolution ⇒ Object
Alert resolution.
-
#scenario ⇒ Object
Scenario was used pre-Handrails to display additional killchain context for UI alerts.
-
#seconds_to_resolved ⇒ Object
Seconds To Resolved represents the seconds elapsed since this alert has been resolved.
-
#seconds_to_triaged ⇒ Object
Seconds To Triage represents the seconds elapsed since this alert has been triaged.
-
#severity ⇒ Object
Severity is also a 1-100 integer value, but unlike confidence severity impacts how a Alert is displayed in the UI.
-
#severity_name ⇒ Object
Severity name is a UI friendly bucketing of the severity integer.
-
#show_in_ui ⇒ Object
Boolean indicating if this Alert will be shown in the UI or if it’s hidden’.
-
#source_products ⇒ Object
Source Products are products that produced events which contributed to this alert.
-
#source_vendors ⇒ Object
Source Vendors are vendors that produced events which contributed to this alert.
-
#status ⇒ Object
Could be one of the following - New, closed, in_progress, reopened.
-
#tactic ⇒ Object
Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures.
-
#tactic_id ⇒ Object
Unique ID for the tactic seen in the Alert.
-
#tags ⇒ Object
Tags are string values associated with the alert that can be added or removed through the API.
-
#technique ⇒ Object
Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures.
-
#technique_id ⇒ Object
Unique ID for the technique seen in the Alert.
-
#timestamp ⇒ Object
stored value coming in directly from the ingested event or set by cloud in the absence of it.
-
#type ⇒ Object
Type of definition Detections Extensibility use.
-
#updated_timestamp ⇒ Object
indicates when the Alert was last modified.
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 = {}) ⇒ DetectsExternalAlert
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 = {}) ⇒ DetectsExternalAlert
Initializes the object
265 266 267 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 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 367 368 369 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 395 396 397 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 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 265 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DetectsExternalAlert` 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::DetectsExternalAlert`. 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_id') self.agent_id = attributes[:'agent_id'] end if attributes.key?(:'aggregate_id') self.aggregate_id = attributes[:'aggregate_id'] 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?(:'assigned_to_uuid') self.assigned_to_uuid = attributes[:'assigned_to_uuid'] end if attributes.key?(:'cid') self.cid = attributes[:'cid'] end if attributes.key?(:'composite_id') self.composite_id = attributes[:'composite_id'] end if attributes.key?(:'confidence') self.confidence = attributes[:'confidence'] end if attributes.key?(:'crawled_timestamp') self. = attributes[:'crawled_timestamp'] end if attributes.key?(:'created_timestamp') self. = attributes[:'created_timestamp'] end if attributes.key?(:'data_domains') if (value = attributes[:'data_domains']).is_a?(Array) self.data_domains = value end end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] end if attributes.key?(:'email_sent') self.email_sent = attributes[:'email_sent'] end if attributes.key?(:'external') self.external = attributes[:'external'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'linked_case_ids') if (value = attributes[:'linked_case_ids']).is_a?(Array) self.linked_case_ids = value end end if attributes.key?(:'mitre_attack') if (value = attributes[:'mitre_attack']).is_a?(Array) self.mitre_attack = value end end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'objective') self.objective = attributes[:'objective'] end if attributes.key?(:'pattern_id') self.pattern_id = attributes[:'pattern_id'] end if attributes.key?(:'platform') self.platform = attributes[:'platform'] end if attributes.key?(:'product') self.product = attributes[:'product'] end if attributes.key?(:'resolution') self.resolution = attributes[:'resolution'] end if attributes.key?(:'scenario') self.scenario = attributes[:'scenario'] 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?(:'severity') self.severity = attributes[:'severity'] end if attributes.key?(:'severity_name') self.severity_name = attributes[:'severity_name'] end if attributes.key?(:'show_in_ui') self.show_in_ui = attributes[:'show_in_ui'] end if attributes.key?(:'source_products') if (value = attributes[:'source_products']).is_a?(Array) self.source_products = value end end if attributes.key?(:'source_vendors') if (value = attributes[:'source_vendors']).is_a?(Array) self.source_vendors = value end end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'tactic') self.tactic = attributes[:'tactic'] end if attributes.key?(:'tactic_id') self.tactic_id = attributes[:'tactic_id'] end if attributes.key?(:'tags') if (value = attributes[:'tags']).is_a?(Array) self. = value end end if attributes.key?(:'technique') self.technique = attributes[:'technique'] end if attributes.key?(:'technique_id') self.technique_id = attributes[:'technique_id'] end if attributes.key?(:'timestamp') self. = attributes[:'timestamp'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'updated_timestamp') self. = attributes[:'updated_timestamp'] end end |
Instance Attribute Details
#agent_id ⇒ Object
Device or sensor ID for which the Alert was generated
36 37 38 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 36 def agent_id @agent_id end |
#aggregate_id ⇒ Object
Common linkage between multiple Alerts that belong to the same detection bouquet
39 40 41 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 39 def aggregate_id @aggregate_id end |
#assigned_to_name ⇒ Object
Name of the person this Alert is assigned to
42 43 44 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 42 def assigned_to_name @assigned_to_name end |
#assigned_to_uid ⇒ Object
UserID to which this Alert is assigned to
45 46 47 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 45 def assigned_to_uid @assigned_to_uid end |
#assigned_to_uuid ⇒ Object
UUID to which this Alert is assigned to
48 49 50 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 48 def assigned_to_uuid @assigned_to_uuid end |
#cid ⇒ Object
Unique ID of CrowdStrike customers
51 52 53 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 51 def cid @cid end |
#composite_id ⇒ Object
An opaque internal identifier that can uniquely identify an Alert
54 55 56 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 54 def composite_id @composite_id end |
#confidence ⇒ Object
Confidence is a 1-100 integer value denoting the confidence that, when this Alert fires, it is indicative of malicious activity
57 58 59 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 57 def confidence @confidence end |
#crawled_timestamp ⇒ Object
indicates when ThreatGraph was crawled to gather info for this alert creation/update
60 61 62 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 60 def end |
#created_timestamp ⇒ Object
indicates when the Alert was first written to backend store
63 64 65 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 63 def end |
#data_domains ⇒ Object
Data Domains represents domains to which this alert belongs to
66 67 68 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 66 def data_domains @data_domains end |
#description ⇒ Object
Short, customer-visible summary of the detected activity
69 70 71 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 69 def description @description end |
#display_name ⇒ Object
Customer visible name for the Alert’s pattern
72 73 74 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 72 def display_name @display_name end |
#email_sent ⇒ Object
Boolean to know if we sent email regarding this Alert
75 76 77 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 75 def email_sent @email_sent end |
#external ⇒ Object
Boolean indicating if this Alert is internal or external
78 79 80 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 78 def external @external end |
#id ⇒ Object
Vertex key which triggers the formation of the Alert
81 82 83 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 81 def id @id end |
#linked_case_ids ⇒ Object
Linked Case Ids are cases that are associated with this alert
84 85 86 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 84 def linked_case_ids @linked_case_ids end |
#mitre_attack ⇒ Object
References to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures
87 88 89 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 87 def mitre_attack @mitre_attack end |
#name ⇒ Object
Pattern Name coming either from Taxonomy or directly from the ingested Alert
90 91 92 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 90 def name @name end |
#objective ⇒ Object
End goal that an attack adversary intends to achieve according to MITRE
93 94 95 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 93 def objective @objective end |
#pattern_id ⇒ Object
Taxonomy patternID for this Alert
96 97 98 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 96 def pattern_id @pattern_id end |
#platform ⇒ Object
Platform that this Alert was triggered on e.g. Android, Windows, etc..
99 100 101 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 99 def platform @platform end |
#product ⇒ Object
Product specifies the SKU that this Alert belongs to e.g. mobile, idp, epp
102 103 104 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 102 def product @product end |
#resolution ⇒ Object
Alert resolution. Could be one of the following values: true_positive, false_positive, ignored
105 106 107 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 105 def resolution @resolution end |
#scenario ⇒ Object
Scenario was used pre-Handrails to display additional killchain context for UI alerts. With handrails, this field is mostly obsolete in favor of tactic/technique. Still, it can be useful for determining specific pattern types that are not straightforward to distinguish from other fields alone
108 109 110 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 108 def scenario @scenario end |
#seconds_to_resolved ⇒ Object
Seconds To Resolved represents the seconds elapsed since this alert has been resolved
111 112 113 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 111 def seconds_to_resolved @seconds_to_resolved end |
#seconds_to_triaged ⇒ Object
Seconds To Triage represents the seconds elapsed since this alert has been triaged
114 115 116 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 114 def seconds_to_triaged @seconds_to_triaged end |
#severity ⇒ Object
Severity is also a 1-100 integer value, but unlike confidence severity impacts how a Alert is displayed in the UI
117 118 119 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 117 def severity @severity end |
#severity_name ⇒ Object
Severity name is a UI friendly bucketing of the severity integer
120 121 122 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 120 def severity_name @severity_name end |
#show_in_ui ⇒ Object
Boolean indicating if this Alert will be shown in the UI or if it’s hidden’
123 124 125 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 123 def show_in_ui @show_in_ui end |
#source_products ⇒ Object
Source Products are products that produced events which contributed to this alert
126 127 128 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 126 def source_products @source_products end |
#source_vendors ⇒ Object
Source Vendors are vendors that produced events which contributed to this alert
129 130 131 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 129 def source_vendors @source_vendors end |
#status ⇒ Object
Could be one of the following - New, closed, in_progress, reopened
132 133 134 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 132 def status @status end |
#tactic ⇒ Object
Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures
135 136 137 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 135 def tactic @tactic end |
#tactic_id ⇒ Object
Unique ID for the tactic seen in the Alert
138 139 140 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 138 def tactic_id @tactic_id end |
#tags ⇒ Object
Tags are string values associated with the alert that can be added or removed through the API
141 142 143 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 141 def end |
#technique ⇒ Object
Tactic and Technique are references to MITRE ATT&CK, which is a public framework for tracking and modeling adversary tools techniques and procedures
144 145 146 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 144 def technique @technique end |
#technique_id ⇒ Object
Unique ID for the technique seen in the Alert
147 148 149 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 147 def technique_id @technique_id end |
#timestamp ⇒ Object
stored value coming in directly from the ingested event or set by cloud in the absence of it
150 151 152 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 150 def end |
#type ⇒ Object
Type of definition Detections Extensibility use. Keyed-off of Pattern of the incoming events/Alerts
153 154 155 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 153 def type @type end |
#updated_timestamp ⇒ Object
indicates when the Alert was last modified
156 157 158 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 156 def end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
206 207 208 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 206 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 159 def self.attribute_map { :'agent_id' => :'agent_id', :'aggregate_id' => :'aggregate_id', :'assigned_to_name' => :'assigned_to_name', :'assigned_to_uid' => :'assigned_to_uid', :'assigned_to_uuid' => :'assigned_to_uuid', :'cid' => :'cid', :'composite_id' => :'composite_id', :'confidence' => :'confidence', :'crawled_timestamp' => :'crawled_timestamp', :'created_timestamp' => :'created_timestamp', :'data_domains' => :'data_domains', :'description' => :'description', :'display_name' => :'display_name', :'email_sent' => :'email_sent', :'external' => :'external', :'id' => :'id', :'linked_case_ids' => :'linked_case_ids', :'mitre_attack' => :'mitre_attack', :'name' => :'name', :'objective' => :'objective', :'pattern_id' => :'pattern_id', :'platform' => :'platform', :'product' => :'product', :'resolution' => :'resolution', :'scenario' => :'scenario', :'seconds_to_resolved' => :'seconds_to_resolved', :'seconds_to_triaged' => :'seconds_to_triaged', :'severity' => :'severity', :'severity_name' => :'severity_name', :'show_in_ui' => :'show_in_ui', :'source_products' => :'source_products', :'source_vendors' => :'source_vendors', :'status' => :'status', :'tactic' => :'tactic', :'tactic_id' => :'tactic_id', :'tags' => :'tags', :'technique' => :'technique', :'technique_id' => :'technique_id', :'timestamp' => :'timestamp', :'type' => :'type', :'updated_timestamp' => :'updated_timestamp' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
736 737 738 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 736 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
258 259 260 261 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 258 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 211 def self.openapi_types { :'agent_id' => :'String', :'aggregate_id' => :'String', :'assigned_to_name' => :'String', :'assigned_to_uid' => :'String', :'assigned_to_uuid' => :'String', :'cid' => :'String', :'composite_id' => :'String', :'confidence' => :'Integer', :'crawled_timestamp' => :'Time', :'created_timestamp' => :'Time', :'data_domains' => :'Array<String>', :'description' => :'String', :'display_name' => :'String', :'email_sent' => :'Boolean', :'external' => :'Boolean', :'id' => :'String', :'linked_case_ids' => :'Array<String>', :'mitre_attack' => :'Array<DetectsMitreAttackMapping>', :'name' => :'String', :'objective' => :'String', :'pattern_id' => :'Integer', :'platform' => :'String', :'product' => :'String', :'resolution' => :'String', :'scenario' => :'String', :'seconds_to_resolved' => :'Integer', :'seconds_to_triaged' => :'Integer', :'severity' => :'Integer', :'severity_name' => :'String', :'show_in_ui' => :'Boolean', :'source_products' => :'Array<String>', :'source_vendors' => :'Array<String>', :'status' => :'String', :'tactic' => :'String', :'tactic_id' => :'String', :'tags' => :'Array<String>', :'technique' => :'String', :'technique_id' => :'String', :'timestamp' => :'Time', :'type' => :'String', :'updated_timestamp' => :'Time' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 675 def ==(o) return true if self.equal?(o) self.class == o.class && agent_id == o.agent_id && aggregate_id == o.aggregate_id && assigned_to_name == o.assigned_to_name && assigned_to_uid == o.assigned_to_uid && assigned_to_uuid == o.assigned_to_uuid && cid == o.cid && composite_id == o.composite_id && confidence == o.confidence && == o. && == o. && data_domains == o.data_domains && description == o.description && display_name == o.display_name && email_sent == o.email_sent && external == o.external && id == o.id && linked_case_ids == o.linked_case_ids && mitre_attack == o.mitre_attack && name == o.name && objective == o.objective && pattern_id == o.pattern_id && platform == o.platform && product == o.product && resolution == o.resolution && scenario == o.scenario && seconds_to_resolved == o.seconds_to_resolved && seconds_to_triaged == o.seconds_to_triaged && severity == o.severity && severity_name == o.severity_name && show_in_ui == o.show_in_ui && source_products == o.source_products && source_vendors == o.source_vendors && status == o.status && tactic == o.tactic && tactic_id == o.tactic_id && == o. && technique == o.technique && technique_id == o.technique_id && == o. && type == o.type && == o. end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 767 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
838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 838 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
743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 743 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
723 724 725 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 723 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
729 730 731 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 729 def hash [agent_id, aggregate_id, assigned_to_name, assigned_to_uid, assigned_to_uuid, cid, composite_id, confidence, , , data_domains, description, display_name, email_sent, external, id, linked_case_ids, mitre_attack, name, objective, pattern_id, platform, product, resolution, scenario, seconds_to_resolved, seconds_to_triaged, severity, severity_name, show_in_ui, source_products, source_vendors, status, tactic, tactic_id, , technique, technique_id, , type, ].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 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 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 457 def list_invalid_properties invalid_properties = Array.new if @agent_id.nil? invalid_properties.push('invalid value for "agent_id", agent_id cannot be nil.') end if @aggregate_id.nil? invalid_properties.push('invalid value for "aggregate_id", aggregate_id cannot be nil.') end if @assigned_to_name.nil? invalid_properties.push('invalid value for "assigned_to_name", assigned_to_name cannot be nil.') end if @assigned_to_uid.nil? invalid_properties.push('invalid value for "assigned_to_uid", assigned_to_uid cannot be nil.') end if @assigned_to_uuid.nil? invalid_properties.push('invalid value for "assigned_to_uuid", assigned_to_uuid cannot be nil.') end if @cid.nil? invalid_properties.push('invalid value for "cid", cid cannot be nil.') end if @composite_id.nil? invalid_properties.push('invalid value for "composite_id", composite_id cannot be nil.') end if @confidence.nil? invalid_properties.push('invalid value for "confidence", confidence cannot be nil.') end if .nil? invalid_properties.push('invalid value for "crawled_timestamp", crawled_timestamp cannot be nil.') end if .nil? invalid_properties.push('invalid value for "created_timestamp", created_timestamp cannot be nil.') end if @data_domains.nil? invalid_properties.push('invalid value for "data_domains", data_domains cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end if @display_name.nil? invalid_properties.push('invalid value for "display_name", display_name cannot be nil.') end if @email_sent.nil? invalid_properties.push('invalid value for "email_sent", email_sent cannot be nil.') end if @external.nil? invalid_properties.push('invalid value for "external", external cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @linked_case_ids.nil? invalid_properties.push('invalid value for "linked_case_ids", linked_case_ids cannot be nil.') end if @mitre_attack.nil? invalid_properties.push('invalid value for "mitre_attack", mitre_attack cannot be nil.') end if @name.nil? invalid_properties.push('invalid value for "name", name cannot be nil.') end if @objective.nil? invalid_properties.push('invalid value for "objective", objective cannot be nil.') end if @pattern_id.nil? invalid_properties.push('invalid value for "pattern_id", pattern_id cannot be nil.') end if @platform.nil? invalid_properties.push('invalid value for "platform", platform cannot be nil.') end if @product.nil? invalid_properties.push('invalid value for "product", product cannot be nil.') end if @resolution.nil? invalid_properties.push('invalid value for "resolution", resolution cannot be nil.') end if @scenario.nil? invalid_properties.push('invalid value for "scenario", scenario 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 @severity.nil? invalid_properties.push('invalid value for "severity", severity cannot be nil.') end if @severity_name.nil? invalid_properties.push('invalid value for "severity_name", severity_name 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 @source_products.nil? invalid_properties.push('invalid value for "source_products", source_products cannot be nil.') end if @source_vendors.nil? invalid_properties.push('invalid value for "source_vendors", source_vendors cannot be nil.') end if @status.nil? invalid_properties.push('invalid value for "status", status cannot be nil.') end if @tactic.nil? invalid_properties.push('invalid value for "tactic", tactic cannot be nil.') end if @tactic_id.nil? invalid_properties.push('invalid value for "tactic_id", tactic_id cannot be nil.') end if .nil? invalid_properties.push('invalid value for "tags", tags cannot be nil.') end if @technique.nil? invalid_properties.push('invalid value for "technique", technique cannot be nil.') end if @technique_id.nil? invalid_properties.push('invalid value for "technique_id", technique_id cannot be nil.') end if .nil? invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if .nil? invalid_properties.push('invalid value for "updated_timestamp", updated_timestamp cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
814 815 816 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 814 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
820 821 822 823 824 825 826 827 828 829 830 831 832 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 820 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
808 809 810 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 808 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/crimson-falcon/models/detects_external_alert.rb', line 628 def valid? return false if @agent_id.nil? return false if @aggregate_id.nil? return false if @assigned_to_name.nil? return false if @assigned_to_uid.nil? return false if @assigned_to_uuid.nil? return false if @cid.nil? return false if @composite_id.nil? return false if @confidence.nil? return false if .nil? return false if .nil? return false if @data_domains.nil? return false if @description.nil? return false if @display_name.nil? return false if @email_sent.nil? return false if @external.nil? return false if @id.nil? return false if @linked_case_ids.nil? return false if @mitre_attack.nil? return false if @name.nil? return false if @objective.nil? return false if @pattern_id.nil? return false if @platform.nil? return false if @product.nil? return false if @resolution.nil? return false if @scenario.nil? return false if @seconds_to_resolved.nil? return false if @seconds_to_triaged.nil? return false if @severity.nil? return false if @severity_name.nil? return false if @show_in_ui.nil? return false if @source_products.nil? return false if @source_vendors.nil? return false if @status.nil? return false if @tactic.nil? return false if @tactic_id.nil? return false if .nil? return false if @technique.nil? return false if @technique_id.nil? return false if .nil? return false if @type.nil? return false if .nil? true end |