songtradr_api_client_ruby 1.12.23 → 1.12.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +5 -5
  4. data/docs/AllowedValuesApi.md +2 -2
  5. data/docs/ApiKeyDTO.md +2 -2
  6. data/docs/FileSmallDTO.md +15 -15
  7. data/docs/MusicalFeaturesDTO.md +68 -68
  8. data/docs/PlaylistLargeDTO.md +7 -7
  9. data/docs/ProductMediumDTO.md +7 -7
  10. data/docs/ProductPartyDTO.md +3 -3
  11. data/docs/RecordingApi.md +2 -0
  12. data/docs/RecordingGenrePredictionDTO.md +4 -4
  13. data/docs/RecordingLargeDTO.md +8 -8
  14. data/docs/RecordingMediumDTO.md +6 -6
  15. data/docs/RecordingMinimalWithMusicalFeaturesDTO.md +3 -3
  16. data/docs/RecordingPartyDTO.md +3 -3
  17. data/docs/RecordingSmallDTO.md +3 -3
  18. data/docs/UserApi.md +4 -0
  19. data/docs/UserDTO.md +18 -0
  20. data/lib/songtradr_api_client_ruby/api/allowed_values_api.rb +4 -4
  21. data/lib/songtradr_api_client_ruby/api/api_keys_api.rb +1 -1
  22. data/lib/songtradr_api_client_ruby/api/party_api.rb +1 -1
  23. data/lib/songtradr_api_client_ruby/api/playlist_api.rb +1 -1
  24. data/lib/songtradr_api_client_ruby/api/recording_api.rb +4 -1
  25. data/lib/songtradr_api_client_ruby/api/user_api.rb +7 -1
  26. data/lib/songtradr_api_client_ruby/api_client.rb +1 -1
  27. data/lib/songtradr_api_client_ruby/api_error.rb +1 -1
  28. data/lib/songtradr_api_client_ruby/configuration.rb +10 -8
  29. data/lib/songtradr_api_client_ruby/models/admin_api_user_dto.rb +13 -18
  30. data/lib/songtradr_api_client_ruby/models/api_key_dto.rb +29 -28
  31. data/lib/songtradr_api_client_ruby/models/category_medium_dto.rb +17 -18
  32. data/lib/songtradr_api_client_ruby/models/category_minimal_dto.rb +15 -18
  33. data/lib/songtradr_api_client_ruby/models/config_access_dto.rb +17 -18
  34. data/lib/songtradr_api_client_ruby/models/config_identifier_dto.rb +17 -18
  35. data/lib/songtradr_api_client_ruby/models/contributor_type_dto.rb +15 -18
  36. data/lib/songtradr_api_client_ruby/models/create_api_key_dto.rb +13 -18
  37. data/lib/songtradr_api_client_ruby/models/error_response.rb +19 -18
  38. data/lib/songtradr_api_client_ruby/models/field_summary_dto.rb +19 -18
  39. data/lib/songtradr_api_client_ruby/models/file_dto.rb +23 -18
  40. data/lib/songtradr_api_client_ruby/models/file_list_dto.rb +21 -18
  41. data/lib/songtradr_api_client_ruby/models/file_minimal_with_url_dto.rb +19 -18
  42. data/lib/songtradr_api_client_ruby/models/file_small_dto.rb +84 -79
  43. data/lib/songtradr_api_client_ruby/models/file_upload_dto.rb +13 -18
  44. data/lib/songtradr_api_client_ruby/models/file_w_ith_url_dto.rb +17 -18
  45. data/lib/songtradr_api_client_ruby/models/files_summary_dto.rb +15 -18
  46. data/lib/songtradr_api_client_ruby/models/forgot_password_dto.rb +15 -18
  47. data/lib/songtradr_api_client_ruby/models/genre_dto.rb +17 -18
  48. data/lib/songtradr_api_client_ruby/models/genre_minimal_dto.rb +15 -18
  49. data/lib/songtradr_api_client_ruby/models/genres_summary_dto.rb +17 -18
  50. data/lib/songtradr_api_client_ruby/models/init_put_recording_audio_dto.rb +13 -18
  51. data/lib/songtradr_api_client_ruby/models/jwt_token_dto.rb +17 -18
  52. data/lib/songtradr_api_client_ruby/models/login_dto.rb +17 -18
  53. data/lib/songtradr_api_client_ruby/models/musical_features_dto.rb +448 -453
  54. data/lib/songtradr_api_client_ruby/models/p_line_dto.rb +15 -18
  55. data/lib/songtradr_api_client_ruby/models/party_large_dto.rb +15 -18
  56. data/lib/songtradr_api_client_ruby/models/party_small_dto.rb +17 -18
  57. data/lib/songtradr_api_client_ruby/models/playlist_large_dto.rb +45 -48
  58. data/lib/songtradr_api_client_ruby/models/product_medium_dto.rb +66 -59
  59. data/lib/songtradr_api_client_ruby/models/product_party_dto.rb +28 -31
  60. data/lib/songtradr_api_client_ruby/models/recording_for_similarity_search_dto.rb +17 -18
  61. data/lib/songtradr_api_client_ruby/models/recording_genre_prediction_dto.rb +38 -37
  62. data/lib/songtradr_api_client_ruby/models/recording_large_dto.rb +74 -57
  63. data/lib/songtradr_api_client_ruby/models/recording_list_dto.rb +21 -18
  64. data/lib/songtradr_api_client_ruby/models/recording_medium_dto.rb +61 -48
  65. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_musical_features_dto.rb +28 -31
  66. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_taggrams_dto.rb +15 -18
  67. data/lib/songtradr_api_client_ruby/models/recording_minimal_with_tagstrengths_dto.rb +15 -18
  68. data/lib/songtradr_api_client_ruby/models/recording_party_dto.rb +28 -31
  69. data/lib/songtradr_api_client_ruby/models/recording_playlist_dto.rb +13 -18
  70. data/lib/songtradr_api_client_ruby/models/recording_small_dto.rb +36 -31
  71. data/lib/songtradr_api_client_ruby/models/recording_tag_small_dto.rb +15 -18
  72. data/lib/songtradr_api_client_ruby/models/save_file_recording_dto.rb +17 -18
  73. data/lib/songtradr_api_client_ruby/models/save_playlist_dto.rb +21 -18
  74. data/lib/songtradr_api_client_ruby/models/save_recording_genre_dto.rb +15 -18
  75. data/lib/songtradr_api_client_ruby/models/save_recording_party_dto.rb +17 -18
  76. data/lib/songtradr_api_client_ruby/models/save_recording_playlist_dto.rb +17 -18
  77. data/lib/songtradr_api_client_ruby/models/save_recording_tag_dto.rb +15 -18
  78. data/lib/songtradr_api_client_ruby/models/save_referrer_dto.rb +13 -18
  79. data/lib/songtradr_api_client_ruby/models/save_taggrams_dto.rb +13 -18
  80. data/lib/songtradr_api_client_ruby/models/save_user_dto.rb +15 -18
  81. data/lib/songtradr_api_client_ruby/models/search_filter_values_dto.rb +95 -18
  82. data/lib/songtradr_api_client_ruby/models/search_recording_granular_abstraction_dto.rb +15 -18
  83. data/lib/songtradr_api_client_ruby/models/search_recording_granular_dto.rb +15 -18
  84. data/lib/songtradr_api_client_ruby/models/sign_up_dto.rb +19 -18
  85. data/lib/songtradr_api_client_ruby/models/tag_dto.rb +17 -18
  86. data/lib/songtradr_api_client_ruby/models/tag_small_dto.rb +17 -18
  87. data/lib/songtradr_api_client_ruby/models/taggram_dto.rb +17 -18
  88. data/lib/songtradr_api_client_ruby/models/tags_summary_dto.rb +17 -18
  89. data/lib/songtradr_api_client_ruby/models/tagstrength_dto.rb +17 -18
  90. data/lib/songtradr_api_client_ruby/models/title_dto.rb +15 -18
  91. data/lib/songtradr_api_client_ruby/models/token_request.rb +15 -18
  92. data/lib/songtradr_api_client_ruby/models/track_to_medium_product_dto.rb +17 -18
  93. data/lib/songtradr_api_client_ruby/models/update_password_dto.rb +17 -18
  94. data/lib/songtradr_api_client_ruby/models/usage_dto.rb +13 -18
  95. data/lib/songtradr_api_client_ruby/models/user_dto.rb +196 -19
  96. data/lib/songtradr_api_client_ruby/version.rb +2 -2
  97. data/lib/songtradr_api_client_ruby.rb +1 -1
  98. data/openapi-generator-config.yaml +1 -1
  99. data/songtradr_api_client_ruby.gemspec +1 -1
  100. data/spec/api/allowed_values_api_spec.rb +2 -2
  101. data/spec/api/api_keys_api_spec.rb +1 -1
  102. data/spec/api/party_api_spec.rb +1 -1
  103. data/spec/api/playlist_api_spec.rb +1 -1
  104. data/spec/api/recording_api_spec.rb +2 -1
  105. data/spec/api/user_api_spec.rb +3 -1
  106. data/spec/api_client_spec.rb +1 -1
  107. data/spec/configuration_spec.rb +1 -1
  108. data/spec/models/admin_api_user_dto_spec.rb +1 -1
  109. data/spec/models/api_key_dto_spec.rb +3 -3
  110. data/spec/models/category_medium_dto_spec.rb +1 -1
  111. data/spec/models/category_minimal_dto_spec.rb +1 -1
  112. data/spec/models/config_access_dto_spec.rb +1 -1
  113. data/spec/models/config_identifier_dto_spec.rb +1 -1
  114. data/spec/models/contributor_type_dto_spec.rb +1 -1
  115. data/spec/models/create_api_key_dto_spec.rb +1 -1
  116. data/spec/models/error_response_spec.rb +1 -1
  117. data/spec/models/field_summary_dto_spec.rb +1 -1
  118. data/spec/models/file_dto_spec.rb +1 -1
  119. data/spec/models/file_list_dto_spec.rb +1 -1
  120. data/spec/models/file_minimal_with_url_dto_spec.rb +1 -1
  121. data/spec/models/file_small_dto_spec.rb +19 -19
  122. data/spec/models/file_upload_dto_spec.rb +1 -1
  123. data/spec/models/file_w_ith_url_dto_spec.rb +1 -1
  124. data/spec/models/files_summary_dto_spec.rb +1 -1
  125. data/spec/models/forgot_password_dto_spec.rb +1 -1
  126. data/spec/models/genre_dto_spec.rb +1 -1
  127. data/spec/models/genre_minimal_dto_spec.rb +1 -1
  128. data/spec/models/genres_summary_dto_spec.rb +1 -1
  129. data/spec/models/init_put_recording_audio_dto_spec.rb +1 -1
  130. data/spec/models/jwt_token_dto_spec.rb +1 -1
  131. data/spec/models/login_dto_spec.rb +1 -1
  132. data/spec/models/musical_features_dto_spec.rb +121 -121
  133. data/spec/models/p_line_dto_spec.rb +1 -1
  134. data/spec/models/party_large_dto_spec.rb +1 -1
  135. data/spec/models/party_small_dto_spec.rb +1 -1
  136. data/spec/models/playlist_large_dto_spec.rb +10 -10
  137. data/spec/models/product_medium_dto_spec.rb +9 -9
  138. data/spec/models/product_party_dto_spec.rb +3 -3
  139. data/spec/models/recording_for_similarity_search_dto_spec.rb +1 -1
  140. data/spec/models/recording_genre_prediction_dto_spec.rb +3 -3
  141. data/spec/models/recording_large_dto_spec.rb +12 -12
  142. data/spec/models/recording_list_dto_spec.rb +1 -1
  143. data/spec/models/recording_medium_dto_spec.rb +9 -9
  144. data/spec/models/recording_minimal_with_musical_features_dto_spec.rb +3 -3
  145. data/spec/models/recording_minimal_with_taggrams_dto_spec.rb +1 -1
  146. data/spec/models/recording_minimal_with_tagstrengths_dto_spec.rb +1 -1
  147. data/spec/models/recording_party_dto_spec.rb +3 -3
  148. data/spec/models/recording_playlist_dto_spec.rb +1 -1
  149. data/spec/models/recording_small_dto_spec.rb +4 -4
  150. data/spec/models/recording_tag_small_dto_spec.rb +1 -1
  151. data/spec/models/save_file_recording_dto_spec.rb +1 -1
  152. data/spec/models/save_playlist_dto_spec.rb +1 -1
  153. data/spec/models/save_recording_genre_dto_spec.rb +1 -1
  154. data/spec/models/save_recording_party_dto_spec.rb +1 -1
  155. data/spec/models/save_recording_playlist_dto_spec.rb +1 -1
  156. data/spec/models/save_recording_tag_dto_spec.rb +1 -1
  157. data/spec/models/save_referrer_dto_spec.rb +1 -1
  158. data/spec/models/save_taggrams_dto_spec.rb +1 -1
  159. data/spec/models/save_user_dto_spec.rb +1 -1
  160. data/spec/models/search_filter_values_dto_spec.rb +1 -1
  161. data/spec/models/search_recording_granular_abstraction_dto_spec.rb +1 -1
  162. data/spec/models/search_recording_granular_dto_spec.rb +1 -1
  163. data/spec/models/sign_up_dto_spec.rb +1 -1
  164. data/spec/models/tag_dto_spec.rb +1 -1
  165. data/spec/models/tag_small_dto_spec.rb +1 -1
  166. data/spec/models/taggram_dto_spec.rb +1 -1
  167. data/spec/models/tags_summary_dto_spec.rb +1 -1
  168. data/spec/models/tagstrength_dto_spec.rb +1 -1
  169. data/spec/models/title_dto_spec.rb +1 -1
  170. data/spec/models/token_request_spec.rb +1 -1
  171. data/spec/models/track_to_medium_product_dto_spec.rb +1 -1
  172. data/spec/models/update_password_dto_spec.rb +1 -1
  173. data/spec/models/usage_dto_spec.rb +1 -1
  174. data/spec/models/user_dto_spec.rb +55 -1
  175. data/spec/spec_helper.rb +1 -1
  176. metadata +2 -2
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 1.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -18,19 +18,19 @@ module SongtradrApiClientRuby
18
18
  class RecordingSmallDTO
19
19
  attr_accessor :duration
20
20
 
21
+ attr_accessor :isrc
22
+
21
23
  attr_accessor :parties
22
24
 
23
25
  attr_accessor :titles
24
26
 
25
- attr_accessor :isrc
26
-
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
28
28
  def self.attribute_map
29
29
  {
30
30
  :'duration' => :'duration',
31
+ :'isrc' => :'isrc',
31
32
  :'parties' => :'parties',
32
- :'titles' => :'titles',
33
- :'isrc' => :'isrc'
33
+ :'titles' => :'titles'
34
34
  }
35
35
  end
36
36
 
@@ -43,9 +43,9 @@ module SongtradrApiClientRuby
43
43
  def self.openapi_types
44
44
  {
45
45
  :'duration' => :'Integer',
46
+ :'isrc' => :'String',
46
47
  :'parties' => :'Array<RecordingPartyDTO>',
47
- :'titles' => :'Array<TitleDTO>',
48
- :'isrc' => :'String'
48
+ :'titles' => :'Array<TitleDTO>'
49
49
  }
50
50
  end
51
51
 
@@ -74,6 +74,12 @@ module SongtradrApiClientRuby
74
74
  self.duration = attributes[:'duration']
75
75
  end
76
76
 
77
+ if attributes.key?(:'isrc')
78
+ self.isrc = attributes[:'isrc']
79
+ else
80
+ self.isrc = nil
81
+ end
82
+
77
83
  if attributes.key?(:'parties')
78
84
  if (value = attributes[:'parties']).is_a?(Array)
79
85
  self.parties = value
@@ -85,15 +91,12 @@ module SongtradrApiClientRuby
85
91
  self.titles = value
86
92
  end
87
93
  end
88
-
89
- if attributes.key?(:'isrc')
90
- self.isrc = attributes[:'isrc']
91
- end
92
94
  end
93
95
 
94
96
  # Show invalid properties with the reasons. Usually used together with valid?
95
97
  # @return Array for valid properties with the reasons
96
98
  def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
97
100
  invalid_properties = Array.new
98
101
  if @isrc.nil?
99
102
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -105,6 +108,7 @@ module SongtradrApiClientRuby
105
108
  # Check to see if the all the properties in the model are valid
106
109
  # @return true if the model is valid
107
110
  def valid?
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
112
  return false if @isrc.nil?
109
113
  true
110
114
  end
@@ -112,12 +116,20 @@ module SongtradrApiClientRuby
112
116
  # Custom attribute writer method with validation
113
117
  # @param [Object] parties Value to be assigned
114
118
  def parties=(parties)
119
+ if parties.nil?
120
+ fail ArgumentError, 'parties cannot be nil'
121
+ end
122
+
115
123
  @parties = parties
116
124
  end
117
125
 
118
126
  # Custom attribute writer method with validation
119
127
  # @param [Object] titles Value to be assigned
120
128
  def titles=(titles)
129
+ if titles.nil?
130
+ fail ArgumentError, 'titles cannot be nil'
131
+ end
132
+
121
133
  @titles = titles
122
134
  end
123
135
 
@@ -127,9 +139,9 @@ module SongtradrApiClientRuby
127
139
  return true if self.equal?(o)
128
140
  self.class == o.class &&
129
141
  duration == o.duration &&
142
+ isrc == o.isrc &&
130
143
  parties == o.parties &&
131
- titles == o.titles &&
132
- isrc == o.isrc
144
+ titles == o.titles
133
145
  end
134
146
 
135
147
  # @see the `==` method
@@ -141,44 +153,37 @@ module SongtradrApiClientRuby
141
153
  # Calculates hash code according to all attributes.
142
154
  # @return [Integer] Hash code
143
155
  def hash
144
- [duration, parties, titles, isrc].hash
156
+ [duration, isrc, parties, titles].hash
145
157
  end
146
158
 
147
159
  # Builds the object from hash
148
160
  # @param [Hash] attributes Model attributes in the form of hash
149
161
  # @return [Object] Returns the model itself
150
162
  def self.build_from_hash(attributes)
151
- new.build_from_hash(attributes)
152
- end
153
-
154
- # Builds the object from hash
155
- # @param [Hash] attributes Model attributes in the form of hash
156
- # @return [Object] Returns the model itself
157
- def build_from_hash(attributes)
158
163
  return nil unless attributes.is_a?(Hash)
159
164
  attributes = attributes.transform_keys(&:to_sym)
160
- self.class.openapi_types.each_pair do |key, type|
161
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
162
- self.send("#{key}=", nil)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
163
169
  elsif type =~ /\AArray<(.*)>/i
164
170
  # check to ensure the input is an array given that the attribute
165
171
  # is documented as an array but the input is not
166
- if attributes[self.class.attribute_map[key]].is_a?(Array)
167
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
168
174
  end
169
- elsif !attributes[self.class.attribute_map[key]].nil?
170
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
171
177
  end
172
178
  end
173
-
174
- self
179
+ new(transformed_hash)
175
180
  end
176
181
 
177
182
  # Deserializes the data based on type
178
183
  # @param string type Data type
179
184
  # @param string value Value to be deserialized
180
185
  # @return [Object] Deserialized data
181
- def _deserialize(type, value)
186
+ def self._deserialize(type, value)
182
187
  case type.to_sym
183
188
  when :Time
184
189
  Time.parse(value)
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 1.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -60,12 +60,15 @@ module SongtradrApiClientRuby
60
60
 
61
61
  if attributes.key?(:'tag')
62
62
  self.tag = attributes[:'tag']
63
+ else
64
+ self.tag = nil
63
65
  end
64
66
  end
65
67
 
66
68
  # Show invalid properties with the reasons. Usually used together with valid?
67
69
  # @return Array for valid properties with the reasons
68
70
  def list_invalid_properties
71
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
69
72
  invalid_properties = Array.new
70
73
  if @tag.nil?
71
74
  invalid_properties.push('invalid value for "tag", tag cannot be nil.')
@@ -77,6 +80,7 @@ module SongtradrApiClientRuby
77
80
  # Check to see if the all the properties in the model are valid
78
81
  # @return true if the model is valid
79
82
  def valid?
83
+ warn '[DEPRECATED] the `valid?` method is obsolete'
80
84
  return false if @tag.nil?
81
85
  true
82
86
  end
@@ -105,37 +109,30 @@ module SongtradrApiClientRuby
105
109
  # @param [Hash] attributes Model attributes in the form of hash
106
110
  # @return [Object] Returns the model itself
107
111
  def self.build_from_hash(attributes)
108
- new.build_from_hash(attributes)
109
- end
110
-
111
- # Builds the object from hash
112
- # @param [Hash] attributes Model attributes in the form of hash
113
- # @return [Object] Returns the model itself
114
- def build_from_hash(attributes)
115
112
  return nil unless attributes.is_a?(Hash)
116
113
  attributes = attributes.transform_keys(&:to_sym)
117
- self.class.openapi_types.each_pair do |key, type|
118
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
119
- self.send("#{key}=", nil)
114
+ transformed_hash = {}
115
+ openapi_types.each_pair do |key, type|
116
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = nil
120
118
  elsif type =~ /\AArray<(.*)>/i
121
119
  # check to ensure the input is an array given that the attribute
122
120
  # is documented as an array but the input is not
123
- if attributes[self.class.attribute_map[key]].is_a?(Array)
124
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ if attributes[attribute_map[key]].is_a?(Array)
122
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
125
123
  end
126
- elsif !attributes[self.class.attribute_map[key]].nil?
127
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ elsif !attributes[attribute_map[key]].nil?
125
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
128
126
  end
129
127
  end
130
-
131
- self
128
+ new(transformed_hash)
132
129
  end
133
130
 
134
131
  # Deserializes the data based on type
135
132
  # @param string type Data type
136
133
  # @param string value Value to be deserialized
137
134
  # @return [Object] Deserialized data
138
- def _deserialize(type, value)
135
+ def self._deserialize(type, value)
139
136
  case type.to_sym
140
137
  when :Time
141
138
  Time.parse(value)
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 1.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -548,6 +548,8 @@ module SongtradrApiClientRuby
548
548
 
549
549
  if attributes.key?(:'isrc')
550
550
  self.isrc = attributes[:'isrc']
551
+ else
552
+ self.isrc = nil
551
553
  end
552
554
 
553
555
  if attributes.key?(:'name')
@@ -958,6 +960,8 @@ module SongtradrApiClientRuby
958
960
 
959
961
  if attributes.key?(:'created_by_version')
960
962
  self.created_by_version = attributes[:'created_by_version']
963
+ else
964
+ self.created_by_version = nil
961
965
  end
962
966
 
963
967
  if attributes.key?(:'tags')
@@ -998,6 +1002,7 @@ module SongtradrApiClientRuby
998
1002
  # Show invalid properties with the reasons. Usually used together with valid?
999
1003
  # @return Array for valid properties with the reasons
1000
1004
  def list_invalid_properties
1005
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
1001
1006
  invalid_properties = Array.new
1002
1007
  if @isrc.nil?
1003
1008
  invalid_properties.push('invalid value for "isrc", isrc cannot be nil.')
@@ -1013,6 +1018,7 @@ module SongtradrApiClientRuby
1013
1018
  # Check to see if the all the properties in the model are valid
1014
1019
  # @return true if the model is valid
1015
1020
  def valid?
1021
+ warn '[DEPRECATED] the `valid?` method is obsolete'
1016
1022
  return false if @isrc.nil?
1017
1023
  primary_mood_cluster_validator = EnumAttributeValidator.new('String', ["aggressive", "amusing", "anxious", "calm", "devotional", "dreamy", "energetic", "enigmatic", "epic", "erotic", "positive", "sad", "scary", "wild"])
1018
1024
  return false unless primary_mood_cluster_validator.valid?(@primary_mood_cluster)
@@ -1727,37 +1733,30 @@ module SongtradrApiClientRuby
1727
1733
  # @param [Hash] attributes Model attributes in the form of hash
1728
1734
  # @return [Object] Returns the model itself
1729
1735
  def self.build_from_hash(attributes)
1730
- new.build_from_hash(attributes)
1731
- end
1732
-
1733
- # Builds the object from hash
1734
- # @param [Hash] attributes Model attributes in the form of hash
1735
- # @return [Object] Returns the model itself
1736
- def build_from_hash(attributes)
1737
1736
  return nil unless attributes.is_a?(Hash)
1738
1737
  attributes = attributes.transform_keys(&:to_sym)
1739
- self.class.openapi_types.each_pair do |key, type|
1740
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
1741
- self.send("#{key}=", nil)
1738
+ transformed_hash = {}
1739
+ openapi_types.each_pair do |key, type|
1740
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
1741
+ transformed_hash["#{key}"] = nil
1742
1742
  elsif type =~ /\AArray<(.*)>/i
1743
1743
  # check to ensure the input is an array given that the attribute
1744
1744
  # is documented as an array but the input is not
1745
- if attributes[self.class.attribute_map[key]].is_a?(Array)
1746
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
1745
+ if attributes[attribute_map[key]].is_a?(Array)
1746
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
1747
1747
  end
1748
- elsif !attributes[self.class.attribute_map[key]].nil?
1749
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
1748
+ elsif !attributes[attribute_map[key]].nil?
1749
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
1750
1750
  end
1751
1751
  end
1752
-
1753
- self
1752
+ new(transformed_hash)
1754
1753
  end
1755
1754
 
1756
1755
  # Deserializes the data based on type
1757
1756
  # @param string type Data type
1758
1757
  # @param string value Value to be deserialized
1759
1758
  # @return [Object] Deserialized data
1760
- def _deserialize(type, value)
1759
+ def self._deserialize(type, value)
1761
1760
  case type.to_sym
1762
1761
  when :Time
1763
1762
  Time.parse(value)
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 1.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -114,10 +114,14 @@ module SongtradrApiClientRuby
114
114
 
115
115
  if attributes.key?(:'songtradr_playlist_guid')
116
116
  self.songtradr_playlist_guid = attributes[:'songtradr_playlist_guid']
117
+ else
118
+ self.songtradr_playlist_guid = nil
117
119
  end
118
120
 
119
121
  if attributes.key?(:'name')
120
122
  self.name = attributes[:'name']
123
+ else
124
+ self.name = nil
121
125
  end
122
126
 
123
127
  if attributes.key?(:'description')
@@ -126,6 +130,8 @@ module SongtradrApiClientRuby
126
130
 
127
131
  if attributes.key?(:'state')
128
132
  self.state = attributes[:'state']
133
+ else
134
+ self.state = nil
129
135
  end
130
136
 
131
137
  if attributes.key?(:'asset_url')
@@ -144,6 +150,8 @@ module SongtradrApiClientRuby
144
150
  if (value = attributes[:'usages']).is_a?(Array)
145
151
  self.usages = value
146
152
  end
153
+ else
154
+ self.usages = nil
147
155
  end
148
156
 
149
157
  if attributes.key?(:'recordings')
@@ -156,6 +164,7 @@ module SongtradrApiClientRuby
156
164
  # Show invalid properties with the reasons. Usually used together with valid?
157
165
  # @return Array for valid properties with the reasons
158
166
  def list_invalid_properties
167
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
159
168
  invalid_properties = Array.new
160
169
  if @songtradr_playlist_guid.nil?
161
170
  invalid_properties.push('invalid value for "songtradr_playlist_guid", songtradr_playlist_guid cannot be nil.')
@@ -179,6 +188,7 @@ module SongtradrApiClientRuby
179
188
  # Check to see if the all the properties in the model are valid
180
189
  # @return true if the model is valid
181
190
  def valid?
191
+ warn '[DEPRECATED] the `valid?` method is obsolete'
182
192
  return false if @songtradr_playlist_guid.nil?
183
193
  return false if @name.nil?
184
194
  return false if @state.nil?
@@ -230,37 +240,30 @@ module SongtradrApiClientRuby
230
240
  # @param [Hash] attributes Model attributes in the form of hash
231
241
  # @return [Object] Returns the model itself
232
242
  def self.build_from_hash(attributes)
233
- new.build_from_hash(attributes)
234
- end
235
-
236
- # Builds the object from hash
237
- # @param [Hash] attributes Model attributes in the form of hash
238
- # @return [Object] Returns the model itself
239
- def build_from_hash(attributes)
240
243
  return nil unless attributes.is_a?(Hash)
241
244
  attributes = attributes.transform_keys(&:to_sym)
242
- self.class.openapi_types.each_pair do |key, type|
243
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
244
- self.send("#{key}=", nil)
245
+ transformed_hash = {}
246
+ openapi_types.each_pair do |key, type|
247
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
248
+ transformed_hash["#{key}"] = nil
245
249
  elsif type =~ /\AArray<(.*)>/i
246
250
  # check to ensure the input is an array given that the attribute
247
251
  # is documented as an array but the input is not
248
- if attributes[self.class.attribute_map[key]].is_a?(Array)
249
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
252
+ if attributes[attribute_map[key]].is_a?(Array)
253
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
250
254
  end
251
- elsif !attributes[self.class.attribute_map[key]].nil?
252
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
255
+ elsif !attributes[attribute_map[key]].nil?
256
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
253
257
  end
254
258
  end
255
-
256
- self
259
+ new(transformed_hash)
257
260
  end
258
261
 
259
262
  # Deserializes the data based on type
260
263
  # @param string type Data type
261
264
  # @param string value Value to be deserialized
262
265
  # @return [Object] Deserialized data
263
- def _deserialize(type, value)
266
+ def self._deserialize(type, value)
264
267
  case type.to_sym
265
268
  when :Time
266
269
  Time.parse(value)
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 1.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -68,6 +68,8 @@ module SongtradrApiClientRuby
68
68
 
69
69
  if attributes.key?(:'genre_name')
70
70
  self.genre_name = attributes[:'genre_name']
71
+ else
72
+ self.genre_name = nil
71
73
  end
72
74
 
73
75
  if attributes.key?(:'genre_type')
@@ -82,6 +84,7 @@ module SongtradrApiClientRuby
82
84
  # Show invalid properties with the reasons. Usually used together with valid?
83
85
  # @return Array for valid properties with the reasons
84
86
  def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
88
  invalid_properties = Array.new
86
89
  if @genre_name.nil?
87
90
  invalid_properties.push('invalid value for "genre_name", genre_name cannot be nil.')
@@ -93,6 +96,7 @@ module SongtradrApiClientRuby
93
96
  # Check to see if the all the properties in the model are valid
94
97
  # @return true if the model is valid
95
98
  def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
96
100
  return false if @genre_name.nil?
97
101
  true
98
102
  end
@@ -123,37 +127,30 @@ module SongtradrApiClientRuby
123
127
  # @param [Hash] attributes Model attributes in the form of hash
124
128
  # @return [Object] Returns the model itself
125
129
  def self.build_from_hash(attributes)
126
- new.build_from_hash(attributes)
127
- end
128
-
129
- # Builds the object from hash
130
- # @param [Hash] attributes Model attributes in the form of hash
131
- # @return [Object] Returns the model itself
132
- def build_from_hash(attributes)
133
130
  return nil unless attributes.is_a?(Hash)
134
131
  attributes = attributes.transform_keys(&:to_sym)
135
- self.class.openapi_types.each_pair do |key, type|
136
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
137
- self.send("#{key}=", nil)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
138
136
  elsif type =~ /\AArray<(.*)>/i
139
137
  # check to ensure the input is an array given that the attribute
140
138
  # is documented as an array but the input is not
141
- if attributes[self.class.attribute_map[key]].is_a?(Array)
142
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
141
  end
144
- elsif !attributes[self.class.attribute_map[key]].nil?
145
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
144
  end
147
145
  end
148
-
149
- self
146
+ new(transformed_hash)
150
147
  end
151
148
 
152
149
  # Deserializes the data based on type
153
150
  # @param string type Data type
154
151
  # @param string value Value to be deserialized
155
152
  # @return [Object] Deserialized data
156
- def _deserialize(type, value)
153
+ def self._deserialize(type, value)
157
154
  case type.to_sym
158
155
  when :Time
159
156
  Time.parse(value)
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 1.12.23
6
+ The version of the OpenAPI document: 1.12.24
7
7
  Contact: info@songtradr.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 7.0.0-SNAPSHOT
@@ -86,16 +86,21 @@ module SongtradrApiClientRuby
86
86
 
87
87
  if attributes.key?(:'full_name')
88
88
  self.full_name = attributes[:'full_name']
89
+ else
90
+ self.full_name = nil
89
91
  end
90
92
 
91
93
  if attributes.key?(:'contributor_type')
92
94
  self.contributor_type = attributes[:'contributor_type']
95
+ else
96
+ self.contributor_type = nil
93
97
  end
94
98
  end
95
99
 
96
100
  # Show invalid properties with the reasons. Usually used together with valid?
97
101
  # @return Array for valid properties with the reasons
98
102
  def list_invalid_properties
103
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
104
  invalid_properties = Array.new
100
105
  if @full_name.nil?
101
106
  invalid_properties.push('invalid value for "full_name", full_name cannot be nil.')
@@ -111,6 +116,7 @@ module SongtradrApiClientRuby
111
116
  # Check to see if the all the properties in the model are valid
112
117
  # @return true if the model is valid
113
118
  def valid?
119
+ warn '[DEPRECATED] the `valid?` method is obsolete'
114
120
  return false if @full_name.nil?
115
121
  return false if @contributor_type.nil?
116
122
  contributor_type_validator = EnumAttributeValidator.new('String', ["trackArtist", "composer", "author"])
@@ -153,37 +159,30 @@ module SongtradrApiClientRuby
153
159
  # @param [Hash] attributes Model attributes in the form of hash
154
160
  # @return [Object] Returns the model itself
155
161
  def self.build_from_hash(attributes)
156
- new.build_from_hash(attributes)
157
- end
158
-
159
- # Builds the object from hash
160
- # @param [Hash] attributes Model attributes in the form of hash
161
- # @return [Object] Returns the model itself
162
- def build_from_hash(attributes)
163
162
  return nil unless attributes.is_a?(Hash)
164
163
  attributes = attributes.transform_keys(&:to_sym)
165
- self.class.openapi_types.each_pair do |key, type|
166
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
167
- self.send("#{key}=", nil)
164
+ transformed_hash = {}
165
+ openapi_types.each_pair do |key, type|
166
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = nil
168
168
  elsif type =~ /\AArray<(.*)>/i
169
169
  # check to ensure the input is an array given that the attribute
170
170
  # is documented as an array but the input is not
171
- if attributes[self.class.attribute_map[key]].is_a?(Array)
172
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ if attributes[attribute_map[key]].is_a?(Array)
172
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
173
173
  end
174
- elsif !attributes[self.class.attribute_map[key]].nil?
175
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ elsif !attributes[attribute_map[key]].nil?
175
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
176
176
  end
177
177
  end
178
-
179
- self
178
+ new(transformed_hash)
180
179
  end
181
180
 
182
181
  # Deserializes the data based on type
183
182
  # @param string type Data type
184
183
  # @param string value Value to be deserialized
185
184
  # @return [Object] Deserialized data
186
- def _deserialize(type, value)
185
+ def self._deserialize(type, value)
187
186
  case type.to_sym
188
187
  when :Time
189
188
  Time.parse(value)