vgen-apimatic-sdk 0.0.1

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 (192) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +152 -0
  4. data/bin/console +15 -0
  5. data/lib/videogen/api_helper.rb +10 -0
  6. data/lib/videogen/apis/account_api.rb +31 -0
  7. data/lib/videogen/apis/assistant_api.rb +191 -0
  8. data/lib/videogen/apis/base_api.rb +67 -0
  9. data/lib/videogen/apis/entities_api.rb +230 -0
  10. data/lib/videogen/apis/files_api.rb +263 -0
  11. data/lib/videogen/apis/projects_api.rb +355 -0
  12. data/lib/videogen/apis/resources_api.rb +81 -0
  13. data/lib/videogen/apis/text_api.rb +39 -0
  14. data/lib/videogen/apis/tools_api.rb +494 -0
  15. data/lib/videogen/apis/webhooks_api.rb +94 -0
  16. data/lib/videogen/apis/workflows_api.rb +217 -0
  17. data/lib/videogen/client.rb +127 -0
  18. data/lib/videogen/configuration.rb +166 -0
  19. data/lib/videogen/exceptions/api_exception.rb +21 -0
  20. data/lib/videogen/http/api_response.rb +19 -0
  21. data/lib/videogen/http/auth/oauth_2.rb +53 -0
  22. data/lib/videogen/http/http_call_back.rb +10 -0
  23. data/lib/videogen/http/http_method_enum.rb +10 -0
  24. data/lib/videogen/http/http_request.rb +10 -0
  25. data/lib/videogen/http/http_response.rb +10 -0
  26. data/lib/videogen/http/proxy_settings.rb +22 -0
  27. data/lib/videogen/logging/configuration/api_logging_configuration.rb +186 -0
  28. data/lib/videogen/logging/sdk_logger.rb +17 -0
  29. data/lib/videogen/models/act_on_assistant_action_request.rb +77 -0
  30. data/lib/videogen/models/act_on_assistant_action_request_decision.rb +36 -0
  31. data/lib/videogen/models/act_on_assistant_action_response.rb +77 -0
  32. data/lib/videogen/models/add_entity_reference_request.rb +95 -0
  33. data/lib/videogen/models/api_error.rb +137 -0
  34. data/lib/videogen/models/aspect_ratio.rb +105 -0
  35. data/lib/videogen/models/aspect_ratio1.rb +82 -0
  36. data/lib/videogen/models/aspect_ratio2.rb +82 -0
  37. data/lib/videogen/models/aspect_ratio4.rb +83 -0
  38. data/lib/videogen/models/assistant_action.rb +148 -0
  39. data/lib/videogen/models/assistant_action_detail.rb +108 -0
  40. data/lib/videogen/models/assistant_action_detail1.rb +117 -0
  41. data/lib/videogen/models/assistant_action_kind.rb +52 -0
  42. data/lib/videogen/models/assistant_message.rb +167 -0
  43. data/lib/videogen/models/assistant_message1.rb +259 -0
  44. data/lib/videogen/models/assistant_message_attachment.rb +101 -0
  45. data/lib/videogen/models/assistant_message_status.rb +49 -0
  46. data/lib/videogen/models/assistant_workflow_suggestion.rb +133 -0
  47. data/lib/videogen/models/base_model.rb +110 -0
  48. data/lib/videogen/models/content_policy_config.rb +80 -0
  49. data/lib/videogen/models/create_entity_request.rb +96 -0
  50. data/lib/videogen/models/create_entity_request_entity_type.rb +47 -0
  51. data/lib/videogen/models/create_file_upload_request.rb +125 -0
  52. data/lib/videogen/models/create_timeline_interchange_request.rb +93 -0
  53. data/lib/videogen/models/create_timeline_interchange_response.rb +76 -0
  54. data/lib/videogen/models/create_webhook_endpoint_request.rb +94 -0
  55. data/lib/videogen/models/end_screen_mode.rb +43 -0
  56. data/lib/videogen/models/entity.rb +166 -0
  57. data/lib/videogen/models/entity_actor_config.rb +101 -0
  58. data/lib/videogen/models/entity_archive_response.rb +82 -0
  59. data/lib/videogen/models/entity_entity_type.rb +47 -0
  60. data/lib/videogen/models/entity_reference.rb +93 -0
  61. data/lib/videogen/models/error_requirement.rb +101 -0
  62. data/lib/videogen/models/executed_tool.rb +148 -0
  63. data/lib/videogen/models/export_delivery_destination.rb +110 -0
  64. data/lib/videogen/models/export_delivery_destination_type.rb +36 -0
  65. data/lib/videogen/models/export_project_quality.rb +44 -0
  66. data/lib/videogen/models/export_project_request.rb +124 -0
  67. data/lib/videogen/models/export_project_response.rb +76 -0
  68. data/lib/videogen/models/file_analysis_metadata.rb +112 -0
  69. data/lib/videogen/models/file_analysis_metadata1.rb +112 -0
  70. data/lib/videogen/models/file_analysis_metadata_analysis_loading_state.rb +48 -0
  71. data/lib/videogen/models/file_info.rb +386 -0
  72. data/lib/videogen/models/file_info1.rb +387 -0
  73. data/lib/videogen/models/file_info_scope.rb +54 -0
  74. data/lib/videogen/models/file_source.rb +134 -0
  75. data/lib/videogen/models/file_source_status.rb +46 -0
  76. data/lib/videogen/models/file_type.rb +57 -0
  77. data/lib/videogen/models/file_type1.rb +56 -0
  78. data/lib/videogen/models/file_type2.rb +57 -0
  79. data/lib/videogen/models/file_upload_response.rb +82 -0
  80. data/lib/videogen/models/generate_avatar_request.rb +149 -0
  81. data/lib/videogen/models/generate_image_request.rb +187 -0
  82. data/lib/videogen/models/generate_motion_graphic_request.rb +193 -0
  83. data/lib/videogen/models/generate_music_request.rb +111 -0
  84. data/lib/videogen/models/generate_sound_effect_request.rb +139 -0
  85. data/lib/videogen/models/generate_text_request.rb +120 -0
  86. data/lib/videogen/models/generate_text_response.rb +72 -0
  87. data/lib/videogen/models/generate_video_clip_request.rb +297 -0
  88. data/lib/videogen/models/get_assistant_response.rb +135 -0
  89. data/lib/videogen/models/get_files_response.rb +102 -0
  90. data/lib/videogen/models/image_asset_request.rb +125 -0
  91. data/lib/videogen/models/job_status.rb +51 -0
  92. data/lib/videogen/models/language.rb +83 -0
  93. data/lib/videogen/models/language_list_response.rb +83 -0
  94. data/lib/videogen/models/list_entities_response.rb +103 -0
  95. data/lib/videogen/models/list_project_exports_response.rb +104 -0
  96. data/lib/videogen/models/list_projects_response.rb +105 -0
  97. data/lib/videogen/models/list_remix_actions_response.rb +103 -0
  98. data/lib/videogen/models/me_response.rb +114 -0
  99. data/lib/videogen/models/model_quality.rb +51 -0
  100. data/lib/videogen/models/model_quality1.rb +47 -0
  101. data/lib/videogen/models/model_quality10.rb +46 -0
  102. data/lib/videogen/models/model_quality11.rb +46 -0
  103. data/lib/videogen/models/model_quality12.rb +45 -0
  104. data/lib/videogen/models/model_quality13.rb +46 -0
  105. data/lib/videogen/models/model_quality2.rb +46 -0
  106. data/lib/videogen/models/model_quality3.rb +46 -0
  107. data/lib/videogen/models/model_quality4.rb +48 -0
  108. data/lib/videogen/models/model_quality9.rb +47 -0
  109. data/lib/videogen/models/motion_graphic_sub_tool_mode.rb +44 -0
  110. data/lib/videogen/models/motion_graphic_sub_tool_mode1.rb +40 -0
  111. data/lib/videogen/models/motion_graphic_sub_tool_mode2.rb +41 -0
  112. data/lib/videogen/models/motion_graphic_sub_tool_mode3.rb +40 -0
  113. data/lib/videogen/models/motion_graphic_sub_tool_mode4.rb +40 -0
  114. data/lib/videogen/models/motion_graphic_sub_tool_modes.rb +114 -0
  115. data/lib/videogen/models/motion_graphic_sub_tool_modes1.rb +116 -0
  116. data/lib/videogen/models/project_export.rb +207 -0
  117. data/lib/videogen/models/project_response.rb +151 -0
  118. data/lib/videogen/models/project_response_status.rb +36 -0
  119. data/lib/videogen/models/prompt_to_video_clip_request.rb +155 -0
  120. data/lib/videogen/models/pronunciation_replacement.rb +82 -0
  121. data/lib/videogen/models/remix_action.rb +111 -0
  122. data/lib/videogen/models/remix_action1.rb +123 -0
  123. data/lib/videogen/models/remix_action10.rb +115 -0
  124. data/lib/videogen/models/remix_action11.rb +148 -0
  125. data/lib/videogen/models/remix_action12.rb +89 -0
  126. data/lib/videogen/models/remix_action13.rb +105 -0
  127. data/lib/videogen/models/remix_action14.rb +138 -0
  128. data/lib/videogen/models/remix_action2.rb +101 -0
  129. data/lib/videogen/models/remix_action3.rb +85 -0
  130. data/lib/videogen/models/remix_action4.rb +120 -0
  131. data/lib/videogen/models/remix_action5.rb +88 -0
  132. data/lib/videogen/models/remix_action6.rb +106 -0
  133. data/lib/videogen/models/remix_action7.rb +137 -0
  134. data/lib/videogen/models/remix_action8.rb +131 -0
  135. data/lib/videogen/models/remix_action9.rb +120 -0
  136. data/lib/videogen/models/remix_action_discriminator_mapping_set_logo_position.rb +53 -0
  137. data/lib/videogen/models/remix_action_run.rb +150 -0
  138. data/lib/videogen/models/remix_action_type.rb +88 -0
  139. data/lib/videogen/models/remix_project_request.rb +105 -0
  140. data/lib/videogen/models/remix_project_response.rb +101 -0
  141. data/lib/videogen/models/remix_transition_style.rb +58 -0
  142. data/lib/videogen/models/remove_entity_reference_request.rb +73 -0
  143. data/lib/videogen/models/scene_description_range.rb +121 -0
  144. data/lib/videogen/models/script_to_video_request.rb +309 -0
  145. data/lib/videogen/models/search_files_request.rb +96 -0
  146. data/lib/videogen/models/search_files_response.rb +82 -0
  147. data/lib/videogen/models/search_files_result.rb +85 -0
  148. data/lib/videogen/models/send_assistant_message_request.rb +73 -0
  149. data/lib/videogen/models/send_assistant_message_response.rb +76 -0
  150. data/lib/videogen/models/slideshow_to_video_request.rb +276 -0
  151. data/lib/videogen/models/start_assistant_chat_request.rb +88 -0
  152. data/lib/videogen/models/start_assistant_chat_response.rb +105 -0
  153. data/lib/videogen/models/start_tool_execution_response.rb +76 -0
  154. data/lib/videogen/models/start_workflow_run_response.rb +141 -0
  155. data/lib/videogen/models/text_to_speech_request.rb +191 -0
  156. data/lib/videogen/models/timeline_interchange.rb +210 -0
  157. data/lib/videogen/models/timeline_interchange_format.rb +47 -0
  158. data/lib/videogen/models/timeline_interchange_media_delivery.rb +39 -0
  159. data/lib/videogen/models/tool_execution_list_response.rb +104 -0
  160. data/lib/videogen/models/tool_success_result.rb +152 -0
  161. data/lib/videogen/models/transcript.rb +97 -0
  162. data/lib/videogen/models/transcript_word.rb +93 -0
  163. data/lib/videogen/models/tts_voice.rb +162 -0
  164. data/lib/videogen/models/tts_voice_display_gender.rb +40 -0
  165. data/lib/videogen/models/tts_voice_list_response.rb +103 -0
  166. data/lib/videogen/models/update_entity_request.rb +88 -0
  167. data/lib/videogen/models/v1_entities_get_parameters_entity_type.rb +44 -0
  168. data/lib/videogen/models/video_asset_request.rb +125 -0
  169. data/lib/videogen/models/visual_pacing.rb +41 -0
  170. data/lib/videogen/models/voiceover_to_video_request.rb +297 -0
  171. data/lib/videogen/models/watermark_mode.rb +43 -0
  172. data/lib/videogen/models/webhook_endpoint.rb +137 -0
  173. data/lib/videogen/models/webhook_endpoint_list_response.rb +103 -0
  174. data/lib/videogen/models/webhook_event_name.rb +100 -0
  175. data/lib/videogen/models/workflow_caption_background_style.rb +133 -0
  176. data/lib/videogen/models/workflow_caption_background_style_type.rb +41 -0
  177. data/lib/videogen/models/workflow_caption_style.rb +220 -0
  178. data/lib/videogen/models/workflow_caption_style_font_weight.rb +64 -0
  179. data/lib/videogen/models/workflow_caption_style_text_justification.rb +40 -0
  180. data/lib/videogen/models/workflow_caption_style_vertical_alignment.rb +40 -0
  181. data/lib/videogen/models/workflow_rgb_color.rb +116 -0
  182. data/lib/videogen/models/workflow_run.rb +150 -0
  183. data/lib/videogen/models/workflow_run_list_response.rb +103 -0
  184. data/lib/videogen/models/workflow_type.rb +52 -0
  185. data/lib/videogen/models/workflow_type1.rb +52 -0
  186. data/lib/videogen/models/workflow_visual_style.rb +136 -0
  187. data/lib/videogen/models/workflow_visual_style_type.rb +38 -0
  188. data/lib/videogen/utilities/date_time_helper.rb +11 -0
  189. data/lib/videogen/utilities/file_wrapper.rb +28 -0
  190. data/lib/videogen/utilities/union_type_lookup.rb +188 -0
  191. data/lib/videogen.rb +213 -0
  192. metadata +275 -0
@@ -0,0 +1,210 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # TimelineInterchange Model.
8
+ class TimelineInterchange < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Opaque timeline interchange job id (e.g. `vg_inte_...`) matching the
13
+ # original request.
14
+ # @return [String]
15
+ attr_accessor :interchange_job_id
16
+
17
+ # Id of the source project (e.g. `vg_proj_...`).
18
+ # @return [String]
19
+ attr_accessor :project_id
20
+
21
+ # Editor interchange document format. `FCPXML` is Final Cut Pro (also
22
+ # imported by DaVinci Resolve and others). `PREMIERE_XML` is the Final Cut 7
23
+ # `xmeml` XML that Adobe Premiere Pro imports natively. `OTIO` is
24
+ # OpenTimelineIO, the vendor-neutral format. `SRT` is a SubRip caption
25
+ # sidecar.
26
+ # @return [TimelineInterchangeFormat]
27
+ attr_accessor :format
28
+
29
+ # How the interchange document references media. `REMOTE_URLS` produces a
30
+ # single document that links to signed media URLs. `BUNDLE` produces a zip
31
+ # containing the document plus every referenced media file, referenced by
32
+ # relative path, for durable offline relinking.
33
+ # @return [TimelineInterchangeMediaDelivery]
34
+ attr_accessor :media_delivery
35
+
36
+ # Lifecycle status shared by every asynchronous job (tool executions,
37
+ # workflow runs, remix actions, project exports, and timeline interchange
38
+ # jobs). `pending` and `running` are in-progress; `succeeded`, `failed`, and
39
+ # `cancelled` are terminal.
40
+ # @return [JobStatus]
41
+ attr_accessor :status
42
+
43
+ # Completion progress for the current attempt (0-100). Always `100` when
44
+ # `status` is `succeeded`.
45
+ # @return [Float]
46
+ attr_accessor :progress_percentage
47
+
48
+ # Zero-based index of the current or most recent job attempt.
49
+ # @return [Integer]
50
+ attr_accessor :attempt_index
51
+
52
+ # Private signed download URL for the interchange document (or the media
53
+ # bundle zip when `mediaDelivery` is `BUNDLE`), valid for 7 days from when
54
+ # it was signed. Always present as a field; `null` until `status` is
55
+ # `succeeded`. This endpoint automatically re-signs the URL when it is
56
+ # within an hour of expiring. To fetch a fresh URL directly from the
57
+ # underlying file at any time, use `interchangeFileId` with the hydrate-file
58
+ # endpoint.
59
+ # @return [String]
60
+ attr_accessor :download_url
61
+
62
+ # Seconds since epoch (Unix timestamp) when `downloadUrl` expires. `null`
63
+ # while `downloadUrl` is null.
64
+ # @return [Integer]
65
+ attr_accessor :download_url_expires_at
66
+
67
+ # File id (e.g. `vg_file_...`) of the interchange document or bundle zip.
68
+ # Always present as a field; `null` until `status` is `succeeded`. Pass it
69
+ # to `POST /v1/files/{fileId}/hydrate` to fetch fresh signed URLs directly
70
+ # from the file at any time.
71
+ # @return [String]
72
+ attr_accessor :interchange_file_id
73
+
74
+ # Hydrated interchange file metadata with a signed download URL. Always
75
+ # present as a field; `null` until `status` is `succeeded`. Its signed URL
76
+ # follows the same 24-hour validity and automatic re-signing as
77
+ # `downloadUrl`.
78
+ # @return [FileInfo]
79
+ attr_accessor :file
80
+
81
+ # Error details. Always present as a field; `null` unless `status` is
82
+ # `failed`.
83
+ # @return [ApiError]
84
+ attr_accessor :error
85
+
86
+ # A mapping from model property names to API property names.
87
+ def self.names
88
+ @_hash = {} if @_hash.nil?
89
+ @_hash['interchange_job_id'] = 'interchangeJobId'
90
+ @_hash['project_id'] = 'projectId'
91
+ @_hash['format'] = 'format'
92
+ @_hash['media_delivery'] = 'mediaDelivery'
93
+ @_hash['status'] = 'status'
94
+ @_hash['progress_percentage'] = 'progressPercentage'
95
+ @_hash['attempt_index'] = 'attemptIndex'
96
+ @_hash['download_url'] = 'downloadUrl'
97
+ @_hash['download_url_expires_at'] = 'downloadUrlExpiresAt'
98
+ @_hash['interchange_file_id'] = 'interchangeFileId'
99
+ @_hash['file'] = 'file'
100
+ @_hash['error'] = 'error'
101
+ @_hash
102
+ end
103
+
104
+ # An array for optional fields
105
+ def self.optionals
106
+ []
107
+ end
108
+
109
+ # An array for nullable fields
110
+ def self.nullables
111
+ %w[
112
+ download_url
113
+ download_url_expires_at
114
+ interchange_file_id
115
+ file
116
+ error
117
+ ]
118
+ end
119
+
120
+ def initialize(interchange_job_id:, project_id:, format:, media_delivery:,
121
+ status:, progress_percentage:, attempt_index:, download_url:,
122
+ download_url_expires_at:, interchange_file_id:, file:,
123
+ error:, additional_properties: nil)
124
+ # Add additional model properties to the instance
125
+ additional_properties = {} if additional_properties.nil?
126
+
127
+ @interchange_job_id = interchange_job_id
128
+ @project_id = project_id
129
+ @format = format
130
+ @media_delivery = media_delivery
131
+ @status = status
132
+ @progress_percentage = progress_percentage
133
+ @attempt_index = attempt_index
134
+ @download_url = download_url
135
+ @download_url_expires_at = download_url_expires_at
136
+ @interchange_file_id = interchange_file_id
137
+ @file = file
138
+ @error = error
139
+ @additional_properties = additional_properties
140
+ end
141
+
142
+ # Creates an instance of the object from a hash.
143
+ def self.from_hash(hash)
144
+ return nil unless hash
145
+
146
+ # Extract variables from the hash.
147
+ interchange_job_id =
148
+ hash.key?('interchangeJobId') ? hash['interchangeJobId'] : nil
149
+ project_id = hash.key?('projectId') ? hash['projectId'] : nil
150
+ format = hash.key?('format') ? hash['format'] : nil
151
+ media_delivery = hash.key?('mediaDelivery') ? hash['mediaDelivery'] : nil
152
+ status = hash.key?('status') ? hash['status'] : nil
153
+ progress_percentage =
154
+ hash.key?('progressPercentage') ? hash['progressPercentage'] : nil
155
+ attempt_index = hash.key?('attemptIndex') ? hash['attemptIndex'] : nil
156
+ download_url = hash.key?('downloadUrl') ? hash['downloadUrl'] : nil
157
+ download_url_expires_at =
158
+ hash.key?('downloadUrlExpiresAt') ? hash['downloadUrlExpiresAt'] : nil
159
+ interchange_file_id =
160
+ hash.key?('interchangeFileId') ? hash['interchangeFileId'] : nil
161
+ file = FileInfo.from_hash(hash['file']) if hash['file']
162
+ error = ApiError.from_hash(hash['error']) if hash['error']
163
+
164
+ # Create a new hash for additional properties, removing known properties.
165
+ new_hash = hash.reject { |k, _| names.value?(k) }
166
+
167
+ additional_properties = APIHelper.get_additional_properties(
168
+ new_hash, proc { |value| value }
169
+ )
170
+
171
+ # Create object from extracted values.
172
+ TimelineInterchange.new(interchange_job_id: interchange_job_id,
173
+ project_id: project_id,
174
+ format: format,
175
+ media_delivery: media_delivery,
176
+ status: status,
177
+ progress_percentage: progress_percentage,
178
+ attempt_index: attempt_index,
179
+ download_url: download_url,
180
+ download_url_expires_at: download_url_expires_at,
181
+ interchange_file_id: interchange_file_id,
182
+ file: file,
183
+ error: error,
184
+ additional_properties: additional_properties)
185
+ end
186
+
187
+ # Provides a human-readable string representation of the object.
188
+ def to_s
189
+ class_name = self.class.name.split('::').last
190
+ "<#{class_name} interchange_job_id: #{@interchange_job_id}, project_id: #{@project_id},"\
191
+ " format: #{@format}, media_delivery: #{@media_delivery}, status: #{@status},"\
192
+ " progress_percentage: #{@progress_percentage}, attempt_index: #{@attempt_index},"\
193
+ " download_url: #{@download_url}, download_url_expires_at: #{@download_url_expires_at},"\
194
+ " interchange_file_id: #{@interchange_file_id}, file: #{@file}, error: #{@error},"\
195
+ " additional_properties: #{@additional_properties}>"
196
+ end
197
+
198
+ # Provides a debugging-friendly string with detailed object information.
199
+ def inspect
200
+ class_name = self.class.name.split('::').last
201
+ "<#{class_name} interchange_job_id: #{@interchange_job_id.inspect}, project_id:"\
202
+ " #{@project_id.inspect}, format: #{@format.inspect}, media_delivery:"\
203
+ " #{@media_delivery.inspect}, status: #{@status.inspect}, progress_percentage:"\
204
+ " #{@progress_percentage.inspect}, attempt_index: #{@attempt_index.inspect}, download_url:"\
205
+ " #{@download_url.inspect}, download_url_expires_at: #{@download_url_expires_at.inspect},"\
206
+ " interchange_file_id: #{@interchange_file_id.inspect}, file: #{@file.inspect}, error:"\
207
+ " #{@error.inspect}, additional_properties: #{@additional_properties}>"
208
+ end
209
+ end
210
+ end
@@ -0,0 +1,47 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Editor interchange document format. `FCPXML` is Final Cut Pro (also imported
8
+ # by DaVinci Resolve and others). `PREMIERE_XML` is the Final Cut 7 `xmeml`
9
+ # XML that Adobe Premiere Pro imports natively. `OTIO` is OpenTimelineIO, the
10
+ # vendor-neutral format. `SRT` is a SubRip caption sidecar.
11
+ class TimelineInterchangeFormat
12
+ TIMELINE_INTERCHANGE_FORMAT = [
13
+ # TODO: Write general description for FCPXML
14
+ FCPXML = 'FCPXML'.freeze,
15
+
16
+ # TODO: Write general description for PREMIERE_XML
17
+ PREMIERE_XML = 'PREMIERE_XML'.freeze,
18
+
19
+ # TODO: Write general description for OTIO
20
+ OTIO = 'OTIO'.freeze,
21
+
22
+ # TODO: Write general description for SRT
23
+ SRT = 'SRT'.freeze
24
+ ].freeze
25
+
26
+ def self.validate(value)
27
+ return false if value.nil?
28
+
29
+ TIMELINE_INTERCHANGE_FORMAT.include?(value)
30
+ end
31
+
32
+ def self.from_value(value, default_value = FCPXML)
33
+ return default_value if value.nil?
34
+
35
+ str = value.to_s.strip
36
+
37
+ case str.downcase
38
+ when 'fcpxml' then FCPXML
39
+ when 'premiere_xml' then PREMIERE_XML
40
+ when 'otio' then OTIO
41
+ when 'srt' then SRT
42
+ else
43
+ default_value
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,39 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # How the interchange document references media. `REMOTE_URLS` produces a
8
+ # single document that links to signed media URLs. `BUNDLE` produces a zip
9
+ # containing the document plus every referenced media file, referenced by
10
+ # relative path, for durable offline relinking.
11
+ class TimelineInterchangeMediaDelivery
12
+ TIMELINE_INTERCHANGE_MEDIA_DELIVERY = [
13
+ # TODO: Write general description for REMOTE_URLS
14
+ REMOTE_URLS = 'REMOTE_URLS'.freeze,
15
+
16
+ # TODO: Write general description for BUNDLE
17
+ BUNDLE = 'BUNDLE'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ TIMELINE_INTERCHANGE_MEDIA_DELIVERY.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = REMOTE_URLS)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'remote_urls' then REMOTE_URLS
33
+ when 'bundle' then BUNDLE
34
+ else
35
+ default_value
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,104 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Paginated list of API-started tool executions, most recently created first.
8
+ class ToolExecutionListResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[ExecutedTool]]
14
+ attr_accessor :tool_executions
15
+
16
+ # When true, there are more executions available. Pass `nextCursor` as the
17
+ # `cursor` query param to fetch the next page.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :has_more
20
+
21
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
22
+ # @return [String]
23
+ attr_accessor :next_cursor
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['tool_executions'] = 'toolExecutions'
29
+ @_hash['has_more'] = 'hasMore'
30
+ @_hash['next_cursor'] = 'nextCursor'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ %w[
42
+ next_cursor
43
+ ]
44
+ end
45
+
46
+ def initialize(tool_executions:, has_more:, next_cursor:,
47
+ additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @tool_executions = tool_executions
52
+ @has_more = has_more
53
+ @next_cursor = next_cursor
54
+ @additional_properties = additional_properties
55
+ end
56
+
57
+ # Creates an instance of the object from a hash.
58
+ def self.from_hash(hash)
59
+ return nil unless hash
60
+
61
+ # Extract variables from the hash.
62
+ # Parameter is an array, so we need to iterate through it
63
+ tool_executions = nil
64
+ unless hash['toolExecutions'].nil?
65
+ tool_executions = []
66
+ hash['toolExecutions'].each do |structure|
67
+ tool_executions << (ExecutedTool.from_hash(structure) if structure)
68
+ end
69
+ end
70
+
71
+ tool_executions = nil unless hash.key?('toolExecutions')
72
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
73
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
74
+
75
+ # Create a new hash for additional properties, removing known properties.
76
+ new_hash = hash.reject { |k, _| names.value?(k) }
77
+
78
+ additional_properties = APIHelper.get_additional_properties(
79
+ new_hash, proc { |value| value }
80
+ )
81
+
82
+ # Create object from extracted values.
83
+ ToolExecutionListResponse.new(tool_executions: tool_executions,
84
+ has_more: has_more,
85
+ next_cursor: next_cursor,
86
+ additional_properties: additional_properties)
87
+ end
88
+
89
+ # Provides a human-readable string representation of the object.
90
+ def to_s
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} tool_executions: #{@tool_executions}, has_more: #{@has_more}, next_cursor:"\
93
+ " #{@next_cursor}, additional_properties: #{@additional_properties}>"
94
+ end
95
+
96
+ # Provides a debugging-friendly string with detailed object information.
97
+ def inspect
98
+ class_name = self.class.name.split('::').last
99
+ "<#{class_name} tool_executions: #{@tool_executions.inspect}, has_more:"\
100
+ " #{@has_more.inspect}, next_cursor: #{@next_cursor.inspect}, additional_properties:"\
101
+ " #{@additional_properties}>"
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,152 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Result for a single generated file. Only appears inside a succeeded
8
+ # execution's `results`, so every field below is always present.
9
+ class ToolSuccessResult < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # File id for the generated asset.
14
+ # @return [String]
15
+ attr_accessor :file_id
16
+
17
+ # File type.
18
+ # @return [FileType1]
19
+ attr_accessor :type
20
+
21
+ # Private signed download URL for the generated file, valid for 7 days from
22
+ # when it was signed. Provided at the top level for convenience so you don't
23
+ # have to read it out of `file`. When you GET a single execution it is
24
+ # automatically re-signed if within an hour of expiring; list endpoints do
25
+ # not re-sign, so there it may be expired (check `downloadUrlExpiresAt`).
26
+ # See `downloadUrlExpiresAt` for the exact expiry. Null only in the rare
27
+ # case that the highest-quality rendition is still finalizing.
28
+ # @return [String]
29
+ attr_accessor :download_url
30
+
31
+ # Seconds since epoch (Unix timestamp) when `downloadUrl` expires. Null only
32
+ # when `downloadUrl` is null.
33
+ # @return [Integer]
34
+ attr_accessor :download_url_expires_at
35
+
36
+ # Private signed thumbnail URL for the generated file, valid for 7 days from
37
+ # when it was signed. Provided at the top level for convenience so you don't
38
+ # have to read it out of `file`. Re-signed on the same terms as
39
+ # `downloadUrl` (single-execution GET re-signs when near expiry; list
40
+ # endpoints do not). Null for file types that have no thumbnail (e.g.
41
+ # audio).
42
+ # @return [String]
43
+ attr_accessor :thumbnail_url
44
+
45
+ # Seconds since epoch (Unix timestamp) when `thumbnailUrl` expires. Null
46
+ # when there is no thumbnail URL.
47
+ # @return [Integer]
48
+ attr_accessor :thumbnail_url_expires_at
49
+
50
+ # Hydrated file metadata with signed download URLs (always present and
51
+ # hydrated for a succeeded result). Its signed URLs follow the same 24-hour
52
+ # validity and automatic re-signing as `downloadUrl`.
53
+ # @return [FileInfo1]
54
+ attr_accessor :file
55
+
56
+ # A mapping from model property names to API property names.
57
+ def self.names
58
+ @_hash = {} if @_hash.nil?
59
+ @_hash['file_id'] = 'fileId'
60
+ @_hash['type'] = 'type'
61
+ @_hash['download_url'] = 'downloadUrl'
62
+ @_hash['download_url_expires_at'] = 'downloadUrlExpiresAt'
63
+ @_hash['thumbnail_url'] = 'thumbnailUrl'
64
+ @_hash['thumbnail_url_expires_at'] = 'thumbnailUrlExpiresAt'
65
+ @_hash['file'] = 'file'
66
+ @_hash
67
+ end
68
+
69
+ # An array for optional fields
70
+ def self.optionals
71
+ []
72
+ end
73
+
74
+ # An array for nullable fields
75
+ def self.nullables
76
+ %w[
77
+ download_url
78
+ download_url_expires_at
79
+ thumbnail_url
80
+ thumbnail_url_expires_at
81
+ ]
82
+ end
83
+
84
+ def initialize(file_id:, type:, download_url:, download_url_expires_at:,
85
+ thumbnail_url:, thumbnail_url_expires_at:, file:,
86
+ additional_properties: nil)
87
+ # Add additional model properties to the instance
88
+ additional_properties = {} if additional_properties.nil?
89
+
90
+ @file_id = file_id
91
+ @type = type
92
+ @download_url = download_url
93
+ @download_url_expires_at = download_url_expires_at
94
+ @thumbnail_url = thumbnail_url
95
+ @thumbnail_url_expires_at = thumbnail_url_expires_at
96
+ @file = file
97
+ @additional_properties = additional_properties
98
+ end
99
+
100
+ # Creates an instance of the object from a hash.
101
+ def self.from_hash(hash)
102
+ return nil unless hash
103
+
104
+ # Extract variables from the hash.
105
+ file_id = hash.key?('fileId') ? hash['fileId'] : nil
106
+ type = hash.key?('type') ? hash['type'] : nil
107
+ download_url = hash.key?('downloadUrl') ? hash['downloadUrl'] : nil
108
+ download_url_expires_at =
109
+ hash.key?('downloadUrlExpiresAt') ? hash['downloadUrlExpiresAt'] : nil
110
+ thumbnail_url = hash.key?('thumbnailUrl') ? hash['thumbnailUrl'] : nil
111
+ thumbnail_url_expires_at =
112
+ hash.key?('thumbnailUrlExpiresAt') ? hash['thumbnailUrlExpiresAt'] : nil
113
+ file = FileInfo1.from_hash(hash['file']) if hash['file']
114
+
115
+ # Create a new hash for additional properties, removing known properties.
116
+ new_hash = hash.reject { |k, _| names.value?(k) }
117
+
118
+ additional_properties = APIHelper.get_additional_properties(
119
+ new_hash, proc { |value| value }
120
+ )
121
+
122
+ # Create object from extracted values.
123
+ ToolSuccessResult.new(file_id: file_id,
124
+ type: type,
125
+ download_url: download_url,
126
+ download_url_expires_at: download_url_expires_at,
127
+ thumbnail_url: thumbnail_url,
128
+ thumbnail_url_expires_at: thumbnail_url_expires_at,
129
+ file: file,
130
+ additional_properties: additional_properties)
131
+ end
132
+
133
+ # Provides a human-readable string representation of the object.
134
+ def to_s
135
+ class_name = self.class.name.split('::').last
136
+ "<#{class_name} file_id: #{@file_id}, type: #{@type}, download_url: #{@download_url},"\
137
+ " download_url_expires_at: #{@download_url_expires_at}, thumbnail_url: #{@thumbnail_url},"\
138
+ " thumbnail_url_expires_at: #{@thumbnail_url_expires_at}, file: #{@file},"\
139
+ " additional_properties: #{@additional_properties}>"
140
+ end
141
+
142
+ # Provides a debugging-friendly string with detailed object information.
143
+ def inspect
144
+ class_name = self.class.name.split('::').last
145
+ "<#{class_name} file_id: #{@file_id.inspect}, type: #{@type.inspect}, download_url:"\
146
+ " #{@download_url.inspect}, download_url_expires_at: #{@download_url_expires_at.inspect},"\
147
+ " thumbnail_url: #{@thumbnail_url.inspect}, thumbnail_url_expires_at:"\
148
+ " #{@thumbnail_url_expires_at.inspect}, file: #{@file.inspect}, additional_properties:"\
149
+ " #{@additional_properties}>"
150
+ end
151
+ end
152
+ end
@@ -0,0 +1,97 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A transcript of an audio file, as timed words in order.
8
+ class Transcript < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Optional BCP-47 language code of the spoken audio (e.g. `en`, `es`). Used
13
+ # to tag the transcript's language; omit if unknown.
14
+ # @return [String]
15
+ attr_accessor :language_code
16
+
17
+ # The transcript words, sorted by `startSeconds` and non-overlapping. Must
18
+ # contain at least one word.
19
+ # @return [Array[TranscriptWord]]
20
+ attr_accessor :words
21
+
22
+ # A mapping from model property names to API property names.
23
+ def self.names
24
+ @_hash = {} if @_hash.nil?
25
+ @_hash['language_code'] = 'languageCode'
26
+ @_hash['words'] = 'words'
27
+ @_hash
28
+ end
29
+
30
+ # An array for optional fields
31
+ def self.optionals
32
+ %w[
33
+ language_code
34
+ ]
35
+ end
36
+
37
+ # An array for nullable fields
38
+ def self.nullables
39
+ %w[
40
+ language_code
41
+ ]
42
+ end
43
+
44
+ def initialize(words:, language_code: SKIP, additional_properties: nil)
45
+ # Add additional model properties to the instance
46
+ additional_properties = {} if additional_properties.nil?
47
+
48
+ @language_code = language_code unless language_code == SKIP
49
+ @words = words
50
+ @additional_properties = additional_properties
51
+ end
52
+
53
+ # Creates an instance of the object from a hash.
54
+ def self.from_hash(hash)
55
+ return nil unless hash
56
+
57
+ # Extract variables from the hash.
58
+ # Parameter is an array, so we need to iterate through it
59
+ words = nil
60
+ unless hash['words'].nil?
61
+ words = []
62
+ hash['words'].each do |structure|
63
+ words << (TranscriptWord.from_hash(structure) if structure)
64
+ end
65
+ end
66
+
67
+ words = nil unless hash.key?('words')
68
+ language_code = hash.key?('languageCode') ? hash['languageCode'] : SKIP
69
+
70
+ # Create a new hash for additional properties, removing known properties.
71
+ new_hash = hash.reject { |k, _| names.value?(k) }
72
+
73
+ additional_properties = APIHelper.get_additional_properties(
74
+ new_hash, proc { |value| value }
75
+ )
76
+
77
+ # Create object from extracted values.
78
+ Transcript.new(words: words,
79
+ language_code: language_code,
80
+ additional_properties: additional_properties)
81
+ end
82
+
83
+ # Provides a human-readable string representation of the object.
84
+ def to_s
85
+ class_name = self.class.name.split('::').last
86
+ "<#{class_name} language_code: #{@language_code}, words: #{@words}, additional_properties:"\
87
+ " #{@additional_properties}>"
88
+ end
89
+
90
+ # Provides a debugging-friendly string with detailed object information.
91
+ def inspect
92
+ class_name = self.class.name.split('::').last
93
+ "<#{class_name} language_code: #{@language_code.inspect}, words: #{@words.inspect},"\
94
+ " additional_properties: #{@additional_properties}>"
95
+ end
96
+ end
97
+ end