songtradr_api_client_ruby 1.12.23 → 1.12.24

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -60,12 +60,15 @@ module SongtradrApiClientRuby
60
60
 
61
61
  if attributes.key?(:'category_name')
62
62
  self.category_name = attributes[:'category_name']
63
+ else
64
+ self.category_name = 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 @category_name.nil?
71
74
  invalid_properties.push('invalid value for "category_name", category_name 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 @category_name.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
@@ -88,16 +88,21 @@ module SongtradrApiClientRuby
88
88
 
89
89
  if attributes.key?(:'accessor_id')
90
90
  self.accessor_id = attributes[:'accessor_id']
91
+ else
92
+ self.accessor_id = nil
91
93
  end
92
94
 
93
95
  if attributes.key?(:'rights')
94
96
  self.rights = attributes[:'rights']
97
+ else
98
+ self.rights = nil
95
99
  end
96
100
  end
97
101
 
98
102
  # Show invalid properties with the reasons. Usually used together with valid?
99
103
  # @return Array for valid properties with the reasons
100
104
  def list_invalid_properties
105
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
106
  invalid_properties = Array.new
102
107
  if @accessor_id.nil?
103
108
  invalid_properties.push('invalid value for "accessor_id", accessor_id cannot be nil.')
@@ -113,6 +118,7 @@ module SongtradrApiClientRuby
113
118
  # Check to see if the all the properties in the model are valid
114
119
  # @return true if the model is valid
115
120
  def valid?
121
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
122
  return false if @accessor_id.nil?
117
123
  accessor_id_validator = EnumAttributeValidator.new('String', ["full", "readOnly"])
118
124
  return false unless accessor_id_validator.valid?(@accessor_id)
@@ -167,37 +173,30 @@ module SongtradrApiClientRuby
167
173
  # @param [Hash] attributes Model attributes in the form of hash
168
174
  # @return [Object] Returns the model itself
169
175
  def self.build_from_hash(attributes)
170
- new.build_from_hash(attributes)
171
- end
172
-
173
- # Builds the object from hash
174
- # @param [Hash] attributes Model attributes in the form of hash
175
- # @return [Object] Returns the model itself
176
- def build_from_hash(attributes)
177
176
  return nil unless attributes.is_a?(Hash)
178
177
  attributes = attributes.transform_keys(&:to_sym)
179
- self.class.openapi_types.each_pair do |key, type|
180
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
181
- self.send("#{key}=", nil)
178
+ transformed_hash = {}
179
+ openapi_types.each_pair do |key, type|
180
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = nil
182
182
  elsif type =~ /\AArray<(.*)>/i
183
183
  # check to ensure the input is an array given that the attribute
184
184
  # is documented as an array but the input is not
185
- if attributes[self.class.attribute_map[key]].is_a?(Array)
186
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ if attributes[attribute_map[key]].is_a?(Array)
186
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
187
187
  end
188
- elsif !attributes[self.class.attribute_map[key]].nil?
189
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ elsif !attributes[attribute_map[key]].nil?
189
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
190
190
  end
191
191
  end
192
-
193
- self
192
+ new(transformed_hash)
194
193
  end
195
194
 
196
195
  # Deserializes the data based on type
197
196
  # @param string type Data type
198
197
  # @param string value Value to be deserialized
199
198
  # @return [Object] Deserialized data
200
- def _deserialize(type, value)
199
+ def self._deserialize(type, value)
201
200
  case type.to_sym
202
201
  when :Time
203
202
  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
@@ -64,16 +64,21 @@ module SongtradrApiClientRuby
64
64
 
65
65
  if attributes.key?(:'identifier_type')
66
66
  self.identifier_type = attributes[:'identifier_type']
67
+ else
68
+ self.identifier_type = nil
67
69
  end
68
70
 
69
71
  if attributes.key?(:'identifier_value')
70
72
  self.identifier_value = attributes[:'identifier_value']
73
+ else
74
+ self.identifier_value = nil
71
75
  end
72
76
  end
73
77
 
74
78
  # Show invalid properties with the reasons. Usually used together with valid?
75
79
  # @return Array for valid properties with the reasons
76
80
  def list_invalid_properties
81
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
82
  invalid_properties = Array.new
78
83
  if @identifier_type.nil?
79
84
  invalid_properties.push('invalid value for "identifier_type", identifier_type cannot be nil.')
@@ -89,6 +94,7 @@ module SongtradrApiClientRuby
89
94
  # Check to see if the all the properties in the model are valid
90
95
  # @return true if the model is valid
91
96
  def valid?
97
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
98
  return false if @identifier_type.nil?
93
99
  return false if @identifier_value.nil?
94
100
  true
@@ -119,37 +125,30 @@ module SongtradrApiClientRuby
119
125
  # @param [Hash] attributes Model attributes in the form of hash
120
126
  # @return [Object] Returns the model itself
121
127
  def self.build_from_hash(attributes)
122
- new.build_from_hash(attributes)
123
- end
124
-
125
- # Builds the object from hash
126
- # @param [Hash] attributes Model attributes in the form of hash
127
- # @return [Object] Returns the model itself
128
- def build_from_hash(attributes)
129
128
  return nil unless attributes.is_a?(Hash)
130
129
  attributes = attributes.transform_keys(&:to_sym)
131
- self.class.openapi_types.each_pair do |key, type|
132
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
133
- self.send("#{key}=", nil)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
134
  elsif type =~ /\AArray<(.*)>/i
135
135
  # check to ensure the input is an array given that the attribute
136
136
  # is documented as an array but the input is not
137
- if attributes[self.class.attribute_map[key]].is_a?(Array)
138
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
139
  end
140
- elsif !attributes[self.class.attribute_map[key]].nil?
141
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
142
  end
143
143
  end
144
-
145
- self
144
+ new(transformed_hash)
146
145
  end
147
146
 
148
147
  # Deserializes the data based on type
149
148
  # @param string type Data type
150
149
  # @param string value Value to be deserialized
151
150
  # @return [Object] Deserialized data
152
- def _deserialize(type, value)
151
+ def self._deserialize(type, value)
153
152
  case type.to_sym
154
153
  when :Time
155
154
  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?(:'type_name')
62
62
  self.type_name = attributes[:'type_name']
63
+ else
64
+ self.type_name = 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 @type_name.nil?
71
74
  invalid_properties.push('invalid value for "type_name", type_name 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 @type_name.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
@@ -65,6 +65,7 @@ module SongtradrApiClientRuby
65
65
  # Show invalid properties with the reasons. Usually used together with valid?
66
66
  # @return Array for valid properties with the reasons
67
67
  def list_invalid_properties
68
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
68
69
  invalid_properties = Array.new
69
70
  invalid_properties
70
71
  end
@@ -72,6 +73,7 @@ module SongtradrApiClientRuby
72
73
  # Check to see if the all the properties in the model are valid
73
74
  # @return true if the model is valid
74
75
  def valid?
76
+ warn '[DEPRECATED] the `valid?` method is obsolete'
75
77
  true
76
78
  end
77
79
 
@@ -99,37 +101,30 @@ module SongtradrApiClientRuby
99
101
  # @param [Hash] attributes Model attributes in the form of hash
100
102
  # @return [Object] Returns the model itself
101
103
  def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
103
- end
104
-
105
- # Builds the object from hash
106
- # @param [Hash] attributes Model attributes in the form of hash
107
- # @return [Object] Returns the model itself
108
- def build_from_hash(attributes)
109
104
  return nil unless attributes.is_a?(Hash)
110
105
  attributes = attributes.transform_keys(&:to_sym)
111
- self.class.openapi_types.each_pair do |key, type|
112
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
- self.send("#{key}=", nil)
106
+ transformed_hash = {}
107
+ openapi_types.each_pair do |key, type|
108
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
109
+ transformed_hash["#{key}"] = nil
114
110
  elsif type =~ /\AArray<(.*)>/i
115
111
  # check to ensure the input is an array given that the attribute
116
112
  # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
113
+ if attributes[attribute_map[key]].is_a?(Array)
114
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
119
115
  end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ elsif !attributes[attribute_map[key]].nil?
117
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
122
118
  end
123
119
  end
124
-
125
- self
120
+ new(transformed_hash)
126
121
  end
127
122
 
128
123
  # Deserializes the data based on type
129
124
  # @param string type Data type
130
125
  # @param string value Value to be deserialized
131
126
  # @return [Object] Deserialized data
132
- def _deserialize(type, value)
127
+ def self._deserialize(type, value)
133
128
  case type.to_sym
134
129
  when :Time
135
130
  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
@@ -81,14 +81,20 @@ module SongtradrApiClientRuby
81
81
 
82
82
  if attributes.key?(:'timestamp')
83
83
  self.timestamp = attributes[:'timestamp']
84
+ else
85
+ self.timestamp = nil
84
86
  end
85
87
 
86
88
  if attributes.key?(:'status')
87
89
  self.status = attributes[:'status']
90
+ else
91
+ self.status = nil
88
92
  end
89
93
 
90
94
  if attributes.key?(:'error')
91
95
  self.error = attributes[:'error']
96
+ else
97
+ self.error = nil
92
98
  end
93
99
 
94
100
  if attributes.key?(:'message')
@@ -103,6 +109,7 @@ module SongtradrApiClientRuby
103
109
  # Show invalid properties with the reasons. Usually used together with valid?
104
110
  # @return Array for valid properties with the reasons
105
111
  def list_invalid_properties
112
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
106
113
  invalid_properties = Array.new
107
114
  if @timestamp.nil?
108
115
  invalid_properties.push('invalid value for "timestamp", timestamp cannot be nil.')
@@ -122,6 +129,7 @@ module SongtradrApiClientRuby
122
129
  # Check to see if the all the properties in the model are valid
123
130
  # @return true if the model is valid
124
131
  def valid?
132
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
133
  return false if @timestamp.nil?
126
134
  return false if @status.nil?
127
135
  return false if @error.nil?
@@ -156,37 +164,30 @@ module SongtradrApiClientRuby
156
164
  # @param [Hash] attributes Model attributes in the form of hash
157
165
  # @return [Object] Returns the model itself
158
166
  def self.build_from_hash(attributes)
159
- new.build_from_hash(attributes)
160
- end
161
-
162
- # Builds the object from hash
163
- # @param [Hash] attributes Model attributes in the form of hash
164
- # @return [Object] Returns the model itself
165
- def build_from_hash(attributes)
166
167
  return nil unless attributes.is_a?(Hash)
167
168
  attributes = attributes.transform_keys(&:to_sym)
168
- self.class.openapi_types.each_pair do |key, type|
169
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
170
- self.send("#{key}=", nil)
169
+ transformed_hash = {}
170
+ openapi_types.each_pair do |key, type|
171
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
172
+ transformed_hash["#{key}"] = nil
171
173
  elsif type =~ /\AArray<(.*)>/i
172
174
  # check to ensure the input is an array given that the attribute
173
175
  # is documented as an array but the input is not
174
- if attributes[self.class.attribute_map[key]].is_a?(Array)
175
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
176
+ if attributes[attribute_map[key]].is_a?(Array)
177
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
176
178
  end
177
- elsif !attributes[self.class.attribute_map[key]].nil?
178
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
179
+ elsif !attributes[attribute_map[key]].nil?
180
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
179
181
  end
180
182
  end
181
-
182
- self
183
+ new(transformed_hash)
183
184
  end
184
185
 
185
186
  # Deserializes the data based on type
186
187
  # @param string type Data type
187
188
  # @param string value Value to be deserialized
188
189
  # @return [Object] Deserialized data
189
- def _deserialize(type, value)
190
+ def self._deserialize(type, value)
190
191
  case type.to_sym
191
192
  when :Time
192
193
  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,20 +68,27 @@ module SongtradrApiClientRuby
68
68
 
69
69
  if attributes.key?(:'field_value')
70
70
  self.field_value = attributes[:'field_value']
71
+ else
72
+ self.field_value = nil
71
73
  end
72
74
 
73
75
  if attributes.key?(:'total')
74
76
  self.total = attributes[:'total']
77
+ else
78
+ self.total = nil
75
79
  end
76
80
 
77
81
  if attributes.key?(:'field_name')
78
82
  self.field_name = attributes[:'field_name']
83
+ else
84
+ self.field_name = nil
79
85
  end
80
86
  end
81
87
 
82
88
  # Show invalid properties with the reasons. Usually used together with valid?
83
89
  # @return Array for valid properties with the reasons
84
90
  def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
92
  invalid_properties = Array.new
86
93
  if @field_value.nil?
87
94
  invalid_properties.push('invalid value for "field_value", field_value cannot be nil.')
@@ -101,6 +108,7 @@ module SongtradrApiClientRuby
101
108
  # Check to see if the all the properties in the model are valid
102
109
  # @return true if the model is valid
103
110
  def valid?
111
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
112
  return false if @field_value.nil?
105
113
  return false if @total.nil?
106
114
  return false if @field_name.nil?
@@ -133,37 +141,30 @@ module SongtradrApiClientRuby
133
141
  # @param [Hash] attributes Model attributes in the form of hash
134
142
  # @return [Object] Returns the model itself
135
143
  def self.build_from_hash(attributes)
136
- new.build_from_hash(attributes)
137
- end
138
-
139
- # Builds the object from hash
140
- # @param [Hash] attributes Model attributes in the form of hash
141
- # @return [Object] Returns the model itself
142
- def build_from_hash(attributes)
143
144
  return nil unless attributes.is_a?(Hash)
144
145
  attributes = attributes.transform_keys(&:to_sym)
145
- self.class.openapi_types.each_pair do |key, type|
146
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
147
- self.send("#{key}=", nil)
146
+ transformed_hash = {}
147
+ openapi_types.each_pair do |key, type|
148
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
149
+ transformed_hash["#{key}"] = nil
148
150
  elsif type =~ /\AArray<(.*)>/i
149
151
  # check to ensure the input is an array given that the attribute
150
152
  # is documented as an array but the input is not
151
- if attributes[self.class.attribute_map[key]].is_a?(Array)
152
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
153
+ if attributes[attribute_map[key]].is_a?(Array)
154
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
153
155
  end
154
- elsif !attributes[self.class.attribute_map[key]].nil?
155
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
156
+ elsif !attributes[attribute_map[key]].nil?
157
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
156
158
  end
157
159
  end
158
-
159
- self
160
+ new(transformed_hash)
160
161
  end
161
162
 
162
163
  # Deserializes the data based on type
163
164
  # @param string type Data type
164
165
  # @param string value Value to be deserialized
165
166
  # @return [Object] Deserialized data
166
- def _deserialize(type, value)
167
+ def self._deserialize(type, value)
167
168
  case type.to_sym
168
169
  when :Time
169
170
  Time.parse(value)