Class: Falcon::VulncheckExploitDetails
- Inherits:
-
Object
- Object
- Falcon::VulncheckExploitDetails
- Defined in:
- lib/crimson-falcon/models/vulncheck_exploit_details.rb
Instance Attribute Summary collapse
-
#botnets ⇒ Object
Returns the value of attribute botnets.
-
#counts ⇒ Object
Returns the value of attribute counts.
-
#epss ⇒ Object
Returns the value of attribute epss.
-
#exploit_found ⇒ Object
Returns the value of attribute exploit_found.
-
#exploits ⇒ Object
Returns the value of attribute exploits.
-
#max_exploit_maturity ⇒ Object
Returns the value of attribute max_exploit_maturity.
-
#ransomware ⇒ Object
Returns the value of attribute ransomware.
-
#reported_exploited_by_botnets ⇒ Object
Returns the value of attribute reported_exploited_by_botnets.
-
#reported_exploited_by_named_threat_actors ⇒ Object
Returns the value of attribute reported_exploited_by_named_threat_actors.
-
#reported_exploited_by_ransomware ⇒ Object
Returns the value of attribute reported_exploited_by_ransomware.
-
#reported_exploited_in_the_wild ⇒ Object
Returns the value of attribute reported_exploited_in_the_wild.
-
#threat_actors ⇒ Object
Returns the value of attribute threat_actors.
-
#timeline ⇒ Object
Returns the value of attribute timeline.
-
#trending ⇒ Object
Returns the value of attribute trending.
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 = {}) ⇒ VulncheckExploitDetails
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 = {}) ⇒ VulncheckExploitDetails
Initializes the object
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 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 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 116 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::VulncheckExploitDetails` 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::VulncheckExploitDetails`. 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?(:'botnets') if (value = attributes[:'botnets']).is_a?(Array) self.botnets = value end end if attributes.key?(:'counts') self.counts = attributes[:'counts'] end if attributes.key?(:'epss') self.epss = attributes[:'epss'] end if attributes.key?(:'exploit_found') self.exploit_found = attributes[:'exploit_found'] end if attributes.key?(:'exploits') if (value = attributes[:'exploits']).is_a?(Array) self.exploits = value end end if attributes.key?(:'max_exploit_maturity') self.max_exploit_maturity = attributes[:'max_exploit_maturity'] end if attributes.key?(:'ransomware') if (value = attributes[:'ransomware']).is_a?(Array) self.ransomware = value end end if attributes.key?(:'reported_exploited_by_botnets') self.reported_exploited_by_botnets = attributes[:'reported_exploited_by_botnets'] end if attributes.key?(:'reported_exploited_by_named_threat_actors') self.reported_exploited_by_named_threat_actors = attributes[:'reported_exploited_by_named_threat_actors'] end if attributes.key?(:'reported_exploited_by_ransomware') self.reported_exploited_by_ransomware = attributes[:'reported_exploited_by_ransomware'] end if attributes.key?(:'reported_exploited_in_the_wild') self.reported_exploited_in_the_wild = attributes[:'reported_exploited_in_the_wild'] end if attributes.key?(:'threat_actors') if (value = attributes[:'threat_actors']).is_a?(Array) self.threat_actors = value end end if attributes.key?(:'timeline') self.timeline = attributes[:'timeline'] end if attributes.key?(:'trending') self.trending = attributes[:'trending'] end end |
Instance Attribute Details
#botnets ⇒ Object
Returns the value of attribute botnets.
35 36 37 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 35 def botnets @botnets end |
#counts ⇒ Object
Returns the value of attribute counts.
37 38 39 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 37 def counts @counts end |
#epss ⇒ Object
Returns the value of attribute epss.
39 40 41 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 39 def epss @epss end |
#exploit_found ⇒ Object
Returns the value of attribute exploit_found.
41 42 43 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 41 def exploit_found @exploit_found end |
#exploits ⇒ Object
Returns the value of attribute exploits.
43 44 45 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 43 def exploits @exploits end |
#max_exploit_maturity ⇒ Object
Returns the value of attribute max_exploit_maturity.
45 46 47 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 45 def max_exploit_maturity @max_exploit_maturity end |
#ransomware ⇒ Object
Returns the value of attribute ransomware.
47 48 49 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 47 def ransomware @ransomware end |
#reported_exploited_by_botnets ⇒ Object
Returns the value of attribute reported_exploited_by_botnets.
49 50 51 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 49 def reported_exploited_by_botnets @reported_exploited_by_botnets end |
#reported_exploited_by_named_threat_actors ⇒ Object
Returns the value of attribute reported_exploited_by_named_threat_actors.
51 52 53 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 51 def reported_exploited_by_named_threat_actors @reported_exploited_by_named_threat_actors end |
#reported_exploited_by_ransomware ⇒ Object
Returns the value of attribute reported_exploited_by_ransomware.
53 54 55 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 53 def reported_exploited_by_ransomware @reported_exploited_by_ransomware end |
#reported_exploited_in_the_wild ⇒ Object
Returns the value of attribute reported_exploited_in_the_wild.
55 56 57 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 55 def reported_exploited_in_the_wild @reported_exploited_in_the_wild end |
#threat_actors ⇒ Object
Returns the value of attribute threat_actors.
57 58 59 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 57 def threat_actors @threat_actors end |
#timeline ⇒ Object
Returns the value of attribute timeline.
59 60 61 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 59 def timeline @timeline end |
#trending ⇒ Object
Returns the value of attribute trending.
61 62 63 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 61 def trending @trending end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
84 85 86 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 84 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 64 def self.attribute_map { :'botnets' => :'botnets', :'counts' => :'counts', :'epss' => :'epss', :'exploit_found' => :'exploit_found', :'exploits' => :'exploits', :'max_exploit_maturity' => :'max_exploit_maturity', :'ransomware' => :'ransomware', :'reported_exploited_by_botnets' => :'reported_exploited_by_botnets', :'reported_exploited_by_named_threat_actors' => :'reported_exploited_by_named_threat_actors', :'reported_exploited_by_ransomware' => :'reported_exploited_by_ransomware', :'reported_exploited_in_the_wild' => :'reported_exploited_in_the_wild', :'threat_actors' => :'threat_actors', :'timeline' => :'timeline', :'trending' => :'trending' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
288 289 290 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 288 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
109 110 111 112 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 109 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 89 def self.openapi_types { :'botnets' => :'Array<VulncheckExploitBotnets>', :'counts' => :'VulncheckExploitCounts', :'epss' => :'VulncheckEPSS', :'exploit_found' => :'Boolean', :'exploits' => :'Array<VulncheckExploitRecord>', :'max_exploit_maturity' => :'String', :'ransomware' => :'Array<VulncheckExploitRansomware>', :'reported_exploited_by_botnets' => :'Boolean', :'reported_exploited_by_named_threat_actors' => :'Boolean', :'reported_exploited_by_ransomware' => :'Boolean', :'reported_exploited_in_the_wild' => :'Boolean', :'threat_actors' => :'Array<VulncheckExploitThreatActor>', :'timeline' => :'VulncheckExploitTimeline', :'trending' => :'VulncheckExploitTrending' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 254 def ==(o) return true if self.equal?(o) self.class == o.class && botnets == o.botnets && counts == o.counts && epss == o.epss && exploit_found == o.exploit_found && exploits == o.exploits && max_exploit_maturity == o.max_exploit_maturity && ransomware == o.ransomware && reported_exploited_by_botnets == o.reported_exploited_by_botnets && reported_exploited_by_named_threat_actors == o.reported_exploited_by_named_threat_actors && reported_exploited_by_ransomware == o.reported_exploited_by_ransomware && reported_exploited_in_the_wild == o.reported_exploited_in_the_wild && threat_actors == o.threat_actors && timeline == o.timeline && trending == o.trending end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 319 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
390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 390 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
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 295 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
275 276 277 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 275 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
281 282 283 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 281 def hash [botnets, counts, epss, exploit_found, exploits, max_exploit_maturity, ransomware, reported_exploited_by_botnets, reported_exploited_by_named_threat_actors, reported_exploited_by_ransomware, reported_exploited_in_the_wild, threat_actors, timeline, trending].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 196 def list_invalid_properties invalid_properties = Array.new if @counts.nil? invalid_properties.push('invalid value for "counts", counts cannot be nil.') end if @exploit_found.nil? invalid_properties.push('invalid value for "exploit_found", exploit_found cannot be nil.') end if @max_exploit_maturity.nil? invalid_properties.push('invalid value for "max_exploit_maturity", max_exploit_maturity cannot be nil.') end if @reported_exploited_by_botnets.nil? invalid_properties.push('invalid value for "reported_exploited_by_botnets", reported_exploited_by_botnets cannot be nil.') end if @reported_exploited_by_named_threat_actors.nil? invalid_properties.push('invalid value for "reported_exploited_by_named_threat_actors", reported_exploited_by_named_threat_actors cannot be nil.') end if @reported_exploited_by_ransomware.nil? invalid_properties.push('invalid value for "reported_exploited_by_ransomware", reported_exploited_by_ransomware cannot be nil.') end if @reported_exploited_in_the_wild.nil? invalid_properties.push('invalid value for "reported_exploited_in_the_wild", reported_exploited_in_the_wild cannot be nil.') end if @timeline.nil? invalid_properties.push('invalid value for "timeline", timeline cannot be nil.') end if @trending.nil? invalid_properties.push('invalid value for "trending", trending cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
366 367 368 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 366 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 372 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
360 361 362 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 360 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/crimson-falcon/models/vulncheck_exploit_details.rb', line 239 def valid? return false if @counts.nil? return false if @exploit_found.nil? return false if @max_exploit_maturity.nil? return false if @reported_exploited_by_botnets.nil? return false if @reported_exploited_by_named_threat_actors.nil? return false if @reported_exploited_by_ransomware.nil? return false if @reported_exploited_in_the_wild.nil? return false if @timeline.nil? return false if @trending.nil? true end |