ilovevideoeditor-sdk 1.0.0

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 (120) hide show
  1. checksums.yaml +7 -0
  2. data/lib/generated/ilovevideoeditor-sdk/api/api_keys_api.rb +204 -0
  3. data/lib/generated/ilovevideoeditor-sdk/api/assets_api.rb +632 -0
  4. data/lib/generated/ilovevideoeditor-sdk/api/billing_api.rb +428 -0
  5. data/lib/generated/ilovevideoeditor-sdk/api/health_api.rb +134 -0
  6. data/lib/generated/ilovevideoeditor-sdk/api/integrations_api.rb +587 -0
  7. data/lib/generated/ilovevideoeditor-sdk/api/projects_api.rb +614 -0
  8. data/lib/generated/ilovevideoeditor-sdk/api/render_api.rb +656 -0
  9. data/lib/generated/ilovevideoeditor-sdk/api/renditions_api.rb +420 -0
  10. data/lib/generated/ilovevideoeditor-sdk/api/templates_api.rb +217 -0
  11. data/lib/generated/ilovevideoeditor-sdk/api/tools_api.rb +220 -0
  12. data/lib/generated/ilovevideoeditor-sdk/api/webhooks_api.rb +204 -0
  13. data/lib/generated/ilovevideoeditor-sdk/api/workflows_api.rb +854 -0
  14. data/lib/generated/ilovevideoeditor-sdk/api_client.rb +397 -0
  15. data/lib/generated/ilovevideoeditor-sdk/api_error.rb +58 -0
  16. data/lib/generated/ilovevideoeditor-sdk/api_model_base.rb +88 -0
  17. data/lib/generated/ilovevideoeditor-sdk/configuration.rb +316 -0
  18. data/lib/generated/ilovevideoeditor-sdk/models/api_key.rb +246 -0
  19. data/lib/generated/ilovevideoeditor-sdk/models/api_key_with_secret.rb +191 -0
  20. data/lib/generated/ilovevideoeditor-sdk/models/asset.rb +404 -0
  21. data/lib/generated/ilovevideoeditor-sdk/models/asset_create.rb +303 -0
  22. data/lib/generated/ilovevideoeditor-sdk/models/asset_upload_url_response.rb +295 -0
  23. data/lib/generated/ilovevideoeditor-sdk/models/batch_delete_projects_request.rb +184 -0
  24. data/lib/generated/ilovevideoeditor-sdk/models/batch_delete_result.rb +175 -0
  25. data/lib/generated/ilovevideoeditor-sdk/models/billing_prices.rb +158 -0
  26. data/lib/generated/ilovevideoeditor-sdk/models/billing_prices_tiers.rb +168 -0
  27. data/lib/generated/ilovevideoeditor-sdk/models/billing_subscription.rb +254 -0
  28. data/lib/generated/ilovevideoeditor-sdk/models/cancel_render200_response.rb +225 -0
  29. data/lib/generated/ilovevideoeditor-sdk/models/create_api_key_request.rb +147 -0
  30. data/lib/generated/ilovevideoeditor-sdk/models/create_asset201_response.rb +164 -0
  31. data/lib/generated/ilovevideoeditor-sdk/models/create_checkout_session200_response.rb +164 -0
  32. data/lib/generated/ilovevideoeditor-sdk/models/create_checkout_session_request.rb +220 -0
  33. data/lib/generated/ilovevideoeditor-sdk/models/create_integration201_response.rb +164 -0
  34. data/lib/generated/ilovevideoeditor-sdk/models/create_project200_response.rb +164 -0
  35. data/lib/generated/ilovevideoeditor-sdk/models/create_workflow201_response.rb +164 -0
  36. data/lib/generated/ilovevideoeditor-sdk/models/create_workflow_request.rb +208 -0
  37. data/lib/generated/ilovevideoeditor-sdk/models/credit_balance.rb +219 -0
  38. data/lib/generated/ilovevideoeditor-sdk/models/credit_balance_summary.rb +174 -0
  39. data/lib/generated/ilovevideoeditor-sdk/models/credit_balance_usage.rb +156 -0
  40. data/lib/generated/ilovevideoeditor-sdk/models/delete_project200_response.rb +190 -0
  41. data/lib/generated/ilovevideoeditor-sdk/models/destination.rb +331 -0
  42. data/lib/generated/ilovevideoeditor-sdk/models/destination_input.rb +304 -0
  43. data/lib/generated/ilovevideoeditor-sdk/models/error.rb +182 -0
  44. data/lib/generated/ilovevideoeditor-sdk/models/estimate_render_cost_request.rb +164 -0
  45. data/lib/generated/ilovevideoeditor-sdk/models/get_asset_signed_url200_response.rb +164 -0
  46. data/lib/generated/ilovevideoeditor-sdk/models/get_asset_upload_url_request.rb +214 -0
  47. data/lib/generated/ilovevideoeditor-sdk/models/get_destination200_response.rb +164 -0
  48. data/lib/generated/ilovevideoeditor-sdk/models/get_project200_response.rb +173 -0
  49. data/lib/generated/ilovevideoeditor-sdk/models/get_project_stats200_response.rb +164 -0
  50. data/lib/generated/ilovevideoeditor-sdk/models/get_render_download_url200_response.rb +190 -0
  51. data/lib/generated/ilovevideoeditor-sdk/models/get_rendition200_response.rb +164 -0
  52. data/lib/generated/ilovevideoeditor-sdk/models/get_subscription200_response.rb +164 -0
  53. data/lib/generated/ilovevideoeditor-sdk/models/get_template200_response.rb +164 -0
  54. data/lib/generated/ilovevideoeditor-sdk/models/get_usage200_response.rb +166 -0
  55. data/lib/generated/ilovevideoeditor-sdk/models/get_workflow200_response.rb +175 -0
  56. data/lib/generated/ilovevideoeditor-sdk/models/get_workflow_run200_response.rb +175 -0
  57. data/lib/generated/ilovevideoeditor-sdk/models/health_check200_response.rb +147 -0
  58. data/lib/generated/ilovevideoeditor-sdk/models/health_check_detailed200_response.rb +199 -0
  59. data/lib/generated/ilovevideoeditor-sdk/models/health_check_detailed200_response_services.rb +156 -0
  60. data/lib/generated/ilovevideoeditor-sdk/models/list_api_keys200_response.rb +166 -0
  61. data/lib/generated/ilovevideoeditor-sdk/models/list_assets200_response.rb +185 -0
  62. data/lib/generated/ilovevideoeditor-sdk/models/list_integrations200_response.rb +166 -0
  63. data/lib/generated/ilovevideoeditor-sdk/models/list_invoices200_response.rb +158 -0
  64. data/lib/generated/ilovevideoeditor-sdk/models/list_projects200_response.rb +185 -0
  65. data/lib/generated/ilovevideoeditor-sdk/models/list_renditions200_response.rb +185 -0
  66. data/lib/generated/ilovevideoeditor-sdk/models/list_templates200_response.rb +166 -0
  67. data/lib/generated/ilovevideoeditor-sdk/models/list_webhook_subscriptions200_response.rb +166 -0
  68. data/lib/generated/ilovevideoeditor-sdk/models/list_workflow_runs200_response.rb +185 -0
  69. data/lib/generated/ilovevideoeditor-sdk/models/list_workflow_step_types200_response.rb +166 -0
  70. data/lib/generated/ilovevideoeditor-sdk/models/list_workflows200_response.rb +185 -0
  71. data/lib/generated/ilovevideoeditor-sdk/models/project.rb +329 -0
  72. data/lib/generated/ilovevideoeditor-sdk/models/project_create.rb +218 -0
  73. data/lib/generated/ilovevideoeditor-sdk/models/project_update.rb +239 -0
  74. data/lib/generated/ilovevideoeditor-sdk/models/queue_render200_response.rb +199 -0
  75. data/lib/generated/ilovevideoeditor-sdk/models/queue_render_request.rb +182 -0
  76. data/lib/generated/ilovevideoeditor-sdk/models/refresh_render_url200_response.rb +190 -0
  77. data/lib/generated/ilovevideoeditor-sdk/models/render_cost_estimate.rb +254 -0
  78. data/lib/generated/ilovevideoeditor-sdk/models/render_cost_estimate_resolution.rb +165 -0
  79. data/lib/generated/ilovevideoeditor-sdk/models/render_cost_estimate_tier.rb +165 -0
  80. data/lib/generated/ilovevideoeditor-sdk/models/render_job.rb +271 -0
  81. data/lib/generated/ilovevideoeditor-sdk/models/render_job_progress.rb +165 -0
  82. data/lib/generated/ilovevideoeditor-sdk/models/render_list_item.rb +356 -0
  83. data/lib/generated/ilovevideoeditor-sdk/models/render_template_request.rb +167 -0
  84. data/lib/generated/ilovevideoeditor-sdk/models/render_webhook_payload.rb +357 -0
  85. data/lib/generated/ilovevideoeditor-sdk/models/rendition.rb +335 -0
  86. data/lib/generated/ilovevideoeditor-sdk/models/rendition_cancel_result.rb +236 -0
  87. data/lib/generated/ilovevideoeditor-sdk/models/rendition_output.rb +233 -0
  88. data/lib/generated/ilovevideoeditor-sdk/models/rendition_stats.rb +192 -0
  89. data/lib/generated/ilovevideoeditor-sdk/models/run_workflow202_response.rb +164 -0
  90. data/lib/generated/ilovevideoeditor-sdk/models/run_workflow_request.rb +149 -0
  91. data/lib/generated/ilovevideoeditor-sdk/models/service_health.rb +208 -0
  92. data/lib/generated/ilovevideoeditor-sdk/models/template.rb +324 -0
  93. data/lib/generated/ilovevideoeditor-sdk/models/template_summary.rb +322 -0
  94. data/lib/generated/ilovevideoeditor-sdk/models/test_integration200_response.rb +174 -0
  95. data/lib/generated/ilovevideoeditor-sdk/models/tier_info.rb +214 -0
  96. data/lib/generated/ilovevideoeditor-sdk/models/tier_info_credits.rb +165 -0
  97. data/lib/generated/ilovevideoeditor-sdk/models/tool_job_request.rb +242 -0
  98. data/lib/generated/ilovevideoeditor-sdk/models/tool_job_request_dimensions.rb +208 -0
  99. data/lib/generated/ilovevideoeditor-sdk/models/tool_job_status.rb +310 -0
  100. data/lib/generated/ilovevideoeditor-sdk/models/track_render_bandwidth200_response.rb +164 -0
  101. data/lib/generated/ilovevideoeditor-sdk/models/update_workflow_request.rb +174 -0
  102. data/lib/generated/ilovevideoeditor-sdk/models/upload_asset200_response.rb +164 -0
  103. data/lib/generated/ilovevideoeditor-sdk/models/usage_log.rb +302 -0
  104. data/lib/generated/ilovevideoeditor-sdk/models/video_json.rb +243 -0
  105. data/lib/generated/ilovevideoeditor-sdk/models/video_json_destination.rb +227 -0
  106. data/lib/generated/ilovevideoeditor-sdk/models/webhook_subscription.rb +283 -0
  107. data/lib/generated/ilovevideoeditor-sdk/models/webhook_subscription_create.rb +204 -0
  108. data/lib/generated/ilovevideoeditor-sdk/models/workflow.rb +356 -0
  109. data/lib/generated/ilovevideoeditor-sdk/models/workflow_definition.rb +262 -0
  110. data/lib/generated/ilovevideoeditor-sdk/models/workflow_run.rb +372 -0
  111. data/lib/generated/ilovevideoeditor-sdk/models/workflow_run_step.rb +409 -0
  112. data/lib/generated/ilovevideoeditor-sdk/models/workflow_step.rb +262 -0
  113. data/lib/generated/ilovevideoeditor-sdk/models/workflow_variable.rb +242 -0
  114. data/lib/generated/ilovevideoeditor-sdk/models/workspace_integration.rb +398 -0
  115. data/lib/generated/ilovevideoeditor-sdk/models/workspace_integration_input.rb +260 -0
  116. data/lib/generated/ilovevideoeditor-sdk/version.rb +15 -0
  117. data/lib/generated/ilovevideoeditor-sdk.rb +150 -0
  118. data/lib/ilovevideoeditor/client.rb +106 -0
  119. data/lib/ilovevideoeditor-sdk.rb +2 -0
  120. metadata +181 -0
@@ -0,0 +1,329 @@
1
+ =begin
2
+ #iLoveVideoEditor API
3
+
4
+ #Cloud video rendering API for iLoveVideoEditor. Submit a `VideoJSON` payload, queue a render job, and download the resulting MP4. **Authentication** - **API Key** (`x-api-key` header) — accepted by render pipeline and tool endpoints. - **Bearer Token** (`Authorization: Bearer <jwt>`) — required for user-scoped project, asset, billing, and webhook endpoints. - Many endpoints accept either form of authentication. **SDKs** Official typed SDKs are available for JavaScript/TypeScript, PHP, Python, Ruby, and Go. See https://ilovevideoeditor.com/docs/sdks **Outbound Webhooks** Render lifecycle events (`render.completed`, `render.failed`) are delivered to your endpoints as signed HTTP POST requests. See the `Webhooks` tag and the root-level `x-webhook-docs` extension for the payload format (`RenderWebhookPayload`), signature headers, HMAC verification, and the retry policy.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ILoveVideoEditor
17
+ class Project < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :description
23
+
24
+ # Project VideoJSON payload.
25
+ attr_accessor :video_json
26
+
27
+ attr_accessor :thumbnail_url
28
+
29
+ attr_accessor :sprite_url
30
+
31
+ attr_accessor :duration
32
+
33
+ attr_accessor :width
34
+
35
+ attr_accessor :height
36
+
37
+ attr_accessor :status
38
+
39
+ attr_accessor :render_job_id
40
+
41
+ attr_accessor :output_url
42
+
43
+ attr_accessor :processed_at
44
+
45
+ attr_accessor :created_at
46
+
47
+ attr_accessor :updated_at
48
+
49
+ attr_accessor :last_opened_at
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'id' => :'id',
55
+ :'name' => :'name',
56
+ :'description' => :'description',
57
+ :'video_json' => :'video_json',
58
+ :'thumbnail_url' => :'thumbnail_url',
59
+ :'sprite_url' => :'sprite_url',
60
+ :'duration' => :'duration',
61
+ :'width' => :'width',
62
+ :'height' => :'height',
63
+ :'status' => :'status',
64
+ :'render_job_id' => :'render_job_id',
65
+ :'output_url' => :'output_url',
66
+ :'processed_at' => :'processed_at',
67
+ :'created_at' => :'created_at',
68
+ :'updated_at' => :'updated_at',
69
+ :'last_opened_at' => :'last_opened_at'
70
+ }
71
+ end
72
+
73
+ # Returns attribute mapping this model knows about
74
+ def self.acceptable_attribute_map
75
+ attribute_map
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ acceptable_attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'id' => :'String',
87
+ :'name' => :'String',
88
+ :'description' => :'String',
89
+ :'video_json' => :'Object',
90
+ :'thumbnail_url' => :'String',
91
+ :'sprite_url' => :'String',
92
+ :'duration' => :'Integer',
93
+ :'width' => :'Integer',
94
+ :'height' => :'Integer',
95
+ :'status' => :'String',
96
+ :'render_job_id' => :'String',
97
+ :'output_url' => :'String',
98
+ :'processed_at' => :'Time',
99
+ :'created_at' => :'Time',
100
+ :'updated_at' => :'Time',
101
+ :'last_opened_at' => :'Time'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ :'description',
109
+ :'video_json',
110
+ :'thumbnail_url',
111
+ :'sprite_url',
112
+ :'duration',
113
+ :'width',
114
+ :'height',
115
+ :'status',
116
+ :'render_job_id',
117
+ :'output_url',
118
+ :'processed_at',
119
+ :'last_opened_at'
120
+ ])
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ def initialize(attributes = {})
126
+ if (!attributes.is_a?(Hash))
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::Project` initialize method"
128
+ end
129
+
130
+ # check to see if the attribute exists and convert string to symbol for hash key
131
+ acceptable_attribute_map = self.class.acceptable_attribute_map
132
+ attributes = attributes.each_with_object({}) { |(k, v), h|
133
+ if (!acceptable_attribute_map.key?(k.to_sym))
134
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::Project`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
135
+ end
136
+ h[k.to_sym] = v
137
+ }
138
+
139
+ if attributes.key?(:'id')
140
+ self.id = attributes[:'id']
141
+ else
142
+ self.id = nil
143
+ end
144
+
145
+ if attributes.key?(:'name')
146
+ self.name = attributes[:'name']
147
+ else
148
+ self.name = nil
149
+ end
150
+
151
+ if attributes.key?(:'description')
152
+ self.description = attributes[:'description']
153
+ end
154
+
155
+ if attributes.key?(:'video_json')
156
+ self.video_json = attributes[:'video_json']
157
+ end
158
+
159
+ if attributes.key?(:'thumbnail_url')
160
+ self.thumbnail_url = attributes[:'thumbnail_url']
161
+ end
162
+
163
+ if attributes.key?(:'sprite_url')
164
+ self.sprite_url = attributes[:'sprite_url']
165
+ end
166
+
167
+ if attributes.key?(:'duration')
168
+ self.duration = attributes[:'duration']
169
+ end
170
+
171
+ if attributes.key?(:'width')
172
+ self.width = attributes[:'width']
173
+ end
174
+
175
+ if attributes.key?(:'height')
176
+ self.height = attributes[:'height']
177
+ end
178
+
179
+ if attributes.key?(:'status')
180
+ self.status = attributes[:'status']
181
+ end
182
+
183
+ if attributes.key?(:'render_job_id')
184
+ self.render_job_id = attributes[:'render_job_id']
185
+ end
186
+
187
+ if attributes.key?(:'output_url')
188
+ self.output_url = attributes[:'output_url']
189
+ end
190
+
191
+ if attributes.key?(:'processed_at')
192
+ self.processed_at = attributes[:'processed_at']
193
+ end
194
+
195
+ if attributes.key?(:'created_at')
196
+ self.created_at = attributes[:'created_at']
197
+ end
198
+
199
+ if attributes.key?(:'updated_at')
200
+ self.updated_at = attributes[:'updated_at']
201
+ end
202
+
203
+ if attributes.key?(:'last_opened_at')
204
+ self.last_opened_at = attributes[:'last_opened_at']
205
+ end
206
+ end
207
+
208
+ # Show invalid properties with the reasons. Usually used together with valid?
209
+ # @return Array for valid properties with the reasons
210
+ def list_invalid_properties
211
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
212
+ invalid_properties = Array.new
213
+ if @id.nil?
214
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
215
+ end
216
+
217
+ if @name.nil?
218
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
219
+ end
220
+
221
+ invalid_properties
222
+ end
223
+
224
+ # Check to see if the all the properties in the model are valid
225
+ # @return true if the model is valid
226
+ def valid?
227
+ warn '[DEPRECATED] the `valid?` method is obsolete'
228
+ return false if @id.nil?
229
+ return false if @name.nil?
230
+ true
231
+ end
232
+
233
+ # Custom attribute writer method with validation
234
+ # @param [Object] id Value to be assigned
235
+ def id=(id)
236
+ if id.nil?
237
+ fail ArgumentError, 'id cannot be nil'
238
+ end
239
+
240
+ @id = id
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] name Value to be assigned
245
+ def name=(name)
246
+ if name.nil?
247
+ fail ArgumentError, 'name cannot be nil'
248
+ end
249
+
250
+ @name = name
251
+ end
252
+
253
+ # Checks equality by comparing each attribute.
254
+ # @param [Object] Object to be compared
255
+ def ==(o)
256
+ return true if self.equal?(o)
257
+ self.class == o.class &&
258
+ id == o.id &&
259
+ name == o.name &&
260
+ description == o.description &&
261
+ video_json == o.video_json &&
262
+ thumbnail_url == o.thumbnail_url &&
263
+ sprite_url == o.sprite_url &&
264
+ duration == o.duration &&
265
+ width == o.width &&
266
+ height == o.height &&
267
+ status == o.status &&
268
+ render_job_id == o.render_job_id &&
269
+ output_url == o.output_url &&
270
+ processed_at == o.processed_at &&
271
+ created_at == o.created_at &&
272
+ updated_at == o.updated_at &&
273
+ last_opened_at == o.last_opened_at
274
+ end
275
+
276
+ # @see the `==` method
277
+ # @param [Object] Object to be compared
278
+ def eql?(o)
279
+ self == o
280
+ end
281
+
282
+ # Calculates hash code according to all attributes.
283
+ # @return [Integer] Hash code
284
+ def hash
285
+ [id, name, description, video_json, thumbnail_url, sprite_url, duration, width, height, status, render_job_id, output_url, processed_at, created_at, updated_at, last_opened_at].hash
286
+ end
287
+
288
+ # Builds the object from hash
289
+ # @param [Hash] attributes Model attributes in the form of hash
290
+ # @return [Object] Returns the model itself
291
+ def self.build_from_hash(attributes)
292
+ return nil unless attributes.is_a?(Hash)
293
+ attributes = attributes.transform_keys(&:to_sym)
294
+ transformed_hash = {}
295
+ openapi_types.each_pair do |key, type|
296
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
297
+ transformed_hash["#{key}"] = nil
298
+ elsif type =~ /\AArray<(.*)>/i
299
+ # check to ensure the input is an array given that the attribute
300
+ # is documented as an array but the input is not
301
+ if attributes[attribute_map[key]].is_a?(Array)
302
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
303
+ end
304
+ elsif !attributes[attribute_map[key]].nil?
305
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
306
+ end
307
+ end
308
+ new(transformed_hash)
309
+ end
310
+
311
+ # Returns the object in the form of hash
312
+ # @return [Hash] Returns the object in the form of hash
313
+ def to_hash
314
+ hash = {}
315
+ self.class.attribute_map.each_pair do |attr, param|
316
+ value = self.send(attr)
317
+ if value.nil?
318
+ is_nullable = self.class.openapi_nullable.include?(attr)
319
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
320
+ end
321
+
322
+ hash[param] = _to_hash(value)
323
+ end
324
+ hash
325
+ end
326
+
327
+ end
328
+
329
+ end
@@ -0,0 +1,218 @@
1
+ =begin
2
+ #iLoveVideoEditor API
3
+
4
+ #Cloud video rendering API for iLoveVideoEditor. Submit a `VideoJSON` payload, queue a render job, and download the resulting MP4. **Authentication** - **API Key** (`x-api-key` header) — accepted by render pipeline and tool endpoints. - **Bearer Token** (`Authorization: Bearer <jwt>`) — required for user-scoped project, asset, billing, and webhook endpoints. - Many endpoints accept either form of authentication. **SDKs** Official typed SDKs are available for JavaScript/TypeScript, PHP, Python, Ruby, and Go. See https://ilovevideoeditor.com/docs/sdks **Outbound Webhooks** Render lifecycle events (`render.completed`, `render.failed`) are delivered to your endpoints as signed HTTP POST requests. See the `Webhooks` tag and the root-level `x-webhook-docs` extension for the payload format (`RenderWebhookPayload`), signature headers, HMAC verification, and the retry policy.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ILoveVideoEditor
17
+ class ProjectCreate < ApiModelBase
18
+ attr_accessor :name
19
+
20
+ attr_accessor :description
21
+
22
+ attr_accessor :video_json
23
+
24
+ attr_accessor :thumbnail_url
25
+
26
+ attr_accessor :duration
27
+
28
+ attr_accessor :width
29
+
30
+ attr_accessor :height
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'name' => :'name',
36
+ :'description' => :'description',
37
+ :'video_json' => :'video_json',
38
+ :'thumbnail_url' => :'thumbnail_url',
39
+ :'duration' => :'duration',
40
+ :'width' => :'width',
41
+ :'height' => :'height'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'name' => :'String',
59
+ :'description' => :'String',
60
+ :'video_json' => :'Object',
61
+ :'thumbnail_url' => :'String',
62
+ :'duration' => :'Integer',
63
+ :'width' => :'Integer',
64
+ :'height' => :'Integer'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::ProjectCreate` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::ProjectCreate`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'name')
91
+ self.name = attributes[:'name']
92
+ else
93
+ self.name = nil
94
+ end
95
+
96
+ if attributes.key?(:'description')
97
+ self.description = attributes[:'description']
98
+ end
99
+
100
+ if attributes.key?(:'video_json')
101
+ self.video_json = attributes[:'video_json']
102
+ end
103
+
104
+ if attributes.key?(:'thumbnail_url')
105
+ self.thumbnail_url = attributes[:'thumbnail_url']
106
+ end
107
+
108
+ if attributes.key?(:'duration')
109
+ self.duration = attributes[:'duration']
110
+ end
111
+
112
+ if attributes.key?(:'width')
113
+ self.width = attributes[:'width']
114
+ end
115
+
116
+ if attributes.key?(:'height')
117
+ self.height = attributes[:'height']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
125
+ invalid_properties = Array.new
126
+ if @name.nil?
127
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
128
+ end
129
+
130
+ invalid_properties
131
+ end
132
+
133
+ # Check to see if the all the properties in the model are valid
134
+ # @return true if the model is valid
135
+ def valid?
136
+ warn '[DEPRECATED] the `valid?` method is obsolete'
137
+ return false if @name.nil?
138
+ true
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] name Value to be assigned
143
+ def name=(name)
144
+ if name.nil?
145
+ fail ArgumentError, 'name cannot be nil'
146
+ end
147
+
148
+ @name = name
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ name == o.name &&
157
+ description == o.description &&
158
+ video_json == o.video_json &&
159
+ thumbnail_url == o.thumbnail_url &&
160
+ duration == o.duration &&
161
+ width == o.width &&
162
+ height == o.height
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [name, description, video_json, thumbnail_url, duration, width, height].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ return nil unless attributes.is_a?(Hash)
182
+ attributes = attributes.transform_keys(&:to_sym)
183
+ transformed_hash = {}
184
+ openapi_types.each_pair do |key, type|
185
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = nil
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[attribute_map[key]].is_a?(Array)
191
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
192
+ end
193
+ elsif !attributes[attribute_map[key]].nil?
194
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
195
+ end
196
+ end
197
+ new(transformed_hash)
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ end
217
+
218
+ end