songtradr_api_client_ruby 1.12.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (225) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +76 -0
  4. data/README.md +223 -0
  5. data/Rakefile +10 -0
  6. data/docs/AllowedValuesApi.md +200 -0
  7. data/docs/CategoryMediumDTO.md +22 -0
  8. data/docs/CategoryMinimalDTO.md +18 -0
  9. data/docs/ConfigAccessDTO.md +20 -0
  10. data/docs/ConfigIdentifierDTO.md +20 -0
  11. data/docs/ContributorTypeDTO.md +18 -0
  12. data/docs/ErrorResponse.md +26 -0
  13. data/docs/FieldSummaryDTO.md +22 -0
  14. data/docs/FileDTO.md +50 -0
  15. data/docs/FileListDTO.md +24 -0
  16. data/docs/FileMinimalWithUrlDTO.md +22 -0
  17. data/docs/FileSmallDTO.md +46 -0
  18. data/docs/FileUploadDTO.md +22 -0
  19. data/docs/FileWIthUrlDTO.md +20 -0
  20. data/docs/FilesSummaryDTO.md +30 -0
  21. data/docs/ForgotPasswordDTO.md +20 -0
  22. data/docs/GenreDTO.md +20 -0
  23. data/docs/GenreMinimalDTO.md +18 -0
  24. data/docs/GenresSummaryDTO.md +22 -0
  25. data/docs/InitPutRecordingAudioDTO.md +22 -0
  26. data/docs/JwtTokenDTO.md +22 -0
  27. data/docs/LoginDTO.md +24 -0
  28. data/docs/MusicalFeaturesDTO.md +186 -0
  29. data/docs/PLineDTO.md +20 -0
  30. data/docs/PartyApi.md +75 -0
  31. data/docs/PartyLargeDTO.md +32 -0
  32. data/docs/PartySmallDTO.md +20 -0
  33. data/docs/PlaylistApi.md +221 -0
  34. data/docs/PlaylistLargeDTO.md +38 -0
  35. data/docs/ProductMediumDTO.md +34 -0
  36. data/docs/ProductPartyDTO.md +20 -0
  37. data/docs/RecordingApi.md +789 -0
  38. data/docs/RecordingForSimilaritySearchDTO.md +20 -0
  39. data/docs/RecordingGenrePredictionDTO.md +22 -0
  40. data/docs/RecordingLargeDTO.md +40 -0
  41. data/docs/RecordingListDTO.md +24 -0
  42. data/docs/RecordingMediumDTO.md +36 -0
  43. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +20 -0
  44. data/docs/RecordingMinimalWithTaggramsDTO.md +22 -0
  45. data/docs/RecordingMinimalWithTagstrengthsDTO.md +20 -0
  46. data/docs/RecordingPartyDTO.md +20 -0
  47. data/docs/RecordingPlaylistDTO.md +24 -0
  48. data/docs/RecordingSmallDTO.md +24 -0
  49. data/docs/RecordingTagSmallDTO.md +18 -0
  50. data/docs/SaveFileRecordingDTO.md +236 -0
  51. data/docs/SavePlaylistDTO.md +34 -0
  52. data/docs/SaveRecordingGenreDTO.md +22 -0
  53. data/docs/SaveRecordingPartyDTO.md +20 -0
  54. data/docs/SaveRecordingPlaylistDTO.md +22 -0
  55. data/docs/SaveRecordingTagDTO.md +20 -0
  56. data/docs/SaveReferrerDTO.md +20 -0
  57. data/docs/SaveTaggramsDTO.md +82 -0
  58. data/docs/SaveUserDTO.md +28 -0
  59. data/docs/SearchFilterValuesDTO.md +98 -0
  60. data/docs/SearchRecordingGranularAbstractionDTO.md +20 -0
  61. data/docs/SearchRecordingGranularDTO.md +20 -0
  62. data/docs/SignUpDTO.md +24 -0
  63. data/docs/TagDTO.md +22 -0
  64. data/docs/TagSmallDTO.md +20 -0
  65. data/docs/TaggramDTO.md +26 -0
  66. data/docs/TagsSummaryDTO.md +22 -0
  67. data/docs/TagstrengthDTO.md +26 -0
  68. data/docs/TitleDTO.md +18 -0
  69. data/docs/TokenRequest.md +18 -0
  70. data/docs/TrackToMediumProductDTO.md +22 -0
  71. data/docs/UpdatePasswordDTO.md +20 -0
  72. data/docs/UsageDTO.md +18 -0
  73. data/docs/UserApi.md +1936 -0
  74. data/docs/UserDTO.md +56 -0
  75. data/getspec.rb +10 -0
  76. data/git_push.sh +57 -0
  77. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +213 -0
  78. data/lib/songtradr_api_client_ruby/api/party_api.rb +84 -0
  79. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +222 -0
  80. data/lib/songtradr_api_client_ruby/api/recording_api.rb +900 -0
  81. data/lib/songtradr_api_client_ruby/api/user_api.rb +2642 -0
  82. data/lib/songtradr_api_client_ruby/api_client.rb +428 -0
  83. data/lib/songtradr_api_client_ruby/api_error.rb +58 -0
  84. data/lib/songtradr_api_client_ruby/configuration.rb +380 -0
  85. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +250 -0
  86. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +225 -0
  87. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +287 -0
  88. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +239 -0
  89. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +225 -0
  90. data/lib/songtradr_api_client_ruby/models/error_response.rb +276 -0
  91. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +253 -0
  92. data/lib/songtradr_api_client_ruby/models/file_dto.rb +450 -0
  93. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +269 -0
  94. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +253 -0
  95. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +432 -0
  96. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +244 -0
  97. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +239 -0
  98. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +287 -0
  99. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +267 -0
  100. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +239 -0
  101. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +225 -0
  102. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +248 -0
  103. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +238 -0
  104. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +248 -0
  105. data/lib/songtradr_api_client_ruby/models/login_dto.rb +257 -0
  106. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +1532 -0
  107. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +234 -0
  108. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +288 -0
  109. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +239 -0
  110. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +353 -0
  111. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +316 -0
  112. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +236 -0
  113. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +239 -0
  114. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +253 -0
  115. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +366 -0
  116. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +269 -0
  117. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +340 -0
  118. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +236 -0
  119. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +248 -0
  120. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +236 -0
  121. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +236 -0
  122. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +247 -0
  123. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +268 -0
  124. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +225 -0
  125. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +1847 -0
  126. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +350 -0
  127. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +243 -0
  128. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +273 -0
  129. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +248 -0
  130. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +234 -0
  131. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +229 -0
  132. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +574 -0
  133. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +317 -0
  134. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +867 -0
  135. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +270 -0
  136. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +235 -0
  137. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +262 -0
  138. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +250 -0
  139. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +239 -0
  140. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +271 -0
  141. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +250 -0
  142. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +269 -0
  143. data/lib/songtradr_api_client_ruby/models/title_dto.rb +225 -0
  144. data/lib/songtradr_api_client_ruby/models/token_request.rb +224 -0
  145. data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +248 -0
  146. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +238 -0
  147. data/lib/songtradr_api_client_ruby/models/usage_dto.rb +220 -0
  148. data/lib/songtradr_api_client_ruby/models/user_dto.rb +481 -0
  149. data/lib/songtradr_api_client_ruby/version.rb +15 -0
  150. data/lib/songtradr_api_client_ruby.rb +108 -0
  151. data/openapi-generator-config.yaml +10 -0
  152. data/songtradr_api_client_ruby.gemspec +39 -0
  153. data/spec/api/allowed_values_api_spec.rb +68 -0
  154. data/spec/api/party_api_spec.rb +46 -0
  155. data/spec/api/playlist_api_spec.rb +72 -0
  156. data/spec/api/recording_api_spec.rb +192 -0
  157. data/spec/api/user_api_spec.rb +507 -0
  158. data/spec/api_client_spec.rb +223 -0
  159. data/spec/configuration_spec.rb +82 -0
  160. data/spec/models/category_medium_dto_spec.rb +46 -0
  161. data/spec/models/category_minimal_dto_spec.rb +34 -0
  162. data/spec/models/config_access_dto_spec.rb +48 -0
  163. data/spec/models/config_identifier_dto_spec.rb +40 -0
  164. data/spec/models/contributor_type_dto_spec.rb +34 -0
  165. data/spec/models/error_response_spec.rb +58 -0
  166. data/spec/models/field_summary_dto_spec.rb +46 -0
  167. data/spec/models/file_dto_spec.rb +142 -0
  168. data/spec/models/file_list_dto_spec.rb +52 -0
  169. data/spec/models/file_minimal_with_url_dto_spec.rb +46 -0
  170. data/spec/models/file_small_dto_spec.rb +130 -0
  171. data/spec/models/file_upload_dto_spec.rb +46 -0
  172. data/spec/models/file_w_ith_url_dto_spec.rb +40 -0
  173. data/spec/models/files_summary_dto_spec.rb +70 -0
  174. data/spec/models/forgot_password_dto_spec.rb +44 -0
  175. data/spec/models/genre_dto_spec.rb +40 -0
  176. data/spec/models/genre_minimal_dto_spec.rb +34 -0
  177. data/spec/models/genres_summary_dto_spec.rb +46 -0
  178. data/spec/models/init_put_recording_audio_dto_spec.rb +46 -0
  179. data/spec/models/jwt_token_dto_spec.rb +46 -0
  180. data/spec/models/login_dto_spec.rb +52 -0
  181. data/spec/models/musical_features_dto_spec.rb +706 -0
  182. data/spec/models/p_line_dto_spec.rb +40 -0
  183. data/spec/models/party_large_dto_spec.rb +76 -0
  184. data/spec/models/party_small_dto_spec.rb +40 -0
  185. data/spec/models/playlist_large_dto_spec.rb +98 -0
  186. data/spec/models/product_medium_dto_spec.rb +82 -0
  187. data/spec/models/product_party_dto_spec.rb +40 -0
  188. data/spec/models/recording_for_similarity_search_dto_spec.rb +40 -0
  189. data/spec/models/recording_genre_prediction_dto_spec.rb +46 -0
  190. data/spec/models/recording_large_dto_spec.rb +100 -0
  191. data/spec/models/recording_list_dto_spec.rb +52 -0
  192. data/spec/models/recording_medium_dto_spec.rb +88 -0
  193. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +40 -0
  194. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +46 -0
  195. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +40 -0
  196. data/spec/models/recording_party_dto_spec.rb +40 -0
  197. data/spec/models/recording_playlist_dto_spec.rb +52 -0
  198. data/spec/models/recording_small_dto_spec.rb +52 -0
  199. data/spec/models/recording_tag_small_dto_spec.rb +34 -0
  200. data/spec/models/save_file_recording_dto_spec.rb +880 -0
  201. data/spec/models/save_playlist_dto_spec.rb +86 -0
  202. data/spec/models/save_recording_genre_dto_spec.rb +46 -0
  203. data/spec/models/save_recording_party_dto_spec.rb +44 -0
  204. data/spec/models/save_recording_playlist_dto_spec.rb +46 -0
  205. data/spec/models/save_recording_tag_dto_spec.rb +40 -0
  206. data/spec/models/save_referrer_dto_spec.rb +40 -0
  207. data/spec/models/save_taggrams_dto_spec.rb +226 -0
  208. data/spec/models/save_user_dto_spec.rb +72 -0
  209. data/spec/models/search_filter_values_dto_spec.rb +274 -0
  210. data/spec/models/search_recording_granular_abstraction_dto_spec.rb +44 -0
  211. data/spec/models/search_recording_granular_dto_spec.rb +40 -0
  212. data/spec/models/sign_up_dto_spec.rb +52 -0
  213. data/spec/models/tag_dto_spec.rb +46 -0
  214. data/spec/models/tag_small_dto_spec.rb +40 -0
  215. data/spec/models/taggram_dto_spec.rb +58 -0
  216. data/spec/models/tags_summary_dto_spec.rb +46 -0
  217. data/spec/models/tagstrength_dto_spec.rb +58 -0
  218. data/spec/models/title_dto_spec.rb +34 -0
  219. data/spec/models/token_request_spec.rb +34 -0
  220. data/spec/models/track_to_medium_product_dto_spec.rb +46 -0
  221. data/spec/models/update_password_dto_spec.rb +40 -0
  222. data/spec/models/usage_dto_spec.rb +34 -0
  223. data/spec/models/user_dto_spec.rb +148 -0
  224. data/spec/spec_helper.rb +111 -0
  225. metadata +412 -0
@@ -0,0 +1,1532 @@
1
+ =begin
2
+ #Songtradr API
3
+
4
+ #This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
5
+
6
+ The version of the OpenAPI document: 1.12.21
7
+ Contact: info@songtradr.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module SongtradrApiClientRuby
17
+ # AI generated musical features of a recording.
18
+ class MusicalFeaturesDTO
19
+ # Search for space
20
+ attr_accessor :space
21
+
22
+ # Search for curatebility
23
+ attr_accessor :curateability
24
+
25
+ # Search for use case
26
+ attr_accessor :use_case
27
+
28
+ # Search for social media suitability
29
+ attr_accessor :channel_suitability
30
+
31
+ # Search for an arousal
32
+ attr_accessor :arousal
33
+
34
+ # Search for a dominant instrument
35
+ attr_accessor :dominant_instrument
36
+
37
+ attr_accessor :language_of_performance
38
+
39
+ # Search for energy
40
+ attr_accessor :energy
41
+
42
+ # Search for an engagement
43
+ attr_accessor :engagement
44
+
45
+ # Search for groovyness
46
+ attr_accessor :groovyness
47
+
48
+ # Search for a degree of harmoniousness
49
+ attr_accessor :harmony
50
+
51
+ # Search for pleasantness
52
+ attr_accessor :pleasantness
53
+
54
+ # Search for a language of the lyrics
55
+ attr_accessor :primary_mood_cluster
56
+
57
+ # Search for a sound character
58
+ attr_accessor :primary_sound_character
59
+
60
+ # Search for rhythm
61
+ attr_accessor :rhythm
62
+
63
+ # Search for roughness
64
+ attr_accessor :roughness
65
+
66
+ # Search for a tonal scale
67
+ attr_accessor :scale
68
+
69
+ # Search for type of sound generation
70
+ attr_accessor :sound_generation
71
+
72
+ # Search for tempo
73
+ attr_accessor :tempo
74
+
75
+ # Search for texture
76
+ attr_accessor :texture
77
+
78
+ # Search for timbre
79
+ attr_accessor :timbre
80
+
81
+ # Search for tonality
82
+ attr_accessor :tonality
83
+
84
+ # Search for a valence
85
+ attr_accessor :valence
86
+
87
+ # Search for a vocal gender or instrumental songs
88
+ attr_accessor :vocals
89
+
90
+ # Search for origin decade
91
+ attr_accessor :origin_decade
92
+
93
+ attr_accessor :primary_mood_cluster_affinity
94
+
95
+ # Search for a language of the lyrics
96
+ attr_accessor :secondary_mood_cluster
97
+
98
+ attr_accessor :secondary_mood_cluster_affinity
99
+
100
+ # Search for a language of the lyrics
101
+ attr_accessor :tertiary_mood_cluster
102
+
103
+ attr_accessor :tertiary_mood_cluster_affinity
104
+
105
+ attr_accessor :vocals_affinity
106
+
107
+ attr_accessor :bpm
108
+
109
+ attr_accessor :production_rating
110
+
111
+ attr_accessor :production_rating_affinity
112
+
113
+ attr_accessor :performance_rating
114
+
115
+ attr_accessor :performance_rating_affinity
116
+
117
+ attr_accessor :song_rating
118
+
119
+ attr_accessor :song_rating_affinity
120
+
121
+ attr_accessor :audience_age
122
+
123
+ attr_accessor :audience_age_affinity
124
+
125
+ attr_accessor :secondary_audience_age
126
+
127
+ attr_accessor :secondary_audience_age_affinity
128
+
129
+ attr_accessor :tertiary_audience_age
130
+
131
+ attr_accessor :tertiary_audience_age_affinity
132
+
133
+ attr_accessor :audience_gender
134
+
135
+ attr_accessor :audience_gender_affinity
136
+
137
+ attr_accessor :dominant_instrument_affinity
138
+
139
+ # Search for a dominant instrument
140
+ attr_accessor :secondary_instrument
141
+
142
+ attr_accessor :secondary_instrument_affinity
143
+
144
+ # Search for a dominant instrument
145
+ attr_accessor :tertiary_instrument
146
+
147
+ attr_accessor :tertiary_instrument_affinity
148
+
149
+ attr_accessor :sound_generation_affinity
150
+
151
+ attr_accessor :rhythm_affinity
152
+
153
+ attr_accessor :primary_sound_character_affinity
154
+
155
+ attr_accessor :tonality_affinity
156
+
157
+ attr_accessor :audience_region_affinity
158
+
159
+ attr_accessor :secondary_audience_region
160
+
161
+ attr_accessor :secondary_audience_region_affinity
162
+
163
+ attr_accessor :tertiary_audience_region
164
+
165
+ attr_accessor :tertiary_audience_region_affinity
166
+
167
+ attr_accessor :origin_region
168
+
169
+ attr_accessor :origin_region_affinity
170
+
171
+ attr_accessor :origin_decade_affinity
172
+
173
+ attr_accessor :language_of_performance_affinity
174
+
175
+ attr_accessor :curateability_affinity
176
+
177
+ attr_accessor :use_case_affinity
178
+
179
+ # Search for Industry suitability
180
+ attr_accessor :industry_suitability
181
+
182
+ attr_accessor :industry_suitability_affinity
183
+
184
+ attr_accessor :audience_region
185
+
186
+ attr_accessor :valence_affinity
187
+
188
+ attr_accessor :arousal_affinity
189
+
190
+ attr_accessor :pleasantness_affinity
191
+
192
+ attr_accessor :engagement_affinity
193
+
194
+ attr_accessor :energy_affinity
195
+
196
+ attr_accessor :tempo_affinity
197
+
198
+ attr_accessor :scale_affinity
199
+
200
+ attr_accessor :timbre_affinity
201
+
202
+ attr_accessor :roughness_affinity
203
+
204
+ attr_accessor :harmony_affinity
205
+
206
+ attr_accessor :texture_affinity
207
+
208
+ attr_accessor :groovyness_affinity
209
+
210
+ attr_accessor :space_affinity
211
+
212
+ attr_accessor :key_affinity
213
+
214
+ attr_accessor :channel_suitability_affinity
215
+
216
+ # Search for a harmonic key
217
+ attr_accessor :key
218
+
219
+ class EnumAttributeValidator
220
+ attr_reader :datatype
221
+ attr_reader :allowable_values
222
+
223
+ def initialize(datatype, allowable_values)
224
+ @allowable_values = allowable_values.map do |value|
225
+ case datatype.to_s
226
+ when /Integer/i
227
+ value.to_i
228
+ when /Float/i
229
+ value.to_f
230
+ else
231
+ value
232
+ end
233
+ end
234
+ end
235
+
236
+ def valid?(value)
237
+ !value || allowable_values.include?(value)
238
+ end
239
+ end
240
+
241
+ # Attribute mapping from ruby-style variable name to JSON key.
242
+ def self.attribute_map
243
+ {
244
+ :'space' => :'space',
245
+ :'curateability' => :'curateability',
246
+ :'use_case' => :'useCase',
247
+ :'channel_suitability' => :'channelSuitability',
248
+ :'arousal' => :'arousal',
249
+ :'dominant_instrument' => :'dominantInstrument',
250
+ :'language_of_performance' => :'languageOfPerformance',
251
+ :'energy' => :'energy',
252
+ :'engagement' => :'engagement',
253
+ :'groovyness' => :'groovyness',
254
+ :'harmony' => :'harmony',
255
+ :'pleasantness' => :'pleasantness',
256
+ :'primary_mood_cluster' => :'primaryMoodCluster',
257
+ :'primary_sound_character' => :'primarySoundCharacter',
258
+ :'rhythm' => :'rhythm',
259
+ :'roughness' => :'roughness',
260
+ :'scale' => :'scale',
261
+ :'sound_generation' => :'soundGeneration',
262
+ :'tempo' => :'tempo',
263
+ :'texture' => :'texture',
264
+ :'timbre' => :'timbre',
265
+ :'tonality' => :'tonality',
266
+ :'valence' => :'valence',
267
+ :'vocals' => :'vocals',
268
+ :'origin_decade' => :'originDecade',
269
+ :'primary_mood_cluster_affinity' => :'primaryMoodClusterAffinity',
270
+ :'secondary_mood_cluster' => :'secondaryMoodCluster',
271
+ :'secondary_mood_cluster_affinity' => :'secondaryMoodClusterAffinity',
272
+ :'tertiary_mood_cluster' => :'tertiaryMoodCluster',
273
+ :'tertiary_mood_cluster_affinity' => :'tertiaryMoodClusterAffinity',
274
+ :'vocals_affinity' => :'vocalsAffinity',
275
+ :'bpm' => :'bpm',
276
+ :'production_rating' => :'productionRating',
277
+ :'production_rating_affinity' => :'productionRatingAffinity',
278
+ :'performance_rating' => :'performanceRating',
279
+ :'performance_rating_affinity' => :'performanceRatingAffinity',
280
+ :'song_rating' => :'songRating',
281
+ :'song_rating_affinity' => :'songRatingAffinity',
282
+ :'audience_age' => :'audienceAge',
283
+ :'audience_age_affinity' => :'audienceAgeAffinity',
284
+ :'secondary_audience_age' => :'secondaryAudienceAge',
285
+ :'secondary_audience_age_affinity' => :'secondaryAudienceAgeAffinity',
286
+ :'tertiary_audience_age' => :'tertiaryAudienceAge',
287
+ :'tertiary_audience_age_affinity' => :'tertiaryAudienceAgeAffinity',
288
+ :'audience_gender' => :'audienceGender',
289
+ :'audience_gender_affinity' => :'audienceGenderAffinity',
290
+ :'dominant_instrument_affinity' => :'dominantInstrumentAffinity',
291
+ :'secondary_instrument' => :'secondaryInstrument',
292
+ :'secondary_instrument_affinity' => :'secondaryInstrumentAffinity',
293
+ :'tertiary_instrument' => :'tertiaryInstrument',
294
+ :'tertiary_instrument_affinity' => :'tertiaryInstrumentAffinity',
295
+ :'sound_generation_affinity' => :'soundGenerationAffinity',
296
+ :'rhythm_affinity' => :'rhythmAffinity',
297
+ :'primary_sound_character_affinity' => :'primarySoundCharacterAffinity',
298
+ :'tonality_affinity' => :'tonalityAffinity',
299
+ :'audience_region_affinity' => :'audienceRegionAffinity',
300
+ :'secondary_audience_region' => :'secondaryAudienceRegion',
301
+ :'secondary_audience_region_affinity' => :'secondaryAudienceRegionAffinity',
302
+ :'tertiary_audience_region' => :'tertiaryAudienceRegion',
303
+ :'tertiary_audience_region_affinity' => :'tertiaryAudienceRegionAffinity',
304
+ :'origin_region' => :'originRegion',
305
+ :'origin_region_affinity' => :'originRegionAffinity',
306
+ :'origin_decade_affinity' => :'originDecadeAffinity',
307
+ :'language_of_performance_affinity' => :'languageOfPerformanceAffinity',
308
+ :'curateability_affinity' => :'curateabilityAffinity',
309
+ :'use_case_affinity' => :'useCaseAffinity',
310
+ :'industry_suitability' => :'industrySuitability',
311
+ :'industry_suitability_affinity' => :'industrySuitabilityAffinity',
312
+ :'audience_region' => :'audienceRegion',
313
+ :'valence_affinity' => :'valenceAffinity',
314
+ :'arousal_affinity' => :'arousalAffinity',
315
+ :'pleasantness_affinity' => :'pleasantnessAffinity',
316
+ :'engagement_affinity' => :'engagementAffinity',
317
+ :'energy_affinity' => :'energyAffinity',
318
+ :'tempo_affinity' => :'tempoAffinity',
319
+ :'scale_affinity' => :'scaleAffinity',
320
+ :'timbre_affinity' => :'timbreAffinity',
321
+ :'roughness_affinity' => :'roughnessAffinity',
322
+ :'harmony_affinity' => :'harmonyAffinity',
323
+ :'texture_affinity' => :'textureAffinity',
324
+ :'groovyness_affinity' => :'groovynessAffinity',
325
+ :'space_affinity' => :'spaceAffinity',
326
+ :'key_affinity' => :'keyAffinity',
327
+ :'channel_suitability_affinity' => :'channelSuitabilityAffinity',
328
+ :'key' => :'key'
329
+ }
330
+ end
331
+
332
+ # Returns all the JSON keys this model knows about
333
+ def self.acceptable_attributes
334
+ attribute_map.values
335
+ end
336
+
337
+ # Attribute type mapping.
338
+ def self.openapi_types
339
+ {
340
+ :'space' => :'String',
341
+ :'curateability' => :'String',
342
+ :'use_case' => :'String',
343
+ :'channel_suitability' => :'String',
344
+ :'arousal' => :'String',
345
+ :'dominant_instrument' => :'String',
346
+ :'language_of_performance' => :'String',
347
+ :'energy' => :'String',
348
+ :'engagement' => :'String',
349
+ :'groovyness' => :'String',
350
+ :'harmony' => :'String',
351
+ :'pleasantness' => :'String',
352
+ :'primary_mood_cluster' => :'String',
353
+ :'primary_sound_character' => :'String',
354
+ :'rhythm' => :'String',
355
+ :'roughness' => :'String',
356
+ :'scale' => :'String',
357
+ :'sound_generation' => :'String',
358
+ :'tempo' => :'String',
359
+ :'texture' => :'String',
360
+ :'timbre' => :'String',
361
+ :'tonality' => :'String',
362
+ :'valence' => :'String',
363
+ :'vocals' => :'String',
364
+ :'origin_decade' => :'String',
365
+ :'primary_mood_cluster_affinity' => :'Float',
366
+ :'secondary_mood_cluster' => :'String',
367
+ :'secondary_mood_cluster_affinity' => :'Float',
368
+ :'tertiary_mood_cluster' => :'String',
369
+ :'tertiary_mood_cluster_affinity' => :'Float',
370
+ :'vocals_affinity' => :'Float',
371
+ :'bpm' => :'Float',
372
+ :'production_rating' => :'String',
373
+ :'production_rating_affinity' => :'Float',
374
+ :'performance_rating' => :'String',
375
+ :'performance_rating_affinity' => :'Float',
376
+ :'song_rating' => :'String',
377
+ :'song_rating_affinity' => :'Float',
378
+ :'audience_age' => :'String',
379
+ :'audience_age_affinity' => :'Float',
380
+ :'secondary_audience_age' => :'String',
381
+ :'secondary_audience_age_affinity' => :'Float',
382
+ :'tertiary_audience_age' => :'String',
383
+ :'tertiary_audience_age_affinity' => :'Float',
384
+ :'audience_gender' => :'String',
385
+ :'audience_gender_affinity' => :'Float',
386
+ :'dominant_instrument_affinity' => :'Float',
387
+ :'secondary_instrument' => :'String',
388
+ :'secondary_instrument_affinity' => :'Float',
389
+ :'tertiary_instrument' => :'String',
390
+ :'tertiary_instrument_affinity' => :'Float',
391
+ :'sound_generation_affinity' => :'Float',
392
+ :'rhythm_affinity' => :'Float',
393
+ :'primary_sound_character_affinity' => :'Float',
394
+ :'tonality_affinity' => :'Float',
395
+ :'audience_region_affinity' => :'Float',
396
+ :'secondary_audience_region' => :'String',
397
+ :'secondary_audience_region_affinity' => :'Float',
398
+ :'tertiary_audience_region' => :'String',
399
+ :'tertiary_audience_region_affinity' => :'Float',
400
+ :'origin_region' => :'String',
401
+ :'origin_region_affinity' => :'Float',
402
+ :'origin_decade_affinity' => :'Float',
403
+ :'language_of_performance_affinity' => :'Float',
404
+ :'curateability_affinity' => :'Float',
405
+ :'use_case_affinity' => :'Float',
406
+ :'industry_suitability' => :'String',
407
+ :'industry_suitability_affinity' => :'Float',
408
+ :'audience_region' => :'String',
409
+ :'valence_affinity' => :'Float',
410
+ :'arousal_affinity' => :'Float',
411
+ :'pleasantness_affinity' => :'Float',
412
+ :'engagement_affinity' => :'Float',
413
+ :'energy_affinity' => :'Float',
414
+ :'tempo_affinity' => :'Float',
415
+ :'scale_affinity' => :'Float',
416
+ :'timbre_affinity' => :'Float',
417
+ :'roughness_affinity' => :'Float',
418
+ :'harmony_affinity' => :'Float',
419
+ :'texture_affinity' => :'Float',
420
+ :'groovyness_affinity' => :'Float',
421
+ :'space_affinity' => :'Float',
422
+ :'key_affinity' => :'Float',
423
+ :'channel_suitability_affinity' => :'Float',
424
+ :'key' => :'String'
425
+ }
426
+ end
427
+
428
+ # List of attributes with nullable: true
429
+ def self.openapi_nullable
430
+ Set.new([
431
+ ])
432
+ end
433
+
434
+ # Initializes the object
435
+ # @param [Hash] attributes Model attributes in the form of hash
436
+ def initialize(attributes = {})
437
+ if (!attributes.is_a?(Hash))
438
+ fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::MusicalFeaturesDTO` initialize method"
439
+ end
440
+
441
+ # check to see if the attribute exists and convert string to symbol for hash key
442
+ attributes = attributes.each_with_object({}) { |(k, v), h|
443
+ if (!self.class.attribute_map.key?(k.to_sym))
444
+ fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::MusicalFeaturesDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
445
+ end
446
+ h[k.to_sym] = v
447
+ }
448
+
449
+ if attributes.key?(:'space')
450
+ self.space = attributes[:'space']
451
+ end
452
+
453
+ if attributes.key?(:'curateability')
454
+ self.curateability = attributes[:'curateability']
455
+ end
456
+
457
+ if attributes.key?(:'use_case')
458
+ self.use_case = attributes[:'use_case']
459
+ end
460
+
461
+ if attributes.key?(:'channel_suitability')
462
+ self.channel_suitability = attributes[:'channel_suitability']
463
+ end
464
+
465
+ if attributes.key?(:'arousal')
466
+ self.arousal = attributes[:'arousal']
467
+ end
468
+
469
+ if attributes.key?(:'dominant_instrument')
470
+ self.dominant_instrument = attributes[:'dominant_instrument']
471
+ end
472
+
473
+ if attributes.key?(:'language_of_performance')
474
+ self.language_of_performance = attributes[:'language_of_performance']
475
+ end
476
+
477
+ if attributes.key?(:'energy')
478
+ self.energy = attributes[:'energy']
479
+ end
480
+
481
+ if attributes.key?(:'engagement')
482
+ self.engagement = attributes[:'engagement']
483
+ end
484
+
485
+ if attributes.key?(:'groovyness')
486
+ self.groovyness = attributes[:'groovyness']
487
+ end
488
+
489
+ if attributes.key?(:'harmony')
490
+ self.harmony = attributes[:'harmony']
491
+ end
492
+
493
+ if attributes.key?(:'pleasantness')
494
+ self.pleasantness = attributes[:'pleasantness']
495
+ end
496
+
497
+ if attributes.key?(:'primary_mood_cluster')
498
+ self.primary_mood_cluster = attributes[:'primary_mood_cluster']
499
+ end
500
+
501
+ if attributes.key?(:'primary_sound_character')
502
+ self.primary_sound_character = attributes[:'primary_sound_character']
503
+ end
504
+
505
+ if attributes.key?(:'rhythm')
506
+ self.rhythm = attributes[:'rhythm']
507
+ end
508
+
509
+ if attributes.key?(:'roughness')
510
+ self.roughness = attributes[:'roughness']
511
+ end
512
+
513
+ if attributes.key?(:'scale')
514
+ self.scale = attributes[:'scale']
515
+ end
516
+
517
+ if attributes.key?(:'sound_generation')
518
+ self.sound_generation = attributes[:'sound_generation']
519
+ end
520
+
521
+ if attributes.key?(:'tempo')
522
+ self.tempo = attributes[:'tempo']
523
+ end
524
+
525
+ if attributes.key?(:'texture')
526
+ self.texture = attributes[:'texture']
527
+ end
528
+
529
+ if attributes.key?(:'timbre')
530
+ self.timbre = attributes[:'timbre']
531
+ end
532
+
533
+ if attributes.key?(:'tonality')
534
+ self.tonality = attributes[:'tonality']
535
+ end
536
+
537
+ if attributes.key?(:'valence')
538
+ self.valence = attributes[:'valence']
539
+ end
540
+
541
+ if attributes.key?(:'vocals')
542
+ self.vocals = attributes[:'vocals']
543
+ end
544
+
545
+ if attributes.key?(:'origin_decade')
546
+ self.origin_decade = attributes[:'origin_decade']
547
+ end
548
+
549
+ if attributes.key?(:'primary_mood_cluster_affinity')
550
+ self.primary_mood_cluster_affinity = attributes[:'primary_mood_cluster_affinity']
551
+ end
552
+
553
+ if attributes.key?(:'secondary_mood_cluster')
554
+ self.secondary_mood_cluster = attributes[:'secondary_mood_cluster']
555
+ end
556
+
557
+ if attributes.key?(:'secondary_mood_cluster_affinity')
558
+ self.secondary_mood_cluster_affinity = attributes[:'secondary_mood_cluster_affinity']
559
+ end
560
+
561
+ if attributes.key?(:'tertiary_mood_cluster')
562
+ self.tertiary_mood_cluster = attributes[:'tertiary_mood_cluster']
563
+ end
564
+
565
+ if attributes.key?(:'tertiary_mood_cluster_affinity')
566
+ self.tertiary_mood_cluster_affinity = attributes[:'tertiary_mood_cluster_affinity']
567
+ end
568
+
569
+ if attributes.key?(:'vocals_affinity')
570
+ self.vocals_affinity = attributes[:'vocals_affinity']
571
+ end
572
+
573
+ if attributes.key?(:'bpm')
574
+ self.bpm = attributes[:'bpm']
575
+ end
576
+
577
+ if attributes.key?(:'production_rating')
578
+ self.production_rating = attributes[:'production_rating']
579
+ end
580
+
581
+ if attributes.key?(:'production_rating_affinity')
582
+ self.production_rating_affinity = attributes[:'production_rating_affinity']
583
+ end
584
+
585
+ if attributes.key?(:'performance_rating')
586
+ self.performance_rating = attributes[:'performance_rating']
587
+ end
588
+
589
+ if attributes.key?(:'performance_rating_affinity')
590
+ self.performance_rating_affinity = attributes[:'performance_rating_affinity']
591
+ end
592
+
593
+ if attributes.key?(:'song_rating')
594
+ self.song_rating = attributes[:'song_rating']
595
+ end
596
+
597
+ if attributes.key?(:'song_rating_affinity')
598
+ self.song_rating_affinity = attributes[:'song_rating_affinity']
599
+ end
600
+
601
+ if attributes.key?(:'audience_age')
602
+ self.audience_age = attributes[:'audience_age']
603
+ end
604
+
605
+ if attributes.key?(:'audience_age_affinity')
606
+ self.audience_age_affinity = attributes[:'audience_age_affinity']
607
+ end
608
+
609
+ if attributes.key?(:'secondary_audience_age')
610
+ self.secondary_audience_age = attributes[:'secondary_audience_age']
611
+ end
612
+
613
+ if attributes.key?(:'secondary_audience_age_affinity')
614
+ self.secondary_audience_age_affinity = attributes[:'secondary_audience_age_affinity']
615
+ end
616
+
617
+ if attributes.key?(:'tertiary_audience_age')
618
+ self.tertiary_audience_age = attributes[:'tertiary_audience_age']
619
+ end
620
+
621
+ if attributes.key?(:'tertiary_audience_age_affinity')
622
+ self.tertiary_audience_age_affinity = attributes[:'tertiary_audience_age_affinity']
623
+ end
624
+
625
+ if attributes.key?(:'audience_gender')
626
+ self.audience_gender = attributes[:'audience_gender']
627
+ end
628
+
629
+ if attributes.key?(:'audience_gender_affinity')
630
+ self.audience_gender_affinity = attributes[:'audience_gender_affinity']
631
+ end
632
+
633
+ if attributes.key?(:'dominant_instrument_affinity')
634
+ self.dominant_instrument_affinity = attributes[:'dominant_instrument_affinity']
635
+ end
636
+
637
+ if attributes.key?(:'secondary_instrument')
638
+ self.secondary_instrument = attributes[:'secondary_instrument']
639
+ end
640
+
641
+ if attributes.key?(:'secondary_instrument_affinity')
642
+ self.secondary_instrument_affinity = attributes[:'secondary_instrument_affinity']
643
+ end
644
+
645
+ if attributes.key?(:'tertiary_instrument')
646
+ self.tertiary_instrument = attributes[:'tertiary_instrument']
647
+ end
648
+
649
+ if attributes.key?(:'tertiary_instrument_affinity')
650
+ self.tertiary_instrument_affinity = attributes[:'tertiary_instrument_affinity']
651
+ end
652
+
653
+ if attributes.key?(:'sound_generation_affinity')
654
+ self.sound_generation_affinity = attributes[:'sound_generation_affinity']
655
+ end
656
+
657
+ if attributes.key?(:'rhythm_affinity')
658
+ self.rhythm_affinity = attributes[:'rhythm_affinity']
659
+ end
660
+
661
+ if attributes.key?(:'primary_sound_character_affinity')
662
+ self.primary_sound_character_affinity = attributes[:'primary_sound_character_affinity']
663
+ end
664
+
665
+ if attributes.key?(:'tonality_affinity')
666
+ self.tonality_affinity = attributes[:'tonality_affinity']
667
+ end
668
+
669
+ if attributes.key?(:'audience_region_affinity')
670
+ self.audience_region_affinity = attributes[:'audience_region_affinity']
671
+ end
672
+
673
+ if attributes.key?(:'secondary_audience_region')
674
+ self.secondary_audience_region = attributes[:'secondary_audience_region']
675
+ end
676
+
677
+ if attributes.key?(:'secondary_audience_region_affinity')
678
+ self.secondary_audience_region_affinity = attributes[:'secondary_audience_region_affinity']
679
+ end
680
+
681
+ if attributes.key?(:'tertiary_audience_region')
682
+ self.tertiary_audience_region = attributes[:'tertiary_audience_region']
683
+ end
684
+
685
+ if attributes.key?(:'tertiary_audience_region_affinity')
686
+ self.tertiary_audience_region_affinity = attributes[:'tertiary_audience_region_affinity']
687
+ end
688
+
689
+ if attributes.key?(:'origin_region')
690
+ self.origin_region = attributes[:'origin_region']
691
+ end
692
+
693
+ if attributes.key?(:'origin_region_affinity')
694
+ self.origin_region_affinity = attributes[:'origin_region_affinity']
695
+ end
696
+
697
+ if attributes.key?(:'origin_decade_affinity')
698
+ self.origin_decade_affinity = attributes[:'origin_decade_affinity']
699
+ end
700
+
701
+ if attributes.key?(:'language_of_performance_affinity')
702
+ self.language_of_performance_affinity = attributes[:'language_of_performance_affinity']
703
+ end
704
+
705
+ if attributes.key?(:'curateability_affinity')
706
+ self.curateability_affinity = attributes[:'curateability_affinity']
707
+ end
708
+
709
+ if attributes.key?(:'use_case_affinity')
710
+ self.use_case_affinity = attributes[:'use_case_affinity']
711
+ end
712
+
713
+ if attributes.key?(:'industry_suitability')
714
+ self.industry_suitability = attributes[:'industry_suitability']
715
+ end
716
+
717
+ if attributes.key?(:'industry_suitability_affinity')
718
+ self.industry_suitability_affinity = attributes[:'industry_suitability_affinity']
719
+ end
720
+
721
+ if attributes.key?(:'audience_region')
722
+ self.audience_region = attributes[:'audience_region']
723
+ end
724
+
725
+ if attributes.key?(:'valence_affinity')
726
+ self.valence_affinity = attributes[:'valence_affinity']
727
+ end
728
+
729
+ if attributes.key?(:'arousal_affinity')
730
+ self.arousal_affinity = attributes[:'arousal_affinity']
731
+ end
732
+
733
+ if attributes.key?(:'pleasantness_affinity')
734
+ self.pleasantness_affinity = attributes[:'pleasantness_affinity']
735
+ end
736
+
737
+ if attributes.key?(:'engagement_affinity')
738
+ self.engagement_affinity = attributes[:'engagement_affinity']
739
+ end
740
+
741
+ if attributes.key?(:'energy_affinity')
742
+ self.energy_affinity = attributes[:'energy_affinity']
743
+ end
744
+
745
+ if attributes.key?(:'tempo_affinity')
746
+ self.tempo_affinity = attributes[:'tempo_affinity']
747
+ end
748
+
749
+ if attributes.key?(:'scale_affinity')
750
+ self.scale_affinity = attributes[:'scale_affinity']
751
+ end
752
+
753
+ if attributes.key?(:'timbre_affinity')
754
+ self.timbre_affinity = attributes[:'timbre_affinity']
755
+ end
756
+
757
+ if attributes.key?(:'roughness_affinity')
758
+ self.roughness_affinity = attributes[:'roughness_affinity']
759
+ end
760
+
761
+ if attributes.key?(:'harmony_affinity')
762
+ self.harmony_affinity = attributes[:'harmony_affinity']
763
+ end
764
+
765
+ if attributes.key?(:'texture_affinity')
766
+ self.texture_affinity = attributes[:'texture_affinity']
767
+ end
768
+
769
+ if attributes.key?(:'groovyness_affinity')
770
+ self.groovyness_affinity = attributes[:'groovyness_affinity']
771
+ end
772
+
773
+ if attributes.key?(:'space_affinity')
774
+ self.space_affinity = attributes[:'space_affinity']
775
+ end
776
+
777
+ if attributes.key?(:'key_affinity')
778
+ self.key_affinity = attributes[:'key_affinity']
779
+ end
780
+
781
+ if attributes.key?(:'channel_suitability_affinity')
782
+ self.channel_suitability_affinity = attributes[:'channel_suitability_affinity']
783
+ end
784
+
785
+ if attributes.key?(:'key')
786
+ self.key = attributes[:'key']
787
+ end
788
+ end
789
+
790
+ # Show invalid properties with the reasons. Usually used together with valid?
791
+ # @return Array for valid properties with the reasons
792
+ def list_invalid_properties
793
+ invalid_properties = Array.new
794
+ invalid_properties
795
+ end
796
+
797
+ # Check to see if the all the properties in the model are valid
798
+ # @return true if the model is valid
799
+ def valid?
800
+ space_validator = EnumAttributeValidator.new('String', ["very compact", "compact", "moderate space", "wide", "very wide"])
801
+ return false unless space_validator.valid?(@space)
802
+ curateability_validator = EnumAttributeValidator.new('String', ["curateable", "uncurateable"])
803
+ return false unless curateability_validator.valid?(@curateability)
804
+ use_case_validator = EnumAttributeValidator.new('String', ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"])
805
+ return false unless use_case_validator.valid?(@use_case)
806
+ channel_suitability_validator = EnumAttributeValidator.new('String', ["Spotify", "TikTok", "Unfitting", "YouTube"])
807
+ return false unless channel_suitability_validator.valid?(@channel_suitability)
808
+ arousal_validator = EnumAttributeValidator.new('String', ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"])
809
+ return false unless arousal_validator.valid?(@arousal)
810
+ dominant_instrument_validator = EnumAttributeValidator.new('String', ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"])
811
+ return false unless dominant_instrument_validator.valid?(@dominant_instrument)
812
+ language_of_performance_validator = EnumAttributeValidator.new('String', ["en", "de", "no", "fr", "es", "pt", "fi", "ru", "it", "la", "el", "ar", "nl", "ja", "pl", "sv", "zu", "da", "cs", "hu", "af", "hi", "tr", "zh", "ms", "pa", "id", "ko", "vi"])
813
+ return false unless language_of_performance_validator.valid?(@language_of_performance)
814
+ energy_validator = EnumAttributeValidator.new('String', ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"])
815
+ return false unless energy_validator.valid?(@energy)
816
+ engagement_validator = EnumAttributeValidator.new('String', ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"])
817
+ return false unless engagement_validator.valid?(@engagement)
818
+ groovyness_validator = EnumAttributeValidator.new('String', ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"])
819
+ return false unless groovyness_validator.valid?(@groovyness)
820
+ harmony_validator = EnumAttributeValidator.new('String', ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"])
821
+ return false unless harmony_validator.valid?(@harmony)
822
+ pleasantness_validator = EnumAttributeValidator.new('String', ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"])
823
+ return false unless pleasantness_validator.valid?(@pleasantness)
824
+ primary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
825
+ return false unless primary_mood_cluster_validator.valid?(@primary_mood_cluster)
826
+ primary_sound_character_validator = EnumAttributeValidator.new('String', ["brassy", "bright", "clear", "deep", "distorted", "flat", "full", "groovy", "melodious", "natural", "resonant", "shrill", "steady", "thin", "warm"])
827
+ return false unless primary_sound_character_validator.valid?(@primary_sound_character)
828
+ rhythm_validator = EnumAttributeValidator.new('String', ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"])
829
+ return false unless rhythm_validator.valid?(@rhythm)
830
+ roughness_validator = EnumAttributeValidator.new('String', ["very clear", "clear", "moderate roughness", "distorted", "very distorted"])
831
+ return false unless roughness_validator.valid?(@roughness)
832
+ scale_validator = EnumAttributeValidator.new('String', ["major key", "minor key", "neutral key"])
833
+ return false unless scale_validator.valid?(@scale)
834
+ sound_generation_validator = EnumAttributeValidator.new('String', ["acoustic", "electric", "electronic", "mixed sound generation"])
835
+ return false unless sound_generation_validator.valid?(@sound_generation)
836
+ tempo_validator = EnumAttributeValidator.new('String', ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"])
837
+ return false unless tempo_validator.valid?(@tempo)
838
+ texture_validator = EnumAttributeValidator.new('String', ["very thin", "thin", "moderate texture", "full", "very full"])
839
+ return false unless texture_validator.valid?(@texture)
840
+ timbre_validator = EnumAttributeValidator.new('String', ["very warm", "warm", "moderate timbre", "bright", "very bright"])
841
+ return false unless timbre_validator.valid?(@timbre)
842
+ tonality_validator = EnumAttributeValidator.new('String', ["monotonous", "moderate melodiousness", "melodious", "atonal"])
843
+ return false unless tonality_validator.valid?(@tonality)
844
+ valence_validator = EnumAttributeValidator.new('String', ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"])
845
+ return false unless valence_validator.valid?(@valence)
846
+ vocals_validator = EnumAttributeValidator.new('String', ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"])
847
+ return false unless vocals_validator.valid?(@vocals)
848
+ origin_decade_validator = EnumAttributeValidator.new('String', ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"])
849
+ return false unless origin_decade_validator.valid?(@origin_decade)
850
+ secondary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
851
+ return false unless secondary_mood_cluster_validator.valid?(@secondary_mood_cluster)
852
+ tertiary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
853
+ return false unless tertiary_mood_cluster_validator.valid?(@tertiary_mood_cluster)
854
+ production_rating_validator = EnumAttributeValidator.new('String', ["low production quality", "medium production quality", "high production quality"])
855
+ return false unless production_rating_validator.valid?(@production_rating)
856
+ performance_rating_validator = EnumAttributeValidator.new('String', ["low performance quality", "medium performance quality", "high performance quality"])
857
+ return false unless performance_rating_validator.valid?(@performance_rating)
858
+ song_rating_validator = EnumAttributeValidator.new('String', ["low song quality", "medium song quality", "high song quality"])
859
+ return false unless song_rating_validator.valid?(@song_rating)
860
+ audience_age_validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
861
+ return false unless audience_age_validator.valid?(@audience_age)
862
+ secondary_audience_age_validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
863
+ return false unless secondary_audience_age_validator.valid?(@secondary_audience_age)
864
+ tertiary_audience_age_validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
865
+ return false unless tertiary_audience_age_validator.valid?(@tertiary_audience_age)
866
+ audience_gender_validator = EnumAttributeValidator.new('String', ["male", "female"])
867
+ return false unless audience_gender_validator.valid?(@audience_gender)
868
+ secondary_instrument_validator = EnumAttributeValidator.new('String', ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"])
869
+ return false unless secondary_instrument_validator.valid?(@secondary_instrument)
870
+ tertiary_instrument_validator = EnumAttributeValidator.new('String', ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"])
871
+ return false unless tertiary_instrument_validator.valid?(@tertiary_instrument)
872
+ secondary_audience_region_validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
873
+ return false unless secondary_audience_region_validator.valid?(@secondary_audience_region)
874
+ tertiary_audience_region_validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
875
+ return false unless tertiary_audience_region_validator.valid?(@tertiary_audience_region)
876
+ origin_region_validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
877
+ return false unless origin_region_validator.valid?(@origin_region)
878
+ industry_suitability_validator = EnumAttributeValidator.new('String', ["Automobiles and Parts", "Consumer Products and Services", "Financial Services", "Food, Beverage and Tobacco", "Health Care", "Insurance", "Media", "Politics, Government and Organizations", "Real Estate", "Retail", "Technology", "Telecommunications", "Travel and Leisure"])
879
+ return false unless industry_suitability_validator.valid?(@industry_suitability)
880
+ audience_region_validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
881
+ return false unless audience_region_validator.valid?(@audience_region)
882
+ key_validator = EnumAttributeValidator.new('String', ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "unclear"])
883
+ return false unless key_validator.valid?(@key)
884
+ true
885
+ end
886
+
887
+ # Custom attribute writer method checking allowed values (enum).
888
+ # @param [Object] space Object to be assigned
889
+ def space=(space)
890
+ validator = EnumAttributeValidator.new('String', ["very compact", "compact", "moderate space", "wide", "very wide"])
891
+ unless validator.valid?(space)
892
+ fail ArgumentError, "invalid value for \"space\", must be one of #{validator.allowable_values}."
893
+ end
894
+ @space = space
895
+ end
896
+
897
+ # Custom attribute writer method checking allowed values (enum).
898
+ # @param [Object] curateability Object to be assigned
899
+ def curateability=(curateability)
900
+ validator = EnumAttributeValidator.new('String', ["curateable", "uncurateable"])
901
+ unless validator.valid?(curateability)
902
+ fail ArgumentError, "invalid value for \"curateability\", must be one of #{validator.allowable_values}."
903
+ end
904
+ @curateability = curateability
905
+ end
906
+
907
+ # Custom attribute writer method checking allowed values (enum).
908
+ # @param [Object] use_case Object to be assigned
909
+ def use_case=(use_case)
910
+ validator = EnumAttributeValidator.new('String', ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"])
911
+ unless validator.valid?(use_case)
912
+ fail ArgumentError, "invalid value for \"use_case\", must be one of #{validator.allowable_values}."
913
+ end
914
+ @use_case = use_case
915
+ end
916
+
917
+ # Custom attribute writer method checking allowed values (enum).
918
+ # @param [Object] channel_suitability Object to be assigned
919
+ def channel_suitability=(channel_suitability)
920
+ validator = EnumAttributeValidator.new('String', ["Spotify", "TikTok", "Unfitting", "YouTube"])
921
+ unless validator.valid?(channel_suitability)
922
+ fail ArgumentError, "invalid value for \"channel_suitability\", must be one of #{validator.allowable_values}."
923
+ end
924
+ @channel_suitability = channel_suitability
925
+ end
926
+
927
+ # Custom attribute writer method checking allowed values (enum).
928
+ # @param [Object] arousal Object to be assigned
929
+ def arousal=(arousal)
930
+ validator = EnumAttributeValidator.new('String', ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"])
931
+ unless validator.valid?(arousal)
932
+ fail ArgumentError, "invalid value for \"arousal\", must be one of #{validator.allowable_values}."
933
+ end
934
+ @arousal = arousal
935
+ end
936
+
937
+ # Custom attribute writer method checking allowed values (enum).
938
+ # @param [Object] dominant_instrument Object to be assigned
939
+ def dominant_instrument=(dominant_instrument)
940
+ validator = EnumAttributeValidator.new('String', ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"])
941
+ unless validator.valid?(dominant_instrument)
942
+ fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{validator.allowable_values}."
943
+ end
944
+ @dominant_instrument = dominant_instrument
945
+ end
946
+
947
+ # Custom attribute writer method checking allowed values (enum).
948
+ # @param [Object] language_of_performance Object to be assigned
949
+ def language_of_performance=(language_of_performance)
950
+ validator = EnumAttributeValidator.new('String', ["en", "de", "no", "fr", "es", "pt", "fi", "ru", "it", "la", "el", "ar", "nl", "ja", "pl", "sv", "zu", "da", "cs", "hu", "af", "hi", "tr", "zh", "ms", "pa", "id", "ko", "vi"])
951
+ unless validator.valid?(language_of_performance)
952
+ fail ArgumentError, "invalid value for \"language_of_performance\", must be one of #{validator.allowable_values}."
953
+ end
954
+ @language_of_performance = language_of_performance
955
+ end
956
+
957
+ # Custom attribute writer method checking allowed values (enum).
958
+ # @param [Object] energy Object to be assigned
959
+ def energy=(energy)
960
+ validator = EnumAttributeValidator.new('String', ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"])
961
+ unless validator.valid?(energy)
962
+ fail ArgumentError, "invalid value for \"energy\", must be one of #{validator.allowable_values}."
963
+ end
964
+ @energy = energy
965
+ end
966
+
967
+ # Custom attribute writer method checking allowed values (enum).
968
+ # @param [Object] engagement Object to be assigned
969
+ def engagement=(engagement)
970
+ validator = EnumAttributeValidator.new('String', ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"])
971
+ unless validator.valid?(engagement)
972
+ fail ArgumentError, "invalid value for \"engagement\", must be one of #{validator.allowable_values}."
973
+ end
974
+ @engagement = engagement
975
+ end
976
+
977
+ # Custom attribute writer method checking allowed values (enum).
978
+ # @param [Object] groovyness Object to be assigned
979
+ def groovyness=(groovyness)
980
+ validator = EnumAttributeValidator.new('String', ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"])
981
+ unless validator.valid?(groovyness)
982
+ fail ArgumentError, "invalid value for \"groovyness\", must be one of #{validator.allowable_values}."
983
+ end
984
+ @groovyness = groovyness
985
+ end
986
+
987
+ # Custom attribute writer method checking allowed values (enum).
988
+ # @param [Object] harmony Object to be assigned
989
+ def harmony=(harmony)
990
+ validator = EnumAttributeValidator.new('String', ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"])
991
+ unless validator.valid?(harmony)
992
+ fail ArgumentError, "invalid value for \"harmony\", must be one of #{validator.allowable_values}."
993
+ end
994
+ @harmony = harmony
995
+ end
996
+
997
+ # Custom attribute writer method checking allowed values (enum).
998
+ # @param [Object] pleasantness Object to be assigned
999
+ def pleasantness=(pleasantness)
1000
+ validator = EnumAttributeValidator.new('String', ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"])
1001
+ unless validator.valid?(pleasantness)
1002
+ fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{validator.allowable_values}."
1003
+ end
1004
+ @pleasantness = pleasantness
1005
+ end
1006
+
1007
+ # Custom attribute writer method checking allowed values (enum).
1008
+ # @param [Object] primary_mood_cluster Object to be assigned
1009
+ def primary_mood_cluster=(primary_mood_cluster)
1010
+ validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
1011
+ unless validator.valid?(primary_mood_cluster)
1012
+ fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{validator.allowable_values}."
1013
+ end
1014
+ @primary_mood_cluster = primary_mood_cluster
1015
+ end
1016
+
1017
+ # Custom attribute writer method checking allowed values (enum).
1018
+ # @param [Object] primary_sound_character Object to be assigned
1019
+ def primary_sound_character=(primary_sound_character)
1020
+ validator = EnumAttributeValidator.new('String', ["brassy", "bright", "clear", "deep", "distorted", "flat", "full", "groovy", "melodious", "natural", "resonant", "shrill", "steady", "thin", "warm"])
1021
+ unless validator.valid?(primary_sound_character)
1022
+ fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{validator.allowable_values}."
1023
+ end
1024
+ @primary_sound_character = primary_sound_character
1025
+ end
1026
+
1027
+ # Custom attribute writer method checking allowed values (enum).
1028
+ # @param [Object] rhythm Object to be assigned
1029
+ def rhythm=(rhythm)
1030
+ validator = EnumAttributeValidator.new('String', ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"])
1031
+ unless validator.valid?(rhythm)
1032
+ fail ArgumentError, "invalid value for \"rhythm\", must be one of #{validator.allowable_values}."
1033
+ end
1034
+ @rhythm = rhythm
1035
+ end
1036
+
1037
+ # Custom attribute writer method checking allowed values (enum).
1038
+ # @param [Object] roughness Object to be assigned
1039
+ def roughness=(roughness)
1040
+ validator = EnumAttributeValidator.new('String', ["very clear", "clear", "moderate roughness", "distorted", "very distorted"])
1041
+ unless validator.valid?(roughness)
1042
+ fail ArgumentError, "invalid value for \"roughness\", must be one of #{validator.allowable_values}."
1043
+ end
1044
+ @roughness = roughness
1045
+ end
1046
+
1047
+ # Custom attribute writer method checking allowed values (enum).
1048
+ # @param [Object] scale Object to be assigned
1049
+ def scale=(scale)
1050
+ validator = EnumAttributeValidator.new('String', ["major key", "minor key", "neutral key"])
1051
+ unless validator.valid?(scale)
1052
+ fail ArgumentError, "invalid value for \"scale\", must be one of #{validator.allowable_values}."
1053
+ end
1054
+ @scale = scale
1055
+ end
1056
+
1057
+ # Custom attribute writer method checking allowed values (enum).
1058
+ # @param [Object] sound_generation Object to be assigned
1059
+ def sound_generation=(sound_generation)
1060
+ validator = EnumAttributeValidator.new('String', ["acoustic", "electric", "electronic", "mixed sound generation"])
1061
+ unless validator.valid?(sound_generation)
1062
+ fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{validator.allowable_values}."
1063
+ end
1064
+ @sound_generation = sound_generation
1065
+ end
1066
+
1067
+ # Custom attribute writer method checking allowed values (enum).
1068
+ # @param [Object] tempo Object to be assigned
1069
+ def tempo=(tempo)
1070
+ validator = EnumAttributeValidator.new('String', ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"])
1071
+ unless validator.valid?(tempo)
1072
+ fail ArgumentError, "invalid value for \"tempo\", must be one of #{validator.allowable_values}."
1073
+ end
1074
+ @tempo = tempo
1075
+ end
1076
+
1077
+ # Custom attribute writer method checking allowed values (enum).
1078
+ # @param [Object] texture Object to be assigned
1079
+ def texture=(texture)
1080
+ validator = EnumAttributeValidator.new('String', ["very thin", "thin", "moderate texture", "full", "very full"])
1081
+ unless validator.valid?(texture)
1082
+ fail ArgumentError, "invalid value for \"texture\", must be one of #{validator.allowable_values}."
1083
+ end
1084
+ @texture = texture
1085
+ end
1086
+
1087
+ # Custom attribute writer method checking allowed values (enum).
1088
+ # @param [Object] timbre Object to be assigned
1089
+ def timbre=(timbre)
1090
+ validator = EnumAttributeValidator.new('String', ["very warm", "warm", "moderate timbre", "bright", "very bright"])
1091
+ unless validator.valid?(timbre)
1092
+ fail ArgumentError, "invalid value for \"timbre\", must be one of #{validator.allowable_values}."
1093
+ end
1094
+ @timbre = timbre
1095
+ end
1096
+
1097
+ # Custom attribute writer method checking allowed values (enum).
1098
+ # @param [Object] tonality Object to be assigned
1099
+ def tonality=(tonality)
1100
+ validator = EnumAttributeValidator.new('String', ["monotonous", "moderate melodiousness", "melodious", "atonal"])
1101
+ unless validator.valid?(tonality)
1102
+ fail ArgumentError, "invalid value for \"tonality\", must be one of #{validator.allowable_values}."
1103
+ end
1104
+ @tonality = tonality
1105
+ end
1106
+
1107
+ # Custom attribute writer method checking allowed values (enum).
1108
+ # @param [Object] valence Object to be assigned
1109
+ def valence=(valence)
1110
+ validator = EnumAttributeValidator.new('String', ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"])
1111
+ unless validator.valid?(valence)
1112
+ fail ArgumentError, "invalid value for \"valence\", must be one of #{validator.allowable_values}."
1113
+ end
1114
+ @valence = valence
1115
+ end
1116
+
1117
+ # Custom attribute writer method checking allowed values (enum).
1118
+ # @param [Object] vocals Object to be assigned
1119
+ def vocals=(vocals)
1120
+ validator = EnumAttributeValidator.new('String', ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"])
1121
+ unless validator.valid?(vocals)
1122
+ fail ArgumentError, "invalid value for \"vocals\", must be one of #{validator.allowable_values}."
1123
+ end
1124
+ @vocals = vocals
1125
+ end
1126
+
1127
+ # Custom attribute writer method checking allowed values (enum).
1128
+ # @param [Object] origin_decade Object to be assigned
1129
+ def origin_decade=(origin_decade)
1130
+ validator = EnumAttributeValidator.new('String', ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"])
1131
+ unless validator.valid?(origin_decade)
1132
+ fail ArgumentError, "invalid value for \"origin_decade\", must be one of #{validator.allowable_values}."
1133
+ end
1134
+ @origin_decade = origin_decade
1135
+ end
1136
+
1137
+ # Custom attribute writer method checking allowed values (enum).
1138
+ # @param [Object] secondary_mood_cluster Object to be assigned
1139
+ def secondary_mood_cluster=(secondary_mood_cluster)
1140
+ validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
1141
+ unless validator.valid?(secondary_mood_cluster)
1142
+ fail ArgumentError, "invalid value for \"secondary_mood_cluster\", must be one of #{validator.allowable_values}."
1143
+ end
1144
+ @secondary_mood_cluster = secondary_mood_cluster
1145
+ end
1146
+
1147
+ # Custom attribute writer method checking allowed values (enum).
1148
+ # @param [Object] tertiary_mood_cluster Object to be assigned
1149
+ def tertiary_mood_cluster=(tertiary_mood_cluster)
1150
+ validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
1151
+ unless validator.valid?(tertiary_mood_cluster)
1152
+ fail ArgumentError, "invalid value for \"tertiary_mood_cluster\", must be one of #{validator.allowable_values}."
1153
+ end
1154
+ @tertiary_mood_cluster = tertiary_mood_cluster
1155
+ end
1156
+
1157
+ # Custom attribute writer method checking allowed values (enum).
1158
+ # @param [Object] production_rating Object to be assigned
1159
+ def production_rating=(production_rating)
1160
+ validator = EnumAttributeValidator.new('String', ["low production quality", "medium production quality", "high production quality"])
1161
+ unless validator.valid?(production_rating)
1162
+ fail ArgumentError, "invalid value for \"production_rating\", must be one of #{validator.allowable_values}."
1163
+ end
1164
+ @production_rating = production_rating
1165
+ end
1166
+
1167
+ # Custom attribute writer method checking allowed values (enum).
1168
+ # @param [Object] performance_rating Object to be assigned
1169
+ def performance_rating=(performance_rating)
1170
+ validator = EnumAttributeValidator.new('String', ["low performance quality", "medium performance quality", "high performance quality"])
1171
+ unless validator.valid?(performance_rating)
1172
+ fail ArgumentError, "invalid value for \"performance_rating\", must be one of #{validator.allowable_values}."
1173
+ end
1174
+ @performance_rating = performance_rating
1175
+ end
1176
+
1177
+ # Custom attribute writer method checking allowed values (enum).
1178
+ # @param [Object] song_rating Object to be assigned
1179
+ def song_rating=(song_rating)
1180
+ validator = EnumAttributeValidator.new('String', ["low song quality", "medium song quality", "high song quality"])
1181
+ unless validator.valid?(song_rating)
1182
+ fail ArgumentError, "invalid value for \"song_rating\", must be one of #{validator.allowable_values}."
1183
+ end
1184
+ @song_rating = song_rating
1185
+ end
1186
+
1187
+ # Custom attribute writer method checking allowed values (enum).
1188
+ # @param [Object] audience_age Object to be assigned
1189
+ def audience_age=(audience_age)
1190
+ validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
1191
+ unless validator.valid?(audience_age)
1192
+ fail ArgumentError, "invalid value for \"audience_age\", must be one of #{validator.allowable_values}."
1193
+ end
1194
+ @audience_age = audience_age
1195
+ end
1196
+
1197
+ # Custom attribute writer method checking allowed values (enum).
1198
+ # @param [Object] secondary_audience_age Object to be assigned
1199
+ def secondary_audience_age=(secondary_audience_age)
1200
+ validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
1201
+ unless validator.valid?(secondary_audience_age)
1202
+ fail ArgumentError, "invalid value for \"secondary_audience_age\", must be one of #{validator.allowable_values}."
1203
+ end
1204
+ @secondary_audience_age = secondary_audience_age
1205
+ end
1206
+
1207
+ # Custom attribute writer method checking allowed values (enum).
1208
+ # @param [Object] tertiary_audience_age Object to be assigned
1209
+ def tertiary_audience_age=(tertiary_audience_age)
1210
+ validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
1211
+ unless validator.valid?(tertiary_audience_age)
1212
+ fail ArgumentError, "invalid value for \"tertiary_audience_age\", must be one of #{validator.allowable_values}."
1213
+ end
1214
+ @tertiary_audience_age = tertiary_audience_age
1215
+ end
1216
+
1217
+ # Custom attribute writer method checking allowed values (enum).
1218
+ # @param [Object] audience_gender Object to be assigned
1219
+ def audience_gender=(audience_gender)
1220
+ validator = EnumAttributeValidator.new('String', ["male", "female"])
1221
+ unless validator.valid?(audience_gender)
1222
+ fail ArgumentError, "invalid value for \"audience_gender\", must be one of #{validator.allowable_values}."
1223
+ end
1224
+ @audience_gender = audience_gender
1225
+ end
1226
+
1227
+ # Custom attribute writer method checking allowed values (enum).
1228
+ # @param [Object] secondary_instrument Object to be assigned
1229
+ def secondary_instrument=(secondary_instrument)
1230
+ validator = EnumAttributeValidator.new('String', ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"])
1231
+ unless validator.valid?(secondary_instrument)
1232
+ fail ArgumentError, "invalid value for \"secondary_instrument\", must be one of #{validator.allowable_values}."
1233
+ end
1234
+ @secondary_instrument = secondary_instrument
1235
+ end
1236
+
1237
+ # Custom attribute writer method checking allowed values (enum).
1238
+ # @param [Object] tertiary_instrument Object to be assigned
1239
+ def tertiary_instrument=(tertiary_instrument)
1240
+ validator = EnumAttributeValidator.new('String', ["electric guitar", "piano", "electronics", "guitar", "strings", "synthesizer", "wind", "saxophone", "flute", "trumpet", "drum kit", "keys", "accordion", "violin", "harpsichord", "choir", "cello", "electric bass", "organ", "brass", "percussion", "vocals", "double bass", "harp"])
1241
+ unless validator.valid?(tertiary_instrument)
1242
+ fail ArgumentError, "invalid value for \"tertiary_instrument\", must be one of #{validator.allowable_values}."
1243
+ end
1244
+ @tertiary_instrument = tertiary_instrument
1245
+ end
1246
+
1247
+ # Custom attribute writer method checking allowed values (enum).
1248
+ # @param [Object] secondary_audience_region Object to be assigned
1249
+ def secondary_audience_region=(secondary_audience_region)
1250
+ validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
1251
+ unless validator.valid?(secondary_audience_region)
1252
+ fail ArgumentError, "invalid value for \"secondary_audience_region\", must be one of #{validator.allowable_values}."
1253
+ end
1254
+ @secondary_audience_region = secondary_audience_region
1255
+ end
1256
+
1257
+ # Custom attribute writer method checking allowed values (enum).
1258
+ # @param [Object] tertiary_audience_region Object to be assigned
1259
+ def tertiary_audience_region=(tertiary_audience_region)
1260
+ validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
1261
+ unless validator.valid?(tertiary_audience_region)
1262
+ fail ArgumentError, "invalid value for \"tertiary_audience_region\", must be one of #{validator.allowable_values}."
1263
+ end
1264
+ @tertiary_audience_region = tertiary_audience_region
1265
+ end
1266
+
1267
+ # Custom attribute writer method checking allowed values (enum).
1268
+ # @param [Object] origin_region Object to be assigned
1269
+ def origin_region=(origin_region)
1270
+ validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
1271
+ unless validator.valid?(origin_region)
1272
+ fail ArgumentError, "invalid value for \"origin_region\", must be one of #{validator.allowable_values}."
1273
+ end
1274
+ @origin_region = origin_region
1275
+ end
1276
+
1277
+ # Custom attribute writer method checking allowed values (enum).
1278
+ # @param [Object] industry_suitability Object to be assigned
1279
+ def industry_suitability=(industry_suitability)
1280
+ validator = EnumAttributeValidator.new('String', ["Automobiles and Parts", "Consumer Products and Services", "Financial Services", "Food, Beverage and Tobacco", "Health Care", "Insurance", "Media", "Politics, Government and Organizations", "Real Estate", "Retail", "Technology", "Telecommunications", "Travel and Leisure"])
1281
+ unless validator.valid?(industry_suitability)
1282
+ fail ArgumentError, "invalid value for \"industry_suitability\", must be one of #{validator.allowable_values}."
1283
+ end
1284
+ @industry_suitability = industry_suitability
1285
+ end
1286
+
1287
+ # Custom attribute writer method checking allowed values (enum).
1288
+ # @param [Object] audience_region Object to be assigned
1289
+ def audience_region=(audience_region)
1290
+ validator = EnumAttributeValidator.new('String', ["Australia and New Zealand", "Central America and the Carribean", "Central and Southern Asia", "Eastern Asia", "Eastern Europe", "Northern Africa and Western Asia", "Northern America", "Oceania", "South America", "South-Eastern Asia", "Southern Europe", "Sub-Saharan Africa", "Western and Northern Europe"])
1291
+ unless validator.valid?(audience_region)
1292
+ fail ArgumentError, "invalid value for \"audience_region\", must be one of #{validator.allowable_values}."
1293
+ end
1294
+ @audience_region = audience_region
1295
+ end
1296
+
1297
+ # Custom attribute writer method checking allowed values (enum).
1298
+ # @param [Object] key Object to be assigned
1299
+ def key=(key)
1300
+ validator = EnumAttributeValidator.new('String', ["C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B", "unclear"])
1301
+ unless validator.valid?(key)
1302
+ fail ArgumentError, "invalid value for \"key\", must be one of #{validator.allowable_values}."
1303
+ end
1304
+ @key = key
1305
+ end
1306
+
1307
+ # Checks equality by comparing each attribute.
1308
+ # @param [Object] Object to be compared
1309
+ def ==(o)
1310
+ return true if self.equal?(o)
1311
+ self.class == o.class &&
1312
+ space == o.space &&
1313
+ curateability == o.curateability &&
1314
+ use_case == o.use_case &&
1315
+ channel_suitability == o.channel_suitability &&
1316
+ arousal == o.arousal &&
1317
+ dominant_instrument == o.dominant_instrument &&
1318
+ language_of_performance == o.language_of_performance &&
1319
+ energy == o.energy &&
1320
+ engagement == o.engagement &&
1321
+ groovyness == o.groovyness &&
1322
+ harmony == o.harmony &&
1323
+ pleasantness == o.pleasantness &&
1324
+ primary_mood_cluster == o.primary_mood_cluster &&
1325
+ primary_sound_character == o.primary_sound_character &&
1326
+ rhythm == o.rhythm &&
1327
+ roughness == o.roughness &&
1328
+ scale == o.scale &&
1329
+ sound_generation == o.sound_generation &&
1330
+ tempo == o.tempo &&
1331
+ texture == o.texture &&
1332
+ timbre == o.timbre &&
1333
+ tonality == o.tonality &&
1334
+ valence == o.valence &&
1335
+ vocals == o.vocals &&
1336
+ origin_decade == o.origin_decade &&
1337
+ primary_mood_cluster_affinity == o.primary_mood_cluster_affinity &&
1338
+ secondary_mood_cluster == o.secondary_mood_cluster &&
1339
+ secondary_mood_cluster_affinity == o.secondary_mood_cluster_affinity &&
1340
+ tertiary_mood_cluster == o.tertiary_mood_cluster &&
1341
+ tertiary_mood_cluster_affinity == o.tertiary_mood_cluster_affinity &&
1342
+ vocals_affinity == o.vocals_affinity &&
1343
+ bpm == o.bpm &&
1344
+ production_rating == o.production_rating &&
1345
+ production_rating_affinity == o.production_rating_affinity &&
1346
+ performance_rating == o.performance_rating &&
1347
+ performance_rating_affinity == o.performance_rating_affinity &&
1348
+ song_rating == o.song_rating &&
1349
+ song_rating_affinity == o.song_rating_affinity &&
1350
+ audience_age == o.audience_age &&
1351
+ audience_age_affinity == o.audience_age_affinity &&
1352
+ secondary_audience_age == o.secondary_audience_age &&
1353
+ secondary_audience_age_affinity == o.secondary_audience_age_affinity &&
1354
+ tertiary_audience_age == o.tertiary_audience_age &&
1355
+ tertiary_audience_age_affinity == o.tertiary_audience_age_affinity &&
1356
+ audience_gender == o.audience_gender &&
1357
+ audience_gender_affinity == o.audience_gender_affinity &&
1358
+ dominant_instrument_affinity == o.dominant_instrument_affinity &&
1359
+ secondary_instrument == o.secondary_instrument &&
1360
+ secondary_instrument_affinity == o.secondary_instrument_affinity &&
1361
+ tertiary_instrument == o.tertiary_instrument &&
1362
+ tertiary_instrument_affinity == o.tertiary_instrument_affinity &&
1363
+ sound_generation_affinity == o.sound_generation_affinity &&
1364
+ rhythm_affinity == o.rhythm_affinity &&
1365
+ primary_sound_character_affinity == o.primary_sound_character_affinity &&
1366
+ tonality_affinity == o.tonality_affinity &&
1367
+ audience_region_affinity == o.audience_region_affinity &&
1368
+ secondary_audience_region == o.secondary_audience_region &&
1369
+ secondary_audience_region_affinity == o.secondary_audience_region_affinity &&
1370
+ tertiary_audience_region == o.tertiary_audience_region &&
1371
+ tertiary_audience_region_affinity == o.tertiary_audience_region_affinity &&
1372
+ origin_region == o.origin_region &&
1373
+ origin_region_affinity == o.origin_region_affinity &&
1374
+ origin_decade_affinity == o.origin_decade_affinity &&
1375
+ language_of_performance_affinity == o.language_of_performance_affinity &&
1376
+ curateability_affinity == o.curateability_affinity &&
1377
+ use_case_affinity == o.use_case_affinity &&
1378
+ industry_suitability == o.industry_suitability &&
1379
+ industry_suitability_affinity == o.industry_suitability_affinity &&
1380
+ audience_region == o.audience_region &&
1381
+ valence_affinity == o.valence_affinity &&
1382
+ arousal_affinity == o.arousal_affinity &&
1383
+ pleasantness_affinity == o.pleasantness_affinity &&
1384
+ engagement_affinity == o.engagement_affinity &&
1385
+ energy_affinity == o.energy_affinity &&
1386
+ tempo_affinity == o.tempo_affinity &&
1387
+ scale_affinity == o.scale_affinity &&
1388
+ timbre_affinity == o.timbre_affinity &&
1389
+ roughness_affinity == o.roughness_affinity &&
1390
+ harmony_affinity == o.harmony_affinity &&
1391
+ texture_affinity == o.texture_affinity &&
1392
+ groovyness_affinity == o.groovyness_affinity &&
1393
+ space_affinity == o.space_affinity &&
1394
+ key_affinity == o.key_affinity &&
1395
+ channel_suitability_affinity == o.channel_suitability_affinity &&
1396
+ key == o.key
1397
+ end
1398
+
1399
+ # @see the `==` method
1400
+ # @param [Object] Object to be compared
1401
+ def eql?(o)
1402
+ self == o
1403
+ end
1404
+
1405
+ # Calculates hash code according to all attributes.
1406
+ # @return [Integer] Hash code
1407
+ def hash
1408
+ [space, curateability, use_case, channel_suitability, arousal, dominant_instrument, language_of_performance, energy, engagement, groovyness, harmony, pleasantness, primary_mood_cluster, primary_sound_character, rhythm, roughness, scale, sound_generation, tempo, texture, timbre, tonality, valence, vocals, origin_decade, primary_mood_cluster_affinity, secondary_mood_cluster, secondary_mood_cluster_affinity, tertiary_mood_cluster, tertiary_mood_cluster_affinity, vocals_affinity, bpm, production_rating, production_rating_affinity, performance_rating, performance_rating_affinity, song_rating, song_rating_affinity, audience_age, audience_age_affinity, secondary_audience_age, secondary_audience_age_affinity, tertiary_audience_age, tertiary_audience_age_affinity, audience_gender, audience_gender_affinity, dominant_instrument_affinity, secondary_instrument, secondary_instrument_affinity, tertiary_instrument, tertiary_instrument_affinity, sound_generation_affinity, rhythm_affinity, primary_sound_character_affinity, tonality_affinity, audience_region_affinity, secondary_audience_region, secondary_audience_region_affinity, tertiary_audience_region, tertiary_audience_region_affinity, origin_region, origin_region_affinity, origin_decade_affinity, language_of_performance_affinity, curateability_affinity, use_case_affinity, industry_suitability, industry_suitability_affinity, audience_region, valence_affinity, arousal_affinity, pleasantness_affinity, engagement_affinity, energy_affinity, tempo_affinity, scale_affinity, timbre_affinity, roughness_affinity, harmony_affinity, texture_affinity, groovyness_affinity, space_affinity, key_affinity, channel_suitability_affinity, key].hash
1409
+ end
1410
+
1411
+ # Builds the object from hash
1412
+ # @param [Hash] attributes Model attributes in the form of hash
1413
+ # @return [Object] Returns the model itself
1414
+ def self.build_from_hash(attributes)
1415
+ new.build_from_hash(attributes)
1416
+ end
1417
+
1418
+ # Builds the object from hash
1419
+ # @param [Hash] attributes Model attributes in the form of hash
1420
+ # @return [Object] Returns the model itself
1421
+ def build_from_hash(attributes)
1422
+ return nil unless attributes.is_a?(Hash)
1423
+ attributes = attributes.transform_keys(&:to_sym)
1424
+ self.class.openapi_types.each_pair do |key, type|
1425
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
1426
+ self.send("#{key}=", nil)
1427
+ elsif type =~ /\AArray<(.*)>/i
1428
+ # check to ensure the input is an array given that the attribute
1429
+ # is documented as an array but the input is not
1430
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
1431
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
1432
+ end
1433
+ elsif !attributes[self.class.attribute_map[key]].nil?
1434
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1435
+ end
1436
+ end
1437
+
1438
+ self
1439
+ end
1440
+
1441
+ # Deserializes the data based on type
1442
+ # @param string type Data type
1443
+ # @param string value Value to be deserialized
1444
+ # @return [Object] Deserialized data
1445
+ def _deserialize(type, value)
1446
+ case type.to_sym
1447
+ when :Time
1448
+ Time.parse(value)
1449
+ when :Date
1450
+ Date.parse(value)
1451
+ when :String
1452
+ value.to_s
1453
+ when :Integer
1454
+ value.to_i
1455
+ when :Float
1456
+ value.to_f
1457
+ when :Boolean
1458
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1459
+ true
1460
+ else
1461
+ false
1462
+ end
1463
+ when :Object
1464
+ # generic object (usually a Hash), return directly
1465
+ value
1466
+ when /\AArray<(?<inner_type>.+)>\z/
1467
+ inner_type = Regexp.last_match[:inner_type]
1468
+ value.map { |v| _deserialize(inner_type, v) }
1469
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1470
+ k_type = Regexp.last_match[:k_type]
1471
+ v_type = Regexp.last_match[:v_type]
1472
+ {}.tap do |hash|
1473
+ value.each do |k, v|
1474
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1475
+ end
1476
+ end
1477
+ else # model
1478
+ # models (e.g. Pet) or oneOf
1479
+ klass = SongtradrApiClientRuby.const_get(type)
1480
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
1481
+ end
1482
+ end
1483
+
1484
+ # Returns the string representation of the object
1485
+ # @return [String] String presentation of the object
1486
+ def to_s
1487
+ to_hash.to_s
1488
+ end
1489
+
1490
+ # to_body is an alias to to_hash (backward compatibility)
1491
+ # @return [Hash] Returns the object in the form of hash
1492
+ def to_body
1493
+ to_hash
1494
+ end
1495
+
1496
+ # Returns the object in the form of hash
1497
+ # @return [Hash] Returns the object in the form of hash
1498
+ def to_hash
1499
+ hash = {}
1500
+ self.class.attribute_map.each_pair do |attr, param|
1501
+ value = self.send(attr)
1502
+ if value.nil?
1503
+ is_nullable = self.class.openapi_nullable.include?(attr)
1504
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
1505
+ end
1506
+
1507
+ hash[param] = _to_hash(value)
1508
+ end
1509
+ hash
1510
+ end
1511
+
1512
+ # Outputs non-array value in the form of hash
1513
+ # For object, use to_hash. Otherwise, just return the value
1514
+ # @param [Object] value Any valid value
1515
+ # @return [Hash] Returns the value in the form of hash
1516
+ def _to_hash(value)
1517
+ if value.is_a?(Array)
1518
+ value.compact.map { |v| _to_hash(v) }
1519
+ elsif value.is_a?(Hash)
1520
+ {}.tap do |hash|
1521
+ value.each { |k, v| hash[k] = _to_hash(v) }
1522
+ end
1523
+ elsif value.respond_to? :to_hash
1524
+ value.to_hash
1525
+ else
1526
+ value
1527
+ end
1528
+ end
1529
+
1530
+ end
1531
+
1532
+ end