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,73 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # RemoveEntityReferenceRequest Model.
8
+ class RemoveEntityReferenceRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The file id (e.g. `vg_file_...`) of the reference to remove.
13
+ # @return [String]
14
+ attr_accessor :file_id
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['file_id'] = 'fileId'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(file_id:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @file_id = file_id
38
+ @additional_properties = additional_properties
39
+ end
40
+
41
+ # Creates an instance of the object from a hash.
42
+ def self.from_hash(hash)
43
+ return nil unless hash
44
+
45
+ # Extract variables from the hash.
46
+ file_id = hash.key?('fileId') ? hash['fileId'] : nil
47
+
48
+ # Create a new hash for additional properties, removing known properties.
49
+ new_hash = hash.reject { |k, _| names.value?(k) }
50
+
51
+ additional_properties = APIHelper.get_additional_properties(
52
+ new_hash, proc { |value| value }
53
+ )
54
+
55
+ # Create object from extracted values.
56
+ RemoveEntityReferenceRequest.new(file_id: file_id,
57
+ additional_properties: additional_properties)
58
+ end
59
+
60
+ # Provides a human-readable string representation of the object.
61
+ def to_s
62
+ class_name = self.class.name.split('::').last
63
+ "<#{class_name} file_id: #{@file_id}, additional_properties: #{@additional_properties}>"
64
+ end
65
+
66
+ # Provides a debugging-friendly string with detailed object information.
67
+ def inspect
68
+ class_name = self.class.name.split('::').last
69
+ "<#{class_name} file_id: #{@file_id.inspect}, additional_properties:"\
70
+ " #{@additional_properties}>"
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,121 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A description of the visuals to show during an absolute time range of the
8
+ # finished video.
9
+ class SceneDescriptionRange < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Start time of the range in seconds from the beginning of the video.
14
+ # @return [Float]
15
+ attr_accessor :start_seconds
16
+
17
+ # End time of the range in seconds from the beginning of the video. Must be
18
+ # greater than `startSeconds`.
19
+ # @return [Float]
20
+ attr_accessor :end_seconds
21
+
22
+ # What should be shown on screen during this range (e.g. the b-roll subject,
23
+ # on-screen text, or staging).
24
+ # @return [String]
25
+ attr_accessor :description
26
+
27
+ # A mapping from model property names to API property names.
28
+ def self.names
29
+ @_hash = {} if @_hash.nil?
30
+ @_hash['start_seconds'] = 'startSeconds'
31
+ @_hash['end_seconds'] = 'endSeconds'
32
+ @_hash['description'] = 'description'
33
+ @_hash
34
+ end
35
+
36
+ # An array for optional fields
37
+ def self.optionals
38
+ []
39
+ end
40
+
41
+ # An array for nullable fields
42
+ def self.nullables
43
+ []
44
+ end
45
+
46
+ def initialize(start_seconds:, end_seconds:, description:,
47
+ additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @start_seconds = start_seconds
52
+ @end_seconds = end_seconds
53
+ @description = description
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
+ start_seconds = hash.key?('startSeconds') ? hash['startSeconds'] : nil
63
+ end_seconds = hash.key?('endSeconds') ? hash['endSeconds'] : nil
64
+ description = hash.key?('description') ? hash['description'] : nil
65
+
66
+ # Create a new hash for additional properties, removing known properties.
67
+ new_hash = hash.reject { |k, _| names.value?(k) }
68
+
69
+ additional_properties = APIHelper.get_additional_properties(
70
+ new_hash, proc { |value| value }
71
+ )
72
+
73
+ # Create object from extracted values.
74
+ SceneDescriptionRange.new(start_seconds: start_seconds,
75
+ end_seconds: end_seconds,
76
+ description: description,
77
+ additional_properties: additional_properties)
78
+ end
79
+
80
+ # Validates an instance of the object from a given value.
81
+ # @param [SceneDescriptionRange | Hash] The value against the validation is performed.
82
+ def self.validate(value)
83
+ if value.instance_of? self
84
+ return (
85
+ APIHelper.valid_type?(value.start_seconds,
86
+ ->(val) { val.instance_of? Float }) and
87
+ APIHelper.valid_type?(value.end_seconds,
88
+ ->(val) { val.instance_of? Float }) and
89
+ APIHelper.valid_type?(value.description,
90
+ ->(val) { val.instance_of? String })
91
+ )
92
+ end
93
+
94
+ return false unless value.instance_of? Hash
95
+
96
+ (
97
+ APIHelper.valid_type?(value['startSeconds'],
98
+ ->(val) { val.instance_of? Float }) and
99
+ APIHelper.valid_type?(value['endSeconds'],
100
+ ->(val) { val.instance_of? Float }) and
101
+ APIHelper.valid_type?(value['description'],
102
+ ->(val) { val.instance_of? String })
103
+ )
104
+ end
105
+
106
+ # Provides a human-readable string representation of the object.
107
+ def to_s
108
+ class_name = self.class.name.split('::').last
109
+ "<#{class_name} start_seconds: #{@start_seconds}, end_seconds: #{@end_seconds},"\
110
+ " description: #{@description}, additional_properties: #{@additional_properties}>"
111
+ end
112
+
113
+ # Provides a debugging-friendly string with detailed object information.
114
+ def inspect
115
+ class_name = self.class.name.split('::').last
116
+ "<#{class_name} start_seconds: #{@start_seconds.inspect}, end_seconds:"\
117
+ " #{@end_seconds.inspect}, description: #{@description.inspect}, additional_properties:"\
118
+ " #{@additional_properties}>"
119
+ end
120
+ end
121
+ end
@@ -0,0 +1,309 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # ScriptToVideoRequest Model.
8
+ class ScriptToVideoRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The narration script, used verbatim. This exact text is narrated and
13
+ # turned into a video — it is not rewritten or expanded.
14
+ # @return [String]
15
+ attr_accessor :script
16
+
17
+ # Aspect ratio as a width:height pair (e.g. 16 and 9 for 16:9). Not pixel
18
+ # dimensions.
19
+ # @return [AspectRatio]
20
+ attr_accessor :aspect_ratio
21
+
22
+ # Visual style for the generated b-roll.
23
+ # @return [WorkflowVisualStyle]
24
+ attr_accessor :visual_style
25
+
26
+ # How quickly visuals change. FAST shows more, shorter shots; SLOW holds
27
+ # each visual longer. Defaults to MEDIUM.
28
+ # @return [VisualPacing]
29
+ attr_accessor :visual_pacing
30
+
31
+ # Image generation quality tier for AI-generated visuals. Optional; when
32
+ # omitted, your account's Default AI quality for images is used (change it
33
+ # at https://app.videogen.io/settings/account). Only applies when
34
+ # `visualStyle.type` is AI_IMAGE; STOCK pulls existing footage and is
35
+ # unaffected.
36
+ # @return [ModelQuality4]
37
+ attr_accessor :quality
38
+
39
+ # Output language as a BCP-47 code (e.g. `en`, `es`, `fr`). Defaults to
40
+ # English.
41
+ # @return [String]
42
+ attr_accessor :language
43
+
44
+ # Catalog `displayName` (e.g. `Matilda`) or voice id from `GET
45
+ # /v1/resources/tts-voices` (e.g. `vg_voic_...`). A default voice is used
46
+ # when omitted. Any voice may be used here, including voices where
47
+ # `supportsDirectToolExecution` is false.
48
+ # @return [String]
49
+ attr_accessor :voice_id
50
+
51
+ # Speech rate multiplier, between 0.5 (half speed) and 2 (double speed).
52
+ # Defaults to the voice's default speed.
53
+ # @return [Float]
54
+ attr_accessor :voice_speed
55
+
56
+ # Recommended. Optional id of a built-in stock actor or an ACTOR entity
57
+ # (e.g. `vg_enti_...`) with an image reference. When set, narration is
58
+ # delivered by that actor avatar. Omit or pass `null` for voiceover without
59
+ # an avatar.
60
+ # @return [String]
61
+ attr_accessor :actor_entity_id
62
+
63
+ # Avatar generation quality tier. Applies when `actorEntityId` is provided.
64
+ # Optional; when omitted, your account's Default AI quality for avatars is
65
+ # used.
66
+ # @return [ModelQuality3]
67
+ attr_accessor :avatar_quality
68
+
69
+ # Optional file ids of images or videos to feature as b-roll (e.g.
70
+ # `["vg_file_..."]`). Upload files first via `POST /v1/files/upload`. Only
71
+ # image and video files are accepted.
72
+ # @return [Array[String]]
73
+ attr_accessor :featured_b_roll_file_ids
74
+
75
+ # Optional production notes for the AI that builds the video — visual
76
+ # direction that should not appear in the spoken narration (e.g. on-screen
77
+ # code or text to display, specific b-roll to feature, or scene-by-scene
78
+ # staging). Never spoken; keep the narration itself in `script`.
79
+ # @return [String]
80
+ attr_accessor :workflow_agent_context
81
+
82
+ # Optional timed scene descriptions guiding what to show on screen during
83
+ # each absolute time range of the video. Ranges must be sorted by
84
+ # `startSeconds` and non-overlapping. Omit to let the workflow choose
85
+ # visuals automatically.
86
+ # @return [Array[SceneDescriptionRange]]
87
+ attr_accessor :scenes
88
+
89
+ # Optional edits applied to the project after the video is built, in order.
90
+ # Each action runs asynchronously; the response returns one remix action id
91
+ # per action. Recommended for script-to-video: `ENABLE_CAPTIONS` to show and
92
+ # style captions, `CONVERT_IMAGES_TO_VIDEOS` to animate still images into
93
+ # clips, `ADD_TRANSITIONS` to stamp transitions between sections, and
94
+ # `SET_LOGO` to overlay a logo (this workflow has no native caption-style or
95
+ # logo fields). See the [Remix actions](/remix-actions) guide.
96
+ # @return [Array[Object]]
97
+ attr_accessor :remix_actions
98
+
99
+ # When true, the video's generated OUTPUT files (AI images, video clips,
100
+ # voiceover audio, avatars) are created as temporary: guaranteed available
101
+ # for 24 hours, after which they may be archived and later deleted. This
102
+ # also covers files produced by post-build remix actions (e.g. generated
103
+ # background music, image-to-video conversions). Use this when your
104
+ # integration downloads or re-hosts the results itself and does not need
105
+ # VideoGen to retain them. The project and its metadata are unaffected.
106
+ # Defaults to false.
107
+ # @return [TrueClass | FalseClass]
108
+ attr_accessor :is_output_temporary
109
+
110
+ # When true, generated files are hidden from the VideoGen Media page by
111
+ # default. They remain accessible through the API. Defaults to false.
112
+ # @return [TrueClass | FalseClass]
113
+ attr_accessor :hide_from_ui
114
+
115
+ # A mapping from model property names to API property names.
116
+ def self.names
117
+ @_hash = {} if @_hash.nil?
118
+ @_hash['script'] = 'script'
119
+ @_hash['aspect_ratio'] = 'aspectRatio'
120
+ @_hash['visual_style'] = 'visualStyle'
121
+ @_hash['visual_pacing'] = 'visualPacing'
122
+ @_hash['quality'] = 'quality'
123
+ @_hash['language'] = 'language'
124
+ @_hash['voice_id'] = 'voiceId'
125
+ @_hash['voice_speed'] = 'voiceSpeed'
126
+ @_hash['actor_entity_id'] = 'actorEntityId'
127
+ @_hash['avatar_quality'] = 'avatarQuality'
128
+ @_hash['featured_b_roll_file_ids'] = 'featuredBRollFileIds'
129
+ @_hash['workflow_agent_context'] = 'workflowAgentContext'
130
+ @_hash['scenes'] = 'scenes'
131
+ @_hash['remix_actions'] = 'remixActions'
132
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
133
+ @_hash['hide_from_ui'] = 'hideFromUi'
134
+ @_hash
135
+ end
136
+
137
+ # An array for optional fields
138
+ def self.optionals
139
+ %w[
140
+ aspect_ratio
141
+ visual_pacing
142
+ quality
143
+ language
144
+ voice_id
145
+ voice_speed
146
+ actor_entity_id
147
+ avatar_quality
148
+ featured_b_roll_file_ids
149
+ workflow_agent_context
150
+ scenes
151
+ remix_actions
152
+ is_output_temporary
153
+ hide_from_ui
154
+ ]
155
+ end
156
+
157
+ # An array for nullable fields
158
+ def self.nullables
159
+ %w[
160
+ voice_id
161
+ actor_entity_id
162
+ ]
163
+ end
164
+
165
+ def initialize(script:, visual_style:, aspect_ratio: SKIP,
166
+ visual_pacing: VisualPacing::MEDIUM, quality: SKIP,
167
+ language: SKIP, voice_id: SKIP, voice_speed: SKIP,
168
+ actor_entity_id: SKIP, avatar_quality: SKIP,
169
+ featured_b_roll_file_ids: SKIP, workflow_agent_context: SKIP,
170
+ scenes: SKIP, remix_actions: SKIP,
171
+ is_output_temporary: false, hide_from_ui: false,
172
+ additional_properties: nil)
173
+ # Add additional model properties to the instance
174
+ additional_properties = {} if additional_properties.nil?
175
+
176
+ @script = script
177
+ @aspect_ratio = aspect_ratio unless aspect_ratio == SKIP
178
+ @visual_style = visual_style
179
+ @visual_pacing = visual_pacing unless visual_pacing == SKIP
180
+ @quality = quality unless quality == SKIP
181
+ @language = language unless language == SKIP
182
+ @voice_id = voice_id unless voice_id == SKIP
183
+ @voice_speed = voice_speed unless voice_speed == SKIP
184
+ @actor_entity_id = actor_entity_id unless actor_entity_id == SKIP
185
+ @avatar_quality = avatar_quality unless avatar_quality == SKIP
186
+ @featured_b_roll_file_ids = featured_b_roll_file_ids unless featured_b_roll_file_ids == SKIP
187
+ @workflow_agent_context = workflow_agent_context unless workflow_agent_context == SKIP
188
+ @scenes = scenes unless scenes == SKIP
189
+ @remix_actions = remix_actions unless remix_actions == SKIP
190
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
191
+ @hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
192
+ @additional_properties = additional_properties
193
+ end
194
+
195
+ # Creates an instance of the object from a hash.
196
+ def self.from_hash(hash)
197
+ return nil unless hash
198
+
199
+ # Extract variables from the hash.
200
+ script = hash.key?('script') ? hash['script'] : nil
201
+ visual_style = WorkflowVisualStyle.from_hash(hash['visualStyle']) if hash['visualStyle']
202
+ aspect_ratio = AspectRatio.from_hash(hash['aspectRatio']) if hash['aspectRatio']
203
+ visual_pacing = hash['visualPacing'] ||= VisualPacing::MEDIUM
204
+ quality = hash.key?('quality') ? hash['quality'] : SKIP
205
+ language = hash.key?('language') ? hash['language'] : SKIP
206
+ voice_id = hash.key?('voiceId') ? hash['voiceId'] : SKIP
207
+ voice_speed = hash.key?('voiceSpeed') ? hash['voiceSpeed'] : SKIP
208
+ actor_entity_id =
209
+ hash.key?('actorEntityId') ? hash['actorEntityId'] : SKIP
210
+ avatar_quality = hash.key?('avatarQuality') ? hash['avatarQuality'] : SKIP
211
+ featured_b_roll_file_ids =
212
+ hash.key?('featuredBRollFileIds') ? hash['featuredBRollFileIds'] : SKIP
213
+ workflow_agent_context =
214
+ hash.key?('workflowAgentContext') ? hash['workflowAgentContext'] : SKIP
215
+ # Parameter is an array, so we need to iterate through it
216
+ scenes = nil
217
+ unless hash['scenes'].nil?
218
+ scenes = []
219
+ hash['scenes'].each do |structure|
220
+ scenes << (SceneDescriptionRange.from_hash(structure) if structure)
221
+ end
222
+ end
223
+
224
+ scenes = SKIP unless hash.key?('scenes')
225
+ remix_actions = hash.key?('remixActions') ? APIHelper.deserialize_union_type(
226
+ UnionTypeLookUp.get(:RemixAction15), hash['remixActions']
227
+ ) : SKIP
228
+ is_output_temporary = hash['isOutputTemporary'] ||= false
229
+ hide_from_ui = hash['hideFromUi'] ||= false
230
+
231
+ # Create a new hash for additional properties, removing known properties.
232
+ new_hash = hash.reject { |k, _| names.value?(k) }
233
+
234
+ additional_properties = APIHelper.get_additional_properties(
235
+ new_hash, proc { |value| value }
236
+ )
237
+
238
+ # Create object from extracted values.
239
+ ScriptToVideoRequest.new(script: script,
240
+ visual_style: visual_style,
241
+ aspect_ratio: aspect_ratio,
242
+ visual_pacing: visual_pacing,
243
+ quality: quality,
244
+ language: language,
245
+ voice_id: voice_id,
246
+ voice_speed: voice_speed,
247
+ actor_entity_id: actor_entity_id,
248
+ avatar_quality: avatar_quality,
249
+ featured_b_roll_file_ids: featured_b_roll_file_ids,
250
+ workflow_agent_context: workflow_agent_context,
251
+ scenes: scenes,
252
+ remix_actions: remix_actions,
253
+ is_output_temporary: is_output_temporary,
254
+ hide_from_ui: hide_from_ui,
255
+ additional_properties: additional_properties)
256
+ end
257
+
258
+ # Validates an instance of the object from a given value.
259
+ # @param [ScriptToVideoRequest | Hash] The value against the validation is performed.
260
+ def self.validate(value)
261
+ if value.instance_of? self
262
+ return (
263
+ APIHelper.valid_type?(value.script,
264
+ ->(val) { val.instance_of? String }) and
265
+ APIHelper.valid_type?(value.visual_style,
266
+ ->(val) { WorkflowVisualStyle.validate(val) },
267
+ is_model_hash: true)
268
+ )
269
+ end
270
+
271
+ return false unless value.instance_of? Hash
272
+
273
+ (
274
+ APIHelper.valid_type?(value['script'],
275
+ ->(val) { val.instance_of? String }) and
276
+ APIHelper.valid_type?(value['visualStyle'],
277
+ ->(val) { WorkflowVisualStyle.validate(val) },
278
+ is_model_hash: true)
279
+ )
280
+ end
281
+
282
+ # Provides a human-readable string representation of the object.
283
+ def to_s
284
+ class_name = self.class.name.split('::').last
285
+ "<#{class_name} script: #{@script}, aspect_ratio: #{@aspect_ratio}, visual_style:"\
286
+ " #{@visual_style}, visual_pacing: #{@visual_pacing}, quality: #{@quality}, language:"\
287
+ " #{@language}, voice_id: #{@voice_id}, voice_speed: #{@voice_speed}, actor_entity_id:"\
288
+ " #{@actor_entity_id}, avatar_quality: #{@avatar_quality}, featured_b_roll_file_ids:"\
289
+ " #{@featured_b_roll_file_ids}, workflow_agent_context: #{@workflow_agent_context}, scenes:"\
290
+ " #{@scenes}, remix_actions: #{@remix_actions}, is_output_temporary:"\
291
+ " #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui}, additional_properties:"\
292
+ " #{@additional_properties}>"
293
+ end
294
+
295
+ # Provides a debugging-friendly string with detailed object information.
296
+ def inspect
297
+ class_name = self.class.name.split('::').last
298
+ "<#{class_name} script: #{@script.inspect}, aspect_ratio: #{@aspect_ratio.inspect},"\
299
+ " visual_style: #{@visual_style.inspect}, visual_pacing: #{@visual_pacing.inspect}, quality:"\
300
+ " #{@quality.inspect}, language: #{@language.inspect}, voice_id: #{@voice_id.inspect},"\
301
+ " voice_speed: #{@voice_speed.inspect}, actor_entity_id: #{@actor_entity_id.inspect},"\
302
+ " avatar_quality: #{@avatar_quality.inspect}, featured_b_roll_file_ids:"\
303
+ " #{@featured_b_roll_file_ids.inspect}, workflow_agent_context:"\
304
+ " #{@workflow_agent_context.inspect}, scenes: #{@scenes.inspect}, remix_actions:"\
305
+ " #{@remix_actions.inspect}, is_output_temporary: #{@is_output_temporary.inspect},"\
306
+ " hide_from_ui: #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
307
+ end
308
+ end
309
+ end
@@ -0,0 +1,96 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # SearchFilesRequest Model.
8
+ class SearchFilesRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Natural-language search query. The text is embedded and compared against
13
+ # file description vectors using cosine similarity.
14
+ # @return [String]
15
+ attr_accessor :query
16
+
17
+ # Number of results to return (1-100). Defaults to 10.
18
+ # @return [Integer]
19
+ attr_accessor :num_results
20
+
21
+ # When true, only files created by the calling API key's user are returned.
22
+ # When false (default), all files accessible to the team are included.
23
+ # @return [TrueClass | FalseClass]
24
+ attr_accessor :self_only
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['query'] = 'query'
30
+ @_hash['num_results'] = 'numResults'
31
+ @_hash['self_only'] = 'selfOnly'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ num_results
39
+ self_only
40
+ ]
41
+ end
42
+
43
+ # An array for nullable fields
44
+ def self.nullables
45
+ []
46
+ end
47
+
48
+ def initialize(query:, num_results: 10, self_only: false,
49
+ additional_properties: nil)
50
+ # Add additional model properties to the instance
51
+ additional_properties = {} if additional_properties.nil?
52
+
53
+ @query = query
54
+ @num_results = num_results unless num_results == SKIP
55
+ @self_only = self_only unless self_only == SKIP
56
+ @additional_properties = additional_properties
57
+ end
58
+
59
+ # Creates an instance of the object from a hash.
60
+ def self.from_hash(hash)
61
+ return nil unless hash
62
+
63
+ # Extract variables from the hash.
64
+ query = hash.key?('query') ? hash['query'] : nil
65
+ num_results = hash['numResults'] ||= 10
66
+ self_only = hash['selfOnly'] ||= false
67
+
68
+ # Create a new hash for additional properties, removing known properties.
69
+ new_hash = hash.reject { |k, _| names.value?(k) }
70
+
71
+ additional_properties = APIHelper.get_additional_properties(
72
+ new_hash, proc { |value| value }
73
+ )
74
+
75
+ # Create object from extracted values.
76
+ SearchFilesRequest.new(query: query,
77
+ num_results: num_results,
78
+ self_only: self_only,
79
+ additional_properties: additional_properties)
80
+ end
81
+
82
+ # Provides a human-readable string representation of the object.
83
+ def to_s
84
+ class_name = self.class.name.split('::').last
85
+ "<#{class_name} query: #{@query}, num_results: #{@num_results}, self_only: #{@self_only},"\
86
+ " additional_properties: #{@additional_properties}>"
87
+ end
88
+
89
+ # Provides a debugging-friendly string with detailed object information.
90
+ def inspect
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} query: #{@query.inspect}, num_results: #{@num_results.inspect}, self_only:"\
93
+ " #{@self_only.inspect}, additional_properties: #{@additional_properties}>"
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,82 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # SearchFilesResponse Model.
8
+ class SearchFilesResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[SearchFilesResult]]
14
+ attr_accessor :results
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['results'] = 'results'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(results:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @results = results
38
+ @additional_properties = additional_properties
39
+ end
40
+
41
+ # Creates an instance of the object from a hash.
42
+ def self.from_hash(hash)
43
+ return nil unless hash
44
+
45
+ # Extract variables from the hash.
46
+ # Parameter is an array, so we need to iterate through it
47
+ results = nil
48
+ unless hash['results'].nil?
49
+ results = []
50
+ hash['results'].each do |structure|
51
+ results << (SearchFilesResult.from_hash(structure) if structure)
52
+ end
53
+ end
54
+
55
+ results = nil unless hash.key?('results')
56
+
57
+ # Create a new hash for additional properties, removing known properties.
58
+ new_hash = hash.reject { |k, _| names.value?(k) }
59
+
60
+ additional_properties = APIHelper.get_additional_properties(
61
+ new_hash, proc { |value| value }
62
+ )
63
+
64
+ # Create object from extracted values.
65
+ SearchFilesResponse.new(results: results,
66
+ additional_properties: additional_properties)
67
+ end
68
+
69
+ # Provides a human-readable string representation of the object.
70
+ def to_s
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} results: #{@results}, additional_properties: #{@additional_properties}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} results: #{@results.inspect}, additional_properties:"\
79
+ " #{@additional_properties}>"
80
+ end
81
+ end
82
+ end