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,164 @@
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 UploadAsset200Response < ApiModelBase
18
+ attr_accessor :success
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'success' => :'success'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'success' => :'Boolean'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::UploadAsset200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::UploadAsset200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'success')
67
+ self.success = attributes[:'success']
68
+ else
69
+ self.success = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @success.nil?
79
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @success.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] success Value to be assigned
95
+ def success=(success)
96
+ if success.nil?
97
+ fail ArgumentError, 'success cannot be nil'
98
+ end
99
+
100
+ @success = success
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ success == o.success
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [success].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,302 @@
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 UsageLog < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :type
21
+
22
+ attr_accessor :bytes
23
+
24
+ attr_accessor :source
25
+
26
+ attr_accessor :metadata
27
+
28
+ attr_accessor :created_at
29
+
30
+ class EnumAttributeValidator
31
+ attr_reader :datatype
32
+ attr_reader :allowable_values
33
+
34
+ def initialize(datatype, allowable_values)
35
+ @allowable_values = allowable_values.map do |value|
36
+ case datatype.to_s
37
+ when /Integer/i
38
+ value.to_i
39
+ when /Float/i
40
+ value.to_f
41
+ else
42
+ value
43
+ end
44
+ end
45
+ end
46
+
47
+ def valid?(value)
48
+ !value || allowable_values.include?(value)
49
+ end
50
+ end
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'id' => :'id',
56
+ :'type' => :'type',
57
+ :'bytes' => :'bytes',
58
+ :'source' => :'source',
59
+ :'metadata' => :'metadata',
60
+ :'created_at' => :'created_at'
61
+ }
62
+ end
63
+
64
+ # Returns attribute mapping this model knows about
65
+ def self.acceptable_attribute_map
66
+ attribute_map
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ acceptable_attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'id' => :'String',
78
+ :'type' => :'String',
79
+ :'bytes' => :'Integer',
80
+ :'source' => :'String',
81
+ :'metadata' => :'Object',
82
+ :'created_at' => :'Time'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ :'metadata',
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::UsageLog` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!acceptable_attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::UsageLog`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'id')
110
+ self.id = attributes[:'id']
111
+ else
112
+ self.id = nil
113
+ end
114
+
115
+ if attributes.key?(:'type')
116
+ self.type = attributes[:'type']
117
+ else
118
+ self.type = nil
119
+ end
120
+
121
+ if attributes.key?(:'bytes')
122
+ self.bytes = attributes[:'bytes']
123
+ else
124
+ self.bytes = nil
125
+ end
126
+
127
+ if attributes.key?(:'source')
128
+ self.source = attributes[:'source']
129
+ else
130
+ self.source = nil
131
+ end
132
+
133
+ if attributes.key?(:'metadata')
134
+ self.metadata = attributes[:'metadata']
135
+ end
136
+
137
+ if attributes.key?(:'created_at')
138
+ self.created_at = attributes[:'created_at']
139
+ else
140
+ self.created_at = nil
141
+ end
142
+ end
143
+
144
+ # Show invalid properties with the reasons. Usually used together with valid?
145
+ # @return Array for valid properties with the reasons
146
+ def list_invalid_properties
147
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
148
+ invalid_properties = Array.new
149
+ if @id.nil?
150
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
151
+ end
152
+
153
+ if @type.nil?
154
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
155
+ end
156
+
157
+ if @bytes.nil?
158
+ invalid_properties.push('invalid value for "bytes", bytes cannot be nil.')
159
+ end
160
+
161
+ if @source.nil?
162
+ invalid_properties.push('invalid value for "source", source cannot be nil.')
163
+ end
164
+
165
+ if @created_at.nil?
166
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
167
+ end
168
+
169
+ invalid_properties
170
+ end
171
+
172
+ # Check to see if the all the properties in the model are valid
173
+ # @return true if the model is valid
174
+ def valid?
175
+ warn '[DEPRECATED] the `valid?` method is obsolete'
176
+ return false if @id.nil?
177
+ return false if @type.nil?
178
+ type_validator = EnumAttributeValidator.new('String', ["storage", "bandwidth"])
179
+ return false unless type_validator.valid?(@type)
180
+ return false if @bytes.nil?
181
+ return false if @source.nil?
182
+ return false if @created_at.nil?
183
+ true
184
+ end
185
+
186
+ # Custom attribute writer method with validation
187
+ # @param [Object] id Value to be assigned
188
+ def id=(id)
189
+ if id.nil?
190
+ fail ArgumentError, 'id cannot be nil'
191
+ end
192
+
193
+ @id = id
194
+ end
195
+
196
+ # Custom attribute writer method checking allowed values (enum).
197
+ # @param [Object] type Object to be assigned
198
+ def type=(type)
199
+ validator = EnumAttributeValidator.new('String', ["storage", "bandwidth"])
200
+ unless validator.valid?(type)
201
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
202
+ end
203
+ @type = type
204
+ end
205
+
206
+ # Custom attribute writer method with validation
207
+ # @param [Object] bytes Value to be assigned
208
+ def bytes=(bytes)
209
+ if bytes.nil?
210
+ fail ArgumentError, 'bytes cannot be nil'
211
+ end
212
+
213
+ @bytes = bytes
214
+ end
215
+
216
+ # Custom attribute writer method with validation
217
+ # @param [Object] source Value to be assigned
218
+ def source=(source)
219
+ if source.nil?
220
+ fail ArgumentError, 'source cannot be nil'
221
+ end
222
+
223
+ @source = source
224
+ end
225
+
226
+ # Custom attribute writer method with validation
227
+ # @param [Object] created_at Value to be assigned
228
+ def created_at=(created_at)
229
+ if created_at.nil?
230
+ fail ArgumentError, 'created_at cannot be nil'
231
+ end
232
+
233
+ @created_at = created_at
234
+ end
235
+
236
+ # Checks equality by comparing each attribute.
237
+ # @param [Object] Object to be compared
238
+ def ==(o)
239
+ return true if self.equal?(o)
240
+ self.class == o.class &&
241
+ id == o.id &&
242
+ type == o.type &&
243
+ bytes == o.bytes &&
244
+ source == o.source &&
245
+ metadata == o.metadata &&
246
+ created_at == o.created_at
247
+ end
248
+
249
+ # @see the `==` method
250
+ # @param [Object] Object to be compared
251
+ def eql?(o)
252
+ self == o
253
+ end
254
+
255
+ # Calculates hash code according to all attributes.
256
+ # @return [Integer] Hash code
257
+ def hash
258
+ [id, type, bytes, source, metadata, created_at].hash
259
+ end
260
+
261
+ # Builds the object from hash
262
+ # @param [Hash] attributes Model attributes in the form of hash
263
+ # @return [Object] Returns the model itself
264
+ def self.build_from_hash(attributes)
265
+ return nil unless attributes.is_a?(Hash)
266
+ attributes = attributes.transform_keys(&:to_sym)
267
+ transformed_hash = {}
268
+ openapi_types.each_pair do |key, type|
269
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = nil
271
+ elsif type =~ /\AArray<(.*)>/i
272
+ # check to ensure the input is an array given that the attribute
273
+ # is documented as an array but the input is not
274
+ if attributes[attribute_map[key]].is_a?(Array)
275
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
276
+ end
277
+ elsif !attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
279
+ end
280
+ end
281
+ new(transformed_hash)
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -0,0 +1,243 @@
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
+ # Portable video scene definition produced by `@ilovevideoeditor/core`. The first layer must be a `composition` layer containing project settings (`width`, `height`, `fps`, `sourceDuration`, …).
18
+ class VideoJSON < ApiModelBase
19
+ attr_accessor :name
20
+
21
+ attr_accessor :layers
22
+
23
+ attr_accessor :tracks
24
+
25
+ # Optional output destinations for this render. Each entry references a workspace integration by ID; the API resolves credentials server-side.
26
+ attr_accessor :destinations
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'name' => :'name',
32
+ :'layers' => :'layers',
33
+ :'tracks' => :'tracks',
34
+ :'destinations' => :'destinations'
35
+ }
36
+ end
37
+
38
+ # Returns attribute mapping this model knows about
39
+ def self.acceptable_attribute_map
40
+ attribute_map
41
+ end
42
+
43
+ # Returns all the JSON keys this model knows about
44
+ def self.acceptable_attributes
45
+ acceptable_attribute_map.values
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.openapi_types
50
+ {
51
+ :'name' => :'String',
52
+ :'layers' => :'Array<Object>',
53
+ :'tracks' => :'Array<Object>',
54
+ :'destinations' => :'Array<VideoJSONDestination>'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ ])
62
+ end
63
+
64
+ # Initializes the object
65
+ # @param [Hash] attributes Model attributes in the form of hash
66
+ def initialize(attributes = {})
67
+ if (!attributes.is_a?(Hash))
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ILoveVideoEditor::VideoJSON` initialize method"
69
+ end
70
+
71
+ # check to see if the attribute exists and convert string to symbol for hash key
72
+ acceptable_attribute_map = self.class.acceptable_attribute_map
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!acceptable_attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ILoveVideoEditor::VideoJSON`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'name')
81
+ self.name = attributes[:'name']
82
+ else
83
+ self.name = nil
84
+ end
85
+
86
+ if attributes.key?(:'layers')
87
+ if (value = attributes[:'layers']).is_a?(Array)
88
+ self.layers = value
89
+ end
90
+ else
91
+ self.layers = nil
92
+ end
93
+
94
+ if attributes.key?(:'tracks')
95
+ if (value = attributes[:'tracks']).is_a?(Array)
96
+ self.tracks = value
97
+ end
98
+ end
99
+
100
+ if attributes.key?(:'destinations')
101
+ if (value = attributes[:'destinations']).is_a?(Array)
102
+ self.destinations = value
103
+ end
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ if @name.nil?
113
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
114
+ end
115
+
116
+ if @name.to_s.length > 200
117
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 200.')
118
+ end
119
+
120
+ if @layers.nil?
121
+ invalid_properties.push('invalid value for "layers", layers cannot be nil.')
122
+ end
123
+
124
+ if @layers.length > 50
125
+ invalid_properties.push('invalid value for "layers", number of items must be less than or equal to 50.')
126
+ end
127
+
128
+ if @layers.length < 1
129
+ invalid_properties.push('invalid value for "layers", number of items must be greater than or equal to 1.')
130
+ end
131
+
132
+ invalid_properties
133
+ end
134
+
135
+ # Check to see if the all the properties in the model are valid
136
+ # @return true if the model is valid
137
+ def valid?
138
+ warn '[DEPRECATED] the `valid?` method is obsolete'
139
+ return false if @name.nil?
140
+ return false if @name.to_s.length > 200
141
+ return false if @layers.nil?
142
+ return false if @layers.length > 50
143
+ return false if @layers.length < 1
144
+ true
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] name Value to be assigned
149
+ def name=(name)
150
+ if name.nil?
151
+ fail ArgumentError, 'name cannot be nil'
152
+ end
153
+
154
+ if name.to_s.length > 200
155
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 200.'
156
+ end
157
+
158
+ @name = name
159
+ end
160
+
161
+ # Custom attribute writer method with validation
162
+ # @param [Object] layers Value to be assigned
163
+ def layers=(layers)
164
+ if layers.nil?
165
+ fail ArgumentError, 'layers cannot be nil'
166
+ end
167
+
168
+ if layers.length > 50
169
+ fail ArgumentError, 'invalid value for "layers", number of items must be less than or equal to 50.'
170
+ end
171
+
172
+ if layers.length < 1
173
+ fail ArgumentError, 'invalid value for "layers", number of items must be greater than or equal to 1.'
174
+ end
175
+
176
+ @layers = layers
177
+ end
178
+
179
+ # Checks equality by comparing each attribute.
180
+ # @param [Object] Object to be compared
181
+ def ==(o)
182
+ return true if self.equal?(o)
183
+ self.class == o.class &&
184
+ name == o.name &&
185
+ layers == o.layers &&
186
+ tracks == o.tracks &&
187
+ destinations == o.destinations
188
+ end
189
+
190
+ # @see the `==` method
191
+ # @param [Object] Object to be compared
192
+ def eql?(o)
193
+ self == o
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ def hash
199
+ [name, layers, tracks, destinations].hash
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def self.build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ transformed_hash = {}
209
+ openapi_types.each_pair do |key, type|
210
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = nil
212
+ elsif type =~ /\AArray<(.*)>/i
213
+ # check to ensure the input is an array given that the attribute
214
+ # is documented as an array but the input is not
215
+ if attributes[attribute_map[key]].is_a?(Array)
216
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
217
+ end
218
+ elsif !attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
220
+ end
221
+ end
222
+ new(transformed_hash)
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ end
242
+
243
+ end