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,151 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Simplified project metadata.
8
+ class ProjectResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Opaque project id (e.g. `vg_proj_...`).
13
+ # @return [String]
14
+ attr_accessor :project_id
15
+
16
+ # Opaque id of this project's assistant conversation (e.g. `vg_asst_...`).
17
+ # Use with the Assistant API to send follow-up messages or list the
18
+ # assistant's prior messages for this project. `null` for older projects
19
+ # created before assistant chats were attached at creation time.
20
+ # @return [String]
21
+ attr_accessor :assistant_id
22
+
23
+ # Opaque id of this project's assistant conversation (e.g. `vg_asst_...`).
24
+ # Use with the Assistant API to send follow-up messages or list the
25
+ # assistant's prior messages for this project. `null` for older projects
26
+ # created before assistant chats were attached at creation time.
27
+ # @return [String]
28
+ attr_accessor :title
29
+
30
+ # Aspect ratio as a width:height pair (e.g. 16 and 9 for 16:9). Not pixel
31
+ # dimensions.
32
+ # @return [AspectRatio]
33
+ attr_accessor :aspect_ratio
34
+
35
+ # High-level project status.
36
+ # @return [ProjectResponseStatus]
37
+ attr_accessor :status
38
+
39
+ # Seconds since epoch (Unix timestamp) when the project was created.
40
+ # @return [Integer]
41
+ attr_accessor :created_at
42
+
43
+ # Seconds since epoch (Unix timestamp) when the project was last updated.
44
+ # @return [Integer]
45
+ attr_accessor :updated_at
46
+
47
+ # Deep link to open this project in the VideoGen web editor. Not required
48
+ # for an API-only integration: store `projectId` and use the Projects API
49
+ # (export, remix, metadata). Use `projectUrl` when a person should open the
50
+ # project in the app to review or edit it manually. The project is visible
51
+ # only to members of your team and any project collaborators, the same
52
+ # access model as a project created in the dashboard.
53
+ # @return [String]
54
+ attr_accessor :project_url
55
+
56
+ # A mapping from model property names to API property names.
57
+ def self.names
58
+ @_hash = {} if @_hash.nil?
59
+ @_hash['project_id'] = 'projectId'
60
+ @_hash['assistant_id'] = 'assistantId'
61
+ @_hash['title'] = 'title'
62
+ @_hash['aspect_ratio'] = 'aspectRatio'
63
+ @_hash['status'] = 'status'
64
+ @_hash['created_at'] = 'createdAt'
65
+ @_hash['updated_at'] = 'updatedAt'
66
+ @_hash['project_url'] = 'projectUrl'
67
+ @_hash
68
+ end
69
+
70
+ # An array for optional fields
71
+ def self.optionals
72
+ []
73
+ end
74
+
75
+ # An array for nullable fields
76
+ def self.nullables
77
+ %w[
78
+ assistant_id
79
+ ]
80
+ end
81
+
82
+ def initialize(project_id:, assistant_id:, title:, aspect_ratio:, status:,
83
+ created_at:, updated_at:, project_url:,
84
+ additional_properties: nil)
85
+ # Add additional model properties to the instance
86
+ additional_properties = {} if additional_properties.nil?
87
+
88
+ @project_id = project_id
89
+ @assistant_id = assistant_id
90
+ @title = title
91
+ @aspect_ratio = aspect_ratio
92
+ @status = status
93
+ @created_at = created_at
94
+ @updated_at = updated_at
95
+ @project_url = project_url
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
+ project_id = hash.key?('projectId') ? hash['projectId'] : nil
105
+ assistant_id = hash.key?('assistantId') ? hash['assistantId'] : nil
106
+ title = hash.key?('title') ? hash['title'] : nil
107
+ aspect_ratio = AspectRatio.from_hash(hash['aspectRatio']) if hash['aspectRatio']
108
+ status = hash.key?('status') ? hash['status'] : nil
109
+ created_at = hash.key?('createdAt') ? hash['createdAt'] : nil
110
+ updated_at = hash.key?('updatedAt') ? hash['updatedAt'] : nil
111
+ project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
112
+
113
+ # Create a new hash for additional properties, removing known properties.
114
+ new_hash = hash.reject { |k, _| names.value?(k) }
115
+
116
+ additional_properties = APIHelper.get_additional_properties(
117
+ new_hash, proc { |value| value }
118
+ )
119
+
120
+ # Create object from extracted values.
121
+ ProjectResponse.new(project_id: project_id,
122
+ assistant_id: assistant_id,
123
+ title: title,
124
+ aspect_ratio: aspect_ratio,
125
+ status: status,
126
+ created_at: created_at,
127
+ updated_at: updated_at,
128
+ project_url: project_url,
129
+ additional_properties: additional_properties)
130
+ end
131
+
132
+ # Provides a human-readable string representation of the object.
133
+ def to_s
134
+ class_name = self.class.name.split('::').last
135
+ "<#{class_name} project_id: #{@project_id}, assistant_id: #{@assistant_id}, title:"\
136
+ " #{@title}, aspect_ratio: #{@aspect_ratio}, status: #{@status}, created_at: #{@created_at},"\
137
+ " updated_at: #{@updated_at}, project_url: #{@project_url}, additional_properties:"\
138
+ " #{@additional_properties}>"
139
+ end
140
+
141
+ # Provides a debugging-friendly string with detailed object information.
142
+ def inspect
143
+ class_name = self.class.name.split('::').last
144
+ "<#{class_name} project_id: #{@project_id.inspect}, assistant_id: #{@assistant_id.inspect},"\
145
+ " title: #{@title.inspect}, aspect_ratio: #{@aspect_ratio.inspect}, status:"\
146
+ " #{@status.inspect}, created_at: #{@created_at.inspect}, updated_at:"\
147
+ " #{@updated_at.inspect}, project_url: #{@project_url.inspect}, additional_properties:"\
148
+ " #{@additional_properties}>"
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,36 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # High-level project status.
8
+ class ProjectResponseStatus
9
+ PROJECT_RESPONSE_STATUS = [
10
+ # TODO: Write general description for GENERATING
11
+ GENERATING = 'generating'.freeze,
12
+
13
+ # TODO: Write general description for READY
14
+ READY = 'ready'.freeze
15
+ ].freeze
16
+
17
+ def self.validate(value)
18
+ return false if value.nil?
19
+
20
+ PROJECT_RESPONSE_STATUS.include?(value)
21
+ end
22
+
23
+ def self.from_value(value, default_value = GENERATING)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'generating' then GENERATING
30
+ when 'ready' then READY
31
+ else
32
+ default_value
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,155 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Creates a project from a text prompt and generates one short AI video clip.
8
+ # VideoGen generates an opening frame from the prompt (optionally guided by
9
+ # reference images), then animates that frame into a video inside an editable
10
+ # project. This workflow does not accept `remixActions`. For a standalone clip
11
+ # without a project, use `POST /v1/tools/generate-video-clip`. For longer
12
+ # narrated multi-scene videos, use `POST /v1/workflows/script-to-video`.
13
+ class PromptToVideoClipRequest < BaseModel
14
+ SKIP = Object.new
15
+ private_constant :SKIP
16
+
17
+ # Text prompt describing the video to generate (e.g. `A golden retriever
18
+ # running through a sunlit meadow in slow motion, cinematic`).
19
+ # @return [String]
20
+ attr_accessor :prompt
21
+
22
+ # Optional ids of previously uploaded reference images (e.g. `vg_file_...`)
23
+ # that guide the opening frame. Upload files via `POST /v1/files/upload`
24
+ # first.
25
+ # @return [Array[String]]
26
+ attr_accessor :image_file_ids
27
+
28
+ # Desired clip length in whole seconds (1 to 30). Defaults to 10. The
29
+ # generated clip is clamped to the selected quality's supported range.
30
+ # @return [Integer]
31
+ attr_accessor :duration_seconds
32
+
33
+ # Aspect ratio for the generated video. Defaults to 16:9 when omitted.
34
+ # @return [AspectRatio1]
35
+ attr_accessor :aspect_ratio
36
+
37
+ # Video generation quality tier (`LOW`, `STANDARD`, `HIGH`, or `MAX`). Also
38
+ # used for the opening-frame image. Optional; when omitted, your account's
39
+ # Default AI quality for video is used (change it at
40
+ # https://app.videogen.io/settings/account).
41
+ # @return [ModelQuality9]
42
+ attr_accessor :quality
43
+
44
+ # When true, the generated OUTPUT files (the opening-frame image and the
45
+ # video clip) are created as temporary: guaranteed available for 24 hours,
46
+ # after which they may be archived and later deleted. Use this when your
47
+ # integration downloads or re-hosts the results itself and does not need
48
+ # VideoGen to retain them. The project and its metadata are unaffected.
49
+ # Defaults to false.
50
+ # @return [TrueClass | FalseClass]
51
+ attr_accessor :is_output_temporary
52
+
53
+ # When true, generated files are hidden from the VideoGen Media page by
54
+ # default. They remain accessible through the API. Defaults to false.
55
+ # @return [TrueClass | FalseClass]
56
+ attr_accessor :hide_from_ui
57
+
58
+ # A mapping from model property names to API property names.
59
+ def self.names
60
+ @_hash = {} if @_hash.nil?
61
+ @_hash['prompt'] = 'prompt'
62
+ @_hash['image_file_ids'] = 'imageFileIds'
63
+ @_hash['duration_seconds'] = 'durationSeconds'
64
+ @_hash['aspect_ratio'] = 'aspectRatio'
65
+ @_hash['quality'] = 'quality'
66
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
67
+ @_hash['hide_from_ui'] = 'hideFromUi'
68
+ @_hash
69
+ end
70
+
71
+ # An array for optional fields
72
+ def self.optionals
73
+ %w[
74
+ image_file_ids
75
+ duration_seconds
76
+ aspect_ratio
77
+ quality
78
+ is_output_temporary
79
+ hide_from_ui
80
+ ]
81
+ end
82
+
83
+ # An array for nullable fields
84
+ def self.nullables
85
+ []
86
+ end
87
+
88
+ def initialize(prompt:, image_file_ids: SKIP, duration_seconds: SKIP,
89
+ aspect_ratio: SKIP, quality: SKIP,
90
+ is_output_temporary: false, hide_from_ui: false,
91
+ additional_properties: nil)
92
+ # Add additional model properties to the instance
93
+ additional_properties = {} if additional_properties.nil?
94
+
95
+ @prompt = prompt
96
+ @image_file_ids = image_file_ids unless image_file_ids == SKIP
97
+ @duration_seconds = duration_seconds unless duration_seconds == SKIP
98
+ @aspect_ratio = aspect_ratio unless aspect_ratio == SKIP
99
+ @quality = quality unless quality == SKIP
100
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
101
+ @hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
102
+ @additional_properties = additional_properties
103
+ end
104
+
105
+ # Creates an instance of the object from a hash.
106
+ def self.from_hash(hash)
107
+ return nil unless hash
108
+
109
+ # Extract variables from the hash.
110
+ prompt = hash.key?('prompt') ? hash['prompt'] : nil
111
+ image_file_ids = hash.key?('imageFileIds') ? hash['imageFileIds'] : SKIP
112
+ duration_seconds =
113
+ hash.key?('durationSeconds') ? hash['durationSeconds'] : SKIP
114
+ aspect_ratio = AspectRatio1.from_hash(hash['aspectRatio']) if hash['aspectRatio']
115
+ quality = hash.key?('quality') ? hash['quality'] : SKIP
116
+ is_output_temporary = hash['isOutputTemporary'] ||= false
117
+ hide_from_ui = hash['hideFromUi'] ||= false
118
+
119
+ # Create a new hash for additional properties, removing known properties.
120
+ new_hash = hash.reject { |k, _| names.value?(k) }
121
+
122
+ additional_properties = APIHelper.get_additional_properties(
123
+ new_hash, proc { |value| value }
124
+ )
125
+
126
+ # Create object from extracted values.
127
+ PromptToVideoClipRequest.new(prompt: prompt,
128
+ image_file_ids: image_file_ids,
129
+ duration_seconds: duration_seconds,
130
+ aspect_ratio: aspect_ratio,
131
+ quality: quality,
132
+ is_output_temporary: is_output_temporary,
133
+ hide_from_ui: hide_from_ui,
134
+ additional_properties: additional_properties)
135
+ end
136
+
137
+ # Provides a human-readable string representation of the object.
138
+ def to_s
139
+ class_name = self.class.name.split('::').last
140
+ "<#{class_name} prompt: #{@prompt}, image_file_ids: #{@image_file_ids}, duration_seconds:"\
141
+ " #{@duration_seconds}, aspect_ratio: #{@aspect_ratio}, quality: #{@quality},"\
142
+ " is_output_temporary: #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui},"\
143
+ " additional_properties: #{@additional_properties}>"
144
+ end
145
+
146
+ # Provides a debugging-friendly string with detailed object information.
147
+ def inspect
148
+ class_name = self.class.name.split('::').last
149
+ "<#{class_name} prompt: #{@prompt.inspect}, image_file_ids: #{@image_file_ids.inspect},"\
150
+ " duration_seconds: #{@duration_seconds.inspect}, aspect_ratio: #{@aspect_ratio.inspect},"\
151
+ " quality: #{@quality.inspect}, is_output_temporary: #{@is_output_temporary.inspect},"\
152
+ " hide_from_ui: #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
153
+ end
154
+ end
155
+ 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
+ # PronunciationReplacement Model.
8
+ class PronunciationReplacement < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :original
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :replacement
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['original'] = 'original'
24
+ @_hash['replacement'] = 'replacement'
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(original:, replacement:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @original = original
43
+ @replacement = replacement
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
+ original = hash.key?('original') ? hash['original'] : nil
53
+ replacement = hash.key?('replacement') ? hash['replacement'] : 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
+ PronunciationReplacement.new(original: original,
64
+ replacement: replacement,
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} original: #{@original}, replacement: #{@replacement},"\
72
+ " 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} original: #{@original.inspect}, replacement: #{@replacement.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,111 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Set, replace, or remove the project's background music track.
8
+ class RemixAction < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Discriminator value: SET_BACKGROUND_MUSIC
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # File id of an uploaded audio file to use as background music (e.g.
17
+ # `vg_file_...`). Upload it first via `POST /v1/files/upload`. Pass `null`
18
+ # to remove the existing background music.
19
+ # @return [String]
20
+ attr_accessor :file_id
21
+
22
+ # Music volume from 0 (silent) to 1 (full). Omit or pass `null` to keep the
23
+ # current volume.
24
+ # @return [Float]
25
+ attr_accessor :volume
26
+
27
+ # A mapping from model property names to API property names.
28
+ def self.names
29
+ @_hash = {} if @_hash.nil?
30
+ @_hash['type'] = 'type'
31
+ @_hash['file_id'] = 'fileId'
32
+ @_hash['volume'] = 'volume'
33
+ @_hash
34
+ end
35
+
36
+ # An array for optional fields
37
+ def self.optionals
38
+ %w[
39
+ file_id
40
+ volume
41
+ ]
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ %w[
47
+ file_id
48
+ volume
49
+ ]
50
+ end
51
+
52
+ def initialize(file_id: SKIP, volume: SKIP, additional_properties: nil)
53
+ # Add additional model properties to the instance
54
+ additional_properties = {} if additional_properties.nil?
55
+
56
+ @type = 'SET_BACKGROUND_MUSIC'
57
+ @file_id = file_id unless file_id == SKIP
58
+ @volume = volume unless volume == SKIP
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
+ file_id = hash.key?('fileId') ? hash['fileId'] : SKIP
68
+ volume = hash.key?('volume') ? hash['volume'] : SKIP
69
+
70
+ # Create a new hash for additional properties, removing known properties.
71
+ new_hash = hash.reject { |k, _| names.value?(k) }
72
+
73
+ additional_properties = APIHelper.get_additional_properties(
74
+ new_hash, proc { |value| value }
75
+ )
76
+
77
+ # Create object from extracted values.
78
+ RemixAction.new(file_id: file_id,
79
+ volume: volume,
80
+ additional_properties: additional_properties)
81
+ end
82
+
83
+ # Validates an instance of the object from a given value.
84
+ # @param [RemixAction | Hash] The value against the validation is performed.
85
+ def self.validate(value)
86
+ if value.instance_of? self
87
+ return APIHelper.valid_type?(value.type,
88
+ ->(val) { val.instance_of? String })
89
+ end
90
+
91
+ return false unless value.instance_of? Hash
92
+
93
+ APIHelper.valid_type?(value['type'],
94
+ ->(val) { val.instance_of? String })
95
+ end
96
+
97
+ # Provides a human-readable string representation of the object.
98
+ def to_s
99
+ class_name = self.class.name.split('::').last
100
+ "<#{class_name} type: #{@type}, file_id: #{@file_id}, volume: #{@volume},"\
101
+ " additional_properties: #{@additional_properties}>"
102
+ end
103
+
104
+ # Provides a debugging-friendly string with detailed object information.
105
+ def inspect
106
+ class_name = self.class.name.split('::').last
107
+ "<#{class_name} type: #{@type.inspect}, file_id: #{@file_id.inspect}, volume:"\
108
+ " #{@volume.inspect}, additional_properties: #{@additional_properties}>"
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,123 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Set, replace, or remove the logo overlay.
8
+ class RemixAction1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Discriminator value: SET_LOGO
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # File id of an uploaded image to overlay as a logo (e.g. `vg_file_...`).
17
+ # Upload it first via `POST /v1/files/upload`. Pass `null` to remove the
18
+ # existing logo.
19
+ # @return [String]
20
+ attr_accessor :file_id
21
+
22
+ # Position the logo is anchored to. Omit or pass `null` to keep the current
23
+ # position.
24
+ # @return [RemixActionDiscriminatorMappingSetLogoPosition]
25
+ attr_accessor :position
26
+
27
+ # Logo width as a percentage of the video width. Omit or pass `null` to keep
28
+ # the current size.
29
+ # @return [Float]
30
+ attr_accessor :size_percent
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['type'] = 'type'
36
+ @_hash['file_id'] = 'fileId'
37
+ @_hash['position'] = 'position'
38
+ @_hash['size_percent'] = 'sizePercent'
39
+ @_hash
40
+ end
41
+
42
+ # An array for optional fields
43
+ def self.optionals
44
+ %w[
45
+ file_id
46
+ position
47
+ size_percent
48
+ ]
49
+ end
50
+
51
+ # An array for nullable fields
52
+ def self.nullables
53
+ %w[
54
+ file_id
55
+ size_percent
56
+ ]
57
+ end
58
+
59
+ def initialize(file_id: SKIP, position: SKIP, size_percent: SKIP,
60
+ additional_properties: nil)
61
+ # Add additional model properties to the instance
62
+ additional_properties = {} if additional_properties.nil?
63
+
64
+ @type = 'SET_LOGO'
65
+ @file_id = file_id unless file_id == SKIP
66
+ @position = position unless position == SKIP
67
+ @size_percent = size_percent unless size_percent == SKIP
68
+ @additional_properties = additional_properties
69
+ end
70
+
71
+ # Creates an instance of the object from a hash.
72
+ def self.from_hash(hash)
73
+ return nil unless hash
74
+
75
+ # Extract variables from the hash.
76
+ file_id = hash.key?('fileId') ? hash['fileId'] : SKIP
77
+ position = hash.key?('position') ? hash['position'] : SKIP
78
+ size_percent = hash.key?('sizePercent') ? hash['sizePercent'] : SKIP
79
+
80
+ # Create a new hash for additional properties, removing known properties.
81
+ new_hash = hash.reject { |k, _| names.value?(k) }
82
+
83
+ additional_properties = APIHelper.get_additional_properties(
84
+ new_hash, proc { |value| value }
85
+ )
86
+
87
+ # Create object from extracted values.
88
+ RemixAction1.new(file_id: file_id,
89
+ position: position,
90
+ size_percent: size_percent,
91
+ additional_properties: additional_properties)
92
+ end
93
+
94
+ # Validates an instance of the object from a given value.
95
+ # @param [RemixAction1 | Hash] The value against the validation is performed.
96
+ def self.validate(value)
97
+ if value.instance_of? self
98
+ return APIHelper.valid_type?(value.type,
99
+ ->(val) { val.instance_of? String })
100
+ end
101
+
102
+ return false unless value.instance_of? Hash
103
+
104
+ APIHelper.valid_type?(value['type'],
105
+ ->(val) { val.instance_of? String })
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} type: #{@type}, file_id: #{@file_id}, position: #{@position}, size_percent:"\
112
+ " #{@size_percent}, additional_properties: #{@additional_properties}>"
113
+ end
114
+
115
+ # Provides a debugging-friendly string with detailed object information.
116
+ def inspect
117
+ class_name = self.class.name.split('::').last
118
+ "<#{class_name} type: #{@type.inspect}, file_id: #{@file_id.inspect}, position:"\
119
+ " #{@position.inspect}, size_percent: #{@size_percent.inspect}, additional_properties:"\
120
+ " #{@additional_properties}>"
121
+ end
122
+ end
123
+ end