Class: SongtradrApiClientRuby::SearchFilterValuesDTO
- Inherits:
-
Object
- Object
- SongtradrApiClientRuby::SearchFilterValuesDTO
- Defined in:
- lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb
Overview
Categories of musical features that can be used as search filters.
Instance Attribute Summary collapse
-
#arousal ⇒ Object
Returns the value of attribute arousal.
-
#audience_age ⇒ Object
Returns the value of attribute audience_age.
-
#audience_gender ⇒ Object
Returns the value of attribute audience_gender.
-
#audience_region ⇒ Object
Returns the value of attribute audience_region.
-
#channel_suitability ⇒ Object
Returns the value of attribute channel_suitability.
-
#curateability ⇒ Object
Returns the value of attribute curateability.
-
#dominant_instrument ⇒ Object
Returns the value of attribute dominant_instrument.
-
#energy ⇒ Object
Returns the value of attribute energy.
-
#engagement ⇒ Object
Returns the value of attribute engagement.
-
#groovyness ⇒ Object
Returns the value of attribute groovyness.
-
#harmony ⇒ Object
Returns the value of attribute harmony.
-
#key ⇒ Object
Returns the value of attribute key.
-
#language_of_performance ⇒ Object
Returns the value of attribute language_of_performance.
-
#loudness ⇒ Object
Returns the value of attribute loudness.
-
#origin_decade ⇒ Object
Returns the value of attribute origin_decade.
-
#origin_region ⇒ Object
Returns the value of attribute origin_region.
-
#performance_rating ⇒ Object
Returns the value of attribute performance_rating.
-
#pleasantness ⇒ Object
Returns the value of attribute pleasantness.
-
#primary_mood_cluster ⇒ Object
Returns the value of attribute primary_mood_cluster.
-
#primary_sound_character ⇒ Object
Returns the value of attribute primary_sound_character.
-
#production_rating ⇒ Object
Returns the value of attribute production_rating.
-
#rhythm ⇒ Object
Returns the value of attribute rhythm.
-
#roughness ⇒ Object
Returns the value of attribute roughness.
-
#scale ⇒ Object
Returns the value of attribute scale.
-
#secondary_audience_age ⇒ Object
Returns the value of attribute secondary_audience_age.
-
#secondary_audience_region ⇒ Object
Returns the value of attribute secondary_audience_region.
-
#secondary_instrument ⇒ Object
Returns the value of attribute secondary_instrument.
-
#secondary_mood_cluster ⇒ Object
Returns the value of attribute secondary_mood_cluster.
-
#song_rating ⇒ Object
Returns the value of attribute song_rating.
-
#sound_generation ⇒ Object
Returns the value of attribute sound_generation.
-
#space ⇒ Object
Returns the value of attribute space.
-
#tempo ⇒ Object
Returns the value of attribute tempo.
-
#tertiary_audience_age ⇒ Object
Returns the value of attribute tertiary_audience_age.
-
#tertiary_audience_region ⇒ Object
Returns the value of attribute tertiary_audience_region.
-
#tertiary_instrument ⇒ Object
Returns the value of attribute tertiary_instrument.
-
#tertiary_mood_cluster ⇒ Object
Returns the value of attribute tertiary_mood_cluster.
-
#texture ⇒ Object
Returns the value of attribute texture.
-
#timbre ⇒ Object
Returns the value of attribute timbre.
-
#tonality ⇒ Object
Returns the value of attribute tonality.
-
#use_case ⇒ Object
Returns the value of attribute use_case.
-
#valence ⇒ Object
Returns the value of attribute valence.
-
#vocals ⇒ Object
Returns the value of attribute vocals.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.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.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SearchFilterValuesDTO
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 = {}) ⇒ SearchFilterValuesDTO
Initializes the object
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 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 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 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 212 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::SearchFilterValuesDTO` 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 `SongtradrApiClientRuby::SearchFilterValuesDTO`. 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?(:'primary_mood_cluster') if (value = attributes[:'primary_mood_cluster']).is_a?(Array) self.primary_mood_cluster = value end else self.primary_mood_cluster = nil end if attributes.key?(:'secondary_mood_cluster') if (value = attributes[:'secondary_mood_cluster']).is_a?(Array) self.secondary_mood_cluster = value end else self.secondary_mood_cluster = nil end if attributes.key?(:'tertiary_mood_cluster') if (value = attributes[:'tertiary_mood_cluster']).is_a?(Array) self.tertiary_mood_cluster = value end else self.tertiary_mood_cluster = nil end if attributes.key?(:'valence') if (value = attributes[:'valence']).is_a?(Array) self.valence = value end else self.valence = nil end if attributes.key?(:'arousal') if (value = attributes[:'arousal']).is_a?(Array) self.arousal = value end else self.arousal = nil end if attributes.key?(:'pleasantness') if (value = attributes[:'pleasantness']).is_a?(Array) self.pleasantness = value end else self.pleasantness = nil end if attributes.key?(:'engagement') if (value = attributes[:'engagement']).is_a?(Array) self.engagement = value end else self.engagement = nil end if attributes.key?(:'vocals') if (value = attributes[:'vocals']).is_a?(Array) self.vocals = value end else self.vocals = nil end if attributes.key?(:'dominant_instrument') if (value = attributes[:'dominant_instrument']).is_a?(Array) self.dominant_instrument = value end else self.dominant_instrument = nil end if attributes.key?(:'secondary_instrument') if (value = attributes[:'secondary_instrument']).is_a?(Array) self.secondary_instrument = value end else self.secondary_instrument = nil end if attributes.key?(:'tertiary_instrument') if (value = attributes[:'tertiary_instrument']).is_a?(Array) self.tertiary_instrument = value end else self.tertiary_instrument = nil end if attributes.key?(:'energy') if (value = attributes[:'energy']).is_a?(Array) self.energy = value end else self.energy = nil end if attributes.key?(:'sound_generation') if (value = attributes[:'sound_generation']).is_a?(Array) self.sound_generation = value end else self.sound_generation = nil end if attributes.key?(:'tempo') if (value = attributes[:'tempo']).is_a?(Array) self.tempo = value end else self.tempo = nil end if attributes.key?(:'scale') if (value = attributes[:'scale']).is_a?(Array) self.scale = value end else self.scale = nil end if attributes.key?(:'key') if (value = attributes[:'key']).is_a?(Array) self.key = value end else self.key = nil end if attributes.key?(:'rhythm') if (value = attributes[:'rhythm']).is_a?(Array) self.rhythm = value end else self.rhythm = nil end if attributes.key?(:'primary_sound_character') if (value = attributes[:'primary_sound_character']).is_a?(Array) self.primary_sound_character = value end else self.primary_sound_character = nil end if attributes.key?(:'timbre') if (value = attributes[:'timbre']).is_a?(Array) self.timbre = value end else self.timbre = nil end if attributes.key?(:'roughness') if (value = attributes[:'roughness']).is_a?(Array) self.roughness = value end else self.roughness = nil end if attributes.key?(:'tonality') if (value = attributes[:'tonality']).is_a?(Array) self.tonality = value end else self.tonality = nil end if attributes.key?(:'harmony') if (value = attributes[:'harmony']).is_a?(Array) self.harmony = value end else self.harmony = nil end if attributes.key?(:'texture') if (value = attributes[:'texture']).is_a?(Array) self.texture = value end else self.texture = nil end if attributes.key?(:'groovyness') if (value = attributes[:'groovyness']).is_a?(Array) self.groovyness = value end else self.groovyness = nil end if attributes.key?(:'space') if (value = attributes[:'space']).is_a?(Array) self.space = value end else self.space = nil end if attributes.key?(:'loudness') if (value = attributes[:'loudness']).is_a?(Array) self.loudness = value end else self.loudness = nil end if attributes.key?(:'production_rating') if (value = attributes[:'production_rating']).is_a?(Array) self. = value end else self. = nil end if attributes.key?(:'performance_rating') if (value = attributes[:'performance_rating']).is_a?(Array) self. = value end else self. = nil end if attributes.key?(:'song_rating') if (value = attributes[:'song_rating']).is_a?(Array) self. = value end else self. = nil end if attributes.key?(:'audience_age') if (value = attributes[:'audience_age']).is_a?(Array) self.audience_age = value end else self.audience_age = nil end if attributes.key?(:'secondary_audience_age') if (value = attributes[:'secondary_audience_age']).is_a?(Array) self.secondary_audience_age = value end else self.secondary_audience_age = nil end if attributes.key?(:'tertiary_audience_age') if (value = attributes[:'tertiary_audience_age']).is_a?(Array) self.tertiary_audience_age = value end else self.tertiary_audience_age = nil end if attributes.key?(:'audience_gender') if (value = attributes[:'audience_gender']).is_a?(Array) self.audience_gender = value end else self.audience_gender = nil end if attributes.key?(:'audience_region') if (value = attributes[:'audience_region']).is_a?(Array) self.audience_region = value end else self.audience_region = nil end if attributes.key?(:'secondary_audience_region') if (value = attributes[:'secondary_audience_region']).is_a?(Array) self.secondary_audience_region = value end else self.secondary_audience_region = nil end if attributes.key?(:'tertiary_audience_region') if (value = attributes[:'tertiary_audience_region']).is_a?(Array) self.tertiary_audience_region = value end else self.tertiary_audience_region = nil end if attributes.key?(:'origin_decade') if (value = attributes[:'origin_decade']).is_a?(Array) self.origin_decade = value end else self.origin_decade = nil end if attributes.key?(:'origin_region') if (value = attributes[:'origin_region']).is_a?(Array) self.origin_region = value end else self.origin_region = nil end if attributes.key?(:'language_of_performance') if (value = attributes[:'language_of_performance']).is_a?(Array) self.language_of_performance = value end else self.language_of_performance = nil end if attributes.key?(:'curateability') if (value = attributes[:'curateability']).is_a?(Array) self.curateability = value end else self.curateability = nil end if attributes.key?(:'use_case') if (value = attributes[:'use_case']).is_a?(Array) self.use_case = value end else self.use_case = nil end if attributes.key?(:'channel_suitability') if (value = attributes[:'channel_suitability']).is_a?(Array) self.channel_suitability = value end else self.channel_suitability = nil end end |
Instance Attribute Details
#arousal ⇒ Object
Returns the value of attribute arousal.
27 28 29 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 27 def arousal @arousal end |
#audience_age ⇒ Object
Returns the value of attribute audience_age.
77 78 79 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 77 def audience_age @audience_age end |
#audience_gender ⇒ Object
Returns the value of attribute audience_gender.
83 84 85 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 83 def audience_gender @audience_gender end |
#audience_region ⇒ Object
Returns the value of attribute audience_region.
85 86 87 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 85 def audience_region @audience_region end |
#channel_suitability ⇒ Object
Returns the value of attribute channel_suitability.
101 102 103 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 101 def channel_suitability @channel_suitability end |
#curateability ⇒ Object
Returns the value of attribute curateability.
97 98 99 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 97 def curateability @curateability end |
#dominant_instrument ⇒ Object
Returns the value of attribute dominant_instrument.
35 36 37 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 35 def dominant_instrument @dominant_instrument end |
#energy ⇒ Object
Returns the value of attribute energy.
41 42 43 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 41 def energy @energy end |
#engagement ⇒ Object
Returns the value of attribute engagement.
31 32 33 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 31 def engagement @engagement end |
#groovyness ⇒ Object
Returns the value of attribute groovyness.
65 66 67 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 65 def groovyness @groovyness end |
#harmony ⇒ Object
Returns the value of attribute harmony.
61 62 63 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 61 def harmony @harmony end |
#key ⇒ Object
Returns the value of attribute key.
49 50 51 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 49 def key @key end |
#language_of_performance ⇒ Object
Returns the value of attribute language_of_performance.
95 96 97 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 95 def language_of_performance @language_of_performance end |
#loudness ⇒ Object
Returns the value of attribute loudness.
69 70 71 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 69 def loudness @loudness end |
#origin_decade ⇒ Object
Returns the value of attribute origin_decade.
91 92 93 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 91 def origin_decade @origin_decade end |
#origin_region ⇒ Object
Returns the value of attribute origin_region.
93 94 95 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 93 def origin_region @origin_region end |
#performance_rating ⇒ Object
Returns the value of attribute performance_rating.
73 74 75 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 73 def end |
#pleasantness ⇒ Object
Returns the value of attribute pleasantness.
29 30 31 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 29 def pleasantness @pleasantness end |
#primary_mood_cluster ⇒ Object
Returns the value of attribute primary_mood_cluster.
19 20 21 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 19 def primary_mood_cluster @primary_mood_cluster end |
#primary_sound_character ⇒ Object
Returns the value of attribute primary_sound_character.
53 54 55 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 53 def primary_sound_character @primary_sound_character end |
#production_rating ⇒ Object
Returns the value of attribute production_rating.
71 72 73 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 71 def end |
#rhythm ⇒ Object
Returns the value of attribute rhythm.
51 52 53 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 51 def rhythm @rhythm end |
#roughness ⇒ Object
Returns the value of attribute roughness.
57 58 59 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 57 def roughness @roughness end |
#scale ⇒ Object
Returns the value of attribute scale.
47 48 49 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 47 def scale @scale end |
#secondary_audience_age ⇒ Object
Returns the value of attribute secondary_audience_age.
79 80 81 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 79 def secondary_audience_age @secondary_audience_age end |
#secondary_audience_region ⇒ Object
Returns the value of attribute secondary_audience_region.
87 88 89 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 87 def secondary_audience_region @secondary_audience_region end |
#secondary_instrument ⇒ Object
Returns the value of attribute secondary_instrument.
37 38 39 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 37 def secondary_instrument @secondary_instrument end |
#secondary_mood_cluster ⇒ Object
Returns the value of attribute secondary_mood_cluster.
21 22 23 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 21 def secondary_mood_cluster @secondary_mood_cluster end |
#song_rating ⇒ Object
Returns the value of attribute song_rating.
75 76 77 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 75 def end |
#sound_generation ⇒ Object
Returns the value of attribute sound_generation.
43 44 45 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 43 def sound_generation @sound_generation end |
#space ⇒ Object
Returns the value of attribute space.
67 68 69 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 67 def space @space end |
#tempo ⇒ Object
Returns the value of attribute tempo.
45 46 47 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 45 def tempo @tempo end |
#tertiary_audience_age ⇒ Object
Returns the value of attribute tertiary_audience_age.
81 82 83 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 81 def tertiary_audience_age @tertiary_audience_age end |
#tertiary_audience_region ⇒ Object
Returns the value of attribute tertiary_audience_region.
89 90 91 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 89 def tertiary_audience_region @tertiary_audience_region end |
#tertiary_instrument ⇒ Object
Returns the value of attribute tertiary_instrument.
39 40 41 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 39 def tertiary_instrument @tertiary_instrument end |
#tertiary_mood_cluster ⇒ Object
Returns the value of attribute tertiary_mood_cluster.
23 24 25 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 23 def tertiary_mood_cluster @tertiary_mood_cluster end |
#texture ⇒ Object
Returns the value of attribute texture.
63 64 65 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 63 def texture @texture end |
#timbre ⇒ Object
Returns the value of attribute timbre.
55 56 57 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 55 def timbre @timbre end |
#tonality ⇒ Object
Returns the value of attribute tonality.
59 60 61 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 59 def tonality @tonality end |
#use_case ⇒ Object
Returns the value of attribute use_case.
99 100 101 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 99 def use_case @use_case end |
#valence ⇒ Object
Returns the value of attribute valence.
25 26 27 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 25 def valence @valence end |
#vocals ⇒ Object
Returns the value of attribute vocals.
33 34 35 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 33 def vocals @vocals end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 875 def self._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 = SongtradrApiClientRuby.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
152 153 154 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 152 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
104 105 106 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 147 148 149 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 104 def self.attribute_map { :'primary_mood_cluster' => :'primaryMoodCluster', :'secondary_mood_cluster' => :'secondaryMoodCluster', :'tertiary_mood_cluster' => :'tertiaryMoodCluster', :'valence' => :'valence', :'arousal' => :'arousal', :'pleasantness' => :'pleasantness', :'engagement' => :'engagement', :'vocals' => :'vocals', :'dominant_instrument' => :'dominantInstrument', :'secondary_instrument' => :'secondaryInstrument', :'tertiary_instrument' => :'tertiaryInstrument', :'energy' => :'energy', :'sound_generation' => :'soundGeneration', :'tempo' => :'tempo', :'scale' => :'scale', :'key' => :'key', :'rhythm' => :'rhythm', :'primary_sound_character' => :'primarySoundCharacter', :'timbre' => :'timbre', :'roughness' => :'roughness', :'tonality' => :'tonality', :'harmony' => :'harmony', :'texture' => :'texture', :'groovyness' => :'groovyness', :'space' => :'space', :'loudness' => :'loudness', :'production_rating' => :'productionRating', :'performance_rating' => :'performanceRating', :'song_rating' => :'songRating', :'audience_age' => :'audienceAge', :'secondary_audience_age' => :'secondaryAudienceAge', :'tertiary_audience_age' => :'tertiaryAudienceAge', :'audience_gender' => :'audienceGender', :'audience_region' => :'audienceRegion', :'secondary_audience_region' => :'secondaryAudienceRegion', :'tertiary_audience_region' => :'tertiaryAudienceRegion', :'origin_decade' => :'originDecade', :'origin_region' => :'originRegion', :'language_of_performance' => :'languageOfPerformance', :'curateability' => :'curateability', :'use_case' => :'useCase', :'channel_suitability' => :'channelSuitability' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 851 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
205 206 207 208 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 205 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 157 def self.openapi_types { :'primary_mood_cluster' => :'Array<String>', :'secondary_mood_cluster' => :'Array<String>', :'tertiary_mood_cluster' => :'Array<String>', :'valence' => :'Array<String>', :'arousal' => :'Array<String>', :'pleasantness' => :'Array<String>', :'engagement' => :'Array<String>', :'vocals' => :'Array<String>', :'dominant_instrument' => :'Array<String>', :'secondary_instrument' => :'Array<String>', :'tertiary_instrument' => :'Array<String>', :'energy' => :'Array<String>', :'sound_generation' => :'Array<String>', :'tempo' => :'Array<String>', :'scale' => :'Array<String>', :'key' => :'Array<String>', :'rhythm' => :'Array<String>', :'primary_sound_character' => :'Array<String>', :'timbre' => :'Array<String>', :'roughness' => :'Array<String>', :'tonality' => :'Array<String>', :'harmony' => :'Array<String>', :'texture' => :'Array<String>', :'groovyness' => :'Array<String>', :'space' => :'Array<String>', :'loudness' => :'Array<String>', :'production_rating' => :'Array<String>', :'performance_rating' => :'Array<String>', :'song_rating' => :'Array<String>', :'audience_age' => :'Array<String>', :'secondary_audience_age' => :'Array<String>', :'tertiary_audience_age' => :'Array<String>', :'audience_gender' => :'Array<String>', :'audience_region' => :'Array<String>', :'secondary_audience_region' => :'Array<String>', :'tertiary_audience_region' => :'Array<String>', :'origin_decade' => :'Array<String>', :'origin_region' => :'Array<String>', :'language_of_performance' => :'Array<String>', :'curateability' => :'Array<String>', :'use_case' => :'Array<String>', :'channel_suitability' => :'Array<String>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 789 def ==(o) return true if self.equal?(o) self.class == o.class && primary_mood_cluster == o.primary_mood_cluster && secondary_mood_cluster == o.secondary_mood_cluster && tertiary_mood_cluster == o.tertiary_mood_cluster && valence == o.valence && arousal == o.arousal && pleasantness == o.pleasantness && engagement == o.engagement && vocals == o.vocals && dominant_instrument == o.dominant_instrument && secondary_instrument == o.secondary_instrument && tertiary_instrument == o.tertiary_instrument && energy == o.energy && sound_generation == o.sound_generation && tempo == o.tempo && scale == o.scale && key == o.key && rhythm == o.rhythm && primary_sound_character == o.primary_sound_character && timbre == o.timbre && roughness == o.roughness && tonality == o.tonality && harmony == o.harmony && texture == o.texture && groovyness == o.groovyness && space == o.space && loudness == o.loudness && == o. && == o. && == o. && audience_age == o.audience_age && secondary_audience_age == o.secondary_audience_age && tertiary_audience_age == o.tertiary_audience_age && audience_gender == o.audience_gender && audience_region == o.audience_region && secondary_audience_region == o.secondary_audience_region && tertiary_audience_region == o.tertiary_audience_region && origin_decade == o.origin_decade && origin_region == o.origin_region && language_of_performance == o.language_of_performance && curateability == o.curateability && use_case == o.use_case && channel_suitability == o.channel_suitability end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
946 947 948 949 950 951 952 953 954 955 956 957 958 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 946 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 |
#eql?(o) ⇒ Boolean
838 839 840 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 838 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
844 845 846 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 844 def hash [primary_mood_cluster, secondary_mood_cluster, tertiary_mood_cluster, valence, arousal, pleasantness, engagement, vocals, dominant_instrument, secondary_instrument, tertiary_instrument, energy, sound_generation, tempo, scale, key, rhythm, primary_sound_character, timbre, roughness, tonality, harmony, texture, groovyness, space, loudness, , , , audience_age, secondary_audience_age, tertiary_audience_age, audience_gender, audience_region, secondary_audience_region, tertiary_audience_region, origin_decade, origin_region, language_of_performance, curateability, use_case, channel_suitability].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 625 626 627 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 672 673 674 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 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 564 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @primary_mood_cluster.nil? invalid_properties.push('invalid value for "primary_mood_cluster", primary_mood_cluster cannot be nil.') end if @secondary_mood_cluster.nil? invalid_properties.push('invalid value for "secondary_mood_cluster", secondary_mood_cluster cannot be nil.') end if @tertiary_mood_cluster.nil? invalid_properties.push('invalid value for "tertiary_mood_cluster", tertiary_mood_cluster cannot be nil.') end if @valence.nil? invalid_properties.push('invalid value for "valence", valence cannot be nil.') end if @arousal.nil? invalid_properties.push('invalid value for "arousal", arousal cannot be nil.') end if @pleasantness.nil? invalid_properties.push('invalid value for "pleasantness", pleasantness cannot be nil.') end if @engagement.nil? invalid_properties.push('invalid value for "engagement", engagement cannot be nil.') end if @vocals.nil? invalid_properties.push('invalid value for "vocals", vocals cannot be nil.') end if @dominant_instrument.nil? invalid_properties.push('invalid value for "dominant_instrument", dominant_instrument cannot be nil.') end if @secondary_instrument.nil? invalid_properties.push('invalid value for "secondary_instrument", secondary_instrument cannot be nil.') end if @tertiary_instrument.nil? invalid_properties.push('invalid value for "tertiary_instrument", tertiary_instrument cannot be nil.') end if @energy.nil? invalid_properties.push('invalid value for "energy", energy cannot be nil.') end if @sound_generation.nil? invalid_properties.push('invalid value for "sound_generation", sound_generation cannot be nil.') end if @tempo.nil? invalid_properties.push('invalid value for "tempo", tempo cannot be nil.') end if @scale.nil? invalid_properties.push('invalid value for "scale", scale cannot be nil.') end if @key.nil? invalid_properties.push('invalid value for "key", key cannot be nil.') end if @rhythm.nil? invalid_properties.push('invalid value for "rhythm", rhythm cannot be nil.') end if @primary_sound_character.nil? invalid_properties.push('invalid value for "primary_sound_character", primary_sound_character cannot be nil.') end if @timbre.nil? invalid_properties.push('invalid value for "timbre", timbre cannot be nil.') end if @roughness.nil? invalid_properties.push('invalid value for "roughness", roughness cannot be nil.') end if @tonality.nil? invalid_properties.push('invalid value for "tonality", tonality cannot be nil.') end if @harmony.nil? invalid_properties.push('invalid value for "harmony", harmony cannot be nil.') end if @texture.nil? invalid_properties.push('invalid value for "texture", texture cannot be nil.') end if @groovyness.nil? invalid_properties.push('invalid value for "groovyness", groovyness cannot be nil.') end if @space.nil? invalid_properties.push('invalid value for "space", space cannot be nil.') end if @loudness.nil? invalid_properties.push('invalid value for "loudness", loudness cannot be nil.') end if .nil? invalid_properties.push('invalid value for "production_rating", production_rating cannot be nil.') end if .nil? invalid_properties.push('invalid value for "performance_rating", performance_rating cannot be nil.') end if .nil? invalid_properties.push('invalid value for "song_rating", song_rating cannot be nil.') end if @audience_age.nil? invalid_properties.push('invalid value for "audience_age", audience_age cannot be nil.') end if @secondary_audience_age.nil? invalid_properties.push('invalid value for "secondary_audience_age", secondary_audience_age cannot be nil.') end if @tertiary_audience_age.nil? invalid_properties.push('invalid value for "tertiary_audience_age", tertiary_audience_age cannot be nil.') end if @audience_gender.nil? invalid_properties.push('invalid value for "audience_gender", audience_gender cannot be nil.') end if @audience_region.nil? invalid_properties.push('invalid value for "audience_region", audience_region cannot be nil.') end if @secondary_audience_region.nil? invalid_properties.push('invalid value for "secondary_audience_region", secondary_audience_region cannot be nil.') end if @tertiary_audience_region.nil? invalid_properties.push('invalid value for "tertiary_audience_region", tertiary_audience_region cannot be nil.') end if @origin_decade.nil? invalid_properties.push('invalid value for "origin_decade", origin_decade cannot be nil.') end if @origin_region.nil? invalid_properties.push('invalid value for "origin_region", origin_region cannot be nil.') end if @language_of_performance.nil? invalid_properties.push('invalid value for "language_of_performance", language_of_performance cannot be nil.') end if @curateability.nil? invalid_properties.push('invalid value for "curateability", curateability cannot be nil.') end if @use_case.nil? invalid_properties.push('invalid value for "use_case", use_case cannot be nil.') end if @channel_suitability.nil? invalid_properties.push('invalid value for "channel_suitability", channel_suitability cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
922 923 924 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 922 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
928 929 930 931 932 933 934 935 936 937 938 939 940 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 928 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
916 917 918 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 916 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb', line 740 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @primary_mood_cluster.nil? return false if @secondary_mood_cluster.nil? return false if @tertiary_mood_cluster.nil? return false if @valence.nil? return false if @arousal.nil? return false if @pleasantness.nil? return false if @engagement.nil? return false if @vocals.nil? return false if @dominant_instrument.nil? return false if @secondary_instrument.nil? return false if @tertiary_instrument.nil? return false if @energy.nil? return false if @sound_generation.nil? return false if @tempo.nil? return false if @scale.nil? return false if @key.nil? return false if @rhythm.nil? return false if @primary_sound_character.nil? return false if @timbre.nil? return false if @roughness.nil? return false if @tonality.nil? return false if @harmony.nil? return false if @texture.nil? return false if @groovyness.nil? return false if @space.nil? return false if @loudness.nil? return false if .nil? return false if .nil? return false if .nil? return false if @audience_age.nil? return false if @secondary_audience_age.nil? return false if @tertiary_audience_age.nil? return false if @audience_gender.nil? return false if @audience_region.nil? return false if @secondary_audience_region.nil? return false if @tertiary_audience_region.nil? return false if @origin_decade.nil? return false if @origin_region.nil? return false if @language_of_performance.nil? return false if @curateability.nil? return false if @use_case.nil? return false if @channel_suitability.nil? true end |