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,297 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # At least one of `prompt`, `startFrameFileId`, `imageFileIds`,
8
+ # `videoFileIds`, `audioFileIds`, or `spokenDialogue` must be provided.
9
+ class GenerateVideoClipRequest < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Text prompt describing the video to generate. Optional when reference
14
+ # media, `startFrameFileId`, or `spokenDialogue` is provided. Describe the
15
+ # video in plain language; any reference media you provide is incorporated
16
+ # automatically.
17
+ # @return [String]
18
+ attr_accessor :prompt
19
+
20
+ # Optional file id of the opening-frame still (e.g. `vg_file_...`). Upload
21
+ # first via `POST /v1/files/upload`. When set, this image is the first frame
22
+ # of the clip. If the same id also appears in `imageFileIds`, it is used
23
+ # only as the opening frame and dropped from the reference list. Can be the
24
+ # only input (prompt optional).
25
+ # @return [String]
26
+ attr_accessor :start_frame_file_id
27
+
28
+ # Optional file ids of reference images (e.g. `["vg_file_..."]`). Upload
29
+ # files first via `POST /v1/files/upload`, then pass the returned ids here.
30
+ # When provided, the images are used as visual guidance. To animate a
31
+ # specific still as the opening frame, pass it as `startFrameFileId`
32
+ # instead.
33
+ # @return [Array[String]]
34
+ attr_accessor :image_file_ids
35
+
36
+ # Optional file ids of reference videos (e.g. `["vg_file_..."]`). Upload
37
+ # files first via `POST /v1/files/upload`, then pass the returned ids here.
38
+ # They are used as motion or style guidance for the generated video.
39
+ # @return [Array[String]]
40
+ attr_accessor :video_file_ids
41
+
42
+ # Optional file ids of reference audio clips (e.g. `["vg_file_..."]`) used
43
+ # for lip-sync from that recording. Upload files first via `POST
44
+ # /v1/files/upload`, then pass the returned ids here. To have the model
45
+ # speak a line it generates itself, pass `spokenDialogue` instead (or in
46
+ # addition).
47
+ # @return [Array[String]]
48
+ attr_accessor :audio_file_ids
49
+
50
+ # Optional exact line the subject should speak as native, lip-synced speech
51
+ # in the generated clip. The model synthesizes the voice from this text. Can
52
+ # be the only input. Combine with a visual `prompt`, `startFrameFileId`, or
53
+ # reference media. Combine with `audioFileIds` when you also have a
54
+ # reference recording.
55
+ # @return [String]
56
+ attr_accessor :spoken_dialogue
57
+
58
+ # Optional natural-language description of the voice that speaks
59
+ # `spokenDialogue` (for example, a warm, confident young man's voice). Used
60
+ # when `spokenDialogue` is set. When omitted, a clear natural voice is used.
61
+ # @return [String]
62
+ attr_accessor :voice_description
63
+
64
+ # When true, the generated video is guaranteed to include audio. When false,
65
+ # audio may still be present. Defaults to false.
66
+ # @return [TrueClass | FalseClass]
67
+ attr_accessor :generate_audio
68
+
69
+ # When true, the generated clip will not include a musical soundtrack.
70
+ # Spoken dialogue and environmental sound are still allowed. Use this when
71
+ # you will add background music separately (for example at the project
72
+ # level). Defaults to false.
73
+ # @return [TrueClass | FalseClass]
74
+ attr_accessor :suppress_background_music
75
+
76
+ # Desired clip length in seconds. A whole number between 1 and 30. Defaults
77
+ # to 6 when omitted. The generated clip is clamped to the selected quality's
78
+ # supported range. This endpoint produces a single short clip. For longer,
79
+ # multi-scene, professionally edited videos, use a video workflow such as
80
+ # `POST /v1/workflows/script-to-video`.
81
+ # @return [Integer]
82
+ attr_accessor :duration_seconds
83
+
84
+ # Aspect ratio for the generated video. Defaults to 16:9 when omitted.
85
+ # @return [AspectRatio1]
86
+ attr_accessor :aspect_ratio
87
+
88
+ # Video generation quality tier (`LOW`, `STANDARD`, `HIGH`, or `MAX`).
89
+ # Optional; when omitted, your account's Default AI quality for video is
90
+ # used (change it at https://app.videogen.io/settings/account).
91
+ # @return [ModelQuality11]
92
+ attr_accessor :quality
93
+
94
+ # Controls how content-policy rejections are handled during generation.
95
+ # @return [ContentPolicyConfig]
96
+ attr_accessor :content_policy_config
97
+
98
+ # Controls whether the VideoGen watermark is applied to the output. `AUTO`
99
+ # applies the watermark unless you have a Pro plan. `VIDEO_GEN` always
100
+ # applies it. `NONE` removes the watermark (requires Pro; returns an error
101
+ # if you don't have it).
102
+ # @return [WatermarkMode]
103
+ attr_accessor :watermark_mode
104
+
105
+ # Number of output results to generate. Defaults to 1.
106
+ # @return [Integer]
107
+ attr_accessor :num_results
108
+
109
+ # When true, generated files are temporary. Temporary files are guaranteed
110
+ # to be available for 24 hours, after which they may be archived at any
111
+ # time. Temporary files are not analyzed (no description, transcript, or
112
+ # embedding will be generated), so they will not appear in search results.
113
+ # Defaults to false.
114
+ # @return [TrueClass | FalseClass]
115
+ attr_accessor :is_output_temporary
116
+
117
+ # When true, generated files are hidden from the VideoGen Media page by
118
+ # default. They remain accessible through the API. Defaults to false.
119
+ # @return [TrueClass | FalseClass]
120
+ attr_accessor :hide_from_ui
121
+
122
+ # A mapping from model property names to API property names.
123
+ def self.names
124
+ @_hash = {} if @_hash.nil?
125
+ @_hash['prompt'] = 'prompt'
126
+ @_hash['start_frame_file_id'] = 'startFrameFileId'
127
+ @_hash['image_file_ids'] = 'imageFileIds'
128
+ @_hash['video_file_ids'] = 'videoFileIds'
129
+ @_hash['audio_file_ids'] = 'audioFileIds'
130
+ @_hash['spoken_dialogue'] = 'spokenDialogue'
131
+ @_hash['voice_description'] = 'voiceDescription'
132
+ @_hash['generate_audio'] = 'generateAudio'
133
+ @_hash['suppress_background_music'] = 'suppressBackgroundMusic'
134
+ @_hash['duration_seconds'] = 'durationSeconds'
135
+ @_hash['aspect_ratio'] = 'aspectRatio'
136
+ @_hash['quality'] = 'quality'
137
+ @_hash['content_policy_config'] = 'contentPolicyConfig'
138
+ @_hash['watermark_mode'] = 'watermarkMode'
139
+ @_hash['num_results'] = 'numResults'
140
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
141
+ @_hash['hide_from_ui'] = 'hideFromUi'
142
+ @_hash
143
+ end
144
+
145
+ # An array for optional fields
146
+ def self.optionals
147
+ %w[
148
+ prompt
149
+ start_frame_file_id
150
+ image_file_ids
151
+ video_file_ids
152
+ audio_file_ids
153
+ spoken_dialogue
154
+ voice_description
155
+ generate_audio
156
+ suppress_background_music
157
+ duration_seconds
158
+ aspect_ratio
159
+ quality
160
+ content_policy_config
161
+ watermark_mode
162
+ num_results
163
+ is_output_temporary
164
+ hide_from_ui
165
+ ]
166
+ end
167
+
168
+ # An array for nullable fields
169
+ def self.nullables
170
+ %w[
171
+ duration_seconds
172
+ ]
173
+ end
174
+
175
+ def initialize(prompt: SKIP, start_frame_file_id: SKIP,
176
+ image_file_ids: SKIP, video_file_ids: SKIP,
177
+ audio_file_ids: SKIP, spoken_dialogue: SKIP,
178
+ voice_description: SKIP, generate_audio: false,
179
+ suppress_background_music: false, duration_seconds: SKIP,
180
+ aspect_ratio: SKIP, quality: SKIP,
181
+ content_policy_config: SKIP,
182
+ watermark_mode: WatermarkMode::AUTO, num_results: 1,
183
+ is_output_temporary: false, hide_from_ui: false,
184
+ additional_properties: nil)
185
+ # Add additional model properties to the instance
186
+ additional_properties = {} if additional_properties.nil?
187
+
188
+ @prompt = prompt unless prompt == SKIP
189
+ @start_frame_file_id = start_frame_file_id unless start_frame_file_id == SKIP
190
+ @image_file_ids = image_file_ids unless image_file_ids == SKIP
191
+ @video_file_ids = video_file_ids unless video_file_ids == SKIP
192
+ @audio_file_ids = audio_file_ids unless audio_file_ids == SKIP
193
+ @spoken_dialogue = spoken_dialogue unless spoken_dialogue == SKIP
194
+ @voice_description = voice_description unless voice_description == SKIP
195
+ @generate_audio = generate_audio unless generate_audio == SKIP
196
+ unless suppress_background_music == SKIP
197
+ @suppress_background_music =
198
+ suppress_background_music
199
+ end
200
+ @duration_seconds = duration_seconds unless duration_seconds == SKIP
201
+ @aspect_ratio = aspect_ratio unless aspect_ratio == SKIP
202
+ @quality = quality unless quality == SKIP
203
+ @content_policy_config = content_policy_config unless content_policy_config == SKIP
204
+ @watermark_mode = watermark_mode unless watermark_mode == SKIP
205
+ @num_results = num_results unless num_results == SKIP
206
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
207
+ @hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
208
+ @additional_properties = additional_properties
209
+ end
210
+
211
+ # Creates an instance of the object from a hash.
212
+ def self.from_hash(hash)
213
+ return nil unless hash
214
+
215
+ # Extract variables from the hash.
216
+ prompt = hash.key?('prompt') ? hash['prompt'] : SKIP
217
+ start_frame_file_id =
218
+ hash.key?('startFrameFileId') ? hash['startFrameFileId'] : SKIP
219
+ image_file_ids = hash.key?('imageFileIds') ? hash['imageFileIds'] : SKIP
220
+ video_file_ids = hash.key?('videoFileIds') ? hash['videoFileIds'] : SKIP
221
+ audio_file_ids = hash.key?('audioFileIds') ? hash['audioFileIds'] : SKIP
222
+ spoken_dialogue =
223
+ hash.key?('spokenDialogue') ? hash['spokenDialogue'] : SKIP
224
+ voice_description =
225
+ hash.key?('voiceDescription') ? hash['voiceDescription'] : SKIP
226
+ generate_audio = hash['generateAudio'] ||= false
227
+ suppress_background_music = hash['suppressBackgroundMusic'] ||= false
228
+ duration_seconds =
229
+ hash.key?('durationSeconds') ? hash['durationSeconds'] : SKIP
230
+ aspect_ratio = AspectRatio1.from_hash(hash['aspectRatio']) if hash['aspectRatio']
231
+ quality = hash.key?('quality') ? hash['quality'] : SKIP
232
+ content_policy_config = ContentPolicyConfig.from_hash(hash['contentPolicyConfig']) if
233
+ hash['contentPolicyConfig']
234
+ watermark_mode = hash['watermarkMode'] ||= WatermarkMode::AUTO
235
+ num_results = hash['numResults'] ||= 1
236
+ is_output_temporary = hash['isOutputTemporary'] ||= false
237
+ hide_from_ui = hash['hideFromUi'] ||= false
238
+
239
+ # Create a new hash for additional properties, removing known properties.
240
+ new_hash = hash.reject { |k, _| names.value?(k) }
241
+
242
+ additional_properties = APIHelper.get_additional_properties(
243
+ new_hash, proc { |value| value }
244
+ )
245
+
246
+ # Create object from extracted values.
247
+ GenerateVideoClipRequest.new(prompt: prompt,
248
+ start_frame_file_id: start_frame_file_id,
249
+ image_file_ids: image_file_ids,
250
+ video_file_ids: video_file_ids,
251
+ audio_file_ids: audio_file_ids,
252
+ spoken_dialogue: spoken_dialogue,
253
+ voice_description: voice_description,
254
+ generate_audio: generate_audio,
255
+ suppress_background_music: suppress_background_music,
256
+ duration_seconds: duration_seconds,
257
+ aspect_ratio: aspect_ratio,
258
+ quality: quality,
259
+ content_policy_config: content_policy_config,
260
+ watermark_mode: watermark_mode,
261
+ num_results: num_results,
262
+ is_output_temporary: is_output_temporary,
263
+ hide_from_ui: hide_from_ui,
264
+ additional_properties: additional_properties)
265
+ end
266
+
267
+ # Provides a human-readable string representation of the object.
268
+ def to_s
269
+ class_name = self.class.name.split('::').last
270
+ "<#{class_name} prompt: #{@prompt}, start_frame_file_id: #{@start_frame_file_id},"\
271
+ " image_file_ids: #{@image_file_ids}, video_file_ids: #{@video_file_ids}, audio_file_ids:"\
272
+ " #{@audio_file_ids}, spoken_dialogue: #{@spoken_dialogue}, voice_description:"\
273
+ " #{@voice_description}, generate_audio: #{@generate_audio}, suppress_background_music:"\
274
+ " #{@suppress_background_music}, duration_seconds: #{@duration_seconds}, aspect_ratio:"\
275
+ " #{@aspect_ratio}, quality: #{@quality}, content_policy_config: #{@content_policy_config},"\
276
+ " watermark_mode: #{@watermark_mode}, num_results: #{@num_results}, is_output_temporary:"\
277
+ " #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui}, additional_properties:"\
278
+ " #{@additional_properties}>"
279
+ end
280
+
281
+ # Provides a debugging-friendly string with detailed object information.
282
+ def inspect
283
+ class_name = self.class.name.split('::').last
284
+ "<#{class_name} prompt: #{@prompt.inspect}, start_frame_file_id:"\
285
+ " #{@start_frame_file_id.inspect}, image_file_ids: #{@image_file_ids.inspect},"\
286
+ " video_file_ids: #{@video_file_ids.inspect}, audio_file_ids: #{@audio_file_ids.inspect},"\
287
+ " spoken_dialogue: #{@spoken_dialogue.inspect}, voice_description:"\
288
+ " #{@voice_description.inspect}, generate_audio: #{@generate_audio.inspect},"\
289
+ " suppress_background_music: #{@suppress_background_music.inspect}, duration_seconds:"\
290
+ " #{@duration_seconds.inspect}, aspect_ratio: #{@aspect_ratio.inspect}, quality:"\
291
+ " #{@quality.inspect}, content_policy_config: #{@content_policy_config.inspect},"\
292
+ " watermark_mode: #{@watermark_mode.inspect}, num_results: #{@num_results.inspect},"\
293
+ " is_output_temporary: #{@is_output_temporary.inspect}, hide_from_ui:"\
294
+ " #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
295
+ end
296
+ end
297
+ end
@@ -0,0 +1,135 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # An assistant chat and every message it currently contains.
8
+ class GetAssistantResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Opaque assistant chat id (e.g. `vg_asst_...`).
13
+ # @return [String]
14
+ attr_accessor :assistant_id
15
+
16
+ # Opaque project id of the project this chat belongs to (e.g.
17
+ # `vg_proj_...`).
18
+ # @return [String]
19
+ attr_accessor :project_id
20
+
21
+ # Deep link to open this chat's project in the VideoGen web app. Visible
22
+ # only to members of your team and project collaborators.
23
+ # @return [String]
24
+ attr_accessor :project_url
25
+
26
+ # Every message in the chat in chronological order (oldest first).
27
+ # @return [Array[Object]]
28
+ attr_accessor :messages
29
+
30
+ # A mapping from model property names to API property names.
31
+ def self.names
32
+ @_hash = {} if @_hash.nil?
33
+ @_hash['assistant_id'] = 'assistantId'
34
+ @_hash['project_id'] = 'projectId'
35
+ @_hash['project_url'] = 'projectUrl'
36
+ @_hash['messages'] = 'messages'
37
+ @_hash
38
+ end
39
+
40
+ # An array for optional fields
41
+ def self.optionals
42
+ []
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ []
48
+ end
49
+
50
+ def initialize(assistant_id:, project_id:, project_url:, messages:,
51
+ additional_properties: nil)
52
+ # Add additional model properties to the instance
53
+ additional_properties = {} if additional_properties.nil?
54
+
55
+ @assistant_id = assistant_id
56
+ @project_id = project_id
57
+ @project_url = project_url
58
+ @messages = messages
59
+ @additional_properties = additional_properties
60
+ end
61
+
62
+ # Creates an instance of the object from a hash.
63
+ def self.from_hash(hash)
64
+ return nil unless hash
65
+
66
+ # Extract variables from the hash.
67
+ assistant_id = hash.key?('assistantId') ? hash['assistantId'] : nil
68
+ project_id = hash.key?('projectId') ? hash['projectId'] : nil
69
+ project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
70
+ messages = hash.key?('messages') ? APIHelper.deserialize_union_type(
71
+ UnionTypeLookUp.get(:AssistantMessage22), hash['messages']
72
+ ) : nil
73
+
74
+ # Create a new hash for additional properties, removing known properties.
75
+ new_hash = hash.reject { |k, _| names.value?(k) }
76
+
77
+ additional_properties = APIHelper.get_additional_properties(
78
+ new_hash, proc { |value| value }
79
+ )
80
+
81
+ # Create object from extracted values.
82
+ GetAssistantResponse.new(assistant_id: assistant_id,
83
+ project_id: project_id,
84
+ project_url: project_url,
85
+ messages: messages,
86
+ additional_properties: additional_properties)
87
+ end
88
+
89
+ # Validates an instance of the object from a given value.
90
+ # @param [GetAssistantResponse | Hash] The value against the validation is performed.
91
+ def self.validate(value)
92
+ if value.instance_of? self
93
+ return (
94
+ APIHelper.valid_type?(value.assistant_id,
95
+ ->(val) { val.instance_of? String }) and
96
+ APIHelper.valid_type?(value.project_id,
97
+ ->(val) { val.instance_of? String }) and
98
+ APIHelper.valid_type?(value.project_url,
99
+ ->(val) { val.instance_of? String }) and
100
+ UnionTypeLookUp.get(:AssistantMessage22)
101
+ .validate(value.messages)
102
+ )
103
+ end
104
+
105
+ return false unless value.instance_of? Hash
106
+
107
+ (
108
+ APIHelper.valid_type?(value['assistantId'],
109
+ ->(val) { val.instance_of? String }) and
110
+ APIHelper.valid_type?(value['projectId'],
111
+ ->(val) { val.instance_of? String }) and
112
+ APIHelper.valid_type?(value['projectUrl'],
113
+ ->(val) { val.instance_of? String }) and
114
+ UnionTypeLookUp.get(:AssistantMessage22)
115
+ .validate(value['messages'])
116
+ )
117
+ end
118
+
119
+ # Provides a human-readable string representation of the object.
120
+ def to_s
121
+ class_name = self.class.name.split('::').last
122
+ "<#{class_name} assistant_id: #{@assistant_id}, project_id: #{@project_id}, project_url:"\
123
+ " #{@project_url}, messages: #{@messages}, additional_properties:"\
124
+ " #{@additional_properties}>"
125
+ end
126
+
127
+ # Provides a debugging-friendly string with detailed object information.
128
+ def inspect
129
+ class_name = self.class.name.split('::').last
130
+ "<#{class_name} assistant_id: #{@assistant_id.inspect}, project_id: #{@project_id.inspect},"\
131
+ " project_url: #{@project_url.inspect}, messages: #{@messages.inspect},"\
132
+ " additional_properties: #{@additional_properties}>"
133
+ end
134
+ end
135
+ end
@@ -0,0 +1,102 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # GetFilesResponse Model.
8
+ class GetFilesResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[FileInfo]]
14
+ attr_accessor :files
15
+
16
+ # When true, there are more files 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['files'] = 'files'
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(files:, has_more:, next_cursor:, additional_properties: nil)
47
+ # Add additional model properties to the instance
48
+ additional_properties = {} if additional_properties.nil?
49
+
50
+ @files = files
51
+ @has_more = has_more
52
+ @next_cursor = next_cursor
53
+ @additional_properties = additional_properties
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ # Parameter is an array, so we need to iterate through it
62
+ files = nil
63
+ unless hash['files'].nil?
64
+ files = []
65
+ hash['files'].each do |structure|
66
+ files << (FileInfo.from_hash(structure) if structure)
67
+ end
68
+ end
69
+
70
+ files = nil unless hash.key?('files')
71
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
72
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
73
+
74
+ # Create a new hash for additional properties, removing known properties.
75
+ new_hash = hash.reject { |k, _| names.value?(k) }
76
+
77
+ additional_properties = APIHelper.get_additional_properties(
78
+ new_hash, proc { |value| value }
79
+ )
80
+
81
+ # Create object from extracted values.
82
+ GetFilesResponse.new(files: files,
83
+ has_more: has_more,
84
+ next_cursor: next_cursor,
85
+ additional_properties: additional_properties)
86
+ end
87
+
88
+ # Provides a human-readable string representation of the object.
89
+ def to_s
90
+ class_name = self.class.name.split('::').last
91
+ "<#{class_name} files: #{@files}, has_more: #{@has_more}, next_cursor: #{@next_cursor},"\
92
+ " additional_properties: #{@additional_properties}>"
93
+ end
94
+
95
+ # Provides a debugging-friendly string with detailed object information.
96
+ def inspect
97
+ class_name = self.class.name.split('::').last
98
+ "<#{class_name} files: #{@files.inspect}, has_more: #{@has_more.inspect}, next_cursor:"\
99
+ " #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,125 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # ImageAssetRequest Model.
8
+ class ImageAssetRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # File id of the source image (e.g. `vg_file_...`). Upload a file first via
13
+ # `POST /v1/files/upload`, then pass the returned id here.
14
+ # @return [String]
15
+ attr_accessor :image_file_id
16
+
17
+ # Controls whether the VideoGen watermark is applied to the output. `AUTO`
18
+ # applies the watermark unless you have a Pro plan. `VIDEO_GEN` always
19
+ # applies it. `NONE` removes the watermark (requires Pro; returns an error
20
+ # if you don't have it).
21
+ # @return [WatermarkMode]
22
+ attr_accessor :watermark_mode
23
+
24
+ # Number of output results to generate. Defaults to 1.
25
+ # @return [Integer]
26
+ attr_accessor :num_results
27
+
28
+ # When true, generated files are temporary. Temporary files are guaranteed
29
+ # to be available for 24 hours, after which they may be archived at any
30
+ # time. Temporary files are not analyzed (no description, transcript, or
31
+ # embedding will be generated), so they will not appear in search results.
32
+ # Defaults to false.
33
+ # @return [TrueClass | FalseClass]
34
+ attr_accessor :is_output_temporary
35
+
36
+ # When true, generated files are hidden from the VideoGen Media page by
37
+ # default. They remain accessible through the API. Defaults to false.
38
+ # @return [TrueClass | FalseClass]
39
+ attr_accessor :hide_from_ui
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['image_file_id'] = 'imageFileId'
45
+ @_hash['watermark_mode'] = 'watermarkMode'
46
+ @_hash['num_results'] = 'numResults'
47
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
48
+ @_hash['hide_from_ui'] = 'hideFromUi'
49
+ @_hash
50
+ end
51
+
52
+ # An array for optional fields
53
+ def self.optionals
54
+ %w[
55
+ watermark_mode
56
+ num_results
57
+ is_output_temporary
58
+ hide_from_ui
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ []
65
+ end
66
+
67
+ def initialize(image_file_id:, watermark_mode: WatermarkMode::AUTO,
68
+ num_results: 1, is_output_temporary: false,
69
+ hide_from_ui: false, additional_properties: nil)
70
+ # Add additional model properties to the instance
71
+ additional_properties = {} if additional_properties.nil?
72
+
73
+ @image_file_id = image_file_id
74
+ @watermark_mode = watermark_mode unless watermark_mode == SKIP
75
+ @num_results = num_results unless num_results == SKIP
76
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
77
+ @hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
78
+ @additional_properties = additional_properties
79
+ end
80
+
81
+ # Creates an instance of the object from a hash.
82
+ def self.from_hash(hash)
83
+ return nil unless hash
84
+
85
+ # Extract variables from the hash.
86
+ image_file_id = hash.key?('imageFileId') ? hash['imageFileId'] : nil
87
+ watermark_mode = hash['watermarkMode'] ||= WatermarkMode::AUTO
88
+ num_results = hash['numResults'] ||= 1
89
+ is_output_temporary = hash['isOutputTemporary'] ||= false
90
+ hide_from_ui = hash['hideFromUi'] ||= false
91
+
92
+ # Create a new hash for additional properties, removing known properties.
93
+ new_hash = hash.reject { |k, _| names.value?(k) }
94
+
95
+ additional_properties = APIHelper.get_additional_properties(
96
+ new_hash, proc { |value| value }
97
+ )
98
+
99
+ # Create object from extracted values.
100
+ ImageAssetRequest.new(image_file_id: image_file_id,
101
+ watermark_mode: watermark_mode,
102
+ num_results: num_results,
103
+ is_output_temporary: is_output_temporary,
104
+ hide_from_ui: hide_from_ui,
105
+ additional_properties: additional_properties)
106
+ end
107
+
108
+ # Provides a human-readable string representation of the object.
109
+ def to_s
110
+ class_name = self.class.name.split('::').last
111
+ "<#{class_name} image_file_id: #{@image_file_id}, watermark_mode: #{@watermark_mode},"\
112
+ " num_results: #{@num_results}, is_output_temporary: #{@is_output_temporary}, hide_from_ui:"\
113
+ " #{@hide_from_ui}, additional_properties: #{@additional_properties}>"
114
+ end
115
+
116
+ # Provides a debugging-friendly string with detailed object information.
117
+ def inspect
118
+ class_name = self.class.name.split('::').last
119
+ "<#{class_name} image_file_id: #{@image_file_id.inspect}, watermark_mode:"\
120
+ " #{@watermark_mode.inspect}, num_results: #{@num_results.inspect}, is_output_temporary:"\
121
+ " #{@is_output_temporary.inspect}, hide_from_ui: #{@hide_from_ui.inspect},"\
122
+ " additional_properties: #{@additional_properties}>"
123
+ end
124
+ end
125
+ end