shotstack 0.2.2 → 0.2.6

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 (121) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/Rakefile +10 -0
  4. data/lib/shotstack/api/create_api.rb +158 -0
  5. data/lib/shotstack/api/edit_api.rb +20 -20
  6. data/lib/shotstack/api/ingest_api.rb +338 -0
  7. data/lib/shotstack/api/serve_api.rb +76 -8
  8. data/lib/shotstack/api_client.rb +28 -24
  9. data/lib/shotstack/api_error.rb +3 -2
  10. data/lib/shotstack/configuration.rb +55 -9
  11. data/lib/shotstack/models/asset.rb +3 -3
  12. data/lib/shotstack/models/asset_render_response.rb +18 -20
  13. data/lib/shotstack/models/asset_response.rb +18 -20
  14. data/lib/shotstack/models/asset_response_attributes.rb +23 -21
  15. data/lib/shotstack/models/asset_response_data.rb +20 -20
  16. data/lib/shotstack/models/audio_asset.rb +57 -21
  17. data/lib/shotstack/models/audio_enhancement.rb +43 -0
  18. data/lib/shotstack/models/clip.rb +27 -25
  19. data/lib/shotstack/models/crop.rb +40 -28
  20. data/lib/shotstack/models/destinations.rb +78 -243
  21. data/lib/shotstack/models/did_generated_asset.rb +273 -0
  22. data/lib/shotstack/models/did_generated_asset_options.rb +54 -0
  23. data/lib/shotstack/models/did_text_to_avatar_options.rb +313 -0
  24. data/lib/shotstack/models/dolby_enhancement.rb +239 -0
  25. data/lib/shotstack/models/dolby_enhancement_options.rb +257 -0
  26. data/lib/shotstack/models/edit.rb +22 -22
  27. data/lib/shotstack/models/eleven_labs_generated_asset.rb +273 -0
  28. data/lib/shotstack/models/eleven_labs_generated_asset_options.rb +54 -0
  29. data/lib/shotstack/models/eleven_labs_text_to_speech_options.rb +303 -0
  30. data/lib/shotstack/models/enhancements.rb +215 -0
  31. data/lib/shotstack/models/flip_transformation.rb +16 -20
  32. data/lib/shotstack/models/font.rb +18 -20
  33. data/lib/shotstack/models/generated_asset.rb +48 -0
  34. data/lib/shotstack/models/generated_asset_error_response.rb +225 -0
  35. data/lib/shotstack/models/generated_asset_error_response_data.rb +257 -0
  36. data/lib/shotstack/models/generated_asset_response.rb +222 -0
  37. data/lib/shotstack/models/generated_asset_response_attributes.rb +376 -0
  38. data/lib/shotstack/models/generated_asset_response_data.rb +256 -0
  39. data/lib/shotstack/models/google_cloud_storage_destination.rb +232 -0
  40. data/lib/shotstack/models/google_cloud_storage_destination_options.rb +243 -0
  41. data/lib/shotstack/models/google_drive_destination.rb +239 -0
  42. data/lib/shotstack/models/google_drive_destination_options.rb +233 -0
  43. data/lib/shotstack/models/hey_gen_generated_asset.rb +273 -0
  44. data/lib/shotstack/models/hey_gen_generated_asset_options.rb +54 -0
  45. data/lib/shotstack/models/hey_gen_text_to_avatar_options.rb +396 -0
  46. data/lib/shotstack/models/html_asset.rb +20 -22
  47. data/lib/shotstack/models/image_asset.rb +18 -20
  48. data/lib/shotstack/models/ingest_error_response.rb +225 -0
  49. data/lib/shotstack/models/ingest_error_response_data.rb +257 -0
  50. data/lib/shotstack/models/luma_asset.rb +18 -20
  51. data/lib/shotstack/models/merge_field.rb +20 -20
  52. data/lib/shotstack/models/mux_destination.rb +18 -22
  53. data/lib/shotstack/models/mux_destination_options.rb +50 -25
  54. data/lib/shotstack/models/offset.rb +28 -24
  55. data/lib/shotstack/models/open_ai_generated_asset.rb +273 -0
  56. data/lib/shotstack/models/open_ai_generated_asset_options.rb +54 -0
  57. data/lib/shotstack/models/open_ai_text_generator_options.rb +313 -0
  58. data/lib/shotstack/models/output.rb +27 -29
  59. data/lib/shotstack/models/outputs.rb +227 -0
  60. data/lib/shotstack/models/outputs_response.rb +218 -0
  61. data/lib/shotstack/models/poster.rb +18 -20
  62. data/lib/shotstack/models/probe_response.rb +22 -20
  63. data/lib/shotstack/models/queued_response.rb +22 -20
  64. data/lib/shotstack/models/queued_response_data.rb +20 -20
  65. data/lib/shotstack/models/queued_source_response.rb +222 -0
  66. data/lib/shotstack/models/queued_source_response_data.rb +240 -0
  67. data/lib/shotstack/models/range.rb +26 -22
  68. data/lib/shotstack/models/render_response.rb +22 -20
  69. data/lib/shotstack/models/render_response_data.rb +22 -20
  70. data/lib/shotstack/models/rendition.rb +429 -0
  71. data/lib/shotstack/models/rendition_response_attributes.rb +336 -0
  72. data/lib/shotstack/models/rotate_transformation.rb +16 -20
  73. data/lib/shotstack/models/s3_destination.rb +18 -22
  74. data/lib/shotstack/models/s3_destination_options.rb +21 -21
  75. data/lib/shotstack/models/shotstack_destination.rb +19 -23
  76. data/lib/shotstack/models/shotstack_generated_asset.rb +273 -0
  77. data/lib/shotstack/models/shotstack_generated_asset_options.rb +60 -0
  78. data/lib/shotstack/models/shotstack_image_to_video_options.rb +298 -0
  79. data/lib/shotstack/models/shotstack_text_generator_options.rb +274 -0
  80. data/lib/shotstack/models/shotstack_text_to_image_options.rb +308 -0
  81. data/lib/shotstack/models/shotstack_text_to_speech_options.rb +339 -0
  82. data/lib/shotstack/models/size.rb +36 -32
  83. data/lib/shotstack/models/skew_transformation.rb +16 -20
  84. data/lib/shotstack/models/soundtrack.rb +18 -20
  85. data/lib/shotstack/models/source.rb +244 -0
  86. data/lib/shotstack/models/source_list_response.rb +225 -0
  87. data/lib/shotstack/models/source_response.rb +222 -0
  88. data/lib/shotstack/models/source_response_attributes.rb +373 -0
  89. data/lib/shotstack/models/source_response_data.rb +256 -0
  90. data/lib/shotstack/models/speed.rb +254 -0
  91. data/lib/shotstack/models/stability_ai_generated_asset.rb +273 -0
  92. data/lib/shotstack/models/stability_ai_generated_asset_options.rb +54 -0
  93. data/lib/shotstack/models/stability_ai_text_to_image_options.rb +390 -0
  94. data/lib/shotstack/models/template.rb +18 -20
  95. data/lib/shotstack/models/template_data_response.rb +23 -21
  96. data/lib/shotstack/models/template_data_response_data.rb +24 -20
  97. data/lib/shotstack/models/template_list_response.rb +24 -22
  98. data/lib/shotstack/models/template_list_response_data.rb +20 -20
  99. data/lib/shotstack/models/template_list_response_item.rb +20 -20
  100. data/lib/shotstack/models/template_render.rb +18 -20
  101. data/lib/shotstack/models/template_response.rb +22 -20
  102. data/lib/shotstack/models/template_response_data.rb +20 -20
  103. data/lib/shotstack/models/thumbnail.rb +20 -20
  104. data/lib/shotstack/models/timeline.rb +19 -21
  105. data/lib/shotstack/models/title_asset.rb +18 -20
  106. data/lib/shotstack/models/track.rb +18 -20
  107. data/lib/shotstack/models/transcription.rb +250 -0
  108. data/lib/shotstack/models/transfer.rb +259 -0
  109. data/lib/shotstack/models/transfer_response.rb +222 -0
  110. data/lib/shotstack/models/transfer_response_attributes.rb +280 -0
  111. data/lib/shotstack/models/transfer_response_data.rb +225 -0
  112. data/lib/shotstack/models/transformation.rb +16 -20
  113. data/lib/shotstack/models/transition.rb +16 -20
  114. data/lib/shotstack/models/upload_response.rb +222 -0
  115. data/lib/shotstack/models/upload_response_attributes.rb +257 -0
  116. data/lib/shotstack/models/upload_response_data.rb +256 -0
  117. data/lib/shotstack/models/video_asset.rb +57 -21
  118. data/lib/shotstack/version.rb +3 -3
  119. data/lib/shotstack.rb +61 -2
  120. data/shotstack.gemspec +8 -8
  121. metadata +69 -16
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ # Official Ruby SDK for the Shotstack Cloud Video Editing API
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -76,6 +76,7 @@ module Shotstack
76
76
  # Show invalid properties with the reasons. Usually used together with valid?
77
77
  # @return Array for valid properties with the reasons
78
78
  def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
80
  invalid_properties = Array.new
80
81
  if !@start.nil? && @start < 0
81
82
  invalid_properties.push('invalid value for "start", must be greater than or equal to 0.')
@@ -91,6 +92,7 @@ module Shotstack
91
92
  # Check to see if the all the properties in the model are valid
92
93
  # @return true if the model is valid
93
94
  def valid?
95
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
96
  return false if !@start.nil? && @start < 0
95
97
  return false if !@length.nil? && @length < 0
96
98
  true
@@ -99,7 +101,11 @@ module Shotstack
99
101
  # Custom attribute writer method with validation
100
102
  # @param [Object] start Value to be assigned
101
103
  def start=(start)
102
- if !start.nil? && start < 0
104
+ if start.nil?
105
+ fail ArgumentError, 'start cannot be nil'
106
+ end
107
+
108
+ if start < 0
103
109
  fail ArgumentError, 'invalid value for "start", must be greater than or equal to 0.'
104
110
  end
105
111
 
@@ -109,7 +115,11 @@ module Shotstack
109
115
  # Custom attribute writer method with validation
110
116
  # @param [Object] length Value to be assigned
111
117
  def length=(length)
112
- if !length.nil? && length < 0
118
+ if length.nil?
119
+ fail ArgumentError, 'length cannot be nil'
120
+ end
121
+
122
+ if length < 0
113
123
  fail ArgumentError, 'invalid value for "length", must be greater than or equal to 0.'
114
124
  end
115
125
 
@@ -141,36 +151,30 @@ module Shotstack
141
151
  # @param [Hash] attributes Model attributes in the form of hash
142
152
  # @return [Object] Returns the model itself
143
153
  def self.build_from_hash(attributes)
144
- new.build_from_hash(attributes)
145
- end
146
-
147
- # Builds the object from hash
148
- # @param [Hash] attributes Model attributes in the form of hash
149
- # @return [Object] Returns the model itself
150
- def build_from_hash(attributes)
151
154
  return nil unless attributes.is_a?(Hash)
152
- self.class.openapi_types.each_pair do |key, type|
153
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
- self.send("#{key}=", nil)
155
+ attributes = attributes.transform_keys(&:to_sym)
156
+ transformed_hash = {}
157
+ openapi_types.each_pair do |key, type|
158
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = nil
155
160
  elsif type =~ /\AArray<(.*)>/i
156
161
  # check to ensure the input is an array given that the attribute
157
162
  # is documented as an array but the input is not
158
- if attributes[self.class.attribute_map[key]].is_a?(Array)
159
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ if attributes[attribute_map[key]].is_a?(Array)
164
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
160
165
  end
161
- elsif !attributes[self.class.attribute_map[key]].nil?
162
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ elsif !attributes[attribute_map[key]].nil?
167
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
163
168
  end
164
169
  end
165
-
166
- self
170
+ new(transformed_hash)
167
171
  end
168
172
 
169
173
  # Deserializes the data based on type
170
174
  # @param string type Data type
171
175
  # @param string value Value to be deserialized
172
176
  # @return [Object] Deserialized data
173
- def _deserialize(type, value)
177
+ def self._deserialize(type, value)
174
178
  case type.to_sym
175
179
  when :Time
176
180
  Time.parse(value)
@@ -205,7 +209,7 @@ module Shotstack
205
209
  else # model
206
210
  # models (e.g. Pet) or oneOf
207
211
  klass = Shotstack.const_get(type)
208
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
213
  end
210
214
  end
211
215
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ # Official Ruby SDK for the Shotstack Cloud Video Editing API
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -70,20 +70,27 @@ module Shotstack
70
70
 
71
71
  if attributes.key?(:'success')
72
72
  self.success = attributes[:'success']
73
+ else
74
+ self.success = nil
73
75
  end
74
76
 
75
77
  if attributes.key?(:'message')
76
78
  self.message = attributes[:'message']
79
+ else
80
+ self.message = nil
77
81
  end
78
82
 
79
83
  if attributes.key?(:'response')
80
84
  self.response = attributes[:'response']
85
+ else
86
+ self.response = nil
81
87
  end
82
88
  end
83
89
 
84
90
  # Show invalid properties with the reasons. Usually used together with valid?
85
91
  # @return Array for valid properties with the reasons
86
92
  def list_invalid_properties
93
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
94
  invalid_properties = Array.new
88
95
  if @success.nil?
89
96
  invalid_properties.push('invalid value for "success", success cannot be nil.')
@@ -103,6 +110,7 @@ module Shotstack
103
110
  # Check to see if the all the properties in the model are valid
104
111
  # @return true if the model is valid
105
112
  def valid?
113
+ warn '[DEPRECATED] the `valid?` method is obsolete'
106
114
  return false if @success.nil?
107
115
  return false if @message.nil?
108
116
  return false if @response.nil?
@@ -135,36 +143,30 @@ module Shotstack
135
143
  # @param [Hash] attributes Model attributes in the form of hash
136
144
  # @return [Object] Returns the model itself
137
145
  def self.build_from_hash(attributes)
138
- new.build_from_hash(attributes)
139
- end
140
-
141
- # Builds the object from hash
142
- # @param [Hash] attributes Model attributes in the form of hash
143
- # @return [Object] Returns the model itself
144
- def build_from_hash(attributes)
145
146
  return nil unless attributes.is_a?(Hash)
146
- self.class.openapi_types.each_pair do |key, type|
147
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
- self.send("#{key}=", nil)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
149
152
  elsif type =~ /\AArray<(.*)>/i
150
153
  # check to ensure the input is an array given that the attribute
151
154
  # is documented as an array but the input is not
152
- if attributes[self.class.attribute_map[key]].is_a?(Array)
153
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
154
157
  end
155
- elsif !attributes[self.class.attribute_map[key]].nil?
156
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
157
160
  end
158
161
  end
159
-
160
- self
162
+ new(transformed_hash)
161
163
  end
162
164
 
163
165
  # Deserializes the data based on type
164
166
  # @param string type Data type
165
167
  # @param string value Value to be deserialized
166
168
  # @return [Object] Deserialized data
167
- def _deserialize(type, value)
169
+ def self._deserialize(type, value)
168
170
  case type.to_sym
169
171
  when :Time
170
172
  Time.parse(value)
@@ -199,7 +201,7 @@ module Shotstack
199
201
  else # model
200
202
  # models (e.g. Pet) or oneOf
201
203
  klass = Shotstack.const_get(type)
202
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
205
  end
204
206
  end
205
207
 
@@ -1,12 +1,12 @@
1
1
  =begin
2
2
  #Shotstack
3
3
 
4
- #Shotstack is a video, image and audio editing service that allows for the automated generation of videos, images and audio using JSON and a RESTful API. You arrange and configure an edit and POST it to the API which will render your media and provide a file location when complete. For more details visit [shotstack.io](https://shotstack.io) or checkout our [getting started](https://shotstack.io/docs/guide/) documentation. There are two main API's, one for editing and generating assets (Edit API) and one for managing hosted assets (Serve API). The Edit API base URL is: <b>https://api.shotstack.io/{version}</b> The Serve API base URL is: <b>https://api.shotstack.io/serve/{version}</b>
4
+ # Official Ruby SDK for the Shotstack Cloud Video Editing API
5
5
 
6
6
  The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ Generator version: 7.4.0
10
10
 
11
11
  =end
12
12
 
@@ -144,10 +144,14 @@ module Shotstack
144
144
 
145
145
  if attributes.key?(:'id')
146
146
  self.id = attributes[:'id']
147
+ else
148
+ self.id = nil
147
149
  end
148
150
 
149
151
  if attributes.key?(:'owner')
150
152
  self.owner = attributes[:'owner']
153
+ else
154
+ self.owner = nil
151
155
  end
152
156
 
153
157
  if attributes.key?(:'plan')
@@ -156,6 +160,8 @@ module Shotstack
156
160
 
157
161
  if attributes.key?(:'status')
158
162
  self.status = attributes[:'status']
163
+ else
164
+ self.status = nil
159
165
  end
160
166
 
161
167
  if attributes.key?(:'error')
@@ -198,6 +204,7 @@ module Shotstack
198
204
  # Show invalid properties with the reasons. Usually used together with valid?
199
205
  # @return Array for valid properties with the reasons
200
206
  def list_invalid_properties
207
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
201
208
  invalid_properties = Array.new
202
209
  if @id.nil?
203
210
  invalid_properties.push('invalid value for "id", id cannot be nil.')
@@ -217,6 +224,7 @@ module Shotstack
217
224
  # Check to see if the all the properties in the model are valid
218
225
  # @return true if the model is valid
219
226
  def valid?
227
+ warn '[DEPRECATED] the `valid?` method is obsolete'
220
228
  return false if @id.nil?
221
229
  return false if @owner.nil?
222
230
  return false if @status.nil?
@@ -271,36 +279,30 @@ module Shotstack
271
279
  # @param [Hash] attributes Model attributes in the form of hash
272
280
  # @return [Object] Returns the model itself
273
281
  def self.build_from_hash(attributes)
274
- new.build_from_hash(attributes)
275
- end
276
-
277
- # Builds the object from hash
278
- # @param [Hash] attributes Model attributes in the form of hash
279
- # @return [Object] Returns the model itself
280
- def build_from_hash(attributes)
281
282
  return nil unless attributes.is_a?(Hash)
282
- self.class.openapi_types.each_pair do |key, type|
283
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
284
- self.send("#{key}=", nil)
283
+ attributes = attributes.transform_keys(&:to_sym)
284
+ transformed_hash = {}
285
+ openapi_types.each_pair do |key, type|
286
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
287
+ transformed_hash["#{key}"] = nil
285
288
  elsif type =~ /\AArray<(.*)>/i
286
289
  # check to ensure the input is an array given that the attribute
287
290
  # is documented as an array but the input is not
288
- if attributes[self.class.attribute_map[key]].is_a?(Array)
289
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
291
+ if attributes[attribute_map[key]].is_a?(Array)
292
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
290
293
  end
291
- elsif !attributes[self.class.attribute_map[key]].nil?
292
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
294
+ elsif !attributes[attribute_map[key]].nil?
295
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
293
296
  end
294
297
  end
295
-
296
- self
298
+ new(transformed_hash)
297
299
  end
298
300
 
299
301
  # Deserializes the data based on type
300
302
  # @param string type Data type
301
303
  # @param string value Value to be deserialized
302
304
  # @return [Object] Deserialized data
303
- def _deserialize(type, value)
305
+ def self._deserialize(type, value)
304
306
  case type.to_sym
305
307
  when :Time
306
308
  Time.parse(value)
@@ -335,7 +337,7 @@ module Shotstack
335
337
  else # model
336
338
  # models (e.g. Pet) or oneOf
337
339
  klass = Shotstack.const_get(type)
338
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
340
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
339
341
  end
340
342
  end
341
343