Class: Falcon::DomainIOC
- Inherits:
-
Object
- Object
- Falcon::DomainIOC
- Defined in:
- lib/crimson-falcon/models/domain_ioc.rb
Instance Attribute Summary collapse
-
#at_accounts ⇒ Object
Returns the value of attribute at_accounts.
-
#aws_clis ⇒ Object
Returns the value of attribute aws_clis.
-
#aws_ids ⇒ Object
Returns the value of attribute aws_ids.
-
#aws_secrets ⇒ Object
Returns the value of attribute aws_secrets.
-
#bitcoin_address ⇒ Object
Returns the value of attribute bitcoin_address.
-
#cves ⇒ Object
Returns the value of attribute cves.
-
#discord_urls ⇒ Object
Returns the value of attribute discord_urls.
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#email_domains ⇒ Object
Returns the value of attribute email_domains.
-
#emails ⇒ Object
Returns the value of attribute emails.
-
#emails_local_part ⇒ Object
Returns the value of attribute emails_local_part.
-
#ethereum_addresses ⇒ Object
Returns the value of attribute ethereum_addresses.
-
#generic_apis ⇒ Object
Returns the value of attribute generic_apis.
-
#github_apis ⇒ Object
Returns the value of attribute github_apis.
-
#google_apis ⇒ Object
Returns the value of attribute google_apis.
-
#hashtags ⇒ Object
Returns the value of attribute hashtags.
-
#i2p_urls ⇒ Object
Returns the value of attribute i2p_urls.
-
#icq_urls ⇒ Object
Returns the value of attribute icq_urls.
-
#ips ⇒ Object
Returns the value of attribute ips.
-
#magnet_urls ⇒ Object
Returns the value of attribute magnet_urls.
-
#md5s ⇒ Object
Returns the value of attribute md5s.
-
#monero_addresses ⇒ Object
Returns the value of attribute monero_addresses.
-
#onion_urls ⇒ Object
Returns the value of attribute onion_urls.
-
#paste_urls ⇒ Object
Returns the value of attribute paste_urls.
-
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
-
#s3_buckets ⇒ Object
Returns the value of attribute s3_buckets.
-
#sha1s ⇒ Object
Returns the value of attribute sha1s.
-
#sha256s ⇒ Object
Returns the value of attribute sha256s.
-
#sha512s ⇒ Object
Returns the value of attribute sha512s.
-
#skype_urls ⇒ Object
Returns the value of attribute skype_urls.
-
#slack_apis ⇒ Object
Returns the value of attribute slack_apis.
-
#sqs_queues ⇒ Object
Returns the value of attribute sqs_queues.
-
#telegram_urls ⇒ Object
Returns the value of attribute telegram_urls.
-
#torrent_urls ⇒ Object
Returns the value of attribute torrent_urls.
-
#urls ⇒ Object
Returns the value of attribute urls.
-
#whatsapp_urls ⇒ Object
Returns the value of attribute whatsapp_urls.
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 = {}) ⇒ DomainIOC
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 = {}) ⇒ DomainIOC
Initializes the object
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 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 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 203 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainIOC` 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::DomainIOC`. 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?(:'at_accounts') if (value = attributes[:'at_accounts']).is_a?(Array) self.at_accounts = value end end if attributes.key?(:'aws_clis') if (value = attributes[:'aws_clis']).is_a?(Array) self.aws_clis = value end end if attributes.key?(:'aws_ids') if (value = attributes[:'aws_ids']).is_a?(Array) self.aws_ids = value end end if attributes.key?(:'aws_secrets') if (value = attributes[:'aws_secrets']).is_a?(Array) self.aws_secrets = value end end if attributes.key?(:'bitcoin_address') if (value = attributes[:'bitcoin_address']).is_a?(Array) self.bitcoin_address = value end end if attributes.key?(:'cves') if (value = attributes[:'cves']).is_a?(Array) self.cves = value end end if attributes.key?(:'discord_urls') if (value = attributes[:'discord_urls']).is_a?(Array) self.discord_urls = value end end if attributes.key?(:'domains') if (value = attributes[:'domains']).is_a?(Array) self.domains = value end end if attributes.key?(:'email_domains') if (value = attributes[:'email_domains']).is_a?(Array) self.email_domains = value end end if attributes.key?(:'emails') if (value = attributes[:'emails']).is_a?(Array) self.emails = value end end if attributes.key?(:'emails_local_part') if (value = attributes[:'emails_local_part']).is_a?(Array) self.emails_local_part = value end end if attributes.key?(:'ethereum_addresses') if (value = attributes[:'ethereum_addresses']).is_a?(Array) self.ethereum_addresses = value end end if attributes.key?(:'generic_apis') if (value = attributes[:'generic_apis']).is_a?(Array) self.generic_apis = value end end if attributes.key?(:'github_apis') if (value = attributes[:'github_apis']).is_a?(Array) self.github_apis = value end end if attributes.key?(:'google_apis') if (value = attributes[:'google_apis']).is_a?(Array) self.google_apis = value end end if attributes.key?(:'hashtags') if (value = attributes[:'hashtags']).is_a?(Array) self. = value end end if attributes.key?(:'i2p_urls') if (value = attributes[:'i2p_urls']).is_a?(Array) self.i2p_urls = value end end if attributes.key?(:'icq_urls') if (value = attributes[:'icq_urls']).is_a?(Array) self.icq_urls = value end end if attributes.key?(:'ips') if (value = attributes[:'ips']).is_a?(Array) self.ips = value end end if attributes.key?(:'magnet_urls') if (value = attributes[:'magnet_urls']).is_a?(Array) self.magnet_urls = value end end if attributes.key?(:'md5s') if (value = attributes[:'md5s']).is_a?(Array) self.md5s = value end end if attributes.key?(:'monero_addresses') if (value = attributes[:'monero_addresses']).is_a?(Array) self.monero_addresses = value end end if attributes.key?(:'onion_urls') if (value = attributes[:'onion_urls']).is_a?(Array) self.onion_urls = value end end if attributes.key?(:'paste_urls') if (value = attributes[:'paste_urls']).is_a?(Array) self.paste_urls = value end end if attributes.key?(:'phone_numbers') if (value = attributes[:'phone_numbers']).is_a?(Array) self.phone_numbers = value end end if attributes.key?(:'s3_buckets') if (value = attributes[:'s3_buckets']).is_a?(Array) self.s3_buckets = value end end if attributes.key?(:'sha1s') if (value = attributes[:'sha1s']).is_a?(Array) self.sha1s = value end end if attributes.key?(:'sha256s') if (value = attributes[:'sha256s']).is_a?(Array) self.sha256s = value end end if attributes.key?(:'sha512s') if (value = attributes[:'sha512s']).is_a?(Array) self.sha512s = value end end if attributes.key?(:'skype_urls') if (value = attributes[:'skype_urls']).is_a?(Array) self.skype_urls = value end end if attributes.key?(:'slack_apis') if (value = attributes[:'slack_apis']).is_a?(Array) self.slack_apis = value end end if attributes.key?(:'sqs_queues') if (value = attributes[:'sqs_queues']).is_a?(Array) self.sqs_queues = value end end if attributes.key?(:'telegram_urls') if (value = attributes[:'telegram_urls']).is_a?(Array) self.telegram_urls = value end end if attributes.key?(:'torrent_urls') if (value = attributes[:'torrent_urls']).is_a?(Array) self.torrent_urls = value end end if attributes.key?(:'urls') if (value = attributes[:'urls']).is_a?(Array) self.urls = value end end if attributes.key?(:'whatsapp_urls') if (value = attributes[:'whatsapp_urls']).is_a?(Array) self.whatsapp_urls = value end end end |
Instance Attribute Details
#at_accounts ⇒ Object
Returns the value of attribute at_accounts.
34 35 36 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 34 def at_accounts @at_accounts end |
#aws_clis ⇒ Object
Returns the value of attribute aws_clis.
36 37 38 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 36 def aws_clis @aws_clis end |
#aws_ids ⇒ Object
Returns the value of attribute aws_ids.
38 39 40 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 38 def aws_ids @aws_ids end |
#aws_secrets ⇒ Object
Returns the value of attribute aws_secrets.
40 41 42 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 40 def aws_secrets @aws_secrets end |
#bitcoin_address ⇒ Object
Returns the value of attribute bitcoin_address.
42 43 44 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 42 def bitcoin_address @bitcoin_address end |
#cves ⇒ Object
Returns the value of attribute cves.
44 45 46 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 44 def cves @cves end |
#discord_urls ⇒ Object
Returns the value of attribute discord_urls.
46 47 48 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 46 def discord_urls @discord_urls end |
#domains ⇒ Object
Returns the value of attribute domains.
48 49 50 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 48 def domains @domains end |
#email_domains ⇒ Object
Returns the value of attribute email_domains.
50 51 52 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 50 def email_domains @email_domains end |
#emails ⇒ Object
Returns the value of attribute emails.
52 53 54 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 52 def emails @emails end |
#emails_local_part ⇒ Object
Returns the value of attribute emails_local_part.
54 55 56 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 54 def emails_local_part @emails_local_part end |
#ethereum_addresses ⇒ Object
Returns the value of attribute ethereum_addresses.
56 57 58 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 56 def ethereum_addresses @ethereum_addresses end |
#generic_apis ⇒ Object
Returns the value of attribute generic_apis.
58 59 60 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 58 def generic_apis @generic_apis end |
#github_apis ⇒ Object
Returns the value of attribute github_apis.
60 61 62 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 60 def github_apis @github_apis end |
#google_apis ⇒ Object
Returns the value of attribute google_apis.
62 63 64 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 62 def google_apis @google_apis end |
#hashtags ⇒ Object
Returns the value of attribute hashtags.
64 65 66 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 64 def @hashtags end |
#i2p_urls ⇒ Object
Returns the value of attribute i2p_urls.
66 67 68 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 66 def i2p_urls @i2p_urls end |
#icq_urls ⇒ Object
Returns the value of attribute icq_urls.
68 69 70 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 68 def icq_urls @icq_urls end |
#ips ⇒ Object
Returns the value of attribute ips.
70 71 72 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 70 def ips @ips end |
#magnet_urls ⇒ Object
Returns the value of attribute magnet_urls.
72 73 74 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 72 def magnet_urls @magnet_urls end |
#md5s ⇒ Object
Returns the value of attribute md5s.
74 75 76 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 74 def md5s @md5s end |
#monero_addresses ⇒ Object
Returns the value of attribute monero_addresses.
76 77 78 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 76 def monero_addresses @monero_addresses end |
#onion_urls ⇒ Object
Returns the value of attribute onion_urls.
78 79 80 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 78 def onion_urls @onion_urls end |
#paste_urls ⇒ Object
Returns the value of attribute paste_urls.
80 81 82 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 80 def paste_urls @paste_urls end |
#phone_numbers ⇒ Object
Returns the value of attribute phone_numbers.
82 83 84 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 82 def phone_numbers @phone_numbers end |
#s3_buckets ⇒ Object
Returns the value of attribute s3_buckets.
84 85 86 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 84 def s3_buckets @s3_buckets end |
#sha1s ⇒ Object
Returns the value of attribute sha1s.
86 87 88 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 86 def sha1s @sha1s end |
#sha256s ⇒ Object
Returns the value of attribute sha256s.
88 89 90 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 88 def sha256s @sha256s end |
#sha512s ⇒ Object
Returns the value of attribute sha512s.
90 91 92 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 90 def sha512s @sha512s end |
#skype_urls ⇒ Object
Returns the value of attribute skype_urls.
92 93 94 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 92 def skype_urls @skype_urls end |
#slack_apis ⇒ Object
Returns the value of attribute slack_apis.
94 95 96 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 94 def slack_apis @slack_apis end |
#sqs_queues ⇒ Object
Returns the value of attribute sqs_queues.
96 97 98 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 96 def sqs_queues @sqs_queues end |
#telegram_urls ⇒ Object
Returns the value of attribute telegram_urls.
98 99 100 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 98 def telegram_urls @telegram_urls end |
#torrent_urls ⇒ Object
Returns the value of attribute torrent_urls.
100 101 102 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 100 def torrent_urls @torrent_urls end |
#urls ⇒ Object
Returns the value of attribute urls.
102 103 104 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 102 def urls @urls end |
#whatsapp_urls ⇒ Object
Returns the value of attribute whatsapp_urls.
104 105 106 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 104 def whatsapp_urls @whatsapp_urls end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
149 150 151 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 149 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
107 108 109 110 111 112 113 114 115 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 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 107 def self.attribute_map { :'at_accounts' => :'at_accounts', :'aws_clis' => :'aws_clis', :'aws_ids' => :'aws_ids', :'aws_secrets' => :'aws_secrets', :'bitcoin_address' => :'bitcoin_address', :'cves' => :'cves', :'discord_urls' => :'discord_urls', :'domains' => :'domains', :'email_domains' => :'email_domains', :'emails' => :'emails', :'emails_local_part' => :'emails_local_part', :'ethereum_addresses' => :'ethereum_addresses', :'generic_apis' => :'generic_apis', :'github_apis' => :'github_apis', :'google_apis' => :'google_apis', :'hashtags' => :'hashtags', :'i2p_urls' => :'i2p_urls', :'icq_urls' => :'icq_urls', :'ips' => :'ips', :'magnet_urls' => :'magnet_urls', :'md5s' => :'md5s', :'monero_addresses' => :'monero_addresses', :'onion_urls' => :'onion_urls', :'paste_urls' => :'paste_urls', :'phone_numbers' => :'phone_numbers', :'s3_buckets' => :'s3_buckets', :'sha1s' => :'sha1s', :'sha256s' => :'sha256s', :'sha512s' => :'sha512s', :'skype_urls' => :'skype_urls', :'slack_apis' => :'slack_apis', :'sqs_queues' => :'sqs_queues', :'telegram_urls' => :'telegram_urls', :'torrent_urls' => :'torrent_urls', :'urls' => :'urls', :'whatsapp_urls' => :'whatsapp_urls' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
504 505 506 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 504 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
196 197 198 199 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 196 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 154 def self.openapi_types { :'at_accounts' => :'Array<String>', :'aws_clis' => :'Array<String>', :'aws_ids' => :'Array<String>', :'aws_secrets' => :'Array<String>', :'bitcoin_address' => :'Array<String>', :'cves' => :'Array<String>', :'discord_urls' => :'Array<String>', :'domains' => :'Array<String>', :'email_domains' => :'Array<String>', :'emails' => :'Array<String>', :'emails_local_part' => :'Array<String>', :'ethereum_addresses' => :'Array<String>', :'generic_apis' => :'Array<String>', :'github_apis' => :'Array<String>', :'google_apis' => :'Array<String>', :'hashtags' => :'Array<String>', :'i2p_urls' => :'Array<String>', :'icq_urls' => :'Array<String>', :'ips' => :'Array<String>', :'magnet_urls' => :'Array<String>', :'md5s' => :'Array<String>', :'monero_addresses' => :'Array<String>', :'onion_urls' => :'Array<String>', :'paste_urls' => :'Array<String>', :'phone_numbers' => :'Array<String>', :'s3_buckets' => :'Array<String>', :'sha1s' => :'Array<String>', :'sha256s' => :'Array<String>', :'sha512s' => :'Array<String>', :'skype_urls' => :'Array<String>', :'slack_apis' => :'Array<String>', :'sqs_queues' => :'Array<String>', :'telegram_urls' => :'Array<String>', :'torrent_urls' => :'Array<String>', :'urls' => :'Array<String>', :'whatsapp_urls' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 448 def ==(o) return true if self.equal?(o) self.class == o.class && at_accounts == o.at_accounts && aws_clis == o.aws_clis && aws_ids == o.aws_ids && aws_secrets == o.aws_secrets && bitcoin_address == o.bitcoin_address && cves == o.cves && discord_urls == o.discord_urls && domains == o.domains && email_domains == o.email_domains && emails == o.emails && emails_local_part == o.emails_local_part && ethereum_addresses == o.ethereum_addresses && generic_apis == o.generic_apis && github_apis == o.github_apis && google_apis == o.google_apis && == o. && i2p_urls == o.i2p_urls && icq_urls == o.icq_urls && ips == o.ips && magnet_urls == o.magnet_urls && md5s == o.md5s && monero_addresses == o.monero_addresses && onion_urls == o.onion_urls && paste_urls == o.paste_urls && phone_numbers == o.phone_numbers && s3_buckets == o.s3_buckets && sha1s == o.sha1s && sha256s == o.sha256s && sha512s == o.sha512s && skype_urls == o.skype_urls && slack_apis == o.slack_apis && sqs_queues == o.sqs_queues && telegram_urls == o.telegram_urls && torrent_urls == o.torrent_urls && urls == o.urls && whatsapp_urls == o.whatsapp_urls end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 535 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
606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 606 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
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 511 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
491 492 493 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 491 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
497 498 499 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 497 def hash [at_accounts, aws_clis, aws_ids, aws_secrets, bitcoin_address, cves, discord_urls, domains, email_domains, emails, emails_local_part, ethereum_addresses, generic_apis, github_apis, google_apis, , i2p_urls, icq_urls, ips, magnet_urls, md5s, monero_addresses, onion_urls, paste_urls, phone_numbers, s3_buckets, sha1s, sha256s, sha512s, skype_urls, slack_apis, sqs_queues, telegram_urls, torrent_urls, urls, whatsapp_urls].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
435 436 437 438 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 435 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
582 583 584 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 582 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
588 589 590 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 588 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
576 577 578 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 576 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
442 443 444 |
# File 'lib/crimson-falcon/models/domain_ioc.rb', line 442 def valid? true end |