Class: MusicubeApiClientRuby::SaveTaggramsDTO
- Inherits:
-
Object
- Object
- MusicubeApiClientRuby::SaveTaggramsDTO
- Defined in:
- lib/musicube_api_client_ruby/models/save_taggrams_dto.rb
Overview
Timeseries of tags.
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.
-
#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.
-
#industry_suitability ⇒ Object
Returns the value of attribute industry_suitability.
-
#language_of_performance ⇒ Object
Returns the value of attribute language_of_performance.
-
#level1_genre ⇒ Object
Returns the value of attribute level1_genre.
-
#level2_genre ⇒ Object
Returns the value of attribute level2_genre.
-
#mood_cluster ⇒ Object
Returns the value of attribute mood_cluster.
-
#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.
-
#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.
-
#social_media ⇒ Object
Returns the value of attribute social_media.
-
#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.
-
#texture ⇒ Object
Returns the value of attribute texture.
-
#timbre ⇒ Object
Returns the value of attribute timbre.
-
#timestamps ⇒ Object
Returns the value of attribute timestamps.
-
#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
-
.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 = {}) ⇒ SaveTaggramsDTO
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 = {}) ⇒ SaveTaggramsDTO
Initializes the object
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 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 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 176 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `MusicubeApiClientRuby::SaveTaggramsDTO` 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 `MusicubeApiClientRuby::SaveTaggramsDTO`. 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?(:'timestamps') if (value = attributes[:'timestamps']).is_a?(Array) self. = value end end if attributes.key?(:'level1_genre') if (value = attributes[:'level1_genre']).is_a?(Hash) self.level1_genre = value end end if attributes.key?(:'level2_genre') if (value = attributes[:'level2_genre']).is_a?(Hash) self.level2_genre = value end end if attributes.key?(:'song_rating') if (value = attributes[:'song_rating']).is_a?(Hash) self. = value end end if attributes.key?(:'performance_rating') if (value = attributes[:'performance_rating']).is_a?(Hash) self. = value end end if attributes.key?(:'production_rating') if (value = attributes[:'production_rating']).is_a?(Hash) self. = value end end if attributes.key?(:'mood_cluster') if (value = attributes[:'mood_cluster']).is_a?(Hash) self.mood_cluster = value end end if attributes.key?(:'vocals') if (value = attributes[:'vocals']).is_a?(Hash) self.vocals = value end end if attributes.key?(:'dominant_instrument') if (value = attributes[:'dominant_instrument']).is_a?(Hash) self.dominant_instrument = value end end if attributes.key?(:'sound_generation') if (value = attributes[:'sound_generation']).is_a?(Hash) self.sound_generation = value end end if attributes.key?(:'rhythm') if (value = attributes[:'rhythm']).is_a?(Hash) self.rhythm = value end end if attributes.key?(:'tonality') if (value = attributes[:'tonality']).is_a?(Hash) self.tonality = value end end if attributes.key?(:'audience_age') if (value = attributes[:'audience_age']).is_a?(Hash) self.audience_age = value end end if attributes.key?(:'audience_gender') if (value = attributes[:'audience_gender']).is_a?(Hash) self.audience_gender = value end end if attributes.key?(:'audience_region') if (value = attributes[:'audience_region']).is_a?(Hash) self.audience_region = value end end if attributes.key?(:'origin_region') if (value = attributes[:'origin_region']).is_a?(Hash) self.origin_region = value end end if attributes.key?(:'origin_decade') if (value = attributes[:'origin_decade']).is_a?(Hash) self.origin_decade = value end end if attributes.key?(:'language_of_performance') if (value = attributes[:'language_of_performance']).is_a?(Hash) self.language_of_performance = value end end if attributes.key?(:'arousal') if (value = attributes[:'arousal']).is_a?(Hash) self.arousal = value end end if attributes.key?(:'valence') if (value = attributes[:'valence']).is_a?(Hash) self.valence = value end end if attributes.key?(:'pleasantness') if (value = attributes[:'pleasantness']).is_a?(Hash) self.pleasantness = value end end if attributes.key?(:'engagement') if (value = attributes[:'engagement']).is_a?(Hash) self.engagement = value end end if attributes.key?(:'energy') if (value = attributes[:'energy']).is_a?(Hash) self.energy = value end end if attributes.key?(:'timbre') if (value = attributes[:'timbre']).is_a?(Hash) self.timbre = value end end if attributes.key?(:'roughness') if (value = attributes[:'roughness']).is_a?(Hash) self.roughness = value end end if attributes.key?(:'harmony') if (value = attributes[:'harmony']).is_a?(Hash) self.harmony = value end end if attributes.key?(:'texture') if (value = attributes[:'texture']).is_a?(Hash) self.texture = value end end if attributes.key?(:'groovyness') if (value = attributes[:'groovyness']).is_a?(Hash) self.groovyness = value end end if attributes.key?(:'space') if (value = attributes[:'space']).is_a?(Hash) self.space = value end end if attributes.key?(:'curateability') if (value = attributes[:'curateability']).is_a?(Hash) self.curateability = value end end if attributes.key?(:'use_case') if (value = attributes[:'use_case']).is_a?(Hash) self.use_case = value end end if attributes.key?(:'social_media') if (value = attributes[:'social_media']).is_a?(Hash) self. = value end end if attributes.key?(:'industry_suitability') if (value = attributes[:'industry_suitability']).is_a?(Hash) self.industry_suitability = value end end end |
Instance Attribute Details
#arousal ⇒ Object
Returns the value of attribute arousal.
55 56 57 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 55 def arousal @arousal end |
#audience_age ⇒ Object
Returns the value of attribute audience_age.
43 44 45 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 43 def audience_age @audience_age end |
#audience_gender ⇒ Object
Returns the value of attribute audience_gender.
45 46 47 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 45 def audience_gender @audience_gender end |
#audience_region ⇒ Object
Returns the value of attribute audience_region.
47 48 49 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 47 def audience_region @audience_region end |
#curateability ⇒ Object
Returns the value of attribute curateability.
77 78 79 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 77 def curateability @curateability end |
#dominant_instrument ⇒ Object
Returns the value of attribute dominant_instrument.
35 36 37 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 35 def dominant_instrument @dominant_instrument end |
#energy ⇒ Object
Returns the value of attribute energy.
63 64 65 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 63 def energy @energy end |
#engagement ⇒ Object
Returns the value of attribute engagement.
61 62 63 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 61 def engagement @engagement end |
#groovyness ⇒ Object
Returns the value of attribute groovyness.
73 74 75 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 73 def groovyness @groovyness end |
#harmony ⇒ Object
Returns the value of attribute harmony.
69 70 71 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 69 def harmony @harmony end |
#industry_suitability ⇒ Object
Returns the value of attribute industry_suitability.
83 84 85 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 83 def industry_suitability @industry_suitability end |
#language_of_performance ⇒ Object
Returns the value of attribute language_of_performance.
53 54 55 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 53 def language_of_performance @language_of_performance end |
#level1_genre ⇒ Object
Returns the value of attribute level1_genre.
21 22 23 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 21 def level1_genre @level1_genre end |
#level2_genre ⇒ Object
Returns the value of attribute level2_genre.
23 24 25 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 23 def level2_genre @level2_genre end |
#mood_cluster ⇒ Object
Returns the value of attribute mood_cluster.
31 32 33 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 31 def mood_cluster @mood_cluster end |
#origin_decade ⇒ Object
Returns the value of attribute origin_decade.
51 52 53 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 51 def origin_decade @origin_decade end |
#origin_region ⇒ Object
Returns the value of attribute origin_region.
49 50 51 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 49 def origin_region @origin_region end |
#performance_rating ⇒ Object
Returns the value of attribute performance_rating.
27 28 29 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 27 def @performance_rating end |
#pleasantness ⇒ Object
Returns the value of attribute pleasantness.
59 60 61 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 59 def pleasantness @pleasantness end |
#production_rating ⇒ Object
Returns the value of attribute production_rating.
29 30 31 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 29 def @production_rating end |
#rhythm ⇒ Object
Returns the value of attribute rhythm.
39 40 41 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 39 def rhythm @rhythm end |
#roughness ⇒ Object
Returns the value of attribute roughness.
67 68 69 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 67 def roughness @roughness end |
#social_media ⇒ Object
Returns the value of attribute social_media.
81 82 83 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 81 def @social_media end |
#song_rating ⇒ Object
Returns the value of attribute song_rating.
25 26 27 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 25 def @song_rating end |
#sound_generation ⇒ Object
Returns the value of attribute sound_generation.
37 38 39 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 37 def sound_generation @sound_generation end |
#space ⇒ Object
Returns the value of attribute space.
75 76 77 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 75 def space @space end |
#texture ⇒ Object
Returns the value of attribute texture.
71 72 73 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 71 def texture @texture end |
#timbre ⇒ Object
Returns the value of attribute timbre.
65 66 67 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 65 def timbre @timbre end |
#timestamps ⇒ Object
Returns the value of attribute timestamps.
19 20 21 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 19 def @timestamps end |
#tonality ⇒ Object
Returns the value of attribute tonality.
41 42 43 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 41 def tonality @tonality end |
#use_case ⇒ Object
Returns the value of attribute use_case.
79 80 81 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 79 def use_case @use_case end |
#valence ⇒ Object
Returns the value of attribute valence.
57 58 59 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 57 def valence @valence end |
#vocals ⇒ Object
Returns the value of attribute vocals.
33 34 35 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 33 def vocals @vocals end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
125 126 127 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 125 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 86 def self.attribute_map { :'timestamps' => :'timestamps', :'level1_genre' => :'level1Genre', :'level2_genre' => :'level2Genre', :'song_rating' => :'songRating', :'performance_rating' => :'performanceRating', :'production_rating' => :'productionRating', :'mood_cluster' => :'moodCluster', :'vocals' => :'vocals', :'dominant_instrument' => :'dominantInstrument', :'sound_generation' => :'soundGeneration', :'rhythm' => :'rhythm', :'tonality' => :'tonality', :'audience_age' => :'audienceAge', :'audience_gender' => :'audienceGender', :'audience_region' => :'audienceRegion', :'origin_region' => :'originRegion', :'origin_decade' => :'originDecade', :'language_of_performance' => :'languageOfPerformance', :'arousal' => :'arousal', :'valence' => :'valence', :'pleasantness' => :'pleasantness', :'engagement' => :'engagement', :'energy' => :'energy', :'timbre' => :'timbre', :'roughness' => :'roughness', :'harmony' => :'harmony', :'texture' => :'texture', :'groovyness' => :'groovyness', :'space' => :'space', :'curateability' => :'curateability', :'use_case' => :'useCase', :'social_media' => :'socialMedia', :'industry_suitability' => :'industrySuitability' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
456 457 458 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 456 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
169 170 171 172 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 169 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 130 def self.openapi_types { :'timestamps' => :'Array<Float>', :'level1_genre' => :'Hash<String, Array<Float>>', :'level2_genre' => :'Hash<String, Array<Float>>', :'song_rating' => :'Hash<String, Array<Float>>', :'performance_rating' => :'Hash<String, Array<Float>>', :'production_rating' => :'Hash<String, Array<Float>>', :'mood_cluster' => :'Hash<String, Array<Float>>', :'vocals' => :'Hash<String, Array<Float>>', :'dominant_instrument' => :'Hash<String, Array<Float>>', :'sound_generation' => :'Hash<String, Array<Float>>', :'rhythm' => :'Hash<String, Array<Float>>', :'tonality' => :'Hash<String, Array<Float>>', :'audience_age' => :'Hash<String, Array<Float>>', :'audience_gender' => :'Hash<String, Array<Float>>', :'audience_region' => :'Hash<String, Array<Float>>', :'origin_region' => :'Hash<String, Array<Float>>', :'origin_decade' => :'Hash<String, Array<Float>>', :'language_of_performance' => :'Hash<String, Array<Float>>', :'arousal' => :'Hash<String, Array<Float>>', :'valence' => :'Hash<String, Array<Float>>', :'pleasantness' => :'Hash<String, Array<Float>>', :'engagement' => :'Hash<String, Array<Float>>', :'energy' => :'Hash<String, Array<Float>>', :'timbre' => :'Hash<String, Array<Float>>', :'roughness' => :'Hash<String, Array<Float>>', :'harmony' => :'Hash<String, Array<Float>>', :'texture' => :'Hash<String, Array<Float>>', :'groovyness' => :'Hash<String, Array<Float>>', :'space' => :'Hash<String, Array<Float>>', :'curateability' => :'Hash<String, Array<Float>>', :'use_case' => :'Hash<String, Array<Float>>', :'social_media' => :'Hash<String, Array<Float>>', :'industry_suitability' => :'Hash<String, Array<Float>>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 403 def ==(o) return true if self.equal?(o) self.class == o.class && == o. && level1_genre == o.level1_genre && level2_genre == o.level2_genre && == o. && == o. && == o. && mood_cluster == o.mood_cluster && vocals == o.vocals && dominant_instrument == o.dominant_instrument && sound_generation == o.sound_generation && rhythm == o.rhythm && tonality == o.tonality && audience_age == o.audience_age && audience_gender == o.audience_gender && audience_region == o.audience_region && origin_region == o.origin_region && origin_decade == o.origin_decade && language_of_performance == o.language_of_performance && arousal == o.arousal && valence == o.valence && pleasantness == o.pleasantness && engagement == o.engagement && energy == o.energy && timbre == o.timbre && roughness == o.roughness && harmony == o.harmony && texture == o.texture && groovyness == o.groovyness && space == o.space && curateability == o.curateability && use_case == o.use_case && == o. && industry_suitability == o.industry_suitability end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 487 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 = MusicubeApiClientRuby.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
558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 558 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
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 463 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
443 444 445 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 443 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
449 450 451 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 449 def hash [, level1_genre, level2_genre, , , , mood_cluster, vocals, dominant_instrument, sound_generation, rhythm, tonality, audience_age, audience_gender, audience_region, origin_region, origin_decade, language_of_performance, arousal, valence, pleasantness, engagement, energy, timbre, roughness, harmony, texture, groovyness, space, curateability, use_case, , industry_suitability].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
390 391 392 393 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 390 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
534 535 536 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 534 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
540 541 542 543 544 545 546 547 548 549 550 551 552 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 540 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
528 529 530 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 528 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
397 398 399 |
# File 'lib/musicube_api_client_ruby/models/save_taggrams_dto.rb', line 397 def valid? true end |