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,115 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Sharpen every eligible asset in the project up to 4K, replacing each in
8
+ # place. Runs asynchronously: one upscaled asset is generated per eligible
9
+ # asset. If the project has no eligible assets, the action is skipped and
10
+ # completes successfully without changing anything.
11
+ class RemixAction10 < BaseModel
12
+ SKIP = Object.new
13
+ private_constant :SKIP
14
+
15
+ # Discriminator value: UPSCALE_ASSETS
16
+ # @return [String]
17
+ attr_reader :type
18
+
19
+ # Also upscale video assets (billed per output second). Defaults to `true`.
20
+ # @return [TrueClass | FalseClass]
21
+ attr_accessor :include_videos
22
+
23
+ # Also upscale stock (library) assets, not just uploaded or generated ones.
24
+ # Defaults to `true`.
25
+ # @return [TrueClass | FalseClass]
26
+ attr_accessor :include_stock_content
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['type'] = 'type'
32
+ @_hash['include_videos'] = 'includeVideos'
33
+ @_hash['include_stock_content'] = 'includeStockContent'
34
+ @_hash
35
+ end
36
+
37
+ # An array for optional fields
38
+ def self.optionals
39
+ %w[
40
+ include_videos
41
+ include_stock_content
42
+ ]
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ %w[
48
+ include_videos
49
+ include_stock_content
50
+ ]
51
+ end
52
+
53
+ def initialize(include_videos: SKIP, include_stock_content: SKIP,
54
+ additional_properties: nil)
55
+ # Add additional model properties to the instance
56
+ additional_properties = {} if additional_properties.nil?
57
+
58
+ @type = 'UPSCALE_ASSETS'
59
+ @include_videos = include_videos unless include_videos == SKIP
60
+ @include_stock_content = include_stock_content unless include_stock_content == SKIP
61
+ @additional_properties = additional_properties
62
+ end
63
+
64
+ # Creates an instance of the object from a hash.
65
+ def self.from_hash(hash)
66
+ return nil unless hash
67
+
68
+ # Extract variables from the hash.
69
+ include_videos = hash.key?('includeVideos') ? hash['includeVideos'] : SKIP
70
+ include_stock_content =
71
+ hash.key?('includeStockContent') ? hash['includeStockContent'] : SKIP
72
+
73
+ # Create a new hash for additional properties, removing known properties.
74
+ new_hash = hash.reject { |k, _| names.value?(k) }
75
+
76
+ additional_properties = APIHelper.get_additional_properties(
77
+ new_hash, proc { |value| value }
78
+ )
79
+
80
+ # Create object from extracted values.
81
+ RemixAction10.new(include_videos: include_videos,
82
+ include_stock_content: include_stock_content,
83
+ additional_properties: additional_properties)
84
+ end
85
+
86
+ # Validates an instance of the object from a given value.
87
+ # @param [RemixAction10 | Hash] The value against the validation is performed.
88
+ def self.validate(value)
89
+ if value.instance_of? self
90
+ return APIHelper.valid_type?(value.type,
91
+ ->(val) { val.instance_of? String })
92
+ end
93
+
94
+ return false unless value.instance_of? Hash
95
+
96
+ APIHelper.valid_type?(value['type'],
97
+ ->(val) { val.instance_of? String })
98
+ end
99
+
100
+ # Provides a human-readable string representation of the object.
101
+ def to_s
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} type: #{@type}, include_videos: #{@include_videos}, include_stock_content:"\
104
+ " #{@include_stock_content}, additional_properties: #{@additional_properties}>"
105
+ end
106
+
107
+ # Provides a debugging-friendly string with detailed object information.
108
+ def inspect
109
+ class_name = self.class.name.split('::').last
110
+ "<#{class_name} type: #{@type.inspect}, include_videos: #{@include_videos.inspect},"\
111
+ " include_stock_content: #{@include_stock_content.inspect}, additional_properties:"\
112
+ " #{@additional_properties}>"
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,148 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Re-narrate every AI-voiceover asset in the project with a new voice and
8
+ # optional actor avatar, replacing each narration in place. Runs
9
+ # asynchronously: text-to-speech is re-fired per asset with the original
10
+ # narration text. If the project has no AI-narrated assets, the action is
11
+ # skipped and completes successfully without changing anything.
12
+ class RemixAction11 < BaseModel
13
+ SKIP = Object.new
14
+ private_constant :SKIP
15
+
16
+ # Discriminator value: CHANGE_NARRATOR
17
+ # @return [String]
18
+ attr_reader :type
19
+
20
+ # Catalog `displayName` (e.g. `Matilda`) or voice id from `GET
21
+ # /v1/resources/tts-voices` (e.g. `vg_voic_...`) to re-narrate with.
22
+ # @return [String]
23
+ attr_accessor :voice_id
24
+
25
+ # Recommended. Optional id of a built-in stock actor or an ACTOR entity
26
+ # (e.g. `vg_enti_...`) with an image reference. When set, narration is
27
+ # delivered by that actor avatar. Omit or pass `null` for voiceover without
28
+ # an avatar.
29
+ # @return [String]
30
+ attr_accessor :actor_entity_id
31
+
32
+ # Avatar generation quality tier. Applies when `actorEntityId` is provided.
33
+ # Optional; when omitted, your account's Default AI quality for avatars is
34
+ # used.
35
+ # @return [ModelQuality3]
36
+ attr_accessor :avatar_quality
37
+
38
+ # Speech rate multiplier, between 0.5 (half speed) and 2 (double speed).
39
+ # Omit or pass `null` to keep each asset's current speed.
40
+ # @return [Float]
41
+ attr_accessor :voice_speed
42
+
43
+ # A mapping from model property names to API property names.
44
+ def self.names
45
+ @_hash = {} if @_hash.nil?
46
+ @_hash['type'] = 'type'
47
+ @_hash['voice_id'] = 'voiceId'
48
+ @_hash['actor_entity_id'] = 'actorEntityId'
49
+ @_hash['avatar_quality'] = 'avatarQuality'
50
+ @_hash['voice_speed'] = 'voiceSpeed'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ %w[
57
+ actor_entity_id
58
+ avatar_quality
59
+ voice_speed
60
+ ]
61
+ end
62
+
63
+ # An array for nullable fields
64
+ def self.nullables
65
+ %w[
66
+ actor_entity_id
67
+ voice_speed
68
+ ]
69
+ end
70
+
71
+ def initialize(voice_id:, actor_entity_id: SKIP, avatar_quality: SKIP,
72
+ voice_speed: SKIP, additional_properties: nil)
73
+ # Add additional model properties to the instance
74
+ additional_properties = {} if additional_properties.nil?
75
+
76
+ @type = 'CHANGE_NARRATOR'
77
+ @voice_id = voice_id
78
+ @actor_entity_id = actor_entity_id unless actor_entity_id == SKIP
79
+ @avatar_quality = avatar_quality unless avatar_quality == SKIP
80
+ @voice_speed = voice_speed unless voice_speed == SKIP
81
+ @additional_properties = additional_properties
82
+ end
83
+
84
+ # Creates an instance of the object from a hash.
85
+ def self.from_hash(hash)
86
+ return nil unless hash
87
+
88
+ # Extract variables from the hash.
89
+ voice_id = hash.key?('voiceId') ? hash['voiceId'] : nil
90
+ actor_entity_id =
91
+ hash.key?('actorEntityId') ? hash['actorEntityId'] : SKIP
92
+ avatar_quality = hash.key?('avatarQuality') ? hash['avatarQuality'] : SKIP
93
+ voice_speed = hash.key?('voiceSpeed') ? hash['voiceSpeed'] : SKIP
94
+
95
+ # Create a new hash for additional properties, removing known properties.
96
+ new_hash = hash.reject { |k, _| names.value?(k) }
97
+
98
+ additional_properties = APIHelper.get_additional_properties(
99
+ new_hash, proc { |value| value }
100
+ )
101
+
102
+ # Create object from extracted values.
103
+ RemixAction11.new(voice_id: voice_id,
104
+ actor_entity_id: actor_entity_id,
105
+ avatar_quality: avatar_quality,
106
+ voice_speed: voice_speed,
107
+ additional_properties: additional_properties)
108
+ end
109
+
110
+ # Validates an instance of the object from a given value.
111
+ # @param [RemixAction11 | Hash] The value against the validation is performed.
112
+ def self.validate(value)
113
+ if value.instance_of? self
114
+ return (
115
+ APIHelper.valid_type?(value.type,
116
+ ->(val) { val.instance_of? String }) and
117
+ APIHelper.valid_type?(value.voice_id,
118
+ ->(val) { val.instance_of? String })
119
+ )
120
+ end
121
+
122
+ return false unless value.instance_of? Hash
123
+
124
+ (
125
+ APIHelper.valid_type?(value['type'],
126
+ ->(val) { val.instance_of? String }) and
127
+ APIHelper.valid_type?(value['voiceId'],
128
+ ->(val) { val.instance_of? String })
129
+ )
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} type: #{@type}, voice_id: #{@voice_id}, actor_entity_id:"\
136
+ " #{@actor_entity_id}, avatar_quality: #{@avatar_quality}, voice_speed: #{@voice_speed},"\
137
+ " additional_properties: #{@additional_properties}>"
138
+ end
139
+
140
+ # Provides a debugging-friendly string with detailed object information.
141
+ def inspect
142
+ class_name = self.class.name.split('::').last
143
+ "<#{class_name} type: #{@type.inspect}, voice_id: #{@voice_id.inspect}, actor_entity_id:"\
144
+ " #{@actor_entity_id.inspect}, avatar_quality: #{@avatar_quality.inspect}, voice_speed:"\
145
+ " #{@voice_speed.inspect}, additional_properties: #{@additional_properties}>"
146
+ end
147
+ end
148
+ end
@@ -0,0 +1,89 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Replace every stock (library) visual in the project with a fresh alternative
8
+ # from the same search, replacing each in place. Runs asynchronously: each
9
+ # stock asset's original search is re-run, excluding the currently-shown
10
+ # result. If the project has no shuffleable stock visuals, the action is
11
+ # skipped and completes successfully without changing anything.
12
+ class RemixAction12 < BaseModel
13
+ SKIP = Object.new
14
+ private_constant :SKIP
15
+
16
+ # Discriminator value: SHUFFLE_STOCK_VISUALS
17
+ # @return [String]
18
+ attr_reader :type
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'type'
24
+ @_hash
25
+ end
26
+
27
+ # An array for optional fields
28
+ def self.optionals
29
+ []
30
+ end
31
+
32
+ # An array for nullable fields
33
+ def self.nullables
34
+ []
35
+ end
36
+
37
+ def initialize(additional_properties: nil)
38
+ # Add additional model properties to the instance
39
+ additional_properties = {} if additional_properties.nil?
40
+
41
+ @type = 'SHUFFLE_STOCK_VISUALS'
42
+ @additional_properties = additional_properties
43
+ end
44
+
45
+ # Creates an instance of the object from a hash.
46
+ def self.from_hash(hash)
47
+ return nil unless hash
48
+
49
+ # Extract variables from the hash.
50
+
51
+
52
+ # Create a new hash for additional properties, removing known properties.
53
+ new_hash = hash.reject { |k, _| names.value?(k) }
54
+
55
+ additional_properties = APIHelper.get_additional_properties(
56
+ new_hash, proc { |value| value }
57
+ )
58
+
59
+ # Create object from extracted values.
60
+ RemixAction12.new(additional_properties: additional_properties)
61
+ end
62
+
63
+ # Validates an instance of the object from a given value.
64
+ # @param [RemixAction12 | Hash] The value against the validation is performed.
65
+ def self.validate(value)
66
+ if value.instance_of? self
67
+ return APIHelper.valid_type?(value.type,
68
+ ->(val) { val.instance_of? String })
69
+ end
70
+
71
+ return false unless value.instance_of? Hash
72
+
73
+ APIHelper.valid_type?(value['type'],
74
+ ->(val) { val.instance_of? String })
75
+ end
76
+
77
+ # Provides a human-readable string representation of the object.
78
+ def to_s
79
+ class_name = self.class.name.split('::').last
80
+ "<#{class_name} type: #{@type}, additional_properties: #{@additional_properties}>"
81
+ end
82
+
83
+ # Provides a debugging-friendly string with detailed object information.
84
+ def inspect
85
+ class_name = self.class.name.split('::').last
86
+ "<#{class_name} type: #{@type.inspect}, additional_properties: #{@additional_properties}>"
87
+ end
88
+ end
89
+ end
@@ -0,0 +1,105 @@
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 background music track from a text prompt and set it as the
8
+ # project's background music, replacing any existing track. Runs
9
+ # asynchronously.
10
+ class RemixAction13 < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # Discriminator value: GENERATE_MUSIC
15
+ # @return [String]
16
+ attr_reader :type
17
+
18
+ # Describe the music to generate (e.g. "upbeat corporate background music
19
+ # with a driving beat").
20
+ # @return [String]
21
+ attr_accessor :prompt
22
+
23
+ # A mapping from model property names to API property names.
24
+ def self.names
25
+ @_hash = {} if @_hash.nil?
26
+ @_hash['type'] = 'type'
27
+ @_hash['prompt'] = 'prompt'
28
+ @_hash
29
+ end
30
+
31
+ # An array for optional fields
32
+ def self.optionals
33
+ []
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(prompt:, additional_properties: nil)
42
+ # Add additional model properties to the instance
43
+ additional_properties = {} if additional_properties.nil?
44
+
45
+ @type = 'GENERATE_MUSIC'
46
+ @prompt = prompt
47
+ @additional_properties = additional_properties
48
+ end
49
+
50
+ # Creates an instance of the object from a hash.
51
+ def self.from_hash(hash)
52
+ return nil unless hash
53
+
54
+ # Extract variables from the hash.
55
+ prompt = hash.key?('prompt') ? hash['prompt'] : nil
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
+ RemixAction13.new(prompt: prompt,
66
+ additional_properties: additional_properties)
67
+ end
68
+
69
+ # Validates an instance of the object from a given value.
70
+ # @param [RemixAction13 | Hash] The value against the validation is performed.
71
+ def self.validate(value)
72
+ if value.instance_of? self
73
+ return (
74
+ APIHelper.valid_type?(value.type,
75
+ ->(val) { val.instance_of? String }) and
76
+ APIHelper.valid_type?(value.prompt,
77
+ ->(val) { val.instance_of? String })
78
+ )
79
+ end
80
+
81
+ return false unless value.instance_of? Hash
82
+
83
+ (
84
+ APIHelper.valid_type?(value['type'],
85
+ ->(val) { val.instance_of? String }) and
86
+ APIHelper.valid_type?(value['prompt'],
87
+ ->(val) { val.instance_of? String })
88
+ )
89
+ end
90
+
91
+ # Provides a human-readable string representation of the object.
92
+ def to_s
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} type: #{@type}, prompt: #{@prompt}, additional_properties:"\
95
+ " #{@additional_properties}>"
96
+ end
97
+
98
+ # Provides a debugging-friendly string with detailed object information.
99
+ def inspect
100
+ class_name = self.class.name.split('::').last
101
+ "<#{class_name} type: #{@type.inspect}, prompt: #{@prompt.inspect}, additional_properties:"\
102
+ " #{@additional_properties}>"
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,138 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Translate the whole project into another language: every piece of text
8
+ # (title, section names, on-screen text overlays, transcripts, and narration
9
+ # scripts) is translated, and — unless disabled — each AI voiceover is
10
+ # re-narrated in the new language. Runs asynchronously. Requires a Pro
11
+ # subscription. Retrieve the list of supported language codes from `GET
12
+ # /v1/resources/languages`.
13
+ class RemixAction14 < BaseModel
14
+ SKIP = Object.new
15
+ private_constant :SKIP
16
+
17
+ # Discriminator value: TRANSLATE_PROJECT
18
+ # @return [String]
19
+ attr_reader :type
20
+
21
+ # Target language code to translate the project into (e.g. `es`, `fr`,
22
+ # `ja`). Must be one of the codes returned by `GET /v1/resources/languages`.
23
+ # @return [String]
24
+ attr_accessor :language_code
25
+
26
+ # Swap each AI voiceover to a voice that natively matches the target
27
+ # language. Recommended, since keeping the original voice usually produces a
28
+ # foreign accent. Defaults to `true`.
29
+ # @return [TrueClass | FalseClass]
30
+ attr_accessor :change_voice
31
+
32
+ # Also re-generate every eligible image so that text baked into the image is
33
+ # translated too (image-to-image). Billed per generated image. Defaults to
34
+ # `false`.
35
+ # @return [TrueClass | FalseClass]
36
+ attr_accessor :translate_image_text
37
+
38
+ # A mapping from model property names to API property names.
39
+ def self.names
40
+ @_hash = {} if @_hash.nil?
41
+ @_hash['type'] = 'type'
42
+ @_hash['language_code'] = 'languageCode'
43
+ @_hash['change_voice'] = 'changeVoice'
44
+ @_hash['translate_image_text'] = 'translateImageText'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ change_voice
52
+ translate_image_text
53
+ ]
54
+ end
55
+
56
+ # An array for nullable fields
57
+ def self.nullables
58
+ %w[
59
+ change_voice
60
+ translate_image_text
61
+ ]
62
+ end
63
+
64
+ def initialize(language_code:, change_voice: SKIP,
65
+ translate_image_text: SKIP, additional_properties: nil)
66
+ # Add additional model properties to the instance
67
+ additional_properties = {} if additional_properties.nil?
68
+
69
+ @type = 'TRANSLATE_PROJECT'
70
+ @language_code = language_code
71
+ @change_voice = change_voice unless change_voice == SKIP
72
+ @translate_image_text = translate_image_text unless translate_image_text == SKIP
73
+ @additional_properties = additional_properties
74
+ end
75
+
76
+ # Creates an instance of the object from a hash.
77
+ def self.from_hash(hash)
78
+ return nil unless hash
79
+
80
+ # Extract variables from the hash.
81
+ language_code = hash.key?('languageCode') ? hash['languageCode'] : nil
82
+ change_voice = hash.key?('changeVoice') ? hash['changeVoice'] : SKIP
83
+ translate_image_text =
84
+ hash.key?('translateImageText') ? hash['translateImageText'] : SKIP
85
+
86
+ # Create a new hash for additional properties, removing known properties.
87
+ new_hash = hash.reject { |k, _| names.value?(k) }
88
+
89
+ additional_properties = APIHelper.get_additional_properties(
90
+ new_hash, proc { |value| value }
91
+ )
92
+
93
+ # Create object from extracted values.
94
+ RemixAction14.new(language_code: language_code,
95
+ change_voice: change_voice,
96
+ translate_image_text: translate_image_text,
97
+ additional_properties: additional_properties)
98
+ end
99
+
100
+ # Validates an instance of the object from a given value.
101
+ # @param [RemixAction14 | Hash] The value against the validation is performed.
102
+ def self.validate(value)
103
+ if value.instance_of? self
104
+ return (
105
+ APIHelper.valid_type?(value.type,
106
+ ->(val) { val.instance_of? String }) and
107
+ APIHelper.valid_type?(value.language_code,
108
+ ->(val) { val.instance_of? String })
109
+ )
110
+ end
111
+
112
+ return false unless value.instance_of? Hash
113
+
114
+ (
115
+ APIHelper.valid_type?(value['type'],
116
+ ->(val) { val.instance_of? String }) and
117
+ APIHelper.valid_type?(value['languageCode'],
118
+ ->(val) { val.instance_of? String })
119
+ )
120
+ end
121
+
122
+ # Provides a human-readable string representation of the object.
123
+ def to_s
124
+ class_name = self.class.name.split('::').last
125
+ "<#{class_name} type: #{@type}, language_code: #{@language_code}, change_voice:"\
126
+ " #{@change_voice}, translate_image_text: #{@translate_image_text}, additional_properties:"\
127
+ " #{@additional_properties}>"
128
+ end
129
+
130
+ # Provides a debugging-friendly string with detailed object information.
131
+ def inspect
132
+ class_name = self.class.name.split('::').last
133
+ "<#{class_name} type: #{@type.inspect}, language_code: #{@language_code.inspect},"\
134
+ " change_voice: #{@change_voice.inspect}, translate_image_text:"\
135
+ " #{@translate_image_text.inspect}, additional_properties: #{@additional_properties}>"
136
+ end
137
+ end
138
+ end
@@ -0,0 +1,101 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Show captions on every captionable section. Optionally override the project
8
+ # caption style.
9
+ class RemixAction2 < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Discriminator value: ENABLE_CAPTIONS
14
+ # @return [String]
15
+ attr_reader :type
16
+
17
+ # Caption styling to apply. Omit or pass `null` to show captions with the
18
+ # current style. Any provided field overrides that field; omitted fields
19
+ # keep their current value.
20
+ # @return [WorkflowCaptionStyle]
21
+ attr_accessor :caption_style
22
+
23
+ # A mapping from model property names to API property names.
24
+ def self.names
25
+ @_hash = {} if @_hash.nil?
26
+ @_hash['type'] = 'type'
27
+ @_hash['caption_style'] = 'captionStyle'
28
+ @_hash
29
+ end
30
+
31
+ # An array for optional fields
32
+ def self.optionals
33
+ %w[
34
+ caption_style
35
+ ]
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ %w[
41
+ caption_style
42
+ ]
43
+ end
44
+
45
+ def initialize(caption_style: SKIP, additional_properties: nil)
46
+ # Add additional model properties to the instance
47
+ additional_properties = {} if additional_properties.nil?
48
+
49
+ @type = 'ENABLE_CAPTIONS'
50
+ @caption_style = caption_style unless caption_style == SKIP
51
+ @additional_properties = additional_properties
52
+ end
53
+
54
+ # Creates an instance of the object from a hash.
55
+ def self.from_hash(hash)
56
+ return nil unless hash
57
+
58
+ # Extract variables from the hash.
59
+ caption_style = WorkflowCaptionStyle.from_hash(hash['captionStyle']) if hash['captionStyle']
60
+
61
+ # Create a new hash for additional properties, removing known properties.
62
+ new_hash = hash.reject { |k, _| names.value?(k) }
63
+
64
+ additional_properties = APIHelper.get_additional_properties(
65
+ new_hash, proc { |value| value }
66
+ )
67
+
68
+ # Create object from extracted values.
69
+ RemixAction2.new(caption_style: caption_style,
70
+ additional_properties: additional_properties)
71
+ end
72
+
73
+ # Validates an instance of the object from a given value.
74
+ # @param [RemixAction2 | Hash] The value against the validation is performed.
75
+ def self.validate(value)
76
+ if value.instance_of? self
77
+ return APIHelper.valid_type?(value.type,
78
+ ->(val) { val.instance_of? String })
79
+ end
80
+
81
+ return false unless value.instance_of? Hash
82
+
83
+ APIHelper.valid_type?(value['type'],
84
+ ->(val) { val.instance_of? String })
85
+ end
86
+
87
+ # Provides a human-readable string representation of the object.
88
+ def to_s
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} type: #{@type}, caption_style: #{@caption_style}, additional_properties:"\
91
+ " #{@additional_properties}>"
92
+ end
93
+
94
+ # Provides a debugging-friendly string with detailed object information.
95
+ def inspect
96
+ class_name = self.class.name.split('::').last
97
+ "<#{class_name} type: #{@type.inspect}, caption_style: #{@caption_style.inspect},"\
98
+ " additional_properties: #{@additional_properties}>"
99
+ end
100
+ end
101
+ end