shotstack 0.2.1 → 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 (122) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -0
  3. data/README.md +387 -23
  4. data/Rakefile +10 -0
  5. data/lib/shotstack/api/create_api.rb +158 -0
  6. data/lib/shotstack/api/edit_api.rb +20 -20
  7. data/lib/shotstack/api/ingest_api.rb +338 -0
  8. data/lib/shotstack/api/serve_api.rb +76 -8
  9. data/lib/shotstack/api_client.rb +28 -24
  10. data/lib/shotstack/api_error.rb +3 -2
  11. data/lib/shotstack/configuration.rb +55 -9
  12. data/lib/shotstack/models/asset.rb +4 -4
  13. data/lib/shotstack/models/asset_render_response.rb +23 -20
  14. data/lib/shotstack/models/asset_response.rb +23 -20
  15. data/lib/shotstack/models/asset_response_attributes.rb +38 -21
  16. data/lib/shotstack/models/asset_response_data.rb +30 -20
  17. data/lib/shotstack/models/audio_asset.rb +57 -23
  18. data/lib/shotstack/models/audio_enhancement.rb +43 -0
  19. data/lib/shotstack/models/clip.rb +29 -33
  20. data/lib/shotstack/models/crop.rb +40 -28
  21. data/lib/shotstack/models/destinations.rb +78 -244
  22. data/lib/shotstack/models/did_generated_asset.rb +273 -0
  23. data/lib/shotstack/models/did_generated_asset_options.rb +54 -0
  24. data/lib/shotstack/models/did_text_to_avatar_options.rb +313 -0
  25. data/lib/shotstack/models/dolby_enhancement.rb +239 -0
  26. data/lib/shotstack/models/dolby_enhancement_options.rb +257 -0
  27. data/lib/shotstack/models/edit.rb +22 -24
  28. data/lib/shotstack/models/eleven_labs_generated_asset.rb +273 -0
  29. data/lib/shotstack/models/eleven_labs_generated_asset_options.rb +54 -0
  30. data/lib/shotstack/models/eleven_labs_text_to_speech_options.rb +303 -0
  31. data/lib/shotstack/models/enhancements.rb +215 -0
  32. data/lib/shotstack/models/flip_transformation.rb +16 -24
  33. data/lib/shotstack/models/font.rb +18 -20
  34. data/lib/shotstack/models/generated_asset.rb +48 -0
  35. data/lib/shotstack/models/generated_asset_error_response.rb +225 -0
  36. data/lib/shotstack/models/generated_asset_error_response_data.rb +257 -0
  37. data/lib/shotstack/models/generated_asset_response.rb +222 -0
  38. data/lib/shotstack/models/generated_asset_response_attributes.rb +376 -0
  39. data/lib/shotstack/models/generated_asset_response_data.rb +256 -0
  40. data/lib/shotstack/models/google_cloud_storage_destination.rb +232 -0
  41. data/lib/shotstack/models/google_cloud_storage_destination_options.rb +243 -0
  42. data/lib/shotstack/models/google_drive_destination.rb +239 -0
  43. data/lib/shotstack/models/google_drive_destination_options.rb +233 -0
  44. data/lib/shotstack/models/hey_gen_generated_asset.rb +273 -0
  45. data/lib/shotstack/models/hey_gen_generated_asset_options.rb +54 -0
  46. data/lib/shotstack/models/hey_gen_text_to_avatar_options.rb +396 -0
  47. data/lib/shotstack/models/html_asset.rb +20 -26
  48. data/lib/shotstack/models/image_asset.rb +18 -20
  49. data/lib/shotstack/models/ingest_error_response.rb +225 -0
  50. data/lib/shotstack/models/ingest_error_response_data.rb +257 -0
  51. data/lib/shotstack/models/luma_asset.rb +18 -20
  52. data/lib/shotstack/models/merge_field.rb +20 -20
  53. data/lib/shotstack/models/mux_destination.rb +18 -22
  54. data/lib/shotstack/models/mux_destination_options.rb +50 -25
  55. data/lib/shotstack/models/offset.rb +46 -46
  56. data/lib/shotstack/models/open_ai_generated_asset.rb +273 -0
  57. data/lib/shotstack/models/open_ai_generated_asset_options.rb +54 -0
  58. data/lib/shotstack/models/open_ai_text_generator_options.rb +313 -0
  59. data/lib/shotstack/models/output.rb +40 -35
  60. data/lib/shotstack/models/outputs.rb +227 -0
  61. data/lib/shotstack/models/outputs_response.rb +218 -0
  62. data/lib/shotstack/models/poster.rb +18 -20
  63. data/lib/shotstack/models/probe_response.rb +22 -20
  64. data/lib/shotstack/models/queued_response.rb +22 -20
  65. data/lib/shotstack/models/queued_response_data.rb +20 -20
  66. data/lib/shotstack/models/queued_source_response.rb +222 -0
  67. data/lib/shotstack/models/queued_source_response_data.rb +240 -0
  68. data/lib/shotstack/models/range.rb +26 -22
  69. data/lib/shotstack/models/render_response.rb +22 -20
  70. data/lib/shotstack/models/render_response_data.rb +24 -35
  71. data/lib/shotstack/models/rendition.rb +429 -0
  72. data/lib/shotstack/models/rendition_response_attributes.rb +336 -0
  73. data/lib/shotstack/models/rotate_transformation.rb +16 -22
  74. data/lib/shotstack/models/s3_destination.rb +232 -0
  75. data/lib/shotstack/models/s3_destination_options.rb +270 -0
  76. data/lib/shotstack/models/shotstack_destination.rb +19 -25
  77. data/lib/shotstack/models/shotstack_generated_asset.rb +273 -0
  78. data/lib/shotstack/models/shotstack_generated_asset_options.rb +60 -0
  79. data/lib/shotstack/models/shotstack_image_to_video_options.rb +298 -0
  80. data/lib/shotstack/models/shotstack_text_generator_options.rb +274 -0
  81. data/lib/shotstack/models/shotstack_text_to_image_options.rb +308 -0
  82. data/lib/shotstack/models/shotstack_text_to_speech_options.rb +339 -0
  83. data/lib/shotstack/models/size.rb +39 -35
  84. data/lib/shotstack/models/skew_transformation.rb +16 -24
  85. data/lib/shotstack/models/soundtrack.rb +18 -22
  86. data/lib/shotstack/models/source.rb +244 -0
  87. data/lib/shotstack/models/source_list_response.rb +225 -0
  88. data/lib/shotstack/models/source_response.rb +222 -0
  89. data/lib/shotstack/models/source_response_attributes.rb +373 -0
  90. data/lib/shotstack/models/source_response_data.rb +256 -0
  91. data/lib/shotstack/models/speed.rb +254 -0
  92. data/lib/shotstack/models/stability_ai_generated_asset.rb +273 -0
  93. data/lib/shotstack/models/stability_ai_generated_asset_options.rb +54 -0
  94. data/lib/shotstack/models/stability_ai_text_to_image_options.rb +390 -0
  95. data/lib/shotstack/models/template.rb +18 -20
  96. data/lib/shotstack/models/template_data_response.rb +24 -22
  97. data/lib/shotstack/models/template_data_response_data.rb +25 -22
  98. data/lib/shotstack/models/template_list_response.rb +24 -22
  99. data/lib/shotstack/models/template_list_response_data.rb +20 -20
  100. data/lib/shotstack/models/template_list_response_item.rb +20 -30
  101. data/lib/shotstack/models/template_render.rb +19 -21
  102. data/lib/shotstack/models/template_response.rb +23 -21
  103. data/lib/shotstack/models/template_response_data.rb +20 -20
  104. data/lib/shotstack/models/thumbnail.rb +20 -20
  105. data/lib/shotstack/models/timeline.rb +19 -25
  106. data/lib/shotstack/models/title_asset.rb +19 -27
  107. data/lib/shotstack/models/track.rb +18 -20
  108. data/lib/shotstack/models/transcription.rb +250 -0
  109. data/lib/shotstack/models/transfer.rb +259 -0
  110. data/lib/shotstack/models/transfer_response.rb +222 -0
  111. data/lib/shotstack/models/transfer_response_attributes.rb +280 -0
  112. data/lib/shotstack/models/transfer_response_data.rb +225 -0
  113. data/lib/shotstack/models/transformation.rb +16 -20
  114. data/lib/shotstack/models/transition.rb +16 -20
  115. data/lib/shotstack/models/upload_response.rb +222 -0
  116. data/lib/shotstack/models/upload_response_attributes.rb +257 -0
  117. data/lib/shotstack/models/upload_response_data.rb +256 -0
  118. data/lib/shotstack/models/video_asset.rb +102 -22
  119. data/lib/shotstack/version.rb +3 -3
  120. data/lib/shotstack.rb +63 -2
  121. data/shotstack.gemspec +8 -8
  122. metadata +80 -24
@@ -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
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Shotstack
17
- # The response received after a [template](#create-a-template) is submitted. The template is saved and a unique template id is returned.
17
+ # The response received after a [template](#create-template) is submitted. The template is saved and a unique template id is returned.
18
18
  class TemplateResponse
19
19
  # `true` if successfully created, else `false`.
20
20
  attr_accessor :success
@@ -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
 
@@ -66,16 +66,21 @@ module Shotstack
66
66
 
67
67
  if attributes.key?(:'message')
68
68
  self.message = attributes[:'message']
69
+ else
70
+ self.message = nil
69
71
  end
70
72
 
71
73
  if attributes.key?(:'id')
72
74
  self.id = attributes[:'id']
75
+ else
76
+ self.id = nil
73
77
  end
74
78
  end
75
79
 
76
80
  # Show invalid properties with the reasons. Usually used together with valid?
77
81
  # @return Array for valid properties with the reasons
78
82
  def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
84
  invalid_properties = Array.new
80
85
  if @message.nil?
81
86
  invalid_properties.push('invalid value for "message", message cannot be nil.')
@@ -91,6 +96,7 @@ module Shotstack
91
96
  # Check to see if the all the properties in the model are valid
92
97
  # @return true if the model is valid
93
98
  def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
100
  return false if @message.nil?
95
101
  return false if @id.nil?
96
102
  true
@@ -121,36 +127,30 @@ module Shotstack
121
127
  # @param [Hash] attributes Model attributes in the form of hash
122
128
  # @return [Object] Returns the model itself
123
129
  def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
130
  return nil unless attributes.is_a?(Hash)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
- self.send("#{key}=", nil)
131
+ attributes = attributes.transform_keys(&:to_sym)
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
135
136
  elsif type =~ /\AArray<(.*)>/i
136
137
  # check to ensure the input is an array given that the attribute
137
138
  # is documented as an array but the input is not
138
- if attributes[self.class.attribute_map[key]].is_a?(Array)
139
- 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) }
140
141
  end
141
- elsif !attributes[self.class.attribute_map[key]].nil?
142
- 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]])
143
144
  end
144
145
  end
145
-
146
- self
146
+ new(transformed_hash)
147
147
  end
148
148
 
149
149
  # Deserializes the data based on type
150
150
  # @param string type Data type
151
151
  # @param string value Value to be deserialized
152
152
  # @return [Object] Deserialized data
153
- def _deserialize(type, value)
153
+ def self._deserialize(type, value)
154
154
  case type.to_sym
155
155
  when :Time
156
156
  Time.parse(value)
@@ -185,7 +185,7 @@ module Shotstack
185
185
  else # model
186
186
  # models (e.g. Pet) or oneOf
187
187
  klass = Shotstack.const_get(type)
188
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
189
  end
190
190
  end
191
191
 
@@ -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
 
@@ -66,16 +66,21 @@ module Shotstack
66
66
 
67
67
  if attributes.key?(:'capture')
68
68
  self.capture = attributes[:'capture']
69
+ else
70
+ self.capture = nil
69
71
  end
70
72
 
71
73
  if attributes.key?(:'scale')
72
74
  self.scale = attributes[:'scale']
75
+ else
76
+ self.scale = nil
73
77
  end
74
78
  end
75
79
 
76
80
  # Show invalid properties with the reasons. Usually used together with valid?
77
81
  # @return Array for valid properties with the reasons
78
82
  def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
84
  invalid_properties = Array.new
80
85
  if @capture.nil?
81
86
  invalid_properties.push('invalid value for "capture", capture cannot be nil.')
@@ -91,6 +96,7 @@ module Shotstack
91
96
  # Check to see if the all the properties in the model are valid
92
97
  # @return true if the model is valid
93
98
  def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
94
100
  return false if @capture.nil?
95
101
  return false if @scale.nil?
96
102
  true
@@ -121,36 +127,30 @@ module Shotstack
121
127
  # @param [Hash] attributes Model attributes in the form of hash
122
128
  # @return [Object] Returns the model itself
123
129
  def self.build_from_hash(attributes)
124
- new.build_from_hash(attributes)
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def build_from_hash(attributes)
131
130
  return nil unless attributes.is_a?(Hash)
132
- self.class.openapi_types.each_pair do |key, type|
133
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
- self.send("#{key}=", nil)
131
+ attributes = attributes.transform_keys(&:to_sym)
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
135
136
  elsif type =~ /\AArray<(.*)>/i
136
137
  # check to ensure the input is an array given that the attribute
137
138
  # is documented as an array but the input is not
138
- if attributes[self.class.attribute_map[key]].is_a?(Array)
139
- 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) }
140
141
  end
141
- elsif !attributes[self.class.attribute_map[key]].nil?
142
- 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]])
143
144
  end
144
145
  end
145
-
146
- self
146
+ new(transformed_hash)
147
147
  end
148
148
 
149
149
  # Deserializes the data based on type
150
150
  # @param string type Data type
151
151
  # @param string value Value to be deserialized
152
152
  # @return [Object] Deserialized data
153
- def _deserialize(type, value)
153
+ def self._deserialize(type, value)
154
154
  case type.to_sym
155
155
  when :Time
156
156
  Time.parse(value)
@@ -185,7 +185,7 @@ module Shotstack
185
185
  else # model
186
186
  # models (e.g. Pet) or oneOf
187
187
  klass = Shotstack.const_get(type)
188
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
188
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
189
  end
190
190
  end
191
191
 
@@ -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
 
@@ -27,7 +27,7 @@ module Shotstack
27
27
  # A timeline consists of an array of tracks, each track containing clips. Tracks are layered on top of each other in the same order they are added to the array with the top most track layered over the top of those below it. Ensure that a track containing titles is the top most track so that it is displayed above videos and images.
28
28
  attr_accessor :tracks
29
29
 
30
- # Disable the caching of ingested source footage and assets. See [caching](https://shotstack.io/docs/guide/architecting-an-application/caching) for more details.
30
+ # Disable the caching of ingested source footage and assets. See [caching](https://shotstack.io/docs/guide/architecting-an-application/caching/) for more details.
31
31
  attr_accessor :cache
32
32
 
33
33
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -84,8 +84,6 @@ module Shotstack
84
84
 
85
85
  if attributes.key?(:'background')
86
86
  self.background = attributes[:'background']
87
- else
88
- self.background = '#000000'
89
87
  end
90
88
 
91
89
  if attributes.key?(:'fonts')
@@ -98,18 +96,19 @@ module Shotstack
98
96
  if (value = attributes[:'tracks']).is_a?(Array)
99
97
  self.tracks = value
100
98
  end
99
+ else
100
+ self.tracks = nil
101
101
  end
102
102
 
103
103
  if attributes.key?(:'cache')
104
104
  self.cache = attributes[:'cache']
105
- else
106
- self.cache = true
107
105
  end
108
106
  end
109
107
 
110
108
  # Show invalid properties with the reasons. Usually used together with valid?
111
109
  # @return Array for valid properties with the reasons
112
110
  def list_invalid_properties
111
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
113
112
  invalid_properties = Array.new
114
113
  if @tracks.nil?
115
114
  invalid_properties.push('invalid value for "tracks", tracks cannot be nil.')
@@ -121,6 +120,7 @@ module Shotstack
121
120
  # Check to see if the all the properties in the model are valid
122
121
  # @return true if the model is valid
123
122
  def valid?
123
+ warn '[DEPRECATED] the `valid?` method is obsolete'
124
124
  return false if @tracks.nil?
125
125
  true
126
126
  end
@@ -153,36 +153,30 @@ module Shotstack
153
153
  # @param [Hash] attributes Model attributes in the form of hash
154
154
  # @return [Object] Returns the model itself
155
155
  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
156
  return nil unless attributes.is_a?(Hash)
164
- self.class.openapi_types.each_pair do |key, type|
165
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
166
- self.send("#{key}=", nil)
157
+ attributes = attributes.transform_keys(&:to_sym)
158
+ transformed_hash = {}
159
+ openapi_types.each_pair do |key, type|
160
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = nil
167
162
  elsif type =~ /\AArray<(.*)>/i
168
163
  # check to ensure the input is an array given that the attribute
169
164
  # is documented as an array but the input is not
170
- if attributes[self.class.attribute_map[key]].is_a?(Array)
171
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
165
+ if attributes[attribute_map[key]].is_a?(Array)
166
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
167
  end
173
- elsif !attributes[self.class.attribute_map[key]].nil?
174
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
+ elsif !attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
170
  end
176
171
  end
177
-
178
- self
172
+ new(transformed_hash)
179
173
  end
180
174
 
181
175
  # Deserializes the data based on type
182
176
  # @param string type Data type
183
177
  # @param string value Value to be deserialized
184
178
  # @return [Object] Deserialized data
185
- def _deserialize(type, value)
179
+ def self._deserialize(type, value)
186
180
  case type.to_sym
187
181
  when :Time
188
182
  Time.parse(value)
@@ -217,7 +211,7 @@ module Shotstack
217
211
  else # model
218
212
  # models (e.g. Pet) or oneOf
219
213
  klass = Shotstack.const_get(type)
220
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
221
215
  end
222
216
  end
223
217
 
@@ -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
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Shotstack
17
- # The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
17
+ # **Notice: The title asset is deprecated, use the [HTML asset](#tocs_htmlasset) instead.** The TitleAsset clip type lets you create video titles from a text string and apply styling and positioning.
18
18
  class TitleAsset
19
19
  # The type of asset - set to `title` for titles.
20
20
  attr_accessor :type
@@ -123,6 +123,8 @@ module Shotstack
123
123
 
124
124
  if attributes.key?(:'text')
125
125
  self.text = attributes[:'text']
126
+ else
127
+ self.text = nil
126
128
  end
127
129
 
128
130
  if attributes.key?(:'style')
@@ -131,14 +133,10 @@ module Shotstack
131
133
 
132
134
  if attributes.key?(:'color')
133
135
  self.color = attributes[:'color']
134
- else
135
- self.color = '#ffffff'
136
136
  end
137
137
 
138
138
  if attributes.key?(:'size')
139
139
  self.size = attributes[:'size']
140
- else
141
- self.size = 'medium'
142
140
  end
143
141
 
144
142
  if attributes.key?(:'background')
@@ -147,8 +145,6 @@ module Shotstack
147
145
 
148
146
  if attributes.key?(:'position')
149
147
  self.position = attributes[:'position']
150
- else
151
- self.position = 'center'
152
148
  end
153
149
 
154
150
  if attributes.key?(:'offset')
@@ -159,6 +155,7 @@ module Shotstack
159
155
  # Show invalid properties with the reasons. Usually used together with valid?
160
156
  # @return Array for valid properties with the reasons
161
157
  def list_invalid_properties
158
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
162
159
  invalid_properties = Array.new
163
160
  if @type.nil?
164
161
  invalid_properties.push('invalid value for "type", type cannot be nil.')
@@ -174,6 +171,7 @@ module Shotstack
174
171
  # Check to see if the all the properties in the model are valid
175
172
  # @return true if the model is valid
176
173
  def valid?
174
+ warn '[DEPRECATED] the `valid?` method is obsolete'
177
175
  return false if @type.nil?
178
176
  return false if @text.nil?
179
177
  style_validator = EnumAttributeValidator.new('String', ["minimal", "blockbuster", "vogue", "sketchy", "skinny", "chunk", "chunkLight", "marker", "future", "subtitle"])
@@ -246,36 +244,30 @@ module Shotstack
246
244
  # @param [Hash] attributes Model attributes in the form of hash
247
245
  # @return [Object] Returns the model itself
248
246
  def self.build_from_hash(attributes)
249
- new.build_from_hash(attributes)
250
- end
251
-
252
- # Builds the object from hash
253
- # @param [Hash] attributes Model attributes in the form of hash
254
- # @return [Object] Returns the model itself
255
- def build_from_hash(attributes)
256
247
  return nil unless attributes.is_a?(Hash)
257
- self.class.openapi_types.each_pair do |key, type|
258
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
259
- self.send("#{key}=", nil)
248
+ attributes = attributes.transform_keys(&:to_sym)
249
+ transformed_hash = {}
250
+ openapi_types.each_pair do |key, type|
251
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
252
+ transformed_hash["#{key}"] = nil
260
253
  elsif type =~ /\AArray<(.*)>/i
261
254
  # check to ensure the input is an array given that the attribute
262
255
  # is documented as an array but the input is not
263
- if attributes[self.class.attribute_map[key]].is_a?(Array)
264
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
256
+ if attributes[attribute_map[key]].is_a?(Array)
257
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
265
258
  end
266
- elsif !attributes[self.class.attribute_map[key]].nil?
267
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
259
+ elsif !attributes[attribute_map[key]].nil?
260
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
268
261
  end
269
262
  end
270
-
271
- self
263
+ new(transformed_hash)
272
264
  end
273
265
 
274
266
  # Deserializes the data based on type
275
267
  # @param string type Data type
276
268
  # @param string value Value to be deserialized
277
269
  # @return [Object] Deserialized data
278
- def _deserialize(type, value)
270
+ def self._deserialize(type, value)
279
271
  case type.to_sym
280
272
  when :Time
281
273
  Time.parse(value)
@@ -310,7 +302,7 @@ module Shotstack
310
302
  else # model
311
303
  # models (e.g. Pet) or oneOf
312
304
  klass = Shotstack.const_get(type)
313
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
305
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
314
306
  end
315
307
  end
316
308
 
@@ -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
 
@@ -63,12 +63,15 @@ module Shotstack
63
63
  if (value = attributes[:'clips']).is_a?(Array)
64
64
  self.clips = value
65
65
  end
66
+ else
67
+ self.clips = nil
66
68
  end
67
69
  end
68
70
 
69
71
  # Show invalid properties with the reasons. Usually used together with valid?
70
72
  # @return Array for valid properties with the reasons
71
73
  def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
72
75
  invalid_properties = Array.new
73
76
  if @clips.nil?
74
77
  invalid_properties.push('invalid value for "clips", clips cannot be nil.')
@@ -80,6 +83,7 @@ module Shotstack
80
83
  # Check to see if the all the properties in the model are valid
81
84
  # @return true if the model is valid
82
85
  def valid?
86
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
87
  return false if @clips.nil?
84
88
  true
85
89
  end
@@ -108,36 +112,30 @@ module Shotstack
108
112
  # @param [Hash] attributes Model attributes in the form of hash
109
113
  # @return [Object] Returns the model itself
110
114
  def self.build_from_hash(attributes)
111
- new.build_from_hash(attributes)
112
- end
113
-
114
- # Builds the object from hash
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- # @return [Object] Returns the model itself
117
- def build_from_hash(attributes)
118
115
  return nil unless attributes.is_a?(Hash)
119
- self.class.openapi_types.each_pair do |key, type|
120
- if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
121
- self.send("#{key}=", nil)
116
+ attributes = attributes.transform_keys(&:to_sym)
117
+ transformed_hash = {}
118
+ openapi_types.each_pair do |key, type|
119
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
120
+ transformed_hash["#{key}"] = nil
122
121
  elsif type =~ /\AArray<(.*)>/i
123
122
  # check to ensure the input is an array given that the attribute
124
123
  # is documented as an array but the input is not
125
- if attributes[self.class.attribute_map[key]].is_a?(Array)
126
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
124
+ if attributes[attribute_map[key]].is_a?(Array)
125
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
127
126
  end
128
- elsif !attributes[self.class.attribute_map[key]].nil?
129
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
127
+ elsif !attributes[attribute_map[key]].nil?
128
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
130
129
  end
131
130
  end
132
-
133
- self
131
+ new(transformed_hash)
134
132
  end
135
133
 
136
134
  # Deserializes the data based on type
137
135
  # @param string type Data type
138
136
  # @param string value Value to be deserialized
139
137
  # @return [Object] Deserialized data
140
- def _deserialize(type, value)
138
+ def self._deserialize(type, value)
141
139
  case type.to_sym
142
140
  when :Time
143
141
  Time.parse(value)
@@ -172,7 +170,7 @@ module Shotstack
172
170
  else # model
173
171
  # models (e.g. Pet) or oneOf
174
172
  klass = Shotstack.const_get(type)
175
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
173
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
174
  end
177
175
  end
178
176