musicube_api_client_ruby 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +9 -0
- data/README.md +223 -0
- data/Rakefile +10 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docs/AllowedValuesApi.md +200 -0
- data/docs/CategoryMediumDTO.md +22 -0
- data/docs/CategoryMinimalDTO.md +18 -0
- data/docs/ConfigAccessDTO.md +20 -0
- data/docs/ConfigIdentifierDTO.md +20 -0
- data/docs/ContributorTypeDTO.md +18 -0
- data/docs/ErrorResponse.md +26 -0
- data/docs/FieldSummaryDTO.md +22 -0
- data/docs/FileDTO.md +50 -0
- data/docs/FileListDTO.md +24 -0
- data/docs/FileMinimalWithUrlDTO.md +22 -0
- data/docs/FileSmallDTO.md +46 -0
- data/docs/FileUploadDTO.md +22 -0
- data/docs/FileWIthUrlDTO.md +20 -0
- data/docs/FilesSummaryDTO.md +30 -0
- data/docs/ForgotPasswordDTO.md +20 -0
- data/docs/GenreDTO.md +20 -0
- data/docs/GenreMinimalDTO.md +18 -0
- data/docs/GenresSummaryDTO.md +22 -0
- data/docs/InitPutRecordingAudioDTO.md +22 -0
- data/docs/JwtTokenDTO.md +22 -0
- data/docs/LoginDTO.md +24 -0
- data/docs/MusicalFeaturesDTO.md +186 -0
- data/docs/PLineDTO.md +20 -0
- data/docs/PartyApi.md +75 -0
- data/docs/PartyLargeDTO.md +32 -0
- data/docs/PartySmallDTO.md +20 -0
- data/docs/PlaylistApi.md +221 -0
- data/docs/PlaylistLargeDTO.md +38 -0
- data/docs/ProductMediumDTO.md +34 -0
- data/docs/ProductPartyDTO.md +20 -0
- data/docs/RecordingApi.md +789 -0
- data/docs/RecordingForSimilaritySearchDTO.md +20 -0
- data/docs/RecordingGenrePredictionDTO.md +22 -0
- data/docs/RecordingLargeDTO.md +40 -0
- data/docs/RecordingListDTO.md +24 -0
- data/docs/RecordingMediumDTO.md +36 -0
- data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +20 -0
- data/docs/RecordingMinimalWithTaggramsDTO.md +22 -0
- data/docs/RecordingMinimalWithTagstrengthsDTO.md +20 -0
- data/docs/RecordingPartyDTO.md +20 -0
- data/docs/RecordingPlaylistDTO.md +24 -0
- data/docs/RecordingSmallDTO.md +24 -0
- data/docs/RecordingTagSmallDTO.md +18 -0
- data/docs/SaveFileRecordingDTO.md +236 -0
- data/docs/SavePlaylistDTO.md +34 -0
- data/docs/SaveRecordingGenreDTO.md +22 -0
- data/docs/SaveRecordingPartyDTO.md +20 -0
- data/docs/SaveRecordingPlaylistDTO.md +22 -0
- data/docs/SaveRecordingTagDTO.md +20 -0
- data/docs/SaveReferrerDTO.md +20 -0
- data/docs/SaveTaggramsDTO.md +82 -0
- data/docs/SaveUserDTO.md +28 -0
- data/docs/SearchFilterValuesDTO.md +98 -0
- data/docs/SearchRecordingGranularAbstractionDTO.md +20 -0
- data/docs/SearchRecordingGranularDTO.md +22 -0
- data/docs/SignUpDTO.md +24 -0
- data/docs/TagDTO.md +22 -0
- data/docs/TagSmallDTO.md +20 -0
- data/docs/TaggramDTO.md +26 -0
- data/docs/TagsSummaryDTO.md +22 -0
- data/docs/TagstrengthDTO.md +26 -0
- data/docs/TitleDTO.md +18 -0
- data/docs/TokenRequest.md +18 -0
- data/docs/TrackToMediumProductDTO.md +22 -0
- data/docs/UpdatePasswordDTO.md +20 -0
- data/docs/UsageDTO.md +18 -0
- data/docs/UserApi.md +1936 -0
- data/docs/UserDTO.md +56 -0
- data/git_push.sh +57 -0
- data/lib/musicube_api_client_ruby/api/allowed_values_api.rb +213 -0
- data/lib/musicube_api_client_ruby/api/party_api.rb +84 -0
- data/lib/musicube_api_client_ruby/api/playlist_api.rb +222 -0
- data/lib/musicube_api_client_ruby/api/recording_api.rb +900 -0
- data/lib/musicube_api_client_ruby/api/user_api.rb +2642 -0
- data/lib/musicube_api_client_ruby/api_client.rb +428 -0
- data/lib/musicube_api_client_ruby/api_error.rb +58 -0
- data/lib/musicube_api_client_ruby/configuration.rb +380 -0
- data/lib/musicube_api_client_ruby/models/category_medium_dto.rb +250 -0
- data/lib/musicube_api_client_ruby/models/category_minimal_dto.rb +225 -0
- data/lib/musicube_api_client_ruby/models/config_access_dto.rb +287 -0
- data/lib/musicube_api_client_ruby/models/config_identifier_dto.rb +239 -0
- data/lib/musicube_api_client_ruby/models/contributor_type_dto.rb +225 -0
- data/lib/musicube_api_client_ruby/models/error_response.rb +276 -0
- data/lib/musicube_api_client_ruby/models/field_summary_dto.rb +253 -0
- data/lib/musicube_api_client_ruby/models/file_dto.rb +450 -0
- data/lib/musicube_api_client_ruby/models/file_list_dto.rb +269 -0
- data/lib/musicube_api_client_ruby/models/file_minimal_with_url_dto.rb +253 -0
- data/lib/musicube_api_client_ruby/models/file_small_dto.rb +432 -0
- data/lib/musicube_api_client_ruby/models/file_upload_dto.rb +244 -0
- data/lib/musicube_api_client_ruby/models/file_w_ith_url_dto.rb +239 -0
- data/lib/musicube_api_client_ruby/models/files_summary_dto.rb +287 -0
- data/lib/musicube_api_client_ruby/models/forgot_password_dto.rb +267 -0
- data/lib/musicube_api_client_ruby/models/genre_dto.rb +239 -0
- data/lib/musicube_api_client_ruby/models/genre_minimal_dto.rb +225 -0
- data/lib/musicube_api_client_ruby/models/genres_summary_dto.rb +248 -0
- data/lib/musicube_api_client_ruby/models/init_put_recording_audio_dto.rb +238 -0
- data/lib/musicube_api_client_ruby/models/jwt_token_dto.rb +248 -0
- data/lib/musicube_api_client_ruby/models/login_dto.rb +257 -0
- data/lib/musicube_api_client_ruby/models/musical_features_dto.rb +1532 -0
- data/lib/musicube_api_client_ruby/models/p_line_dto.rb +234 -0
- data/lib/musicube_api_client_ruby/models/party_large_dto.rb +288 -0
- data/lib/musicube_api_client_ruby/models/party_small_dto.rb +239 -0
- data/lib/musicube_api_client_ruby/models/playlist_large_dto.rb +353 -0
- data/lib/musicube_api_client_ruby/models/product_medium_dto.rb +316 -0
- data/lib/musicube_api_client_ruby/models/product_party_dto.rb +236 -0
- data/lib/musicube_api_client_ruby/models/recording_for_similarity_search_dto.rb +239 -0
- data/lib/musicube_api_client_ruby/models/recording_genre_prediction_dto.rb +253 -0
- data/lib/musicube_api_client_ruby/models/recording_large_dto.rb +366 -0
- data/lib/musicube_api_client_ruby/models/recording_list_dto.rb +269 -0
- data/lib/musicube_api_client_ruby/models/recording_medium_dto.rb +340 -0
- data/lib/musicube_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +236 -0
- data/lib/musicube_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +248 -0
- data/lib/musicube_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +236 -0
- data/lib/musicube_api_client_ruby/models/recording_party_dto.rb +236 -0
- data/lib/musicube_api_client_ruby/models/recording_playlist_dto.rb +247 -0
- data/lib/musicube_api_client_ruby/models/recording_small_dto.rb +268 -0
- data/lib/musicube_api_client_ruby/models/recording_tag_small_dto.rb +225 -0
- data/lib/musicube_api_client_ruby/models/save_file_recording_dto.rb +1847 -0
- data/lib/musicube_api_client_ruby/models/save_playlist_dto.rb +350 -0
- data/lib/musicube_api_client_ruby/models/save_recording_genre_dto.rb +243 -0
- data/lib/musicube_api_client_ruby/models/save_recording_party_dto.rb +273 -0
- data/lib/musicube_api_client_ruby/models/save_recording_playlist_dto.rb +248 -0
- data/lib/musicube_api_client_ruby/models/save_recording_tag_dto.rb +234 -0
- data/lib/musicube_api_client_ruby/models/save_referrer_dto.rb +229 -0
- data/lib/musicube_api_client_ruby/models/save_taggrams_dto.rb +574 -0
- data/lib/musicube_api_client_ruby/models/save_user_dto.rb +317 -0
- data/lib/musicube_api_client_ruby/models/search_filter_values_dto.rb +867 -0
- data/lib/musicube_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +270 -0
- data/lib/musicube_api_client_ruby/models/search_recording_granular_dto.rb +245 -0
- data/lib/musicube_api_client_ruby/models/sign_up_dto.rb +262 -0
- data/lib/musicube_api_client_ruby/models/tag_dto.rb +250 -0
- data/lib/musicube_api_client_ruby/models/tag_small_dto.rb +239 -0
- data/lib/musicube_api_client_ruby/models/taggram_dto.rb +271 -0
- data/lib/musicube_api_client_ruby/models/tags_summary_dto.rb +250 -0
- data/lib/musicube_api_client_ruby/models/tagstrength_dto.rb +269 -0
- data/lib/musicube_api_client_ruby/models/title_dto.rb +225 -0
- data/lib/musicube_api_client_ruby/models/token_request.rb +224 -0
- data/lib/musicube_api_client_ruby/models/track_to_medium_product_dto.rb +248 -0
- data/lib/musicube_api_client_ruby/models/update_password_dto.rb +238 -0
- data/lib/musicube_api_client_ruby/models/usage_dto.rb +220 -0
- data/lib/musicube_api_client_ruby/models/user_dto.rb +481 -0
- data/lib/musicube_api_client_ruby/version.rb +15 -0
- data/lib/musicube_api_client_ruby.rb +108 -0
- data/musicube_api_client_ruby.gemspec +39 -0
- data/openapi-generator-config.yaml +9 -0
- data/spec/api/allowed_values_api_spec.rb +68 -0
- data/spec/api/party_api_spec.rb +46 -0
- data/spec/api/playlist_api_spec.rb +72 -0
- data/spec/api/recording_api_spec.rb +192 -0
- data/spec/api/user_api_spec.rb +507 -0
- data/spec/api_client_spec.rb +223 -0
- data/spec/configuration_spec.rb +82 -0
- data/spec/models/category_medium_dto_spec.rb +46 -0
- data/spec/models/category_minimal_dto_spec.rb +34 -0
- data/spec/models/config_access_dto_spec.rb +48 -0
- data/spec/models/config_identifier_dto_spec.rb +40 -0
- data/spec/models/contributor_type_dto_spec.rb +34 -0
- data/spec/models/error_response_spec.rb +58 -0
- data/spec/models/field_summary_dto_spec.rb +46 -0
- data/spec/models/file_dto_spec.rb +142 -0
- data/spec/models/file_list_dto_spec.rb +52 -0
- data/spec/models/file_minimal_with_url_dto_spec.rb +46 -0
- data/spec/models/file_small_dto_spec.rb +130 -0
- data/spec/models/file_upload_dto_spec.rb +46 -0
- data/spec/models/file_w_ith_url_dto_spec.rb +40 -0
- data/spec/models/files_summary_dto_spec.rb +70 -0
- data/spec/models/forgot_password_dto_spec.rb +44 -0
- data/spec/models/genre_dto_spec.rb +40 -0
- data/spec/models/genre_minimal_dto_spec.rb +34 -0
- data/spec/models/genres_summary_dto_spec.rb +46 -0
- data/spec/models/init_put_recording_audio_dto_spec.rb +46 -0
- data/spec/models/jwt_token_dto_spec.rb +46 -0
- data/spec/models/login_dto_spec.rb +52 -0
- data/spec/models/musical_features_dto_spec.rb +706 -0
- data/spec/models/p_line_dto_spec.rb +40 -0
- data/spec/models/party_large_dto_spec.rb +76 -0
- data/spec/models/party_small_dto_spec.rb +40 -0
- data/spec/models/playlist_large_dto_spec.rb +98 -0
- data/spec/models/product_medium_dto_spec.rb +82 -0
- data/spec/models/product_party_dto_spec.rb +40 -0
- data/spec/models/recording_for_similarity_search_dto_spec.rb +40 -0
- data/spec/models/recording_genre_prediction_dto_spec.rb +46 -0
- data/spec/models/recording_large_dto_spec.rb +100 -0
- data/spec/models/recording_list_dto_spec.rb +52 -0
- data/spec/models/recording_medium_dto_spec.rb +88 -0
- data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +40 -0
- data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +46 -0
- data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +40 -0
- data/spec/models/recording_party_dto_spec.rb +40 -0
- data/spec/models/recording_playlist_dto_spec.rb +52 -0
- data/spec/models/recording_small_dto_spec.rb +52 -0
- data/spec/models/recording_tag_small_dto_spec.rb +34 -0
- data/spec/models/save_file_recording_dto_spec.rb +880 -0
- data/spec/models/save_playlist_dto_spec.rb +86 -0
- data/spec/models/save_recording_genre_dto_spec.rb +46 -0
- data/spec/models/save_recording_party_dto_spec.rb +44 -0
- data/spec/models/save_recording_playlist_dto_spec.rb +46 -0
- data/spec/models/save_recording_tag_dto_spec.rb +40 -0
- data/spec/models/save_referrer_dto_spec.rb +40 -0
- data/spec/models/save_taggrams_dto_spec.rb +226 -0
- data/spec/models/save_user_dto_spec.rb +72 -0
- data/spec/models/search_filter_values_dto_spec.rb +274 -0
- data/spec/models/search_recording_granular_abstraction_dto_spec.rb +44 -0
- data/spec/models/search_recording_granular_dto_spec.rb +46 -0
- data/spec/models/sign_up_dto_spec.rb +52 -0
- data/spec/models/tag_dto_spec.rb +46 -0
- data/spec/models/tag_small_dto_spec.rb +40 -0
- data/spec/models/taggram_dto_spec.rb +58 -0
- data/spec/models/tags_summary_dto_spec.rb +46 -0
- data/spec/models/tagstrength_dto_spec.rb +58 -0
- data/spec/models/title_dto_spec.rb +34 -0
- data/spec/models/token_request_spec.rb +34 -0
- data/spec/models/track_to_medium_product_dto_spec.rb +46 -0
- data/spec/models/update_password_dto_spec.rb +40 -0
- data/spec/models/usage_dto_spec.rb +34 -0
- data/spec/models/user_dto_spec.rb +148 -0
- data/spec/musicube_api_client_ruby_spec.rb +11 -0
- data/spec/spec_helper.rb +111 -0
- metadata +415 -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: 6.6.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module MusicubeApiClientRuby
|
17
|
+
# AI generated musical features of a recording.
|
18
|
+
class MusicalFeaturesDTO
|
19
|
+
# Search for space
|
20
|
+
attr_accessor :space
|
21
|
+
|
22
|
+
attr_accessor :primary_sound_character_affinity
|
23
|
+
|
24
|
+
attr_accessor :tonality_affinity
|
25
|
+
|
26
|
+
attr_accessor :bpm
|
27
|
+
|
28
|
+
attr_accessor :production_rating
|
29
|
+
|
30
|
+
attr_accessor :production_rating_affinity
|
31
|
+
|
32
|
+
attr_accessor :performance_rating
|
33
|
+
|
34
|
+
attr_accessor :performance_rating_affinity
|
35
|
+
|
36
|
+
attr_accessor :song_rating
|
37
|
+
|
38
|
+
attr_accessor :song_rating_affinity
|
39
|
+
|
40
|
+
attr_accessor :audience_age
|
41
|
+
|
42
|
+
attr_accessor :audience_age_affinity
|
43
|
+
|
44
|
+
attr_accessor :secondary_audience_age
|
45
|
+
|
46
|
+
attr_accessor :secondary_audience_age_affinity
|
47
|
+
|
48
|
+
attr_accessor :tertiary_audience_age
|
49
|
+
|
50
|
+
attr_accessor :tertiary_audience_age_affinity
|
51
|
+
|
52
|
+
attr_accessor :audience_gender
|
53
|
+
|
54
|
+
attr_accessor :audience_gender_affinity
|
55
|
+
|
56
|
+
attr_accessor :audience_region_affinity
|
57
|
+
|
58
|
+
attr_accessor :secondary_audience_region
|
59
|
+
|
60
|
+
attr_accessor :secondary_audience_region_affinity
|
61
|
+
|
62
|
+
attr_accessor :tertiary_audience_region
|
63
|
+
|
64
|
+
attr_accessor :tertiary_audience_region_affinity
|
65
|
+
|
66
|
+
attr_accessor :origin_region
|
67
|
+
|
68
|
+
attr_accessor :origin_region_affinity
|
69
|
+
|
70
|
+
attr_accessor :origin_decade_affinity
|
71
|
+
|
72
|
+
attr_accessor :language_of_performance_affinity
|
73
|
+
|
74
|
+
attr_accessor :curateability_affinity
|
75
|
+
|
76
|
+
attr_accessor :use_case_affinity
|
77
|
+
|
78
|
+
# Search for Industry suitability
|
79
|
+
attr_accessor :industry_suitability
|
80
|
+
|
81
|
+
attr_accessor :industry_suitability_affinity
|
82
|
+
|
83
|
+
attr_accessor :audience_region
|
84
|
+
|
85
|
+
attr_accessor :primary_mood_cluster_affinity
|
86
|
+
|
87
|
+
# Search for a language of the lyrics
|
88
|
+
attr_accessor :secondary_mood_cluster
|
89
|
+
|
90
|
+
attr_accessor :secondary_mood_cluster_affinity
|
91
|
+
|
92
|
+
# Search for a language of the lyrics
|
93
|
+
attr_accessor :tertiary_mood_cluster
|
94
|
+
|
95
|
+
attr_accessor :tertiary_mood_cluster_affinity
|
96
|
+
|
97
|
+
attr_accessor :vocals_affinity
|
98
|
+
|
99
|
+
attr_accessor :dominant_instrument_affinity
|
100
|
+
|
101
|
+
# Search for a dominant instrument
|
102
|
+
attr_accessor :secondary_instrument
|
103
|
+
|
104
|
+
attr_accessor :secondary_instrument_affinity
|
105
|
+
|
106
|
+
# Search for a dominant instrument
|
107
|
+
attr_accessor :tertiary_instrument
|
108
|
+
|
109
|
+
attr_accessor :tertiary_instrument_affinity
|
110
|
+
|
111
|
+
attr_accessor :sound_generation_affinity
|
112
|
+
|
113
|
+
attr_accessor :rhythm_affinity
|
114
|
+
|
115
|
+
attr_accessor :language_of_performance
|
116
|
+
|
117
|
+
# Search for an arousal
|
118
|
+
attr_accessor :arousal
|
119
|
+
|
120
|
+
# Search for a dominant instrument
|
121
|
+
attr_accessor :dominant_instrument
|
122
|
+
|
123
|
+
# Search for energy
|
124
|
+
attr_accessor :energy
|
125
|
+
|
126
|
+
# Search for an engagement
|
127
|
+
attr_accessor :engagement
|
128
|
+
|
129
|
+
# Search for groovyness
|
130
|
+
attr_accessor :groovyness
|
131
|
+
|
132
|
+
# Search for a degree of harmoniousness
|
133
|
+
attr_accessor :harmony
|
134
|
+
|
135
|
+
# Search for pleasantness
|
136
|
+
attr_accessor :pleasantness
|
137
|
+
|
138
|
+
# Search for a language of the lyrics
|
139
|
+
attr_accessor :primary_mood_cluster
|
140
|
+
|
141
|
+
# Search for a sound character
|
142
|
+
attr_accessor :primary_sound_character
|
143
|
+
|
144
|
+
# Search for rhythm
|
145
|
+
attr_accessor :rhythm
|
146
|
+
|
147
|
+
# Search for roughness
|
148
|
+
attr_accessor :roughness
|
149
|
+
|
150
|
+
# Search for a tonal scale
|
151
|
+
attr_accessor :scale
|
152
|
+
|
153
|
+
# Search for type of sound generation
|
154
|
+
attr_accessor :sound_generation
|
155
|
+
|
156
|
+
# Search for tempo
|
157
|
+
attr_accessor :tempo
|
158
|
+
|
159
|
+
# Search for texture
|
160
|
+
attr_accessor :texture
|
161
|
+
|
162
|
+
# Search for timbre
|
163
|
+
attr_accessor :timbre
|
164
|
+
|
165
|
+
# Search for tonality
|
166
|
+
attr_accessor :tonality
|
167
|
+
|
168
|
+
# Search for a valence
|
169
|
+
attr_accessor :valence
|
170
|
+
|
171
|
+
# Search for a vocal gender or instrumental songs
|
172
|
+
attr_accessor :vocals
|
173
|
+
|
174
|
+
# Search for origin decade
|
175
|
+
attr_accessor :origin_decade
|
176
|
+
|
177
|
+
# Search for curatebility
|
178
|
+
attr_accessor :curateability
|
179
|
+
|
180
|
+
# Search for use case
|
181
|
+
attr_accessor :use_case
|
182
|
+
|
183
|
+
# Search for social media suitability
|
184
|
+
attr_accessor :channel_suitability
|
185
|
+
|
186
|
+
attr_accessor :pleasantness_affinity
|
187
|
+
|
188
|
+
attr_accessor :engagement_affinity
|
189
|
+
|
190
|
+
attr_accessor :energy_affinity
|
191
|
+
|
192
|
+
attr_accessor :tempo_affinity
|
193
|
+
|
194
|
+
attr_accessor :scale_affinity
|
195
|
+
|
196
|
+
attr_accessor :timbre_affinity
|
197
|
+
|
198
|
+
attr_accessor :roughness_affinity
|
199
|
+
|
200
|
+
attr_accessor :harmony_affinity
|
201
|
+
|
202
|
+
attr_accessor :texture_affinity
|
203
|
+
|
204
|
+
attr_accessor :groovyness_affinity
|
205
|
+
|
206
|
+
attr_accessor :space_affinity
|
207
|
+
|
208
|
+
attr_accessor :key_affinity
|
209
|
+
|
210
|
+
attr_accessor :channel_suitability_affinity
|
211
|
+
|
212
|
+
# Search for a harmonic key
|
213
|
+
attr_accessor :key
|
214
|
+
|
215
|
+
attr_accessor :valence_affinity
|
216
|
+
|
217
|
+
attr_accessor :arousal_affinity
|
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
|
+
:'primary_sound_character_affinity' => :'primarySoundCharacterAffinity',
|
246
|
+
:'tonality_affinity' => :'tonalityAffinity',
|
247
|
+
:'bpm' => :'bpm',
|
248
|
+
:'production_rating' => :'productionRating',
|
249
|
+
:'production_rating_affinity' => :'productionRatingAffinity',
|
250
|
+
:'performance_rating' => :'performanceRating',
|
251
|
+
:'performance_rating_affinity' => :'performanceRatingAffinity',
|
252
|
+
:'song_rating' => :'songRating',
|
253
|
+
:'song_rating_affinity' => :'songRatingAffinity',
|
254
|
+
:'audience_age' => :'audienceAge',
|
255
|
+
:'audience_age_affinity' => :'audienceAgeAffinity',
|
256
|
+
:'secondary_audience_age' => :'secondaryAudienceAge',
|
257
|
+
:'secondary_audience_age_affinity' => :'secondaryAudienceAgeAffinity',
|
258
|
+
:'tertiary_audience_age' => :'tertiaryAudienceAge',
|
259
|
+
:'tertiary_audience_age_affinity' => :'tertiaryAudienceAgeAffinity',
|
260
|
+
:'audience_gender' => :'audienceGender',
|
261
|
+
:'audience_gender_affinity' => :'audienceGenderAffinity',
|
262
|
+
:'audience_region_affinity' => :'audienceRegionAffinity',
|
263
|
+
:'secondary_audience_region' => :'secondaryAudienceRegion',
|
264
|
+
:'secondary_audience_region_affinity' => :'secondaryAudienceRegionAffinity',
|
265
|
+
:'tertiary_audience_region' => :'tertiaryAudienceRegion',
|
266
|
+
:'tertiary_audience_region_affinity' => :'tertiaryAudienceRegionAffinity',
|
267
|
+
:'origin_region' => :'originRegion',
|
268
|
+
:'origin_region_affinity' => :'originRegionAffinity',
|
269
|
+
:'origin_decade_affinity' => :'originDecadeAffinity',
|
270
|
+
:'language_of_performance_affinity' => :'languageOfPerformanceAffinity',
|
271
|
+
:'curateability_affinity' => :'curateabilityAffinity',
|
272
|
+
:'use_case_affinity' => :'useCaseAffinity',
|
273
|
+
:'industry_suitability' => :'industrySuitability',
|
274
|
+
:'industry_suitability_affinity' => :'industrySuitabilityAffinity',
|
275
|
+
:'audience_region' => :'audienceRegion',
|
276
|
+
:'primary_mood_cluster_affinity' => :'primaryMoodClusterAffinity',
|
277
|
+
:'secondary_mood_cluster' => :'secondaryMoodCluster',
|
278
|
+
:'secondary_mood_cluster_affinity' => :'secondaryMoodClusterAffinity',
|
279
|
+
:'tertiary_mood_cluster' => :'tertiaryMoodCluster',
|
280
|
+
:'tertiary_mood_cluster_affinity' => :'tertiaryMoodClusterAffinity',
|
281
|
+
:'vocals_affinity' => :'vocalsAffinity',
|
282
|
+
:'dominant_instrument_affinity' => :'dominantInstrumentAffinity',
|
283
|
+
:'secondary_instrument' => :'secondaryInstrument',
|
284
|
+
:'secondary_instrument_affinity' => :'secondaryInstrumentAffinity',
|
285
|
+
:'tertiary_instrument' => :'tertiaryInstrument',
|
286
|
+
:'tertiary_instrument_affinity' => :'tertiaryInstrumentAffinity',
|
287
|
+
:'sound_generation_affinity' => :'soundGenerationAffinity',
|
288
|
+
:'rhythm_affinity' => :'rhythmAffinity',
|
289
|
+
:'language_of_performance' => :'languageOfPerformance',
|
290
|
+
:'arousal' => :'arousal',
|
291
|
+
:'dominant_instrument' => :'dominantInstrument',
|
292
|
+
:'energy' => :'energy',
|
293
|
+
:'engagement' => :'engagement',
|
294
|
+
:'groovyness' => :'groovyness',
|
295
|
+
:'harmony' => :'harmony',
|
296
|
+
:'pleasantness' => :'pleasantness',
|
297
|
+
:'primary_mood_cluster' => :'primaryMoodCluster',
|
298
|
+
:'primary_sound_character' => :'primarySoundCharacter',
|
299
|
+
:'rhythm' => :'rhythm',
|
300
|
+
:'roughness' => :'roughness',
|
301
|
+
:'scale' => :'scale',
|
302
|
+
:'sound_generation' => :'soundGeneration',
|
303
|
+
:'tempo' => :'tempo',
|
304
|
+
:'texture' => :'texture',
|
305
|
+
:'timbre' => :'timbre',
|
306
|
+
:'tonality' => :'tonality',
|
307
|
+
:'valence' => :'valence',
|
308
|
+
:'vocals' => :'vocals',
|
309
|
+
:'origin_decade' => :'originDecade',
|
310
|
+
:'curateability' => :'curateability',
|
311
|
+
:'use_case' => :'useCase',
|
312
|
+
:'channel_suitability' => :'channelSuitability',
|
313
|
+
:'pleasantness_affinity' => :'pleasantnessAffinity',
|
314
|
+
:'engagement_affinity' => :'engagementAffinity',
|
315
|
+
:'energy_affinity' => :'energyAffinity',
|
316
|
+
:'tempo_affinity' => :'tempoAffinity',
|
317
|
+
:'scale_affinity' => :'scaleAffinity',
|
318
|
+
:'timbre_affinity' => :'timbreAffinity',
|
319
|
+
:'roughness_affinity' => :'roughnessAffinity',
|
320
|
+
:'harmony_affinity' => :'harmonyAffinity',
|
321
|
+
:'texture_affinity' => :'textureAffinity',
|
322
|
+
:'groovyness_affinity' => :'groovynessAffinity',
|
323
|
+
:'space_affinity' => :'spaceAffinity',
|
324
|
+
:'key_affinity' => :'keyAffinity',
|
325
|
+
:'channel_suitability_affinity' => :'channelSuitabilityAffinity',
|
326
|
+
:'key' => :'key',
|
327
|
+
:'valence_affinity' => :'valenceAffinity',
|
328
|
+
:'arousal_affinity' => :'arousalAffinity'
|
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
|
+
:'primary_sound_character_affinity' => :'Float',
|
342
|
+
:'tonality_affinity' => :'Float',
|
343
|
+
:'bpm' => :'Float',
|
344
|
+
:'production_rating' => :'String',
|
345
|
+
:'production_rating_affinity' => :'Float',
|
346
|
+
:'performance_rating' => :'String',
|
347
|
+
:'performance_rating_affinity' => :'Float',
|
348
|
+
:'song_rating' => :'String',
|
349
|
+
:'song_rating_affinity' => :'Float',
|
350
|
+
:'audience_age' => :'String',
|
351
|
+
:'audience_age_affinity' => :'Float',
|
352
|
+
:'secondary_audience_age' => :'String',
|
353
|
+
:'secondary_audience_age_affinity' => :'Float',
|
354
|
+
:'tertiary_audience_age' => :'String',
|
355
|
+
:'tertiary_audience_age_affinity' => :'Float',
|
356
|
+
:'audience_gender' => :'String',
|
357
|
+
:'audience_gender_affinity' => :'Float',
|
358
|
+
:'audience_region_affinity' => :'Float',
|
359
|
+
:'secondary_audience_region' => :'String',
|
360
|
+
:'secondary_audience_region_affinity' => :'Float',
|
361
|
+
:'tertiary_audience_region' => :'String',
|
362
|
+
:'tertiary_audience_region_affinity' => :'Float',
|
363
|
+
:'origin_region' => :'String',
|
364
|
+
:'origin_region_affinity' => :'Float',
|
365
|
+
:'origin_decade_affinity' => :'Float',
|
366
|
+
:'language_of_performance_affinity' => :'Float',
|
367
|
+
:'curateability_affinity' => :'Float',
|
368
|
+
:'use_case_affinity' => :'Float',
|
369
|
+
:'industry_suitability' => :'String',
|
370
|
+
:'industry_suitability_affinity' => :'Float',
|
371
|
+
:'audience_region' => :'String',
|
372
|
+
:'primary_mood_cluster_affinity' => :'Float',
|
373
|
+
:'secondary_mood_cluster' => :'String',
|
374
|
+
:'secondary_mood_cluster_affinity' => :'Float',
|
375
|
+
:'tertiary_mood_cluster' => :'String',
|
376
|
+
:'tertiary_mood_cluster_affinity' => :'Float',
|
377
|
+
:'vocals_affinity' => :'Float',
|
378
|
+
:'dominant_instrument_affinity' => :'Float',
|
379
|
+
:'secondary_instrument' => :'String',
|
380
|
+
:'secondary_instrument_affinity' => :'Float',
|
381
|
+
:'tertiary_instrument' => :'String',
|
382
|
+
:'tertiary_instrument_affinity' => :'Float',
|
383
|
+
:'sound_generation_affinity' => :'Float',
|
384
|
+
:'rhythm_affinity' => :'Float',
|
385
|
+
:'language_of_performance' => :'String',
|
386
|
+
:'arousal' => :'String',
|
387
|
+
:'dominant_instrument' => :'String',
|
388
|
+
:'energy' => :'String',
|
389
|
+
:'engagement' => :'String',
|
390
|
+
:'groovyness' => :'String',
|
391
|
+
:'harmony' => :'String',
|
392
|
+
:'pleasantness' => :'String',
|
393
|
+
:'primary_mood_cluster' => :'String',
|
394
|
+
:'primary_sound_character' => :'String',
|
395
|
+
:'rhythm' => :'String',
|
396
|
+
:'roughness' => :'String',
|
397
|
+
:'scale' => :'String',
|
398
|
+
:'sound_generation' => :'String',
|
399
|
+
:'tempo' => :'String',
|
400
|
+
:'texture' => :'String',
|
401
|
+
:'timbre' => :'String',
|
402
|
+
:'tonality' => :'String',
|
403
|
+
:'valence' => :'String',
|
404
|
+
:'vocals' => :'String',
|
405
|
+
:'origin_decade' => :'String',
|
406
|
+
:'curateability' => :'String',
|
407
|
+
:'use_case' => :'String',
|
408
|
+
:'channel_suitability' => :'String',
|
409
|
+
:'pleasantness_affinity' => :'Float',
|
410
|
+
:'engagement_affinity' => :'Float',
|
411
|
+
:'energy_affinity' => :'Float',
|
412
|
+
:'tempo_affinity' => :'Float',
|
413
|
+
:'scale_affinity' => :'Float',
|
414
|
+
:'timbre_affinity' => :'Float',
|
415
|
+
:'roughness_affinity' => :'Float',
|
416
|
+
:'harmony_affinity' => :'Float',
|
417
|
+
:'texture_affinity' => :'Float',
|
418
|
+
:'groovyness_affinity' => :'Float',
|
419
|
+
:'space_affinity' => :'Float',
|
420
|
+
:'key_affinity' => :'Float',
|
421
|
+
:'channel_suitability_affinity' => :'Float',
|
422
|
+
:'key' => :'String',
|
423
|
+
:'valence_affinity' => :'Float',
|
424
|
+
:'arousal_affinity' => :'Float'
|
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 `MusicubeApiClientRuby::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 `MusicubeApiClientRuby::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?(:'primary_sound_character_affinity')
|
454
|
+
self.primary_sound_character_affinity = attributes[:'primary_sound_character_affinity']
|
455
|
+
end
|
456
|
+
|
457
|
+
if attributes.key?(:'tonality_affinity')
|
458
|
+
self.tonality_affinity = attributes[:'tonality_affinity']
|
459
|
+
end
|
460
|
+
|
461
|
+
if attributes.key?(:'bpm')
|
462
|
+
self.bpm = attributes[:'bpm']
|
463
|
+
end
|
464
|
+
|
465
|
+
if attributes.key?(:'production_rating')
|
466
|
+
self.production_rating = attributes[:'production_rating']
|
467
|
+
end
|
468
|
+
|
469
|
+
if attributes.key?(:'production_rating_affinity')
|
470
|
+
self.production_rating_affinity = attributes[:'production_rating_affinity']
|
471
|
+
end
|
472
|
+
|
473
|
+
if attributes.key?(:'performance_rating')
|
474
|
+
self.performance_rating = attributes[:'performance_rating']
|
475
|
+
end
|
476
|
+
|
477
|
+
if attributes.key?(:'performance_rating_affinity')
|
478
|
+
self.performance_rating_affinity = attributes[:'performance_rating_affinity']
|
479
|
+
end
|
480
|
+
|
481
|
+
if attributes.key?(:'song_rating')
|
482
|
+
self.song_rating = attributes[:'song_rating']
|
483
|
+
end
|
484
|
+
|
485
|
+
if attributes.key?(:'song_rating_affinity')
|
486
|
+
self.song_rating_affinity = attributes[:'song_rating_affinity']
|
487
|
+
end
|
488
|
+
|
489
|
+
if attributes.key?(:'audience_age')
|
490
|
+
self.audience_age = attributes[:'audience_age']
|
491
|
+
end
|
492
|
+
|
493
|
+
if attributes.key?(:'audience_age_affinity')
|
494
|
+
self.audience_age_affinity = attributes[:'audience_age_affinity']
|
495
|
+
end
|
496
|
+
|
497
|
+
if attributes.key?(:'secondary_audience_age')
|
498
|
+
self.secondary_audience_age = attributes[:'secondary_audience_age']
|
499
|
+
end
|
500
|
+
|
501
|
+
if attributes.key?(:'secondary_audience_age_affinity')
|
502
|
+
self.secondary_audience_age_affinity = attributes[:'secondary_audience_age_affinity']
|
503
|
+
end
|
504
|
+
|
505
|
+
if attributes.key?(:'tertiary_audience_age')
|
506
|
+
self.tertiary_audience_age = attributes[:'tertiary_audience_age']
|
507
|
+
end
|
508
|
+
|
509
|
+
if attributes.key?(:'tertiary_audience_age_affinity')
|
510
|
+
self.tertiary_audience_age_affinity = attributes[:'tertiary_audience_age_affinity']
|
511
|
+
end
|
512
|
+
|
513
|
+
if attributes.key?(:'audience_gender')
|
514
|
+
self.audience_gender = attributes[:'audience_gender']
|
515
|
+
end
|
516
|
+
|
517
|
+
if attributes.key?(:'audience_gender_affinity')
|
518
|
+
self.audience_gender_affinity = attributes[:'audience_gender_affinity']
|
519
|
+
end
|
520
|
+
|
521
|
+
if attributes.key?(:'audience_region_affinity')
|
522
|
+
self.audience_region_affinity = attributes[:'audience_region_affinity']
|
523
|
+
end
|
524
|
+
|
525
|
+
if attributes.key?(:'secondary_audience_region')
|
526
|
+
self.secondary_audience_region = attributes[:'secondary_audience_region']
|
527
|
+
end
|
528
|
+
|
529
|
+
if attributes.key?(:'secondary_audience_region_affinity')
|
530
|
+
self.secondary_audience_region_affinity = attributes[:'secondary_audience_region_affinity']
|
531
|
+
end
|
532
|
+
|
533
|
+
if attributes.key?(:'tertiary_audience_region')
|
534
|
+
self.tertiary_audience_region = attributes[:'tertiary_audience_region']
|
535
|
+
end
|
536
|
+
|
537
|
+
if attributes.key?(:'tertiary_audience_region_affinity')
|
538
|
+
self.tertiary_audience_region_affinity = attributes[:'tertiary_audience_region_affinity']
|
539
|
+
end
|
540
|
+
|
541
|
+
if attributes.key?(:'origin_region')
|
542
|
+
self.origin_region = attributes[:'origin_region']
|
543
|
+
end
|
544
|
+
|
545
|
+
if attributes.key?(:'origin_region_affinity')
|
546
|
+
self.origin_region_affinity = attributes[:'origin_region_affinity']
|
547
|
+
end
|
548
|
+
|
549
|
+
if attributes.key?(:'origin_decade_affinity')
|
550
|
+
self.origin_decade_affinity = attributes[:'origin_decade_affinity']
|
551
|
+
end
|
552
|
+
|
553
|
+
if attributes.key?(:'language_of_performance_affinity')
|
554
|
+
self.language_of_performance_affinity = attributes[:'language_of_performance_affinity']
|
555
|
+
end
|
556
|
+
|
557
|
+
if attributes.key?(:'curateability_affinity')
|
558
|
+
self.curateability_affinity = attributes[:'curateability_affinity']
|
559
|
+
end
|
560
|
+
|
561
|
+
if attributes.key?(:'use_case_affinity')
|
562
|
+
self.use_case_affinity = attributes[:'use_case_affinity']
|
563
|
+
end
|
564
|
+
|
565
|
+
if attributes.key?(:'industry_suitability')
|
566
|
+
self.industry_suitability = attributes[:'industry_suitability']
|
567
|
+
end
|
568
|
+
|
569
|
+
if attributes.key?(:'industry_suitability_affinity')
|
570
|
+
self.industry_suitability_affinity = attributes[:'industry_suitability_affinity']
|
571
|
+
end
|
572
|
+
|
573
|
+
if attributes.key?(:'audience_region')
|
574
|
+
self.audience_region = attributes[:'audience_region']
|
575
|
+
end
|
576
|
+
|
577
|
+
if attributes.key?(:'primary_mood_cluster_affinity')
|
578
|
+
self.primary_mood_cluster_affinity = attributes[:'primary_mood_cluster_affinity']
|
579
|
+
end
|
580
|
+
|
581
|
+
if attributes.key?(:'secondary_mood_cluster')
|
582
|
+
self.secondary_mood_cluster = attributes[:'secondary_mood_cluster']
|
583
|
+
end
|
584
|
+
|
585
|
+
if attributes.key?(:'secondary_mood_cluster_affinity')
|
586
|
+
self.secondary_mood_cluster_affinity = attributes[:'secondary_mood_cluster_affinity']
|
587
|
+
end
|
588
|
+
|
589
|
+
if attributes.key?(:'tertiary_mood_cluster')
|
590
|
+
self.tertiary_mood_cluster = attributes[:'tertiary_mood_cluster']
|
591
|
+
end
|
592
|
+
|
593
|
+
if attributes.key?(:'tertiary_mood_cluster_affinity')
|
594
|
+
self.tertiary_mood_cluster_affinity = attributes[:'tertiary_mood_cluster_affinity']
|
595
|
+
end
|
596
|
+
|
597
|
+
if attributes.key?(:'vocals_affinity')
|
598
|
+
self.vocals_affinity = attributes[:'vocals_affinity']
|
599
|
+
end
|
600
|
+
|
601
|
+
if attributes.key?(:'dominant_instrument_affinity')
|
602
|
+
self.dominant_instrument_affinity = attributes[:'dominant_instrument_affinity']
|
603
|
+
end
|
604
|
+
|
605
|
+
if attributes.key?(:'secondary_instrument')
|
606
|
+
self.secondary_instrument = attributes[:'secondary_instrument']
|
607
|
+
end
|
608
|
+
|
609
|
+
if attributes.key?(:'secondary_instrument_affinity')
|
610
|
+
self.secondary_instrument_affinity = attributes[:'secondary_instrument_affinity']
|
611
|
+
end
|
612
|
+
|
613
|
+
if attributes.key?(:'tertiary_instrument')
|
614
|
+
self.tertiary_instrument = attributes[:'tertiary_instrument']
|
615
|
+
end
|
616
|
+
|
617
|
+
if attributes.key?(:'tertiary_instrument_affinity')
|
618
|
+
self.tertiary_instrument_affinity = attributes[:'tertiary_instrument_affinity']
|
619
|
+
end
|
620
|
+
|
621
|
+
if attributes.key?(:'sound_generation_affinity')
|
622
|
+
self.sound_generation_affinity = attributes[:'sound_generation_affinity']
|
623
|
+
end
|
624
|
+
|
625
|
+
if attributes.key?(:'rhythm_affinity')
|
626
|
+
self.rhythm_affinity = attributes[:'rhythm_affinity']
|
627
|
+
end
|
628
|
+
|
629
|
+
if attributes.key?(:'language_of_performance')
|
630
|
+
self.language_of_performance = attributes[:'language_of_performance']
|
631
|
+
end
|
632
|
+
|
633
|
+
if attributes.key?(:'arousal')
|
634
|
+
self.arousal = attributes[:'arousal']
|
635
|
+
end
|
636
|
+
|
637
|
+
if attributes.key?(:'dominant_instrument')
|
638
|
+
self.dominant_instrument = attributes[:'dominant_instrument']
|
639
|
+
end
|
640
|
+
|
641
|
+
if attributes.key?(:'energy')
|
642
|
+
self.energy = attributes[:'energy']
|
643
|
+
end
|
644
|
+
|
645
|
+
if attributes.key?(:'engagement')
|
646
|
+
self.engagement = attributes[:'engagement']
|
647
|
+
end
|
648
|
+
|
649
|
+
if attributes.key?(:'groovyness')
|
650
|
+
self.groovyness = attributes[:'groovyness']
|
651
|
+
end
|
652
|
+
|
653
|
+
if attributes.key?(:'harmony')
|
654
|
+
self.harmony = attributes[:'harmony']
|
655
|
+
end
|
656
|
+
|
657
|
+
if attributes.key?(:'pleasantness')
|
658
|
+
self.pleasantness = attributes[:'pleasantness']
|
659
|
+
end
|
660
|
+
|
661
|
+
if attributes.key?(:'primary_mood_cluster')
|
662
|
+
self.primary_mood_cluster = attributes[:'primary_mood_cluster']
|
663
|
+
end
|
664
|
+
|
665
|
+
if attributes.key?(:'primary_sound_character')
|
666
|
+
self.primary_sound_character = attributes[:'primary_sound_character']
|
667
|
+
end
|
668
|
+
|
669
|
+
if attributes.key?(:'rhythm')
|
670
|
+
self.rhythm = attributes[:'rhythm']
|
671
|
+
end
|
672
|
+
|
673
|
+
if attributes.key?(:'roughness')
|
674
|
+
self.roughness = attributes[:'roughness']
|
675
|
+
end
|
676
|
+
|
677
|
+
if attributes.key?(:'scale')
|
678
|
+
self.scale = attributes[:'scale']
|
679
|
+
end
|
680
|
+
|
681
|
+
if attributes.key?(:'sound_generation')
|
682
|
+
self.sound_generation = attributes[:'sound_generation']
|
683
|
+
end
|
684
|
+
|
685
|
+
if attributes.key?(:'tempo')
|
686
|
+
self.tempo = attributes[:'tempo']
|
687
|
+
end
|
688
|
+
|
689
|
+
if attributes.key?(:'texture')
|
690
|
+
self.texture = attributes[:'texture']
|
691
|
+
end
|
692
|
+
|
693
|
+
if attributes.key?(:'timbre')
|
694
|
+
self.timbre = attributes[:'timbre']
|
695
|
+
end
|
696
|
+
|
697
|
+
if attributes.key?(:'tonality')
|
698
|
+
self.tonality = attributes[:'tonality']
|
699
|
+
end
|
700
|
+
|
701
|
+
if attributes.key?(:'valence')
|
702
|
+
self.valence = attributes[:'valence']
|
703
|
+
end
|
704
|
+
|
705
|
+
if attributes.key?(:'vocals')
|
706
|
+
self.vocals = attributes[:'vocals']
|
707
|
+
end
|
708
|
+
|
709
|
+
if attributes.key?(:'origin_decade')
|
710
|
+
self.origin_decade = attributes[:'origin_decade']
|
711
|
+
end
|
712
|
+
|
713
|
+
if attributes.key?(:'curateability')
|
714
|
+
self.curateability = attributes[:'curateability']
|
715
|
+
end
|
716
|
+
|
717
|
+
if attributes.key?(:'use_case')
|
718
|
+
self.use_case = attributes[:'use_case']
|
719
|
+
end
|
720
|
+
|
721
|
+
if attributes.key?(:'channel_suitability')
|
722
|
+
self.channel_suitability = attributes[:'channel_suitability']
|
723
|
+
end
|
724
|
+
|
725
|
+
if attributes.key?(:'pleasantness_affinity')
|
726
|
+
self.pleasantness_affinity = attributes[:'pleasantness_affinity']
|
727
|
+
end
|
728
|
+
|
729
|
+
if attributes.key?(:'engagement_affinity')
|
730
|
+
self.engagement_affinity = attributes[:'engagement_affinity']
|
731
|
+
end
|
732
|
+
|
733
|
+
if attributes.key?(:'energy_affinity')
|
734
|
+
self.energy_affinity = attributes[:'energy_affinity']
|
735
|
+
end
|
736
|
+
|
737
|
+
if attributes.key?(:'tempo_affinity')
|
738
|
+
self.tempo_affinity = attributes[:'tempo_affinity']
|
739
|
+
end
|
740
|
+
|
741
|
+
if attributes.key?(:'scale_affinity')
|
742
|
+
self.scale_affinity = attributes[:'scale_affinity']
|
743
|
+
end
|
744
|
+
|
745
|
+
if attributes.key?(:'timbre_affinity')
|
746
|
+
self.timbre_affinity = attributes[:'timbre_affinity']
|
747
|
+
end
|
748
|
+
|
749
|
+
if attributes.key?(:'roughness_affinity')
|
750
|
+
self.roughness_affinity = attributes[:'roughness_affinity']
|
751
|
+
end
|
752
|
+
|
753
|
+
if attributes.key?(:'harmony_affinity')
|
754
|
+
self.harmony_affinity = attributes[:'harmony_affinity']
|
755
|
+
end
|
756
|
+
|
757
|
+
if attributes.key?(:'texture_affinity')
|
758
|
+
self.texture_affinity = attributes[:'texture_affinity']
|
759
|
+
end
|
760
|
+
|
761
|
+
if attributes.key?(:'groovyness_affinity')
|
762
|
+
self.groovyness_affinity = attributes[:'groovyness_affinity']
|
763
|
+
end
|
764
|
+
|
765
|
+
if attributes.key?(:'space_affinity')
|
766
|
+
self.space_affinity = attributes[:'space_affinity']
|
767
|
+
end
|
768
|
+
|
769
|
+
if attributes.key?(:'key_affinity')
|
770
|
+
self.key_affinity = attributes[:'key_affinity']
|
771
|
+
end
|
772
|
+
|
773
|
+
if attributes.key?(:'channel_suitability_affinity')
|
774
|
+
self.channel_suitability_affinity = attributes[:'channel_suitability_affinity']
|
775
|
+
end
|
776
|
+
|
777
|
+
if attributes.key?(:'key')
|
778
|
+
self.key = attributes[:'key']
|
779
|
+
end
|
780
|
+
|
781
|
+
if attributes.key?(:'valence_affinity')
|
782
|
+
self.valence_affinity = attributes[:'valence_affinity']
|
783
|
+
end
|
784
|
+
|
785
|
+
if attributes.key?(:'arousal_affinity')
|
786
|
+
self.arousal_affinity = attributes[:'arousal_affinity']
|
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
|
+
production_rating_validator = EnumAttributeValidator.new('String', ["low production quality", "medium production quality", "high production quality"])
|
803
|
+
return false unless production_rating_validator.valid?(@production_rating)
|
804
|
+
performance_rating_validator = EnumAttributeValidator.new('String', ["low performance quality", "medium performance quality", "high performance quality"])
|
805
|
+
return false unless performance_rating_validator.valid?(@performance_rating)
|
806
|
+
song_rating_validator = EnumAttributeValidator.new('String', ["low song quality", "medium song quality", "high song quality"])
|
807
|
+
return false unless song_rating_validator.valid?(@song_rating)
|
808
|
+
audience_age_validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
|
809
|
+
return false unless audience_age_validator.valid?(@audience_age)
|
810
|
+
secondary_audience_age_validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
|
811
|
+
return false unless secondary_audience_age_validator.valid?(@secondary_audience_age)
|
812
|
+
tertiary_audience_age_validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
|
813
|
+
return false unless tertiary_audience_age_validator.valid?(@tertiary_audience_age)
|
814
|
+
audience_gender_validator = EnumAttributeValidator.new('String', ["male", "female"])
|
815
|
+
return false unless audience_gender_validator.valid?(@audience_gender)
|
816
|
+
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"])
|
817
|
+
return false unless secondary_audience_region_validator.valid?(@secondary_audience_region)
|
818
|
+
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"])
|
819
|
+
return false unless tertiary_audience_region_validator.valid?(@tertiary_audience_region)
|
820
|
+
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"])
|
821
|
+
return false unless origin_region_validator.valid?(@origin_region)
|
822
|
+
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"])
|
823
|
+
return false unless industry_suitability_validator.valid?(@industry_suitability)
|
824
|
+
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"])
|
825
|
+
return false unless audience_region_validator.valid?(@audience_region)
|
826
|
+
secondary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
|
827
|
+
return false unless secondary_mood_cluster_validator.valid?(@secondary_mood_cluster)
|
828
|
+
tertiary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
|
829
|
+
return false unless tertiary_mood_cluster_validator.valid?(@tertiary_mood_cluster)
|
830
|
+
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"])
|
831
|
+
return false unless secondary_instrument_validator.valid?(@secondary_instrument)
|
832
|
+
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"])
|
833
|
+
return false unless tertiary_instrument_validator.valid?(@tertiary_instrument)
|
834
|
+
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"])
|
835
|
+
return false unless language_of_performance_validator.valid?(@language_of_performance)
|
836
|
+
arousal_validator = EnumAttributeValidator.new('String', ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"])
|
837
|
+
return false unless arousal_validator.valid?(@arousal)
|
838
|
+
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"])
|
839
|
+
return false unless dominant_instrument_validator.valid?(@dominant_instrument)
|
840
|
+
energy_validator = EnumAttributeValidator.new('String', ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"])
|
841
|
+
return false unless energy_validator.valid?(@energy)
|
842
|
+
engagement_validator = EnumAttributeValidator.new('String', ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"])
|
843
|
+
return false unless engagement_validator.valid?(@engagement)
|
844
|
+
groovyness_validator = EnumAttributeValidator.new('String', ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"])
|
845
|
+
return false unless groovyness_validator.valid?(@groovyness)
|
846
|
+
harmony_validator = EnumAttributeValidator.new('String', ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"])
|
847
|
+
return false unless harmony_validator.valid?(@harmony)
|
848
|
+
pleasantness_validator = EnumAttributeValidator.new('String', ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"])
|
849
|
+
return false unless pleasantness_validator.valid?(@pleasantness)
|
850
|
+
primary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
|
851
|
+
return false unless primary_mood_cluster_validator.valid?(@primary_mood_cluster)
|
852
|
+
primary_sound_character_validator = EnumAttributeValidator.new('String', ["brassy", "bright", "clear", "deep", "distorted", "flat", "full", "groovy", "melodious", "natural", "resonant", "shrill", "steady", "thin", "warm"])
|
853
|
+
return false unless primary_sound_character_validator.valid?(@primary_sound_character)
|
854
|
+
rhythm_validator = EnumAttributeValidator.new('String', ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"])
|
855
|
+
return false unless rhythm_validator.valid?(@rhythm)
|
856
|
+
roughness_validator = EnumAttributeValidator.new('String', ["very clear", "clear", "moderate roughness", "distorted", "very distorted"])
|
857
|
+
return false unless roughness_validator.valid?(@roughness)
|
858
|
+
scale_validator = EnumAttributeValidator.new('String', ["major key", "minor key", "neutral key"])
|
859
|
+
return false unless scale_validator.valid?(@scale)
|
860
|
+
sound_generation_validator = EnumAttributeValidator.new('String', ["acoustic", "electric", "electronic", "mixed sound generation"])
|
861
|
+
return false unless sound_generation_validator.valid?(@sound_generation)
|
862
|
+
tempo_validator = EnumAttributeValidator.new('String', ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"])
|
863
|
+
return false unless tempo_validator.valid?(@tempo)
|
864
|
+
texture_validator = EnumAttributeValidator.new('String', ["very thin", "thin", "moderate texture", "full", "very full"])
|
865
|
+
return false unless texture_validator.valid?(@texture)
|
866
|
+
timbre_validator = EnumAttributeValidator.new('String', ["very warm", "warm", "moderate timbre", "bright", "very bright"])
|
867
|
+
return false unless timbre_validator.valid?(@timbre)
|
868
|
+
tonality_validator = EnumAttributeValidator.new('String', ["monotonous", "moderate melodiousness", "melodious", "atonal"])
|
869
|
+
return false unless tonality_validator.valid?(@tonality)
|
870
|
+
valence_validator = EnumAttributeValidator.new('String', ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"])
|
871
|
+
return false unless valence_validator.valid?(@valence)
|
872
|
+
vocals_validator = EnumAttributeValidator.new('String', ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"])
|
873
|
+
return false unless vocals_validator.valid?(@vocals)
|
874
|
+
origin_decade_validator = EnumAttributeValidator.new('String', ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"])
|
875
|
+
return false unless origin_decade_validator.valid?(@origin_decade)
|
876
|
+
curateability_validator = EnumAttributeValidator.new('String', ["curateable", "uncurateable"])
|
877
|
+
return false unless curateability_validator.valid?(@curateability)
|
878
|
+
use_case_validator = EnumAttributeValidator.new('String', ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"])
|
879
|
+
return false unless use_case_validator.valid?(@use_case)
|
880
|
+
channel_suitability_validator = EnumAttributeValidator.new('String', ["Spotify", "TikTok", "Unfitting", "YouTube"])
|
881
|
+
return false unless channel_suitability_validator.valid?(@channel_suitability)
|
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] production_rating Object to be assigned
|
899
|
+
def production_rating=(production_rating)
|
900
|
+
validator = EnumAttributeValidator.new('String', ["low production quality", "medium production quality", "high production quality"])
|
901
|
+
unless validator.valid?(production_rating)
|
902
|
+
fail ArgumentError, "invalid value for \"production_rating\", must be one of #{validator.allowable_values}."
|
903
|
+
end
|
904
|
+
@production_rating = production_rating
|
905
|
+
end
|
906
|
+
|
907
|
+
# Custom attribute writer method checking allowed values (enum).
|
908
|
+
# @param [Object] performance_rating Object to be assigned
|
909
|
+
def performance_rating=(performance_rating)
|
910
|
+
validator = EnumAttributeValidator.new('String', ["low performance quality", "medium performance quality", "high performance quality"])
|
911
|
+
unless validator.valid?(performance_rating)
|
912
|
+
fail ArgumentError, "invalid value for \"performance_rating\", must be one of #{validator.allowable_values}."
|
913
|
+
end
|
914
|
+
@performance_rating = performance_rating
|
915
|
+
end
|
916
|
+
|
917
|
+
# Custom attribute writer method checking allowed values (enum).
|
918
|
+
# @param [Object] song_rating Object to be assigned
|
919
|
+
def song_rating=(song_rating)
|
920
|
+
validator = EnumAttributeValidator.new('String', ["low song quality", "medium song quality", "high song quality"])
|
921
|
+
unless validator.valid?(song_rating)
|
922
|
+
fail ArgumentError, "invalid value for \"song_rating\", must be one of #{validator.allowable_values}."
|
923
|
+
end
|
924
|
+
@song_rating = song_rating
|
925
|
+
end
|
926
|
+
|
927
|
+
# Custom attribute writer method checking allowed values (enum).
|
928
|
+
# @param [Object] audience_age Object to be assigned
|
929
|
+
def audience_age=(audience_age)
|
930
|
+
validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
|
931
|
+
unless validator.valid?(audience_age)
|
932
|
+
fail ArgumentError, "invalid value for \"audience_age\", must be one of #{validator.allowable_values}."
|
933
|
+
end
|
934
|
+
@audience_age = audience_age
|
935
|
+
end
|
936
|
+
|
937
|
+
# Custom attribute writer method checking allowed values (enum).
|
938
|
+
# @param [Object] secondary_audience_age Object to be assigned
|
939
|
+
def secondary_audience_age=(secondary_audience_age)
|
940
|
+
validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
|
941
|
+
unless validator.valid?(secondary_audience_age)
|
942
|
+
fail ArgumentError, "invalid value for \"secondary_audience_age\", must be one of #{validator.allowable_values}."
|
943
|
+
end
|
944
|
+
@secondary_audience_age = secondary_audience_age
|
945
|
+
end
|
946
|
+
|
947
|
+
# Custom attribute writer method checking allowed values (enum).
|
948
|
+
# @param [Object] tertiary_audience_age Object to be assigned
|
949
|
+
def tertiary_audience_age=(tertiary_audience_age)
|
950
|
+
validator = EnumAttributeValidator.new('String', ["Generation Z", "Younger Generation Y", "Older Generation Y", "Generation X", "Younger Generation B", "Older Generation B"])
|
951
|
+
unless validator.valid?(tertiary_audience_age)
|
952
|
+
fail ArgumentError, "invalid value for \"tertiary_audience_age\", must be one of #{validator.allowable_values}."
|
953
|
+
end
|
954
|
+
@tertiary_audience_age = tertiary_audience_age
|
955
|
+
end
|
956
|
+
|
957
|
+
# Custom attribute writer method checking allowed values (enum).
|
958
|
+
# @param [Object] audience_gender Object to be assigned
|
959
|
+
def audience_gender=(audience_gender)
|
960
|
+
validator = EnumAttributeValidator.new('String', ["male", "female"])
|
961
|
+
unless validator.valid?(audience_gender)
|
962
|
+
fail ArgumentError, "invalid value for \"audience_gender\", must be one of #{validator.allowable_values}."
|
963
|
+
end
|
964
|
+
@audience_gender = audience_gender
|
965
|
+
end
|
966
|
+
|
967
|
+
# Custom attribute writer method checking allowed values (enum).
|
968
|
+
# @param [Object] secondary_audience_region Object to be assigned
|
969
|
+
def secondary_audience_region=(secondary_audience_region)
|
970
|
+
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"])
|
971
|
+
unless validator.valid?(secondary_audience_region)
|
972
|
+
fail ArgumentError, "invalid value for \"secondary_audience_region\", must be one of #{validator.allowable_values}."
|
973
|
+
end
|
974
|
+
@secondary_audience_region = secondary_audience_region
|
975
|
+
end
|
976
|
+
|
977
|
+
# Custom attribute writer method checking allowed values (enum).
|
978
|
+
# @param [Object] tertiary_audience_region Object to be assigned
|
979
|
+
def tertiary_audience_region=(tertiary_audience_region)
|
980
|
+
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"])
|
981
|
+
unless validator.valid?(tertiary_audience_region)
|
982
|
+
fail ArgumentError, "invalid value for \"tertiary_audience_region\", must be one of #{validator.allowable_values}."
|
983
|
+
end
|
984
|
+
@tertiary_audience_region = tertiary_audience_region
|
985
|
+
end
|
986
|
+
|
987
|
+
# Custom attribute writer method checking allowed values (enum).
|
988
|
+
# @param [Object] origin_region Object to be assigned
|
989
|
+
def origin_region=(origin_region)
|
990
|
+
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"])
|
991
|
+
unless validator.valid?(origin_region)
|
992
|
+
fail ArgumentError, "invalid value for \"origin_region\", must be one of #{validator.allowable_values}."
|
993
|
+
end
|
994
|
+
@origin_region = origin_region
|
995
|
+
end
|
996
|
+
|
997
|
+
# Custom attribute writer method checking allowed values (enum).
|
998
|
+
# @param [Object] industry_suitability Object to be assigned
|
999
|
+
def industry_suitability=(industry_suitability)
|
1000
|
+
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"])
|
1001
|
+
unless validator.valid?(industry_suitability)
|
1002
|
+
fail ArgumentError, "invalid value for \"industry_suitability\", must be one of #{validator.allowable_values}."
|
1003
|
+
end
|
1004
|
+
@industry_suitability = industry_suitability
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
# Custom attribute writer method checking allowed values (enum).
|
1008
|
+
# @param [Object] audience_region Object to be assigned
|
1009
|
+
def audience_region=(audience_region)
|
1010
|
+
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"])
|
1011
|
+
unless validator.valid?(audience_region)
|
1012
|
+
fail ArgumentError, "invalid value for \"audience_region\", must be one of #{validator.allowable_values}."
|
1013
|
+
end
|
1014
|
+
@audience_region = audience_region
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
# Custom attribute writer method checking allowed values (enum).
|
1018
|
+
# @param [Object] secondary_mood_cluster Object to be assigned
|
1019
|
+
def secondary_mood_cluster=(secondary_mood_cluster)
|
1020
|
+
validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
|
1021
|
+
unless validator.valid?(secondary_mood_cluster)
|
1022
|
+
fail ArgumentError, "invalid value for \"secondary_mood_cluster\", must be one of #{validator.allowable_values}."
|
1023
|
+
end
|
1024
|
+
@secondary_mood_cluster = secondary_mood_cluster
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
# Custom attribute writer method checking allowed values (enum).
|
1028
|
+
# @param [Object] tertiary_mood_cluster Object to be assigned
|
1029
|
+
def tertiary_mood_cluster=(tertiary_mood_cluster)
|
1030
|
+
validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
|
1031
|
+
unless validator.valid?(tertiary_mood_cluster)
|
1032
|
+
fail ArgumentError, "invalid value for \"tertiary_mood_cluster\", must be one of #{validator.allowable_values}."
|
1033
|
+
end
|
1034
|
+
@tertiary_mood_cluster = tertiary_mood_cluster
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
# Custom attribute writer method checking allowed values (enum).
|
1038
|
+
# @param [Object] secondary_instrument Object to be assigned
|
1039
|
+
def secondary_instrument=(secondary_instrument)
|
1040
|
+
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"])
|
1041
|
+
unless validator.valid?(secondary_instrument)
|
1042
|
+
fail ArgumentError, "invalid value for \"secondary_instrument\", must be one of #{validator.allowable_values}."
|
1043
|
+
end
|
1044
|
+
@secondary_instrument = secondary_instrument
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
# Custom attribute writer method checking allowed values (enum).
|
1048
|
+
# @param [Object] tertiary_instrument Object to be assigned
|
1049
|
+
def tertiary_instrument=(tertiary_instrument)
|
1050
|
+
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"])
|
1051
|
+
unless validator.valid?(tertiary_instrument)
|
1052
|
+
fail ArgumentError, "invalid value for \"tertiary_instrument\", must be one of #{validator.allowable_values}."
|
1053
|
+
end
|
1054
|
+
@tertiary_instrument = tertiary_instrument
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
# Custom attribute writer method checking allowed values (enum).
|
1058
|
+
# @param [Object] language_of_performance Object to be assigned
|
1059
|
+
def language_of_performance=(language_of_performance)
|
1060
|
+
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"])
|
1061
|
+
unless validator.valid?(language_of_performance)
|
1062
|
+
fail ArgumentError, "invalid value for \"language_of_performance\", must be one of #{validator.allowable_values}."
|
1063
|
+
end
|
1064
|
+
@language_of_performance = language_of_performance
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
# Custom attribute writer method checking allowed values (enum).
|
1068
|
+
# @param [Object] arousal Object to be assigned
|
1069
|
+
def arousal=(arousal)
|
1070
|
+
validator = EnumAttributeValidator.new('String', ["very calm", "calm", "moderate arousal", "energetic", "very energetic", "varying arousal"])
|
1071
|
+
unless validator.valid?(arousal)
|
1072
|
+
fail ArgumentError, "invalid value for \"arousal\", must be one of #{validator.allowable_values}."
|
1073
|
+
end
|
1074
|
+
@arousal = arousal
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
# Custom attribute writer method checking allowed values (enum).
|
1078
|
+
# @param [Object] dominant_instrument Object to be assigned
|
1079
|
+
def dominant_instrument=(dominant_instrument)
|
1080
|
+
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"])
|
1081
|
+
unless validator.valid?(dominant_instrument)
|
1082
|
+
fail ArgumentError, "invalid value for \"dominant_instrument\", must be one of #{validator.allowable_values}."
|
1083
|
+
end
|
1084
|
+
@dominant_instrument = dominant_instrument
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# Custom attribute writer method checking allowed values (enum).
|
1088
|
+
# @param [Object] energy Object to be assigned
|
1089
|
+
def energy=(energy)
|
1090
|
+
validator = EnumAttributeValidator.new('String', ["very quiet", "quiet", "moderate", "loud", "very loud", "dynamic"])
|
1091
|
+
unless validator.valid?(energy)
|
1092
|
+
fail ArgumentError, "invalid value for \"energy\", must be one of #{validator.allowable_values}."
|
1093
|
+
end
|
1094
|
+
@energy = energy
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# Custom attribute writer method checking allowed values (enum).
|
1098
|
+
# @param [Object] engagement Object to be assigned
|
1099
|
+
def engagement=(engagement)
|
1100
|
+
validator = EnumAttributeValidator.new('String', ["very unengaging", "unengaging", "neutral engagement", "engaging", "very engaging", "varying engagement"])
|
1101
|
+
unless validator.valid?(engagement)
|
1102
|
+
fail ArgumentError, "invalid value for \"engagement\", must be one of #{validator.allowable_values}."
|
1103
|
+
end
|
1104
|
+
@engagement = engagement
|
1105
|
+
end
|
1106
|
+
|
1107
|
+
# Custom attribute writer method checking allowed values (enum).
|
1108
|
+
# @param [Object] groovyness Object to be assigned
|
1109
|
+
def groovyness=(groovyness)
|
1110
|
+
validator = EnumAttributeValidator.new('String', ["very steady", "steady", "moderate rhythm feel", "groovy", "very groovy"])
|
1111
|
+
unless validator.valid?(groovyness)
|
1112
|
+
fail ArgumentError, "invalid value for \"groovyness\", must be one of #{validator.allowable_values}."
|
1113
|
+
end
|
1114
|
+
@groovyness = groovyness
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# Custom attribute writer method checking allowed values (enum).
|
1118
|
+
# @param [Object] harmony Object to be assigned
|
1119
|
+
def harmony=(harmony)
|
1120
|
+
validator = EnumAttributeValidator.new('String', ["very dissonant", "dissonant", "moderate harmonies", "harmonious", "very harmonious"])
|
1121
|
+
unless validator.valid?(harmony)
|
1122
|
+
fail ArgumentError, "invalid value for \"harmony\", must be one of #{validator.allowable_values}."
|
1123
|
+
end
|
1124
|
+
@harmony = harmony
|
1125
|
+
end
|
1126
|
+
|
1127
|
+
# Custom attribute writer method checking allowed values (enum).
|
1128
|
+
# @param [Object] pleasantness Object to be assigned
|
1129
|
+
def pleasantness=(pleasantness)
|
1130
|
+
validator = EnumAttributeValidator.new('String', ["very unpleasant", "unpleasant", "neutral pleasantness", "pleasant", "very pleasant", "varying pleasantness"])
|
1131
|
+
unless validator.valid?(pleasantness)
|
1132
|
+
fail ArgumentError, "invalid value for \"pleasantness\", must be one of #{validator.allowable_values}."
|
1133
|
+
end
|
1134
|
+
@pleasantness = pleasantness
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
# Custom attribute writer method checking allowed values (enum).
|
1138
|
+
# @param [Object] primary_mood_cluster Object to be assigned
|
1139
|
+
def primary_mood_cluster=(primary_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?(primary_mood_cluster)
|
1142
|
+
fail ArgumentError, "invalid value for \"primary_mood_cluster\", must be one of #{validator.allowable_values}."
|
1143
|
+
end
|
1144
|
+
@primary_mood_cluster = primary_mood_cluster
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
# Custom attribute writer method checking allowed values (enum).
|
1148
|
+
# @param [Object] primary_sound_character Object to be assigned
|
1149
|
+
def primary_sound_character=(primary_sound_character)
|
1150
|
+
validator = EnumAttributeValidator.new('String', ["brassy", "bright", "clear", "deep", "distorted", "flat", "full", "groovy", "melodious", "natural", "resonant", "shrill", "steady", "thin", "warm"])
|
1151
|
+
unless validator.valid?(primary_sound_character)
|
1152
|
+
fail ArgumentError, "invalid value for \"primary_sound_character\", must be one of #{validator.allowable_values}."
|
1153
|
+
end
|
1154
|
+
@primary_sound_character = primary_sound_character
|
1155
|
+
end
|
1156
|
+
|
1157
|
+
# Custom attribute writer method checking allowed values (enum).
|
1158
|
+
# @param [Object] rhythm Object to be assigned
|
1159
|
+
def rhythm=(rhythm)
|
1160
|
+
validator = EnumAttributeValidator.new('String', ["common time", "triple meter", "complex time signature", "binary rhythm", "ternary rhythm"])
|
1161
|
+
unless validator.valid?(rhythm)
|
1162
|
+
fail ArgumentError, "invalid value for \"rhythm\", must be one of #{validator.allowable_values}."
|
1163
|
+
end
|
1164
|
+
@rhythm = rhythm
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
# Custom attribute writer method checking allowed values (enum).
|
1168
|
+
# @param [Object] roughness Object to be assigned
|
1169
|
+
def roughness=(roughness)
|
1170
|
+
validator = EnumAttributeValidator.new('String', ["very clear", "clear", "moderate roughness", "distorted", "very distorted"])
|
1171
|
+
unless validator.valid?(roughness)
|
1172
|
+
fail ArgumentError, "invalid value for \"roughness\", must be one of #{validator.allowable_values}."
|
1173
|
+
end
|
1174
|
+
@roughness = roughness
|
1175
|
+
end
|
1176
|
+
|
1177
|
+
# Custom attribute writer method checking allowed values (enum).
|
1178
|
+
# @param [Object] scale Object to be assigned
|
1179
|
+
def scale=(scale)
|
1180
|
+
validator = EnumAttributeValidator.new('String', ["major key", "minor key", "neutral key"])
|
1181
|
+
unless validator.valid?(scale)
|
1182
|
+
fail ArgumentError, "invalid value for \"scale\", must be one of #{validator.allowable_values}."
|
1183
|
+
end
|
1184
|
+
@scale = scale
|
1185
|
+
end
|
1186
|
+
|
1187
|
+
# Custom attribute writer method checking allowed values (enum).
|
1188
|
+
# @param [Object] sound_generation Object to be assigned
|
1189
|
+
def sound_generation=(sound_generation)
|
1190
|
+
validator = EnumAttributeValidator.new('String', ["acoustic", "electric", "electronic", "mixed sound generation"])
|
1191
|
+
unless validator.valid?(sound_generation)
|
1192
|
+
fail ArgumentError, "invalid value for \"sound_generation\", must be one of #{validator.allowable_values}."
|
1193
|
+
end
|
1194
|
+
@sound_generation = sound_generation
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
# Custom attribute writer method checking allowed values (enum).
|
1198
|
+
# @param [Object] tempo Object to be assigned
|
1199
|
+
def tempo=(tempo)
|
1200
|
+
validator = EnumAttributeValidator.new('String', ["very slow", "slow", "mid-tempo", "fast", "very fast", "varying tempo"])
|
1201
|
+
unless validator.valid?(tempo)
|
1202
|
+
fail ArgumentError, "invalid value for \"tempo\", must be one of #{validator.allowable_values}."
|
1203
|
+
end
|
1204
|
+
@tempo = tempo
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
# Custom attribute writer method checking allowed values (enum).
|
1208
|
+
# @param [Object] texture Object to be assigned
|
1209
|
+
def texture=(texture)
|
1210
|
+
validator = EnumAttributeValidator.new('String', ["very thin", "thin", "moderate texture", "full", "very full"])
|
1211
|
+
unless validator.valid?(texture)
|
1212
|
+
fail ArgumentError, "invalid value for \"texture\", must be one of #{validator.allowable_values}."
|
1213
|
+
end
|
1214
|
+
@texture = texture
|
1215
|
+
end
|
1216
|
+
|
1217
|
+
# Custom attribute writer method checking allowed values (enum).
|
1218
|
+
# @param [Object] timbre Object to be assigned
|
1219
|
+
def timbre=(timbre)
|
1220
|
+
validator = EnumAttributeValidator.new('String', ["very warm", "warm", "moderate timbre", "bright", "very bright"])
|
1221
|
+
unless validator.valid?(timbre)
|
1222
|
+
fail ArgumentError, "invalid value for \"timbre\", must be one of #{validator.allowable_values}."
|
1223
|
+
end
|
1224
|
+
@timbre = timbre
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
# Custom attribute writer method checking allowed values (enum).
|
1228
|
+
# @param [Object] tonality Object to be assigned
|
1229
|
+
def tonality=(tonality)
|
1230
|
+
validator = EnumAttributeValidator.new('String', ["monotonous", "moderate melodiousness", "melodious", "atonal"])
|
1231
|
+
unless validator.valid?(tonality)
|
1232
|
+
fail ArgumentError, "invalid value for \"tonality\", must be one of #{validator.allowable_values}."
|
1233
|
+
end
|
1234
|
+
@tonality = tonality
|
1235
|
+
end
|
1236
|
+
|
1237
|
+
# Custom attribute writer method checking allowed values (enum).
|
1238
|
+
# @param [Object] valence Object to be assigned
|
1239
|
+
def valence=(valence)
|
1240
|
+
validator = EnumAttributeValidator.new('String', ["very sad", "sad", "moderate valence", "positive", "very positive", "varying valence"])
|
1241
|
+
unless validator.valid?(valence)
|
1242
|
+
fail ArgumentError, "invalid value for \"valence\", must be one of #{validator.allowable_values}."
|
1243
|
+
end
|
1244
|
+
@valence = valence
|
1245
|
+
end
|
1246
|
+
|
1247
|
+
# Custom attribute writer method checking allowed values (enum).
|
1248
|
+
# @param [Object] vocals Object to be assigned
|
1249
|
+
def vocals=(vocals)
|
1250
|
+
validator = EnumAttributeValidator.new('String', ["instrumental", "female vocals", "male vocals", "mixed vocals", "diverse gender vocals"])
|
1251
|
+
unless validator.valid?(vocals)
|
1252
|
+
fail ArgumentError, "invalid value for \"vocals\", must be one of #{validator.allowable_values}."
|
1253
|
+
end
|
1254
|
+
@vocals = vocals
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
# Custom attribute writer method checking allowed values (enum).
|
1258
|
+
# @param [Object] origin_decade Object to be assigned
|
1259
|
+
def origin_decade=(origin_decade)
|
1260
|
+
validator = EnumAttributeValidator.new('String', ["pre-1950s", "1950s", "1960s", "1970s", "1980s", "1990s", "2000s", "2010s", "2020s"])
|
1261
|
+
unless validator.valid?(origin_decade)
|
1262
|
+
fail ArgumentError, "invalid value for \"origin_decade\", must be one of #{validator.allowable_values}."
|
1263
|
+
end
|
1264
|
+
@origin_decade = origin_decade
|
1265
|
+
end
|
1266
|
+
|
1267
|
+
# Custom attribute writer method checking allowed values (enum).
|
1268
|
+
# @param [Object] curateability Object to be assigned
|
1269
|
+
def curateability=(curateability)
|
1270
|
+
validator = EnumAttributeValidator.new('String', ["curateable", "uncurateable"])
|
1271
|
+
unless validator.valid?(curateability)
|
1272
|
+
fail ArgumentError, "invalid value for \"curateability\", must be one of #{validator.allowable_values}."
|
1273
|
+
end
|
1274
|
+
@curateability = curateability
|
1275
|
+
end
|
1276
|
+
|
1277
|
+
# Custom attribute writer method checking allowed values (enum).
|
1278
|
+
# @param [Object] use_case Object to be assigned
|
1279
|
+
def use_case=(use_case)
|
1280
|
+
validator = EnumAttributeValidator.new('String', ["background", "sport", "focus", "christmas", "film", "summer", "adverts", "party", "relax"])
|
1281
|
+
unless validator.valid?(use_case)
|
1282
|
+
fail ArgumentError, "invalid value for \"use_case\", must be one of #{validator.allowable_values}."
|
1283
|
+
end
|
1284
|
+
@use_case = use_case
|
1285
|
+
end
|
1286
|
+
|
1287
|
+
# Custom attribute writer method checking allowed values (enum).
|
1288
|
+
# @param [Object] channel_suitability Object to be assigned
|
1289
|
+
def channel_suitability=(channel_suitability)
|
1290
|
+
validator = EnumAttributeValidator.new('String', ["Spotify", "TikTok", "Unfitting", "YouTube"])
|
1291
|
+
unless validator.valid?(channel_suitability)
|
1292
|
+
fail ArgumentError, "invalid value for \"channel_suitability\", must be one of #{validator.allowable_values}."
|
1293
|
+
end
|
1294
|
+
@channel_suitability = channel_suitability
|
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
|
+
primary_sound_character_affinity == o.primary_sound_character_affinity &&
|
1314
|
+
tonality_affinity == o.tonality_affinity &&
|
1315
|
+
bpm == o.bpm &&
|
1316
|
+
production_rating == o.production_rating &&
|
1317
|
+
production_rating_affinity == o.production_rating_affinity &&
|
1318
|
+
performance_rating == o.performance_rating &&
|
1319
|
+
performance_rating_affinity == o.performance_rating_affinity &&
|
1320
|
+
song_rating == o.song_rating &&
|
1321
|
+
song_rating_affinity == o.song_rating_affinity &&
|
1322
|
+
audience_age == o.audience_age &&
|
1323
|
+
audience_age_affinity == o.audience_age_affinity &&
|
1324
|
+
secondary_audience_age == o.secondary_audience_age &&
|
1325
|
+
secondary_audience_age_affinity == o.secondary_audience_age_affinity &&
|
1326
|
+
tertiary_audience_age == o.tertiary_audience_age &&
|
1327
|
+
tertiary_audience_age_affinity == o.tertiary_audience_age_affinity &&
|
1328
|
+
audience_gender == o.audience_gender &&
|
1329
|
+
audience_gender_affinity == o.audience_gender_affinity &&
|
1330
|
+
audience_region_affinity == o.audience_region_affinity &&
|
1331
|
+
secondary_audience_region == o.secondary_audience_region &&
|
1332
|
+
secondary_audience_region_affinity == o.secondary_audience_region_affinity &&
|
1333
|
+
tertiary_audience_region == o.tertiary_audience_region &&
|
1334
|
+
tertiary_audience_region_affinity == o.tertiary_audience_region_affinity &&
|
1335
|
+
origin_region == o.origin_region &&
|
1336
|
+
origin_region_affinity == o.origin_region_affinity &&
|
1337
|
+
origin_decade_affinity == o.origin_decade_affinity &&
|
1338
|
+
language_of_performance_affinity == o.language_of_performance_affinity &&
|
1339
|
+
curateability_affinity == o.curateability_affinity &&
|
1340
|
+
use_case_affinity == o.use_case_affinity &&
|
1341
|
+
industry_suitability == o.industry_suitability &&
|
1342
|
+
industry_suitability_affinity == o.industry_suitability_affinity &&
|
1343
|
+
audience_region == o.audience_region &&
|
1344
|
+
primary_mood_cluster_affinity == o.primary_mood_cluster_affinity &&
|
1345
|
+
secondary_mood_cluster == o.secondary_mood_cluster &&
|
1346
|
+
secondary_mood_cluster_affinity == o.secondary_mood_cluster_affinity &&
|
1347
|
+
tertiary_mood_cluster == o.tertiary_mood_cluster &&
|
1348
|
+
tertiary_mood_cluster_affinity == o.tertiary_mood_cluster_affinity &&
|
1349
|
+
vocals_affinity == o.vocals_affinity &&
|
1350
|
+
dominant_instrument_affinity == o.dominant_instrument_affinity &&
|
1351
|
+
secondary_instrument == o.secondary_instrument &&
|
1352
|
+
secondary_instrument_affinity == o.secondary_instrument_affinity &&
|
1353
|
+
tertiary_instrument == o.tertiary_instrument &&
|
1354
|
+
tertiary_instrument_affinity == o.tertiary_instrument_affinity &&
|
1355
|
+
sound_generation_affinity == o.sound_generation_affinity &&
|
1356
|
+
rhythm_affinity == o.rhythm_affinity &&
|
1357
|
+
language_of_performance == o.language_of_performance &&
|
1358
|
+
arousal == o.arousal &&
|
1359
|
+
dominant_instrument == o.dominant_instrument &&
|
1360
|
+
energy == o.energy &&
|
1361
|
+
engagement == o.engagement &&
|
1362
|
+
groovyness == o.groovyness &&
|
1363
|
+
harmony == o.harmony &&
|
1364
|
+
pleasantness == o.pleasantness &&
|
1365
|
+
primary_mood_cluster == o.primary_mood_cluster &&
|
1366
|
+
primary_sound_character == o.primary_sound_character &&
|
1367
|
+
rhythm == o.rhythm &&
|
1368
|
+
roughness == o.roughness &&
|
1369
|
+
scale == o.scale &&
|
1370
|
+
sound_generation == o.sound_generation &&
|
1371
|
+
tempo == o.tempo &&
|
1372
|
+
texture == o.texture &&
|
1373
|
+
timbre == o.timbre &&
|
1374
|
+
tonality == o.tonality &&
|
1375
|
+
valence == o.valence &&
|
1376
|
+
vocals == o.vocals &&
|
1377
|
+
origin_decade == o.origin_decade &&
|
1378
|
+
curateability == o.curateability &&
|
1379
|
+
use_case == o.use_case &&
|
1380
|
+
channel_suitability == o.channel_suitability &&
|
1381
|
+
pleasantness_affinity == o.pleasantness_affinity &&
|
1382
|
+
engagement_affinity == o.engagement_affinity &&
|
1383
|
+
energy_affinity == o.energy_affinity &&
|
1384
|
+
tempo_affinity == o.tempo_affinity &&
|
1385
|
+
scale_affinity == o.scale_affinity &&
|
1386
|
+
timbre_affinity == o.timbre_affinity &&
|
1387
|
+
roughness_affinity == o.roughness_affinity &&
|
1388
|
+
harmony_affinity == o.harmony_affinity &&
|
1389
|
+
texture_affinity == o.texture_affinity &&
|
1390
|
+
groovyness_affinity == o.groovyness_affinity &&
|
1391
|
+
space_affinity == o.space_affinity &&
|
1392
|
+
key_affinity == o.key_affinity &&
|
1393
|
+
channel_suitability_affinity == o.channel_suitability_affinity &&
|
1394
|
+
key == o.key &&
|
1395
|
+
valence_affinity == o.valence_affinity &&
|
1396
|
+
arousal_affinity == o.arousal_affinity
|
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, primary_sound_character_affinity, tonality_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, 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, primary_mood_cluster_affinity, secondary_mood_cluster, secondary_mood_cluster_affinity, tertiary_mood_cluster, tertiary_mood_cluster_affinity, vocals_affinity, dominant_instrument_affinity, secondary_instrument, secondary_instrument_affinity, tertiary_instrument, tertiary_instrument_affinity, sound_generation_affinity, rhythm_affinity, language_of_performance, arousal, dominant_instrument, energy, engagement, groovyness, harmony, pleasantness, primary_mood_cluster, primary_sound_character, rhythm, roughness, scale, sound_generation, tempo, texture, timbre, tonality, valence, vocals, origin_decade, curateability, use_case, channel_suitability, 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, valence_affinity, arousal_affinity].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 = MusicubeApiClientRuby.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
|