songtradr_api_client_ruby 1.12.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +76 -0
- data/README.md +223 -0
- data/Rakefile +10 -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 +20 -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/getspec.rb +10 -0
- data/git_push.sh +57 -0
- data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +213 -0
- data/lib/songtradr_api_client_ruby/api/party_api.rb +84 -0
- data/lib/songtradr_api_client_ruby/api/playlist_api.rb +222 -0
- data/lib/songtradr_api_client_ruby/api/recording_api.rb +900 -0
- data/lib/songtradr_api_client_ruby/api/user_api.rb +2642 -0
- data/lib/songtradr_api_client_ruby/api_client.rb +428 -0
- data/lib/songtradr_api_client_ruby/api_error.rb +58 -0
- data/lib/songtradr_api_client_ruby/configuration.rb +380 -0
- data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +250 -0
- data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +225 -0
- data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +287 -0
- data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +239 -0
- data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +225 -0
- data/lib/songtradr_api_client_ruby/models/error_response.rb +276 -0
- data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +253 -0
- data/lib/songtradr_api_client_ruby/models/file_dto.rb +450 -0
- data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +269 -0
- data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +253 -0
- data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +432 -0
- data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +244 -0
- data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +239 -0
- data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +287 -0
- data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +267 -0
- data/lib/songtradr_api_client_ruby/models/genre_dto.rb +239 -0
- data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +225 -0
- data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +248 -0
- data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +238 -0
- data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +248 -0
- data/lib/songtradr_api_client_ruby/models/login_dto.rb +257 -0
- data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +1532 -0
- data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +234 -0
- data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +288 -0
- data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +239 -0
- data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +353 -0
- data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +316 -0
- data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +236 -0
- data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +239 -0
- data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +253 -0
- data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +366 -0
- data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +269 -0
- data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +340 -0
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +236 -0
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +248 -0
- data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +236 -0
- data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +236 -0
- data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +247 -0
- data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +268 -0
- data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +225 -0
- data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +1847 -0
- data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +350 -0
- data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +243 -0
- data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +273 -0
- data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +248 -0
- data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +234 -0
- data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +229 -0
- data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +574 -0
- data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +317 -0
- data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +867 -0
- data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +270 -0
- data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +235 -0
- data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +262 -0
- data/lib/songtradr_api_client_ruby/models/tag_dto.rb +250 -0
- data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +239 -0
- data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +271 -0
- data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +250 -0
- data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +269 -0
- data/lib/songtradr_api_client_ruby/models/title_dto.rb +225 -0
- data/lib/songtradr_api_client_ruby/models/token_request.rb +224 -0
- data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +248 -0
- data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +238 -0
- data/lib/songtradr_api_client_ruby/models/usage_dto.rb +220 -0
- data/lib/songtradr_api_client_ruby/models/user_dto.rb +481 -0
- data/lib/songtradr_api_client_ruby/version.rb +15 -0
- data/lib/songtradr_api_client_ruby.rb +108 -0
- data/openapi-generator-config.yaml +10 -0
- data/songtradr_api_client_ruby.gemspec +39 -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 +40 -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/spec_helper.rb +111 -0
- metadata +412 -0
@@ -0,0 +1,867 @@
|
|
1
|
+
=begin
|
2
|
+
#Songtradr API
|
3
|
+
|
4
|
+
#This is the Songtradr API. Use it to retrieve deep music metadata and trigger processes like auto-tagging. You can also use the API to manage your account and musicube cloud data. **Authentication** 1. Reach out to support@songtradr.com to receive a free account or use your login data if you are already signed up. 2. To authenticate, you need to login via the POST /api/v1/user/login endpoint. 3. The endpoint responds with a jwtToken which you can use in all following API requests as a bearer token. **Rate Limiting** The current limit is 120 Requests per minute. Reach out to us via support@songtradr.com if you need to request more. **Getting Started with auto-tagging** 1. If you want to get your own files auto-tagged, use the POST /api/v1/user/file/{name}/initUpload endpoint. It responds with a presigned S3 link where you can upload your file. 2. You can check the processing status of your file via the GET /api/v1/user/file/{name}/filesStatus endpoint. 3. As soon as processing is done, you can request the generated data via the GET /api/v1/user/files endpoint. **Getting Started with search** You can either search the released music via the /public/recording endpoints or your own private uploaded music via the /user/file/ endpoints. 1. If you want to search the world's released music, a good starting point is the GET /api/v1/public/recording/search endpoint. Please find the extensive list of parameters that serve as semantic search filters. 2. If you want to search your own previously uploaded music, a good starting point is the GET GET /api/v1/user/files endpoint. It has the same extensive list of parameters that serve as semantic search filters.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.12.21
|
7
|
+
Contact: info@songtradr.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 7.0.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module SongtradrApiClientRuby
|
17
|
+
# Categories of musical features that can be used as search filters.
|
18
|
+
class SearchFilterValuesDTO
|
19
|
+
attr_accessor :primary_mood_cluster
|
20
|
+
|
21
|
+
attr_accessor :secondary_mood_cluster
|
22
|
+
|
23
|
+
attr_accessor :tertiary_mood_cluster
|
24
|
+
|
25
|
+
attr_accessor :valence
|
26
|
+
|
27
|
+
attr_accessor :arousal
|
28
|
+
|
29
|
+
attr_accessor :pleasantness
|
30
|
+
|
31
|
+
attr_accessor :engagement
|
32
|
+
|
33
|
+
attr_accessor :vocals
|
34
|
+
|
35
|
+
attr_accessor :dominant_instrument
|
36
|
+
|
37
|
+
attr_accessor :secondary_instrument
|
38
|
+
|
39
|
+
attr_accessor :tertiary_instrument
|
40
|
+
|
41
|
+
attr_accessor :energy
|
42
|
+
|
43
|
+
attr_accessor :sound_generation
|
44
|
+
|
45
|
+
attr_accessor :tempo
|
46
|
+
|
47
|
+
attr_accessor :scale
|
48
|
+
|
49
|
+
attr_accessor :key
|
50
|
+
|
51
|
+
attr_accessor :rhythm
|
52
|
+
|
53
|
+
attr_accessor :primary_sound_character
|
54
|
+
|
55
|
+
attr_accessor :timbre
|
56
|
+
|
57
|
+
attr_accessor :roughness
|
58
|
+
|
59
|
+
attr_accessor :tonality
|
60
|
+
|
61
|
+
attr_accessor :harmony
|
62
|
+
|
63
|
+
attr_accessor :texture
|
64
|
+
|
65
|
+
attr_accessor :groovyness
|
66
|
+
|
67
|
+
attr_accessor :space
|
68
|
+
|
69
|
+
attr_accessor :production_rating
|
70
|
+
|
71
|
+
attr_accessor :performance_rating
|
72
|
+
|
73
|
+
attr_accessor :song_rating
|
74
|
+
|
75
|
+
attr_accessor :audience_age
|
76
|
+
|
77
|
+
attr_accessor :secondary_audience_age
|
78
|
+
|
79
|
+
attr_accessor :tertiary_audience_age
|
80
|
+
|
81
|
+
attr_accessor :audience_gender
|
82
|
+
|
83
|
+
attr_accessor :audience_region
|
84
|
+
|
85
|
+
attr_accessor :secondary_audience_region
|
86
|
+
|
87
|
+
attr_accessor :tertiary_audience_region
|
88
|
+
|
89
|
+
attr_accessor :origin_decade
|
90
|
+
|
91
|
+
attr_accessor :origin_region
|
92
|
+
|
93
|
+
attr_accessor :language_of_performance
|
94
|
+
|
95
|
+
attr_accessor :curateability
|
96
|
+
|
97
|
+
attr_accessor :use_case
|
98
|
+
|
99
|
+
attr_accessor :channel_suitability
|
100
|
+
|
101
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
102
|
+
def self.attribute_map
|
103
|
+
{
|
104
|
+
:'primary_mood_cluster' => :'primaryMoodCluster',
|
105
|
+
:'secondary_mood_cluster' => :'secondaryMoodCluster',
|
106
|
+
:'tertiary_mood_cluster' => :'tertiaryMoodCluster',
|
107
|
+
:'valence' => :'valence',
|
108
|
+
:'arousal' => :'arousal',
|
109
|
+
:'pleasantness' => :'pleasantness',
|
110
|
+
:'engagement' => :'engagement',
|
111
|
+
:'vocals' => :'vocals',
|
112
|
+
:'dominant_instrument' => :'dominantInstrument',
|
113
|
+
:'secondary_instrument' => :'secondaryInstrument',
|
114
|
+
:'tertiary_instrument' => :'tertiaryInstrument',
|
115
|
+
:'energy' => :'energy',
|
116
|
+
:'sound_generation' => :'soundGeneration',
|
117
|
+
:'tempo' => :'tempo',
|
118
|
+
:'scale' => :'scale',
|
119
|
+
:'key' => :'key',
|
120
|
+
:'rhythm' => :'rhythm',
|
121
|
+
:'primary_sound_character' => :'primarySoundCharacter',
|
122
|
+
:'timbre' => :'timbre',
|
123
|
+
:'roughness' => :'roughness',
|
124
|
+
:'tonality' => :'tonality',
|
125
|
+
:'harmony' => :'harmony',
|
126
|
+
:'texture' => :'texture',
|
127
|
+
:'groovyness' => :'groovyness',
|
128
|
+
:'space' => :'space',
|
129
|
+
:'production_rating' => :'productionRating',
|
130
|
+
:'performance_rating' => :'performanceRating',
|
131
|
+
:'song_rating' => :'songRating',
|
132
|
+
:'audience_age' => :'audienceAge',
|
133
|
+
:'secondary_audience_age' => :'secondaryAudienceAge',
|
134
|
+
:'tertiary_audience_age' => :'tertiaryAudienceAge',
|
135
|
+
:'audience_gender' => :'audienceGender',
|
136
|
+
:'audience_region' => :'audienceRegion',
|
137
|
+
:'secondary_audience_region' => :'secondaryAudienceRegion',
|
138
|
+
:'tertiary_audience_region' => :'tertiaryAudienceRegion',
|
139
|
+
:'origin_decade' => :'originDecade',
|
140
|
+
:'origin_region' => :'originRegion',
|
141
|
+
:'language_of_performance' => :'languageOfPerformance',
|
142
|
+
:'curateability' => :'curateability',
|
143
|
+
:'use_case' => :'useCase',
|
144
|
+
:'channel_suitability' => :'channelSuitability'
|
145
|
+
}
|
146
|
+
end
|
147
|
+
|
148
|
+
# Returns all the JSON keys this model knows about
|
149
|
+
def self.acceptable_attributes
|
150
|
+
attribute_map.values
|
151
|
+
end
|
152
|
+
|
153
|
+
# Attribute type mapping.
|
154
|
+
def self.openapi_types
|
155
|
+
{
|
156
|
+
:'primary_mood_cluster' => :'Array<String>',
|
157
|
+
:'secondary_mood_cluster' => :'Array<String>',
|
158
|
+
:'tertiary_mood_cluster' => :'Array<String>',
|
159
|
+
:'valence' => :'Array<String>',
|
160
|
+
:'arousal' => :'Array<String>',
|
161
|
+
:'pleasantness' => :'Array<String>',
|
162
|
+
:'engagement' => :'Array<String>',
|
163
|
+
:'vocals' => :'Array<String>',
|
164
|
+
:'dominant_instrument' => :'Array<String>',
|
165
|
+
:'secondary_instrument' => :'Array<String>',
|
166
|
+
:'tertiary_instrument' => :'Array<String>',
|
167
|
+
:'energy' => :'Array<String>',
|
168
|
+
:'sound_generation' => :'Array<String>',
|
169
|
+
:'tempo' => :'Array<String>',
|
170
|
+
:'scale' => :'Array<String>',
|
171
|
+
:'key' => :'Array<String>',
|
172
|
+
:'rhythm' => :'Array<String>',
|
173
|
+
:'primary_sound_character' => :'Array<String>',
|
174
|
+
:'timbre' => :'Array<String>',
|
175
|
+
:'roughness' => :'Array<String>',
|
176
|
+
:'tonality' => :'Array<String>',
|
177
|
+
:'harmony' => :'Array<String>',
|
178
|
+
:'texture' => :'Array<String>',
|
179
|
+
:'groovyness' => :'Array<String>',
|
180
|
+
:'space' => :'Array<String>',
|
181
|
+
:'production_rating' => :'Array<String>',
|
182
|
+
:'performance_rating' => :'Array<String>',
|
183
|
+
:'song_rating' => :'Array<String>',
|
184
|
+
:'audience_age' => :'Array<String>',
|
185
|
+
:'secondary_audience_age' => :'Array<String>',
|
186
|
+
:'tertiary_audience_age' => :'Array<String>',
|
187
|
+
:'audience_gender' => :'Array<String>',
|
188
|
+
:'audience_region' => :'Array<String>',
|
189
|
+
:'secondary_audience_region' => :'Array<String>',
|
190
|
+
:'tertiary_audience_region' => :'Array<String>',
|
191
|
+
:'origin_decade' => :'Array<String>',
|
192
|
+
:'origin_region' => :'Array<String>',
|
193
|
+
:'language_of_performance' => :'Array<String>',
|
194
|
+
:'curateability' => :'Array<String>',
|
195
|
+
:'use_case' => :'Array<String>',
|
196
|
+
:'channel_suitability' => :'Array<String>'
|
197
|
+
}
|
198
|
+
end
|
199
|
+
|
200
|
+
# List of attributes with nullable: true
|
201
|
+
def self.openapi_nullable
|
202
|
+
Set.new([
|
203
|
+
])
|
204
|
+
end
|
205
|
+
|
206
|
+
# Initializes the object
|
207
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
208
|
+
def initialize(attributes = {})
|
209
|
+
if (!attributes.is_a?(Hash))
|
210
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `SongtradrApiClientRuby::SearchFilterValuesDTO` initialize method"
|
211
|
+
end
|
212
|
+
|
213
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
214
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
215
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
216
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `SongtradrApiClientRuby::SearchFilterValuesDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
217
|
+
end
|
218
|
+
h[k.to_sym] = v
|
219
|
+
}
|
220
|
+
|
221
|
+
if attributes.key?(:'primary_mood_cluster')
|
222
|
+
if (value = attributes[:'primary_mood_cluster']).is_a?(Array)
|
223
|
+
self.primary_mood_cluster = value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.key?(:'secondary_mood_cluster')
|
228
|
+
if (value = attributes[:'secondary_mood_cluster']).is_a?(Array)
|
229
|
+
self.secondary_mood_cluster = value
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.key?(:'tertiary_mood_cluster')
|
234
|
+
if (value = attributes[:'tertiary_mood_cluster']).is_a?(Array)
|
235
|
+
self.tertiary_mood_cluster = value
|
236
|
+
end
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.key?(:'valence')
|
240
|
+
if (value = attributes[:'valence']).is_a?(Array)
|
241
|
+
self.valence = value
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.key?(:'arousal')
|
246
|
+
if (value = attributes[:'arousal']).is_a?(Array)
|
247
|
+
self.arousal = value
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
if attributes.key?(:'pleasantness')
|
252
|
+
if (value = attributes[:'pleasantness']).is_a?(Array)
|
253
|
+
self.pleasantness = value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
if attributes.key?(:'engagement')
|
258
|
+
if (value = attributes[:'engagement']).is_a?(Array)
|
259
|
+
self.engagement = value
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
if attributes.key?(:'vocals')
|
264
|
+
if (value = attributes[:'vocals']).is_a?(Array)
|
265
|
+
self.vocals = value
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
if attributes.key?(:'dominant_instrument')
|
270
|
+
if (value = attributes[:'dominant_instrument']).is_a?(Array)
|
271
|
+
self.dominant_instrument = value
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
if attributes.key?(:'secondary_instrument')
|
276
|
+
if (value = attributes[:'secondary_instrument']).is_a?(Array)
|
277
|
+
self.secondary_instrument = value
|
278
|
+
end
|
279
|
+
end
|
280
|
+
|
281
|
+
if attributes.key?(:'tertiary_instrument')
|
282
|
+
if (value = attributes[:'tertiary_instrument']).is_a?(Array)
|
283
|
+
self.tertiary_instrument = value
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
if attributes.key?(:'energy')
|
288
|
+
if (value = attributes[:'energy']).is_a?(Array)
|
289
|
+
self.energy = value
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
if attributes.key?(:'sound_generation')
|
294
|
+
if (value = attributes[:'sound_generation']).is_a?(Array)
|
295
|
+
self.sound_generation = value
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
if attributes.key?(:'tempo')
|
300
|
+
if (value = attributes[:'tempo']).is_a?(Array)
|
301
|
+
self.tempo = value
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
if attributes.key?(:'scale')
|
306
|
+
if (value = attributes[:'scale']).is_a?(Array)
|
307
|
+
self.scale = value
|
308
|
+
end
|
309
|
+
end
|
310
|
+
|
311
|
+
if attributes.key?(:'key')
|
312
|
+
if (value = attributes[:'key']).is_a?(Array)
|
313
|
+
self.key = value
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
if attributes.key?(:'rhythm')
|
318
|
+
if (value = attributes[:'rhythm']).is_a?(Array)
|
319
|
+
self.rhythm = value
|
320
|
+
end
|
321
|
+
end
|
322
|
+
|
323
|
+
if attributes.key?(:'primary_sound_character')
|
324
|
+
if (value = attributes[:'primary_sound_character']).is_a?(Array)
|
325
|
+
self.primary_sound_character = value
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
if attributes.key?(:'timbre')
|
330
|
+
if (value = attributes[:'timbre']).is_a?(Array)
|
331
|
+
self.timbre = value
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
if attributes.key?(:'roughness')
|
336
|
+
if (value = attributes[:'roughness']).is_a?(Array)
|
337
|
+
self.roughness = value
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
if attributes.key?(:'tonality')
|
342
|
+
if (value = attributes[:'tonality']).is_a?(Array)
|
343
|
+
self.tonality = value
|
344
|
+
end
|
345
|
+
end
|
346
|
+
|
347
|
+
if attributes.key?(:'harmony')
|
348
|
+
if (value = attributes[:'harmony']).is_a?(Array)
|
349
|
+
self.harmony = value
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
if attributes.key?(:'texture')
|
354
|
+
if (value = attributes[:'texture']).is_a?(Array)
|
355
|
+
self.texture = value
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
if attributes.key?(:'groovyness')
|
360
|
+
if (value = attributes[:'groovyness']).is_a?(Array)
|
361
|
+
self.groovyness = value
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
365
|
+
if attributes.key?(:'space')
|
366
|
+
if (value = attributes[:'space']).is_a?(Array)
|
367
|
+
self.space = value
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
if attributes.key?(:'production_rating')
|
372
|
+
if (value = attributes[:'production_rating']).is_a?(Array)
|
373
|
+
self.production_rating = value
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
if attributes.key?(:'performance_rating')
|
378
|
+
if (value = attributes[:'performance_rating']).is_a?(Array)
|
379
|
+
self.performance_rating = value
|
380
|
+
end
|
381
|
+
end
|
382
|
+
|
383
|
+
if attributes.key?(:'song_rating')
|
384
|
+
if (value = attributes[:'song_rating']).is_a?(Array)
|
385
|
+
self.song_rating = value
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
if attributes.key?(:'audience_age')
|
390
|
+
if (value = attributes[:'audience_age']).is_a?(Array)
|
391
|
+
self.audience_age = value
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
if attributes.key?(:'secondary_audience_age')
|
396
|
+
if (value = attributes[:'secondary_audience_age']).is_a?(Array)
|
397
|
+
self.secondary_audience_age = value
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
if attributes.key?(:'tertiary_audience_age')
|
402
|
+
if (value = attributes[:'tertiary_audience_age']).is_a?(Array)
|
403
|
+
self.tertiary_audience_age = value
|
404
|
+
end
|
405
|
+
end
|
406
|
+
|
407
|
+
if attributes.key?(:'audience_gender')
|
408
|
+
if (value = attributes[:'audience_gender']).is_a?(Array)
|
409
|
+
self.audience_gender = value
|
410
|
+
end
|
411
|
+
end
|
412
|
+
|
413
|
+
if attributes.key?(:'audience_region')
|
414
|
+
if (value = attributes[:'audience_region']).is_a?(Array)
|
415
|
+
self.audience_region = value
|
416
|
+
end
|
417
|
+
end
|
418
|
+
|
419
|
+
if attributes.key?(:'secondary_audience_region')
|
420
|
+
if (value = attributes[:'secondary_audience_region']).is_a?(Array)
|
421
|
+
self.secondary_audience_region = value
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
if attributes.key?(:'tertiary_audience_region')
|
426
|
+
if (value = attributes[:'tertiary_audience_region']).is_a?(Array)
|
427
|
+
self.tertiary_audience_region = value
|
428
|
+
end
|
429
|
+
end
|
430
|
+
|
431
|
+
if attributes.key?(:'origin_decade')
|
432
|
+
if (value = attributes[:'origin_decade']).is_a?(Array)
|
433
|
+
self.origin_decade = value
|
434
|
+
end
|
435
|
+
end
|
436
|
+
|
437
|
+
if attributes.key?(:'origin_region')
|
438
|
+
if (value = attributes[:'origin_region']).is_a?(Array)
|
439
|
+
self.origin_region = value
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
if attributes.key?(:'language_of_performance')
|
444
|
+
if (value = attributes[:'language_of_performance']).is_a?(Array)
|
445
|
+
self.language_of_performance = value
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
if attributes.key?(:'curateability')
|
450
|
+
if (value = attributes[:'curateability']).is_a?(Array)
|
451
|
+
self.curateability = value
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
if attributes.key?(:'use_case')
|
456
|
+
if (value = attributes[:'use_case']).is_a?(Array)
|
457
|
+
self.use_case = value
|
458
|
+
end
|
459
|
+
end
|
460
|
+
|
461
|
+
if attributes.key?(:'channel_suitability')
|
462
|
+
if (value = attributes[:'channel_suitability']).is_a?(Array)
|
463
|
+
self.channel_suitability = value
|
464
|
+
end
|
465
|
+
end
|
466
|
+
end
|
467
|
+
|
468
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
469
|
+
# @return Array for valid properties with the reasons
|
470
|
+
def list_invalid_properties
|
471
|
+
invalid_properties = Array.new
|
472
|
+
if @primary_mood_cluster.nil?
|
473
|
+
invalid_properties.push('invalid value for "primary_mood_cluster", primary_mood_cluster cannot be nil.')
|
474
|
+
end
|
475
|
+
|
476
|
+
if @secondary_mood_cluster.nil?
|
477
|
+
invalid_properties.push('invalid value for "secondary_mood_cluster", secondary_mood_cluster cannot be nil.')
|
478
|
+
end
|
479
|
+
|
480
|
+
if @tertiary_mood_cluster.nil?
|
481
|
+
invalid_properties.push('invalid value for "tertiary_mood_cluster", tertiary_mood_cluster cannot be nil.')
|
482
|
+
end
|
483
|
+
|
484
|
+
if @valence.nil?
|
485
|
+
invalid_properties.push('invalid value for "valence", valence cannot be nil.')
|
486
|
+
end
|
487
|
+
|
488
|
+
if @arousal.nil?
|
489
|
+
invalid_properties.push('invalid value for "arousal", arousal cannot be nil.')
|
490
|
+
end
|
491
|
+
|
492
|
+
if @pleasantness.nil?
|
493
|
+
invalid_properties.push('invalid value for "pleasantness", pleasantness cannot be nil.')
|
494
|
+
end
|
495
|
+
|
496
|
+
if @engagement.nil?
|
497
|
+
invalid_properties.push('invalid value for "engagement", engagement cannot be nil.')
|
498
|
+
end
|
499
|
+
|
500
|
+
if @vocals.nil?
|
501
|
+
invalid_properties.push('invalid value for "vocals", vocals cannot be nil.')
|
502
|
+
end
|
503
|
+
|
504
|
+
if @dominant_instrument.nil?
|
505
|
+
invalid_properties.push('invalid value for "dominant_instrument", dominant_instrument cannot be nil.')
|
506
|
+
end
|
507
|
+
|
508
|
+
if @secondary_instrument.nil?
|
509
|
+
invalid_properties.push('invalid value for "secondary_instrument", secondary_instrument cannot be nil.')
|
510
|
+
end
|
511
|
+
|
512
|
+
if @tertiary_instrument.nil?
|
513
|
+
invalid_properties.push('invalid value for "tertiary_instrument", tertiary_instrument cannot be nil.')
|
514
|
+
end
|
515
|
+
|
516
|
+
if @energy.nil?
|
517
|
+
invalid_properties.push('invalid value for "energy", energy cannot be nil.')
|
518
|
+
end
|
519
|
+
|
520
|
+
if @sound_generation.nil?
|
521
|
+
invalid_properties.push('invalid value for "sound_generation", sound_generation cannot be nil.')
|
522
|
+
end
|
523
|
+
|
524
|
+
if @tempo.nil?
|
525
|
+
invalid_properties.push('invalid value for "tempo", tempo cannot be nil.')
|
526
|
+
end
|
527
|
+
|
528
|
+
if @scale.nil?
|
529
|
+
invalid_properties.push('invalid value for "scale", scale cannot be nil.')
|
530
|
+
end
|
531
|
+
|
532
|
+
if @key.nil?
|
533
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
534
|
+
end
|
535
|
+
|
536
|
+
if @rhythm.nil?
|
537
|
+
invalid_properties.push('invalid value for "rhythm", rhythm cannot be nil.')
|
538
|
+
end
|
539
|
+
|
540
|
+
if @primary_sound_character.nil?
|
541
|
+
invalid_properties.push('invalid value for "primary_sound_character", primary_sound_character cannot be nil.')
|
542
|
+
end
|
543
|
+
|
544
|
+
if @timbre.nil?
|
545
|
+
invalid_properties.push('invalid value for "timbre", timbre cannot be nil.')
|
546
|
+
end
|
547
|
+
|
548
|
+
if @roughness.nil?
|
549
|
+
invalid_properties.push('invalid value for "roughness", roughness cannot be nil.')
|
550
|
+
end
|
551
|
+
|
552
|
+
if @tonality.nil?
|
553
|
+
invalid_properties.push('invalid value for "tonality", tonality cannot be nil.')
|
554
|
+
end
|
555
|
+
|
556
|
+
if @harmony.nil?
|
557
|
+
invalid_properties.push('invalid value for "harmony", harmony cannot be nil.')
|
558
|
+
end
|
559
|
+
|
560
|
+
if @texture.nil?
|
561
|
+
invalid_properties.push('invalid value for "texture", texture cannot be nil.')
|
562
|
+
end
|
563
|
+
|
564
|
+
if @groovyness.nil?
|
565
|
+
invalid_properties.push('invalid value for "groovyness", groovyness cannot be nil.')
|
566
|
+
end
|
567
|
+
|
568
|
+
if @space.nil?
|
569
|
+
invalid_properties.push('invalid value for "space", space cannot be nil.')
|
570
|
+
end
|
571
|
+
|
572
|
+
if @production_rating.nil?
|
573
|
+
invalid_properties.push('invalid value for "production_rating", production_rating cannot be nil.')
|
574
|
+
end
|
575
|
+
|
576
|
+
if @performance_rating.nil?
|
577
|
+
invalid_properties.push('invalid value for "performance_rating", performance_rating cannot be nil.')
|
578
|
+
end
|
579
|
+
|
580
|
+
if @song_rating.nil?
|
581
|
+
invalid_properties.push('invalid value for "song_rating", song_rating cannot be nil.')
|
582
|
+
end
|
583
|
+
|
584
|
+
if @audience_age.nil?
|
585
|
+
invalid_properties.push('invalid value for "audience_age", audience_age cannot be nil.')
|
586
|
+
end
|
587
|
+
|
588
|
+
if @secondary_audience_age.nil?
|
589
|
+
invalid_properties.push('invalid value for "secondary_audience_age", secondary_audience_age cannot be nil.')
|
590
|
+
end
|
591
|
+
|
592
|
+
if @tertiary_audience_age.nil?
|
593
|
+
invalid_properties.push('invalid value for "tertiary_audience_age", tertiary_audience_age cannot be nil.')
|
594
|
+
end
|
595
|
+
|
596
|
+
if @audience_gender.nil?
|
597
|
+
invalid_properties.push('invalid value for "audience_gender", audience_gender cannot be nil.')
|
598
|
+
end
|
599
|
+
|
600
|
+
if @audience_region.nil?
|
601
|
+
invalid_properties.push('invalid value for "audience_region", audience_region cannot be nil.')
|
602
|
+
end
|
603
|
+
|
604
|
+
if @secondary_audience_region.nil?
|
605
|
+
invalid_properties.push('invalid value for "secondary_audience_region", secondary_audience_region cannot be nil.')
|
606
|
+
end
|
607
|
+
|
608
|
+
if @tertiary_audience_region.nil?
|
609
|
+
invalid_properties.push('invalid value for "tertiary_audience_region", tertiary_audience_region cannot be nil.')
|
610
|
+
end
|
611
|
+
|
612
|
+
if @origin_decade.nil?
|
613
|
+
invalid_properties.push('invalid value for "origin_decade", origin_decade cannot be nil.')
|
614
|
+
end
|
615
|
+
|
616
|
+
if @origin_region.nil?
|
617
|
+
invalid_properties.push('invalid value for "origin_region", origin_region cannot be nil.')
|
618
|
+
end
|
619
|
+
|
620
|
+
if @language_of_performance.nil?
|
621
|
+
invalid_properties.push('invalid value for "language_of_performance", language_of_performance cannot be nil.')
|
622
|
+
end
|
623
|
+
|
624
|
+
if @curateability.nil?
|
625
|
+
invalid_properties.push('invalid value for "curateability", curateability cannot be nil.')
|
626
|
+
end
|
627
|
+
|
628
|
+
if @use_case.nil?
|
629
|
+
invalid_properties.push('invalid value for "use_case", use_case cannot be nil.')
|
630
|
+
end
|
631
|
+
|
632
|
+
if @channel_suitability.nil?
|
633
|
+
invalid_properties.push('invalid value for "channel_suitability", channel_suitability cannot be nil.')
|
634
|
+
end
|
635
|
+
|
636
|
+
invalid_properties
|
637
|
+
end
|
638
|
+
|
639
|
+
# Check to see if the all the properties in the model are valid
|
640
|
+
# @return true if the model is valid
|
641
|
+
def valid?
|
642
|
+
return false if @primary_mood_cluster.nil?
|
643
|
+
return false if @secondary_mood_cluster.nil?
|
644
|
+
return false if @tertiary_mood_cluster.nil?
|
645
|
+
return false if @valence.nil?
|
646
|
+
return false if @arousal.nil?
|
647
|
+
return false if @pleasantness.nil?
|
648
|
+
return false if @engagement.nil?
|
649
|
+
return false if @vocals.nil?
|
650
|
+
return false if @dominant_instrument.nil?
|
651
|
+
return false if @secondary_instrument.nil?
|
652
|
+
return false if @tertiary_instrument.nil?
|
653
|
+
return false if @energy.nil?
|
654
|
+
return false if @sound_generation.nil?
|
655
|
+
return false if @tempo.nil?
|
656
|
+
return false if @scale.nil?
|
657
|
+
return false if @key.nil?
|
658
|
+
return false if @rhythm.nil?
|
659
|
+
return false if @primary_sound_character.nil?
|
660
|
+
return false if @timbre.nil?
|
661
|
+
return false if @roughness.nil?
|
662
|
+
return false if @tonality.nil?
|
663
|
+
return false if @harmony.nil?
|
664
|
+
return false if @texture.nil?
|
665
|
+
return false if @groovyness.nil?
|
666
|
+
return false if @space.nil?
|
667
|
+
return false if @production_rating.nil?
|
668
|
+
return false if @performance_rating.nil?
|
669
|
+
return false if @song_rating.nil?
|
670
|
+
return false if @audience_age.nil?
|
671
|
+
return false if @secondary_audience_age.nil?
|
672
|
+
return false if @tertiary_audience_age.nil?
|
673
|
+
return false if @audience_gender.nil?
|
674
|
+
return false if @audience_region.nil?
|
675
|
+
return false if @secondary_audience_region.nil?
|
676
|
+
return false if @tertiary_audience_region.nil?
|
677
|
+
return false if @origin_decade.nil?
|
678
|
+
return false if @origin_region.nil?
|
679
|
+
return false if @language_of_performance.nil?
|
680
|
+
return false if @curateability.nil?
|
681
|
+
return false if @use_case.nil?
|
682
|
+
return false if @channel_suitability.nil?
|
683
|
+
true
|
684
|
+
end
|
685
|
+
|
686
|
+
# Checks equality by comparing each attribute.
|
687
|
+
# @param [Object] Object to be compared
|
688
|
+
def ==(o)
|
689
|
+
return true if self.equal?(o)
|
690
|
+
self.class == o.class &&
|
691
|
+
primary_mood_cluster == o.primary_mood_cluster &&
|
692
|
+
secondary_mood_cluster == o.secondary_mood_cluster &&
|
693
|
+
tertiary_mood_cluster == o.tertiary_mood_cluster &&
|
694
|
+
valence == o.valence &&
|
695
|
+
arousal == o.arousal &&
|
696
|
+
pleasantness == o.pleasantness &&
|
697
|
+
engagement == o.engagement &&
|
698
|
+
vocals == o.vocals &&
|
699
|
+
dominant_instrument == o.dominant_instrument &&
|
700
|
+
secondary_instrument == o.secondary_instrument &&
|
701
|
+
tertiary_instrument == o.tertiary_instrument &&
|
702
|
+
energy == o.energy &&
|
703
|
+
sound_generation == o.sound_generation &&
|
704
|
+
tempo == o.tempo &&
|
705
|
+
scale == o.scale &&
|
706
|
+
key == o.key &&
|
707
|
+
rhythm == o.rhythm &&
|
708
|
+
primary_sound_character == o.primary_sound_character &&
|
709
|
+
timbre == o.timbre &&
|
710
|
+
roughness == o.roughness &&
|
711
|
+
tonality == o.tonality &&
|
712
|
+
harmony == o.harmony &&
|
713
|
+
texture == o.texture &&
|
714
|
+
groovyness == o.groovyness &&
|
715
|
+
space == o.space &&
|
716
|
+
production_rating == o.production_rating &&
|
717
|
+
performance_rating == o.performance_rating &&
|
718
|
+
song_rating == o.song_rating &&
|
719
|
+
audience_age == o.audience_age &&
|
720
|
+
secondary_audience_age == o.secondary_audience_age &&
|
721
|
+
tertiary_audience_age == o.tertiary_audience_age &&
|
722
|
+
audience_gender == o.audience_gender &&
|
723
|
+
audience_region == o.audience_region &&
|
724
|
+
secondary_audience_region == o.secondary_audience_region &&
|
725
|
+
tertiary_audience_region == o.tertiary_audience_region &&
|
726
|
+
origin_decade == o.origin_decade &&
|
727
|
+
origin_region == o.origin_region &&
|
728
|
+
language_of_performance == o.language_of_performance &&
|
729
|
+
curateability == o.curateability &&
|
730
|
+
use_case == o.use_case &&
|
731
|
+
channel_suitability == o.channel_suitability
|
732
|
+
end
|
733
|
+
|
734
|
+
# @see the `==` method
|
735
|
+
# @param [Object] Object to be compared
|
736
|
+
def eql?(o)
|
737
|
+
self == o
|
738
|
+
end
|
739
|
+
|
740
|
+
# Calculates hash code according to all attributes.
|
741
|
+
# @return [Integer] Hash code
|
742
|
+
def hash
|
743
|
+
[primary_mood_cluster, secondary_mood_cluster, tertiary_mood_cluster, valence, arousal, pleasantness, engagement, vocals, dominant_instrument, secondary_instrument, tertiary_instrument, energy, sound_generation, tempo, scale, key, rhythm, primary_sound_character, timbre, roughness, tonality, harmony, texture, groovyness, space, production_rating, performance_rating, song_rating, audience_age, secondary_audience_age, tertiary_audience_age, audience_gender, audience_region, secondary_audience_region, tertiary_audience_region, origin_decade, origin_region, language_of_performance, curateability, use_case, channel_suitability].hash
|
744
|
+
end
|
745
|
+
|
746
|
+
# Builds the object from hash
|
747
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
748
|
+
# @return [Object] Returns the model itself
|
749
|
+
def self.build_from_hash(attributes)
|
750
|
+
new.build_from_hash(attributes)
|
751
|
+
end
|
752
|
+
|
753
|
+
# Builds the object from hash
|
754
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
755
|
+
# @return [Object] Returns the model itself
|
756
|
+
def build_from_hash(attributes)
|
757
|
+
return nil unless attributes.is_a?(Hash)
|
758
|
+
attributes = attributes.transform_keys(&:to_sym)
|
759
|
+
self.class.openapi_types.each_pair do |key, type|
|
760
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
761
|
+
self.send("#{key}=", nil)
|
762
|
+
elsif type =~ /\AArray<(.*)>/i
|
763
|
+
# check to ensure the input is an array given that the attribute
|
764
|
+
# is documented as an array but the input is not
|
765
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
766
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
767
|
+
end
|
768
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
769
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
770
|
+
end
|
771
|
+
end
|
772
|
+
|
773
|
+
self
|
774
|
+
end
|
775
|
+
|
776
|
+
# Deserializes the data based on type
|
777
|
+
# @param string type Data type
|
778
|
+
# @param string value Value to be deserialized
|
779
|
+
# @return [Object] Deserialized data
|
780
|
+
def _deserialize(type, value)
|
781
|
+
case type.to_sym
|
782
|
+
when :Time
|
783
|
+
Time.parse(value)
|
784
|
+
when :Date
|
785
|
+
Date.parse(value)
|
786
|
+
when :String
|
787
|
+
value.to_s
|
788
|
+
when :Integer
|
789
|
+
value.to_i
|
790
|
+
when :Float
|
791
|
+
value.to_f
|
792
|
+
when :Boolean
|
793
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
794
|
+
true
|
795
|
+
else
|
796
|
+
false
|
797
|
+
end
|
798
|
+
when :Object
|
799
|
+
# generic object (usually a Hash), return directly
|
800
|
+
value
|
801
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
802
|
+
inner_type = Regexp.last_match[:inner_type]
|
803
|
+
value.map { |v| _deserialize(inner_type, v) }
|
804
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
805
|
+
k_type = Regexp.last_match[:k_type]
|
806
|
+
v_type = Regexp.last_match[:v_type]
|
807
|
+
{}.tap do |hash|
|
808
|
+
value.each do |k, v|
|
809
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
810
|
+
end
|
811
|
+
end
|
812
|
+
else # model
|
813
|
+
# models (e.g. Pet) or oneOf
|
814
|
+
klass = SongtradrApiClientRuby.const_get(type)
|
815
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
816
|
+
end
|
817
|
+
end
|
818
|
+
|
819
|
+
# Returns the string representation of the object
|
820
|
+
# @return [String] String presentation of the object
|
821
|
+
def to_s
|
822
|
+
to_hash.to_s
|
823
|
+
end
|
824
|
+
|
825
|
+
# to_body is an alias to to_hash (backward compatibility)
|
826
|
+
# @return [Hash] Returns the object in the form of hash
|
827
|
+
def to_body
|
828
|
+
to_hash
|
829
|
+
end
|
830
|
+
|
831
|
+
# Returns the object in the form of hash
|
832
|
+
# @return [Hash] Returns the object in the form of hash
|
833
|
+
def to_hash
|
834
|
+
hash = {}
|
835
|
+
self.class.attribute_map.each_pair do |attr, param|
|
836
|
+
value = self.send(attr)
|
837
|
+
if value.nil?
|
838
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
839
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
840
|
+
end
|
841
|
+
|
842
|
+
hash[param] = _to_hash(value)
|
843
|
+
end
|
844
|
+
hash
|
845
|
+
end
|
846
|
+
|
847
|
+
# Outputs non-array value in the form of hash
|
848
|
+
# For object, use to_hash. Otherwise, just return the value
|
849
|
+
# @param [Object] value Any valid value
|
850
|
+
# @return [Hash] Returns the value in the form of hash
|
851
|
+
def _to_hash(value)
|
852
|
+
if value.is_a?(Array)
|
853
|
+
value.compact.map { |v| _to_hash(v) }
|
854
|
+
elsif value.is_a?(Hash)
|
855
|
+
{}.tap do |hash|
|
856
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
857
|
+
end
|
858
|
+
elsif value.respond_to? :to_hash
|
859
|
+
value.to_hash
|
860
|
+
else
|
861
|
+
value
|
862
|
+
end
|
863
|
+
end
|
864
|
+
|
865
|
+
end
|
866
|
+
|
867
|
+
end
|