Class: Falcon::DomainKillChain
- Inherits:
-
Object
- Object
- Falcon::DomainKillChain
- Defined in:
- lib/crimson-falcon/models/domain_kill_chain.rb
Instance Attribute Summary collapse
-
#actions_and_objectives ⇒ Object
Free form text describing actions and objectives of the actor.
-
#command_and_control ⇒ Object
Free form text describing methods and tools used to communicate with and control an infected machine or network.
-
#delivery ⇒ Object
Free form text describing malware delivery by actor.
-
#exploitation ⇒ Object
Comma separated values of vulnerabilities by CVE codes that are exploited by actor.
-
#installation ⇒ Object
Free form text describing actor’s malware installation on the asset.
-
#objectives ⇒ Object
Legacy field, not used and empty.
-
#reconnaissance ⇒ Object
Free form text describing how targets are researched, identified and selected.
-
#rich_text_actions_and_objectives ⇒ Object
Rich free form text describing actions and objectives of the actor.
-
#rich_text_command_and_control ⇒ Object
Rich free form text describing methods and tools used to communicate with and control an infected machine or network.
-
#rich_text_delivery ⇒ Object
Rich free form text describing malware delivery by actor.
-
#rich_text_exploitation ⇒ Object
Rich text comma separated values of vulnerabilities by CVE codes that are exploited by actor.
-
#rich_text_installation ⇒ Object
Rich free form text describing actor’s malware installation on the asset.
-
#rich_text_objectives ⇒ Object
Legacy field, not used and empty.
-
#rich_text_reconnaissance ⇒ Object
Rich free form text describing how targets are researched, identified and selected.
-
#rich_text_weaponization ⇒ Object
Rich free form text describing weaponization of the threat/malware (couples exploit with backdoor into deliverable payload).
-
#weaponization ⇒ Object
Free form text describing weaponization of the threat/malware (couples exploit with backdoor into deliverable payload).
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 = {}) ⇒ DomainKillChain
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 = {}) ⇒ DomainKillChain
Initializes the object
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 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 140 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainKillChain` 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::DomainKillChain`. 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?(:'actions_and_objectives') self.actions_and_objectives = attributes[:'actions_and_objectives'] end if attributes.key?(:'command_and_control') self.command_and_control = attributes[:'command_and_control'] end if attributes.key?(:'delivery') self.delivery = attributes[:'delivery'] end if attributes.key?(:'exploitation') self.exploitation = attributes[:'exploitation'] end if attributes.key?(:'installation') self.installation = attributes[:'installation'] end if attributes.key?(:'objectives') self.objectives = attributes[:'objectives'] end if attributes.key?(:'reconnaissance') self.reconnaissance = attributes[:'reconnaissance'] end if attributes.key?(:'rich_text_actions_and_objectives') self.rich_text_actions_and_objectives = attributes[:'rich_text_actions_and_objectives'] end if attributes.key?(:'rich_text_command_and_control') self.rich_text_command_and_control = attributes[:'rich_text_command_and_control'] end if attributes.key?(:'rich_text_delivery') self.rich_text_delivery = attributes[:'rich_text_delivery'] end if attributes.key?(:'rich_text_exploitation') self.rich_text_exploitation = attributes[:'rich_text_exploitation'] end if attributes.key?(:'rich_text_installation') self.rich_text_installation = attributes[:'rich_text_installation'] end if attributes.key?(:'rich_text_objectives') self.rich_text_objectives = attributes[:'rich_text_objectives'] end if attributes.key?(:'rich_text_reconnaissance') self.rich_text_reconnaissance = attributes[:'rich_text_reconnaissance'] end if attributes.key?(:'rich_text_weaponization') self.rich_text_weaponization = attributes[:'rich_text_weaponization'] end if attributes.key?(:'weaponization') self.weaponization = attributes[:'weaponization'] end end |
Instance Attribute Details
#actions_and_objectives ⇒ Object
Free form text describing actions and objectives of the actor
36 37 38 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 36 def actions_and_objectives @actions_and_objectives end |
#command_and_control ⇒ Object
Free form text describing methods and tools used to communicate with and control an infected machine or network
39 40 41 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 39 def command_and_control @command_and_control end |
#delivery ⇒ Object
Free form text describing malware delivery by actor
42 43 44 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 42 def delivery @delivery end |
#exploitation ⇒ Object
Comma separated values of vulnerabilities by CVE codes that are exploited by actor
45 46 47 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 45 def exploitation @exploitation end |
#installation ⇒ Object
Free form text describing actor’s malware installation on the asset
48 49 50 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 48 def installation @installation end |
#objectives ⇒ Object
Legacy field, not used and empty
51 52 53 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 51 def objectives @objectives end |
#reconnaissance ⇒ Object
Free form text describing how targets are researched, identified and selected
54 55 56 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 54 def reconnaissance @reconnaissance end |
#rich_text_actions_and_objectives ⇒ Object
Rich free form text describing actions and objectives of the actor
57 58 59 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 57 def rich_text_actions_and_objectives @rich_text_actions_and_objectives end |
#rich_text_command_and_control ⇒ Object
Rich free form text describing methods and tools used to communicate with and control an infected machine or network
60 61 62 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 60 def rich_text_command_and_control @rich_text_command_and_control end |
#rich_text_delivery ⇒ Object
Rich free form text describing malware delivery by actor
63 64 65 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 63 def rich_text_delivery @rich_text_delivery end |
#rich_text_exploitation ⇒ Object
Rich text comma separated values of vulnerabilities by CVE codes that are exploited by actor
66 67 68 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 66 def rich_text_exploitation @rich_text_exploitation end |
#rich_text_installation ⇒ Object
Rich free form text describing actor’s malware installation on the asset
69 70 71 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 69 def rich_text_installation @rich_text_installation end |
#rich_text_objectives ⇒ Object
Legacy field, not used and empty
72 73 74 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 72 def rich_text_objectives @rich_text_objectives end |
#rich_text_reconnaissance ⇒ Object
Rich free form text describing how targets are researched, identified and selected
75 76 77 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 75 def rich_text_reconnaissance @rich_text_reconnaissance end |
#rich_text_weaponization ⇒ Object
Rich free form text describing weaponization of the threat/malware (couples exploit with backdoor into deliverable payload)
78 79 80 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 78 def rich_text_weaponization @rich_text_weaponization end |
#weaponization ⇒ Object
Free form text describing weaponization of the threat/malware (couples exploit with backdoor into deliverable payload)
81 82 83 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 81 def weaponization @weaponization end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
106 107 108 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 106 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 84 def self.attribute_map { :'actions_and_objectives' => :'actions_and_objectives', :'command_and_control' => :'command_and_control', :'delivery' => :'delivery', :'exploitation' => :'exploitation', :'installation' => :'installation', :'objectives' => :'objectives', :'reconnaissance' => :'reconnaissance', :'rich_text_actions_and_objectives' => :'rich_text_actions_and_objectives', :'rich_text_command_and_control' => :'rich_text_command_and_control', :'rich_text_delivery' => :'rich_text_delivery', :'rich_text_exploitation' => :'rich_text_exploitation', :'rich_text_installation' => :'rich_text_installation', :'rich_text_objectives' => :'rich_text_objectives', :'rich_text_reconnaissance' => :'rich_text_reconnaissance', :'rich_text_weaponization' => :'rich_text_weaponization', :'weaponization' => :'weaponization' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
269 270 271 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 269 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
133 134 135 136 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 133 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 111 def self.openapi_types { :'actions_and_objectives' => :'String', :'command_and_control' => :'String', :'delivery' => :'String', :'exploitation' => :'String', :'installation' => :'String', :'objectives' => :'String', :'reconnaissance' => :'String', :'rich_text_actions_and_objectives' => :'String', :'rich_text_command_and_control' => :'String', :'rich_text_delivery' => :'String', :'rich_text_exploitation' => :'String', :'rich_text_installation' => :'String', :'rich_text_objectives' => :'String', :'rich_text_reconnaissance' => :'String', :'rich_text_weaponization' => :'String', :'weaponization' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 233 def ==(o) return true if self.equal?(o) self.class == o.class && actions_and_objectives == o.actions_and_objectives && command_and_control == o.command_and_control && delivery == o.delivery && exploitation == o.exploitation && installation == o.installation && objectives == o.objectives && reconnaissance == o.reconnaissance && rich_text_actions_and_objectives == o.rich_text_actions_and_objectives && rich_text_command_and_control == o.rich_text_command_and_control && rich_text_delivery == o.rich_text_delivery && rich_text_exploitation == o.rich_text_exploitation && rich_text_installation == o.rich_text_installation && rich_text_objectives == o.rich_text_objectives && rich_text_reconnaissance == o.rich_text_reconnaissance && rich_text_weaponization == o.rich_text_weaponization && weaponization == o.weaponization end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 300 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
371 372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 371 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
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 276 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
256 257 258 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 256 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
262 263 264 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 262 def hash [actions_and_objectives, command_and_control, delivery, exploitation, installation, objectives, reconnaissance, rich_text_actions_and_objectives, rich_text_command_and_control, rich_text_delivery, rich_text_exploitation, rich_text_installation, rich_text_objectives, rich_text_reconnaissance, rich_text_weaponization, weaponization].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
220 221 222 223 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 220 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
347 348 349 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 347 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 353 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
341 342 343 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 341 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
227 228 229 |
# File 'lib/crimson-falcon/models/domain_kill_chain.rb', line 227 def valid? true end |