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,56 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # File type.
8
+ class FileType1
9
+ FILE_TYPE1 = [
10
+ # TODO: Write general description for IMAGE
11
+ IMAGE = 'IMAGE'.freeze,
12
+
13
+ # TODO: Write general description for VIDEO
14
+ VIDEO = 'VIDEO'.freeze,
15
+
16
+ # TODO: Write general description for AUDIO
17
+ AUDIO = 'AUDIO'.freeze,
18
+
19
+ # TODO: Write general description for PDF
20
+ PDF = 'PDF'.freeze,
21
+
22
+ # TODO: Write general description for SLIDESHOW
23
+ SLIDESHOW = 'SLIDESHOW'.freeze,
24
+
25
+ # TODO: Write general description for TEXT
26
+ TEXT = 'TEXT'.freeze,
27
+
28
+ # TODO: Write general description for LOTTIE
29
+ LOTTIE = 'LOTTIE'.freeze
30
+ ].freeze
31
+
32
+ def self.validate(value)
33
+ return false if value.nil?
34
+
35
+ FILE_TYPE1.include?(value)
36
+ end
37
+
38
+ def self.from_value(value, default_value = IMAGE)
39
+ return default_value if value.nil?
40
+
41
+ str = value.to_s.strip
42
+
43
+ case str.downcase
44
+ when 'image' then IMAGE
45
+ when 'video' then VIDEO
46
+ when 'audio' then AUDIO
47
+ when 'pdf' then PDF
48
+ when 'slideshow' then SLIDESHOW
49
+ when 'text' then TEXT
50
+ when 'lottie' then LOTTIE
51
+ else
52
+ default_value
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,57 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # The type of file to upload. Optional; when omitted, the type is inferred
8
+ # after upload processing completes.
9
+ class FileType2
10
+ FILE_TYPE2 = [
11
+ # TODO: Write general description for IMAGE
12
+ IMAGE = 'IMAGE'.freeze,
13
+
14
+ # TODO: Write general description for VIDEO
15
+ VIDEO = 'VIDEO'.freeze,
16
+
17
+ # TODO: Write general description for AUDIO
18
+ AUDIO = 'AUDIO'.freeze,
19
+
20
+ # TODO: Write general description for PDF
21
+ PDF = 'PDF'.freeze,
22
+
23
+ # TODO: Write general description for SLIDESHOW
24
+ SLIDESHOW = 'SLIDESHOW'.freeze,
25
+
26
+ # TODO: Write general description for TEXT
27
+ TEXT = 'TEXT'.freeze,
28
+
29
+ # TODO: Write general description for LOTTIE
30
+ LOTTIE = 'LOTTIE'.freeze
31
+ ].freeze
32
+
33
+ def self.validate(value)
34
+ return false if value.nil?
35
+
36
+ FILE_TYPE2.include?(value)
37
+ end
38
+
39
+ def self.from_value(value, default_value = IMAGE)
40
+ return default_value if value.nil?
41
+
42
+ str = value.to_s.strip
43
+
44
+ case str.downcase
45
+ when 'image' then IMAGE
46
+ when 'video' then VIDEO
47
+ when 'audio' then AUDIO
48
+ when 'pdf' then PDF
49
+ when 'slideshow' then SLIDESHOW
50
+ when 'text' then TEXT
51
+ when 'lottie' then LOTTIE
52
+ else
53
+ default_value
54
+ end
55
+ end
56
+ end
57
+ 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
+ # FileUploadResponse Model.
8
+ class FileUploadResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The file id to use in subsequent API calls (e.g. `vg_file_...`).
13
+ # @return [String]
14
+ attr_accessor :file_id
15
+
16
+ # Pre-signed URL. PUT the raw file bytes to this URL to complete the upload.
17
+ # @return [String]
18
+ attr_accessor :upload_url
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['file_id'] = 'fileId'
24
+ @_hash['upload_url'] = 'uploadUrl'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(file_id:, upload_url:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @file_id = file_id
43
+ @upload_url = upload_url
44
+ @additional_properties = additional_properties
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ file_id = hash.key?('fileId') ? hash['fileId'] : nil
53
+ upload_url = hash.key?('uploadUrl') ? hash['uploadUrl'] : nil
54
+
55
+ # Create a new hash for additional properties, removing known properties.
56
+ new_hash = hash.reject { |k, _| names.value?(k) }
57
+
58
+ additional_properties = APIHelper.get_additional_properties(
59
+ new_hash, proc { |value| value }
60
+ )
61
+
62
+ # Create object from extracted values.
63
+ FileUploadResponse.new(file_id: file_id,
64
+ upload_url: upload_url,
65
+ additional_properties: additional_properties)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} file_id: #{@file_id}, upload_url: #{@upload_url}, additional_properties:"\
72
+ " #{@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} file_id: #{@file_id.inspect}, upload_url: #{@upload_url.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,149 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Generate a talking-head avatar from an ACTOR entity and audio.
8
+ class GenerateAvatarRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The id of a built-in stock actor or an ACTOR entity (e.g. `vg_enti_...`)
13
+ # with an image reference.
14
+ # @return [String]
15
+ attr_accessor :actor_entity_id
16
+
17
+ # Avatar generation quality tier. Optional; when omitted, your account's
18
+ # Default AI quality for avatars is used.
19
+ # @return [ModelQuality12]
20
+ attr_accessor :avatar_quality
21
+
22
+ # File id of an AUDIO file (e.g. `vg_file_...`), typically from a prior
23
+ # text-to-speech result. Upload a file first via `POST /v1/files/upload` or
24
+ # generate one with `POST /v1/tools/text-to-speech`, then pass the returned
25
+ # id here.
26
+ # @return [String]
27
+ attr_accessor :audio_file_id
28
+
29
+ # Controls whether the VideoGen watermark is applied to the output. `AUTO`
30
+ # applies the watermark unless you have a Pro plan. `VIDEO_GEN` always
31
+ # applies it. `NONE` removes the watermark (requires Pro; returns an error
32
+ # if you don't have it).
33
+ # @return [WatermarkMode]
34
+ attr_accessor :watermark_mode
35
+
36
+ # Number of output results to generate. Defaults to 1.
37
+ # @return [Integer]
38
+ attr_accessor :num_results
39
+
40
+ # When true, generated files are temporary. Temporary files are guaranteed
41
+ # to be available for 24 hours, after which they may be archived at any
42
+ # time. Temporary files are not analyzed (no description, transcript, or
43
+ # embedding will be generated), so they will not appear in search results.
44
+ # Defaults to false.
45
+ # @return [TrueClass | FalseClass]
46
+ attr_accessor :is_output_temporary
47
+
48
+ # When true, generated files are hidden from the VideoGen Media page by
49
+ # default. They remain accessible through the API. Defaults to false.
50
+ # @return [TrueClass | FalseClass]
51
+ attr_accessor :hide_from_ui
52
+
53
+ # A mapping from model property names to API property names.
54
+ def self.names
55
+ @_hash = {} if @_hash.nil?
56
+ @_hash['actor_entity_id'] = 'actorEntityId'
57
+ @_hash['avatar_quality'] = 'avatarQuality'
58
+ @_hash['audio_file_id'] = 'audioFileId'
59
+ @_hash['watermark_mode'] = 'watermarkMode'
60
+ @_hash['num_results'] = 'numResults'
61
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
62
+ @_hash['hide_from_ui'] = 'hideFromUi'
63
+ @_hash
64
+ end
65
+
66
+ # An array for optional fields
67
+ def self.optionals
68
+ %w[
69
+ avatar_quality
70
+ watermark_mode
71
+ num_results
72
+ is_output_temporary
73
+ hide_from_ui
74
+ ]
75
+ end
76
+
77
+ # An array for nullable fields
78
+ def self.nullables
79
+ []
80
+ end
81
+
82
+ def initialize(actor_entity_id:, audio_file_id:, avatar_quality: SKIP,
83
+ watermark_mode: WatermarkMode::AUTO, num_results: 1,
84
+ is_output_temporary: false, hide_from_ui: false,
85
+ additional_properties: nil)
86
+ # Add additional model properties to the instance
87
+ additional_properties = {} if additional_properties.nil?
88
+
89
+ @actor_entity_id = actor_entity_id
90
+ @avatar_quality = avatar_quality unless avatar_quality == SKIP
91
+ @audio_file_id = audio_file_id
92
+ @watermark_mode = watermark_mode unless watermark_mode == SKIP
93
+ @num_results = num_results unless num_results == SKIP
94
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
95
+ @hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
96
+ @additional_properties = additional_properties
97
+ end
98
+
99
+ # Creates an instance of the object from a hash.
100
+ def self.from_hash(hash)
101
+ return nil unless hash
102
+
103
+ # Extract variables from the hash.
104
+ actor_entity_id = hash.key?('actorEntityId') ? hash['actorEntityId'] : nil
105
+ audio_file_id = hash.key?('audioFileId') ? hash['audioFileId'] : nil
106
+ avatar_quality = hash.key?('avatarQuality') ? hash['avatarQuality'] : SKIP
107
+ watermark_mode = hash['watermarkMode'] ||= WatermarkMode::AUTO
108
+ num_results = hash['numResults'] ||= 1
109
+ is_output_temporary = hash['isOutputTemporary'] ||= false
110
+ hide_from_ui = hash['hideFromUi'] ||= false
111
+
112
+ # Create a new hash for additional properties, removing known properties.
113
+ new_hash = hash.reject { |k, _| names.value?(k) }
114
+
115
+ additional_properties = APIHelper.get_additional_properties(
116
+ new_hash, proc { |value| value }
117
+ )
118
+
119
+ # Create object from extracted values.
120
+ GenerateAvatarRequest.new(actor_entity_id: actor_entity_id,
121
+ audio_file_id: audio_file_id,
122
+ avatar_quality: avatar_quality,
123
+ watermark_mode: watermark_mode,
124
+ num_results: num_results,
125
+ is_output_temporary: is_output_temporary,
126
+ hide_from_ui: hide_from_ui,
127
+ additional_properties: additional_properties)
128
+ end
129
+
130
+ # Provides a human-readable string representation of the object.
131
+ def to_s
132
+ class_name = self.class.name.split('::').last
133
+ "<#{class_name} actor_entity_id: #{@actor_entity_id}, avatar_quality: #{@avatar_quality},"\
134
+ " audio_file_id: #{@audio_file_id}, watermark_mode: #{@watermark_mode}, num_results:"\
135
+ " #{@num_results}, is_output_temporary: #{@is_output_temporary}, hide_from_ui:"\
136
+ " #{@hide_from_ui}, additional_properties: #{@additional_properties}>"
137
+ end
138
+
139
+ # Provides a debugging-friendly string with detailed object information.
140
+ def inspect
141
+ class_name = self.class.name.split('::').last
142
+ "<#{class_name} actor_entity_id: #{@actor_entity_id.inspect}, avatar_quality:"\
143
+ " #{@avatar_quality.inspect}, audio_file_id: #{@audio_file_id.inspect}, watermark_mode:"\
144
+ " #{@watermark_mode.inspect}, num_results: #{@num_results.inspect}, is_output_temporary:"\
145
+ " #{@is_output_temporary.inspect}, hide_from_ui: #{@hide_from_ui.inspect},"\
146
+ " additional_properties: #{@additional_properties}>"
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,187 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # GenerateImageRequest Model.
8
+ class GenerateImageRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Text prompt describing the image to generate. When reference images are
13
+ # provided, the prompt describes the desired transformation.
14
+ # @return [String]
15
+ attr_accessor :prompt
16
+
17
+ # Optional file ids of reference images (e.g. `["vg_file_..."]`). Upload
18
+ # files first via `POST /v1/files/upload`, then pass the returned ids here.
19
+ # Maximum 4 images. When provided, the model uses these as guidance for
20
+ # generation.
21
+ # @return [Array[String]]
22
+ attr_accessor :image_file_ids
23
+
24
+ # Optional actor, product, or visual-style entity ids (e.g.
25
+ # `["vg_enti_..."]`). The model uses each entity as identity/reference the
26
+ # same way in-app image generation does. Can be combined with
27
+ # `imageFileIds`. A missing id returns not found; an inaccessible id returns
28
+ # a permission error.
29
+ # @return [Array[String]]
30
+ attr_accessor :entity_ids
31
+
32
+ # Aspect ratio for the generated image. Defaults to 16:9 when omitted.
33
+ # @return [AspectRatio2]
34
+ attr_accessor :aspect_ratio
35
+
36
+ # Image generation quality tier. Optional; when omitted, your account's
37
+ # Default AI quality for images is used (change it at
38
+ # https://app.videogen.io/settings/account).
39
+ # @return [ModelQuality10]
40
+ attr_accessor :quality
41
+
42
+ # Controls how content-policy rejections are handled during generation.
43
+ # @return [ContentPolicyConfig]
44
+ attr_accessor :content_policy_config
45
+
46
+ # Controls whether the VideoGen watermark is applied to the output. `AUTO`
47
+ # applies the watermark unless you have a Pro plan. `VIDEO_GEN` always
48
+ # applies it. `NONE` removes the watermark (requires Pro; returns an error
49
+ # if you don't have it).
50
+ # @return [WatermarkMode]
51
+ attr_accessor :watermark_mode
52
+
53
+ # Number of output results to generate. Defaults to 1.
54
+ # @return [Integer]
55
+ attr_accessor :num_results
56
+
57
+ # When true, generated files are temporary. Temporary files are guaranteed
58
+ # to be available for 24 hours, after which they may be archived at any
59
+ # time. Temporary files are not analyzed (no description, transcript, or
60
+ # embedding will be generated), so they will not appear in search results.
61
+ # Defaults to false.
62
+ # @return [TrueClass | FalseClass]
63
+ attr_accessor :is_output_temporary
64
+
65
+ # When true, generated files are hidden from the VideoGen Media page by
66
+ # default. They remain accessible through the API. Defaults to false.
67
+ # @return [TrueClass | FalseClass]
68
+ attr_accessor :hide_from_ui
69
+
70
+ # A mapping from model property names to API property names.
71
+ def self.names
72
+ @_hash = {} if @_hash.nil?
73
+ @_hash['prompt'] = 'prompt'
74
+ @_hash['image_file_ids'] = 'imageFileIds'
75
+ @_hash['entity_ids'] = 'entityIds'
76
+ @_hash['aspect_ratio'] = 'aspectRatio'
77
+ @_hash['quality'] = 'quality'
78
+ @_hash['content_policy_config'] = 'contentPolicyConfig'
79
+ @_hash['watermark_mode'] = 'watermarkMode'
80
+ @_hash['num_results'] = 'numResults'
81
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
82
+ @_hash['hide_from_ui'] = 'hideFromUi'
83
+ @_hash
84
+ end
85
+
86
+ # An array for optional fields
87
+ def self.optionals
88
+ %w[
89
+ image_file_ids
90
+ entity_ids
91
+ aspect_ratio
92
+ quality
93
+ content_policy_config
94
+ watermark_mode
95
+ num_results
96
+ is_output_temporary
97
+ hide_from_ui
98
+ ]
99
+ end
100
+
101
+ # An array for nullable fields
102
+ def self.nullables
103
+ []
104
+ end
105
+
106
+ def initialize(prompt:, image_file_ids: SKIP, entity_ids: SKIP,
107
+ aspect_ratio: SKIP, quality: SKIP,
108
+ content_policy_config: SKIP,
109
+ watermark_mode: WatermarkMode::AUTO, num_results: 1,
110
+ is_output_temporary: false, hide_from_ui: false,
111
+ additional_properties: nil)
112
+ # Add additional model properties to the instance
113
+ additional_properties = {} if additional_properties.nil?
114
+
115
+ @prompt = prompt
116
+ @image_file_ids = image_file_ids unless image_file_ids == SKIP
117
+ @entity_ids = entity_ids unless entity_ids == SKIP
118
+ @aspect_ratio = aspect_ratio unless aspect_ratio == SKIP
119
+ @quality = quality unless quality == SKIP
120
+ @content_policy_config = content_policy_config unless content_policy_config == SKIP
121
+ @watermark_mode = watermark_mode unless watermark_mode == SKIP
122
+ @num_results = num_results unless num_results == SKIP
123
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
124
+ @hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
125
+ @additional_properties = additional_properties
126
+ end
127
+
128
+ # Creates an instance of the object from a hash.
129
+ def self.from_hash(hash)
130
+ return nil unless hash
131
+
132
+ # Extract variables from the hash.
133
+ prompt = hash.key?('prompt') ? hash['prompt'] : nil
134
+ image_file_ids = hash.key?('imageFileIds') ? hash['imageFileIds'] : SKIP
135
+ entity_ids = hash.key?('entityIds') ? hash['entityIds'] : SKIP
136
+ aspect_ratio = AspectRatio2.from_hash(hash['aspectRatio']) if hash['aspectRatio']
137
+ quality = hash.key?('quality') ? hash['quality'] : SKIP
138
+ content_policy_config = ContentPolicyConfig.from_hash(hash['contentPolicyConfig']) if
139
+ hash['contentPolicyConfig']
140
+ watermark_mode = hash['watermarkMode'] ||= WatermarkMode::AUTO
141
+ num_results = hash['numResults'] ||= 1
142
+ is_output_temporary = hash['isOutputTemporary'] ||= false
143
+ hide_from_ui = hash['hideFromUi'] ||= false
144
+
145
+ # Create a new hash for additional properties, removing known properties.
146
+ new_hash = hash.reject { |k, _| names.value?(k) }
147
+
148
+ additional_properties = APIHelper.get_additional_properties(
149
+ new_hash, proc { |value| value }
150
+ )
151
+
152
+ # Create object from extracted values.
153
+ GenerateImageRequest.new(prompt: prompt,
154
+ image_file_ids: image_file_ids,
155
+ entity_ids: entity_ids,
156
+ aspect_ratio: aspect_ratio,
157
+ quality: quality,
158
+ content_policy_config: content_policy_config,
159
+ watermark_mode: watermark_mode,
160
+ num_results: num_results,
161
+ is_output_temporary: is_output_temporary,
162
+ hide_from_ui: hide_from_ui,
163
+ additional_properties: additional_properties)
164
+ end
165
+
166
+ # Provides a human-readable string representation of the object.
167
+ def to_s
168
+ class_name = self.class.name.split('::').last
169
+ "<#{class_name} prompt: #{@prompt}, image_file_ids: #{@image_file_ids}, entity_ids:"\
170
+ " #{@entity_ids}, aspect_ratio: #{@aspect_ratio}, quality: #{@quality},"\
171
+ " content_policy_config: #{@content_policy_config}, watermark_mode: #{@watermark_mode},"\
172
+ " num_results: #{@num_results}, is_output_temporary: #{@is_output_temporary}, hide_from_ui:"\
173
+ " #{@hide_from_ui}, additional_properties: #{@additional_properties}>"
174
+ end
175
+
176
+ # Provides a debugging-friendly string with detailed object information.
177
+ def inspect
178
+ class_name = self.class.name.split('::').last
179
+ "<#{class_name} prompt: #{@prompt.inspect}, image_file_ids: #{@image_file_ids.inspect},"\
180
+ " entity_ids: #{@entity_ids.inspect}, aspect_ratio: #{@aspect_ratio.inspect}, quality:"\
181
+ " #{@quality.inspect}, content_policy_config: #{@content_policy_config.inspect},"\
182
+ " watermark_mode: #{@watermark_mode.inspect}, num_results: #{@num_results.inspect},"\
183
+ " is_output_temporary: #{@is_output_temporary.inspect}, hide_from_ui:"\
184
+ " #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
185
+ end
186
+ end
187
+ end