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,85 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Hide captions on every captionable section.
8
+ class RemixAction3 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Discriminator value: DISABLE_CAPTIONS
13
+ # @return [String]
14
+ attr_reader :type
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['type'] = 'type'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @type = 'DISABLE_CAPTIONS'
38
+ @additional_properties = additional_properties
39
+ end
40
+
41
+ # Creates an instance of the object from a hash.
42
+ def self.from_hash(hash)
43
+ return nil unless hash
44
+
45
+ # Extract variables from the hash.
46
+
47
+
48
+ # Create a new hash for additional properties, removing known properties.
49
+ new_hash = hash.reject { |k, _| names.value?(k) }
50
+
51
+ additional_properties = APIHelper.get_additional_properties(
52
+ new_hash, proc { |value| value }
53
+ )
54
+
55
+ # Create object from extracted values.
56
+ RemixAction3.new(additional_properties: additional_properties)
57
+ end
58
+
59
+ # Validates an instance of the object from a given value.
60
+ # @param [RemixAction3 | Hash] The value against the validation is performed.
61
+ def self.validate(value)
62
+ if value.instance_of? self
63
+ return APIHelper.valid_type?(value.type,
64
+ ->(val) { val.instance_of? String })
65
+ end
66
+
67
+ return false unless value.instance_of? Hash
68
+
69
+ APIHelper.valid_type?(value['type'],
70
+ ->(val) { val.instance_of? String })
71
+ end
72
+
73
+ # Provides a human-readable string representation of the object.
74
+ def to_s
75
+ class_name = self.class.name.split('::').last
76
+ "<#{class_name} type: #{@type}, additional_properties: #{@additional_properties}>"
77
+ end
78
+
79
+ # Provides a debugging-friendly string with detailed object information.
80
+ def inspect
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} type: #{@type.inspect}, additional_properties: #{@additional_properties}>"
83
+ end
84
+ end
85
+ end
@@ -0,0 +1,120 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Stamp transitions across the project. Not per-boundary: each field you set
8
+ # is applied uniformly to every boundary in that scope, replacing any
9
+ # transition already there. Set the transition between sections, between
10
+ # base-layer assets, or both; omit or pass `null` for a scope to leave its
11
+ # transitions untouched.
12
+ class RemixAction4 < BaseModel
13
+ SKIP = Object.new
14
+ private_constant :SKIP
15
+
16
+ # Discriminator value: ADD_TRANSITIONS
17
+ # @return [String]
18
+ attr_reader :type
19
+
20
+ # Transition applied at every boundary between sections, replacing any
21
+ # existing section transitions. Omit or pass `null` to leave section
22
+ # transitions untouched.
23
+ # @return [RemixTransitionStyle]
24
+ attr_accessor :section_transition
25
+
26
+ # Transition applied at every boundary between base-layer assets within
27
+ # sections, replacing any existing asset transitions. Omit or pass `null` to
28
+ # leave asset transitions untouched.
29
+ # @return [RemixTransitionStyle]
30
+ attr_accessor :asset_transition
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['section_transition'] = 'sectionTransition'
37
+ @_hash['asset_transition'] = 'assetTransition'
38
+ @_hash
39
+ end
40
+
41
+ # An array for optional fields
42
+ def self.optionals
43
+ %w[
44
+ section_transition
45
+ asset_transition
46
+ ]
47
+ end
48
+
49
+ # An array for nullable fields
50
+ def self.nullables
51
+ %w[
52
+ section_transition
53
+ asset_transition
54
+ ]
55
+ end
56
+
57
+ def initialize(section_transition: SKIP, asset_transition: SKIP,
58
+ additional_properties: nil)
59
+ # Add additional model properties to the instance
60
+ additional_properties = {} if additional_properties.nil?
61
+
62
+ @type = 'ADD_TRANSITIONS'
63
+ @section_transition = section_transition unless section_transition == SKIP
64
+ @asset_transition = asset_transition unless asset_transition == SKIP
65
+ @additional_properties = additional_properties
66
+ end
67
+
68
+ # Creates an instance of the object from a hash.
69
+ def self.from_hash(hash)
70
+ return nil unless hash
71
+
72
+ # Extract variables from the hash.
73
+ section_transition =
74
+ hash.key?('sectionTransition') ? hash['sectionTransition'] : SKIP
75
+ asset_transition =
76
+ hash.key?('assetTransition') ? hash['assetTransition'] : SKIP
77
+
78
+ # Create a new hash for additional properties, removing known properties.
79
+ new_hash = hash.reject { |k, _| names.value?(k) }
80
+
81
+ additional_properties = APIHelper.get_additional_properties(
82
+ new_hash, proc { |value| value }
83
+ )
84
+
85
+ # Create object from extracted values.
86
+ RemixAction4.new(section_transition: section_transition,
87
+ asset_transition: asset_transition,
88
+ additional_properties: additional_properties)
89
+ end
90
+
91
+ # Validates an instance of the object from a given value.
92
+ # @param [RemixAction4 | Hash] The value against the validation is performed.
93
+ def self.validate(value)
94
+ if value.instance_of? self
95
+ return APIHelper.valid_type?(value.type,
96
+ ->(val) { val.instance_of? String })
97
+ end
98
+
99
+ return false unless value.instance_of? Hash
100
+
101
+ APIHelper.valid_type?(value['type'],
102
+ ->(val) { val.instance_of? String })
103
+ end
104
+
105
+ # Provides a human-readable string representation of the object.
106
+ def to_s
107
+ class_name = self.class.name.split('::').last
108
+ "<#{class_name} type: #{@type}, section_transition: #{@section_transition},"\
109
+ " asset_transition: #{@asset_transition}, additional_properties: #{@additional_properties}>"
110
+ end
111
+
112
+ # Provides a debugging-friendly string with detailed object information.
113
+ def inspect
114
+ class_name = self.class.name.split('::').last
115
+ "<#{class_name} type: #{@type.inspect}, section_transition: #{@section_transition.inspect},"\
116
+ " asset_transition: #{@asset_transition.inspect}, additional_properties:"\
117
+ " #{@additional_properties}>"
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,88 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Apply a Ken Burns zoom to every eligible still image in the project,
8
+ # including uploaded images. Replaces any existing still-image effect on those
9
+ # assets. If the project has no eligible stills, the action is skipped and
10
+ # completes successfully without changing anything.
11
+ class RemixAction5 < BaseModel
12
+ SKIP = Object.new
13
+ private_constant :SKIP
14
+
15
+ # Discriminator value: ADD_ZOOM
16
+ # @return [String]
17
+ attr_reader :type
18
+
19
+ # A mapping from model property names to API property names.
20
+ def self.names
21
+ @_hash = {} if @_hash.nil?
22
+ @_hash['type'] = 'type'
23
+ @_hash
24
+ end
25
+
26
+ # An array for optional fields
27
+ def self.optionals
28
+ []
29
+ end
30
+
31
+ # An array for nullable fields
32
+ def self.nullables
33
+ []
34
+ end
35
+
36
+ def initialize(additional_properties: nil)
37
+ # Add additional model properties to the instance
38
+ additional_properties = {} if additional_properties.nil?
39
+
40
+ @type = 'ADD_ZOOM'
41
+ @additional_properties = additional_properties
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+
50
+
51
+ # Create a new hash for additional properties, removing known properties.
52
+ new_hash = hash.reject { |k, _| names.value?(k) }
53
+
54
+ additional_properties = APIHelper.get_additional_properties(
55
+ new_hash, proc { |value| value }
56
+ )
57
+
58
+ # Create object from extracted values.
59
+ RemixAction5.new(additional_properties: additional_properties)
60
+ end
61
+
62
+ # Validates an instance of the object from a given value.
63
+ # @param [RemixAction5 | Hash] The value against the validation is performed.
64
+ def self.validate(value)
65
+ if value.instance_of? self
66
+ return APIHelper.valid_type?(value.type,
67
+ ->(val) { val.instance_of? String })
68
+ end
69
+
70
+ return false unless value.instance_of? Hash
71
+
72
+ APIHelper.valid_type?(value['type'],
73
+ ->(val) { val.instance_of? String })
74
+ end
75
+
76
+ # Provides a human-readable string representation of the object.
77
+ def to_s
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} type: #{@type}, additional_properties: #{@additional_properties}>"
80
+ end
81
+
82
+ # Provides a debugging-friendly string with detailed object information.
83
+ def inspect
84
+ class_name = self.class.name.split('::').last
85
+ "<#{class_name} type: #{@type.inspect}, additional_properties: #{@additional_properties}>"
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,106 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Change the project's output aspect ratio (e.g. to a vertical 9:16 social
8
+ # format). The video is re-flowed to the new ratio.
9
+ class RemixAction6 < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Discriminator value: RESIZE_PROJECT
14
+ # @return [String]
15
+ attr_reader :type
16
+
17
+ # Aspect ratio as a width:height pair (e.g. 16 and 9 for 16:9). Not pixel
18
+ # dimensions.
19
+ # @return [AspectRatio]
20
+ attr_accessor :aspect_ratio
21
+
22
+ # A mapping from model property names to API property names.
23
+ def self.names
24
+ @_hash = {} if @_hash.nil?
25
+ @_hash['type'] = 'type'
26
+ @_hash['aspect_ratio'] = 'aspectRatio'
27
+ @_hash
28
+ end
29
+
30
+ # An array for optional fields
31
+ def self.optionals
32
+ []
33
+ end
34
+
35
+ # An array for nullable fields
36
+ def self.nullables
37
+ []
38
+ end
39
+
40
+ def initialize(aspect_ratio:, additional_properties: nil)
41
+ # Add additional model properties to the instance
42
+ additional_properties = {} if additional_properties.nil?
43
+
44
+ @type = 'RESIZE_PROJECT'
45
+ @aspect_ratio = aspect_ratio
46
+ @additional_properties = additional_properties
47
+ end
48
+
49
+ # Creates an instance of the object from a hash.
50
+ def self.from_hash(hash)
51
+ return nil unless hash
52
+
53
+ # Extract variables from the hash.
54
+ aspect_ratio = AspectRatio.from_hash(hash['aspectRatio']) if hash['aspectRatio']
55
+
56
+ # Create a new hash for additional properties, removing known properties.
57
+ new_hash = hash.reject { |k, _| names.value?(k) }
58
+
59
+ additional_properties = APIHelper.get_additional_properties(
60
+ new_hash, proc { |value| value }
61
+ )
62
+
63
+ # Create object from extracted values.
64
+ RemixAction6.new(aspect_ratio: aspect_ratio,
65
+ additional_properties: additional_properties)
66
+ end
67
+
68
+ # Validates an instance of the object from a given value.
69
+ # @param [RemixAction6 | Hash] The value against the validation is performed.
70
+ def self.validate(value)
71
+ if value.instance_of? self
72
+ return (
73
+ APIHelper.valid_type?(value.type,
74
+ ->(val) { val.instance_of? String }) and
75
+ APIHelper.valid_type?(value.aspect_ratio,
76
+ ->(val) { AspectRatio.validate(val) },
77
+ is_model_hash: true)
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['aspectRatio'],
87
+ ->(val) { AspectRatio.validate(val) },
88
+ is_model_hash: true)
89
+ )
90
+ end
91
+
92
+ # Provides a human-readable string representation of the object.
93
+ def to_s
94
+ class_name = self.class.name.split('::').last
95
+ "<#{class_name} type: #{@type}, aspect_ratio: #{@aspect_ratio}, additional_properties:"\
96
+ " #{@additional_properties}>"
97
+ end
98
+
99
+ # Provides a debugging-friendly string with detailed object information.
100
+ def inspect
101
+ class_name = self.class.name.split('::').last
102
+ "<#{class_name} type: #{@type.inspect}, aspect_ratio: #{@aspect_ratio.inspect},"\
103
+ " additional_properties: #{@additional_properties}>"
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,137 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Tighten every transcript in the project by removing silent pauses and/or
8
+ # filler words. Useful for polishing narration captured from raw recordings.
9
+ class RemixAction7 < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Discriminator value: CLEAN_UP_TRANSCRIPT
14
+ # @return [String]
15
+ attr_reader :type
16
+
17
+ # Remove filler words ("um", "uh", …). Defaults to `true`.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :remove_fillers
20
+
21
+ # Remove silent pauses longer than `minPauseSeconds`. Defaults to `true`.
22
+ # @return [TrueClass | FalseClass]
23
+ attr_accessor :remove_pauses
24
+
25
+ # Override the filler-word list to remove. Omit or pass `null` to use the
26
+ # built-in defaults.
27
+ # @return [Array[String]]
28
+ attr_accessor :filler_words
29
+
30
+ # Shortest pause (in seconds) to remove; pauses below this stay. Omit or
31
+ # pass `null` to use the default threshold.
32
+ # @return [Float]
33
+ attr_accessor :min_pause_seconds
34
+
35
+ # A mapping from model property names to API property names.
36
+ def self.names
37
+ @_hash = {} if @_hash.nil?
38
+ @_hash['type'] = 'type'
39
+ @_hash['remove_fillers'] = 'removeFillers'
40
+ @_hash['remove_pauses'] = 'removePauses'
41
+ @_hash['filler_words'] = 'fillerWords'
42
+ @_hash['min_pause_seconds'] = 'minPauseSeconds'
43
+ @_hash
44
+ end
45
+
46
+ # An array for optional fields
47
+ def self.optionals
48
+ %w[
49
+ remove_fillers
50
+ remove_pauses
51
+ filler_words
52
+ min_pause_seconds
53
+ ]
54
+ end
55
+
56
+ # An array for nullable fields
57
+ def self.nullables
58
+ %w[
59
+ remove_fillers
60
+ remove_pauses
61
+ filler_words
62
+ min_pause_seconds
63
+ ]
64
+ end
65
+
66
+ def initialize(remove_fillers: SKIP, remove_pauses: SKIP,
67
+ filler_words: SKIP, min_pause_seconds: SKIP,
68
+ additional_properties: nil)
69
+ # Add additional model properties to the instance
70
+ additional_properties = {} if additional_properties.nil?
71
+
72
+ @type = 'CLEAN_UP_TRANSCRIPT'
73
+ @remove_fillers = remove_fillers unless remove_fillers == SKIP
74
+ @remove_pauses = remove_pauses unless remove_pauses == SKIP
75
+ @filler_words = filler_words unless filler_words == SKIP
76
+ @min_pause_seconds = min_pause_seconds unless min_pause_seconds == SKIP
77
+ @additional_properties = additional_properties
78
+ end
79
+
80
+ # Creates an instance of the object from a hash.
81
+ def self.from_hash(hash)
82
+ return nil unless hash
83
+
84
+ # Extract variables from the hash.
85
+ remove_fillers = hash.key?('removeFillers') ? hash['removeFillers'] : SKIP
86
+ remove_pauses = hash.key?('removePauses') ? hash['removePauses'] : SKIP
87
+ filler_words = hash.key?('fillerWords') ? hash['fillerWords'] : SKIP
88
+ min_pause_seconds =
89
+ hash.key?('minPauseSeconds') ? hash['minPauseSeconds'] : SKIP
90
+
91
+ # Create a new hash for additional properties, removing known properties.
92
+ new_hash = hash.reject { |k, _| names.value?(k) }
93
+
94
+ additional_properties = APIHelper.get_additional_properties(
95
+ new_hash, proc { |value| value }
96
+ )
97
+
98
+ # Create object from extracted values.
99
+ RemixAction7.new(remove_fillers: remove_fillers,
100
+ remove_pauses: remove_pauses,
101
+ filler_words: filler_words,
102
+ min_pause_seconds: min_pause_seconds,
103
+ additional_properties: additional_properties)
104
+ end
105
+
106
+ # Validates an instance of the object from a given value.
107
+ # @param [RemixAction7 | Hash] The value against the validation is performed.
108
+ def self.validate(value)
109
+ if value.instance_of? self
110
+ return APIHelper.valid_type?(value.type,
111
+ ->(val) { val.instance_of? String })
112
+ end
113
+
114
+ return false unless value.instance_of? Hash
115
+
116
+ APIHelper.valid_type?(value['type'],
117
+ ->(val) { val.instance_of? String })
118
+ end
119
+
120
+ # Provides a human-readable string representation of the object.
121
+ def to_s
122
+ class_name = self.class.name.split('::').last
123
+ "<#{class_name} type: #{@type}, remove_fillers: #{@remove_fillers}, remove_pauses:"\
124
+ " #{@remove_pauses}, filler_words: #{@filler_words}, min_pause_seconds:"\
125
+ " #{@min_pause_seconds}, additional_properties: #{@additional_properties}>"
126
+ end
127
+
128
+ # Provides a debugging-friendly string with detailed object information.
129
+ def inspect
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} type: #{@type.inspect}, remove_fillers: #{@remove_fillers.inspect},"\
132
+ " remove_pauses: #{@remove_pauses.inspect}, filler_words: #{@filler_words.inspect},"\
133
+ " min_pause_seconds: #{@min_pause_seconds.inspect}, additional_properties:"\
134
+ " #{@additional_properties}>"
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,131 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Animate every eligible still image in the project into a short AI video clip
8
+ # (image-to-video), replacing each image in place. Eligible images are non-SVG
9
+ # image assets backed by an uploaded or stock file. Runs asynchronously: one
10
+ # clip is generated per image. If the project has no eligible images, the
11
+ # action is skipped and completes successfully without changing anything (for
12
+ # example, a project whose timeline is already all video clips).
13
+ class RemixAction8 < BaseModel
14
+ SKIP = Object.new
15
+ private_constant :SKIP
16
+
17
+ # Discriminator value: CONVERT_IMAGES_TO_VIDEOS
18
+ # @return [String]
19
+ attr_reader :type
20
+
21
+ # Describe the motion to apply to every image (e.g. "slow cinematic
22
+ # push-in"). Omit or pass `null` for automatic motion.
23
+ # @return [String]
24
+ attr_accessor :motion_prompt
25
+
26
+ # Mute the generated clips and suppress generated background music.
27
+ # Recommended when the clips sit behind a voiceover. Defaults to `true`.
28
+ # @return [TrueClass | FalseClass]
29
+ attr_accessor :mute_output_videos
30
+
31
+ # Video generation quality tier for the image-to-video conversions (`LOW`,
32
+ # `STANDARD`, `HIGH`, or `MAX`). Optional; when omitted, your account's
33
+ # Default AI quality for video is used (change it at
34
+ # https://app.videogen.io/settings/account).
35
+ # @return [ModelQuality1]
36
+ attr_accessor :quality
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['motion_prompt'] = 'motionPrompt'
43
+ @_hash['mute_output_videos'] = 'muteOutputVideos'
44
+ @_hash['quality'] = 'quality'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ motion_prompt
52
+ mute_output_videos
53
+ quality
54
+ ]
55
+ end
56
+
57
+ # An array for nullable fields
58
+ def self.nullables
59
+ %w[
60
+ motion_prompt
61
+ mute_output_videos
62
+ ]
63
+ end
64
+
65
+ def initialize(motion_prompt: SKIP, mute_output_videos: SKIP, quality: SKIP,
66
+ additional_properties: nil)
67
+ # Add additional model properties to the instance
68
+ additional_properties = {} if additional_properties.nil?
69
+
70
+ @type = 'CONVERT_IMAGES_TO_VIDEOS'
71
+ @motion_prompt = motion_prompt unless motion_prompt == SKIP
72
+ @mute_output_videos = mute_output_videos unless mute_output_videos == SKIP
73
+ @quality = quality unless quality == SKIP
74
+ @additional_properties = additional_properties
75
+ end
76
+
77
+ # Creates an instance of the object from a hash.
78
+ def self.from_hash(hash)
79
+ return nil unless hash
80
+
81
+ # Extract variables from the hash.
82
+ motion_prompt = hash.key?('motionPrompt') ? hash['motionPrompt'] : SKIP
83
+ mute_output_videos =
84
+ hash.key?('muteOutputVideos') ? hash['muteOutputVideos'] : SKIP
85
+ quality = hash.key?('quality') ? hash['quality'] : SKIP
86
+
87
+ # Create a new hash for additional properties, removing known properties.
88
+ new_hash = hash.reject { |k, _| names.value?(k) }
89
+
90
+ additional_properties = APIHelper.get_additional_properties(
91
+ new_hash, proc { |value| value }
92
+ )
93
+
94
+ # Create object from extracted values.
95
+ RemixAction8.new(motion_prompt: motion_prompt,
96
+ mute_output_videos: mute_output_videos,
97
+ quality: quality,
98
+ additional_properties: additional_properties)
99
+ end
100
+
101
+ # Validates an instance of the object from a given value.
102
+ # @param [RemixAction8 | Hash] The value against the validation is performed.
103
+ def self.validate(value)
104
+ if value.instance_of? self
105
+ return APIHelper.valid_type?(value.type,
106
+ ->(val) { val.instance_of? String })
107
+ end
108
+
109
+ return false unless value.instance_of? Hash
110
+
111
+ APIHelper.valid_type?(value['type'],
112
+ ->(val) { val.instance_of? String })
113
+ end
114
+
115
+ # Provides a human-readable string representation of the object.
116
+ def to_s
117
+ class_name = self.class.name.split('::').last
118
+ "<#{class_name} type: #{@type}, motion_prompt: #{@motion_prompt}, mute_output_videos:"\
119
+ " #{@mute_output_videos}, quality: #{@quality}, additional_properties:"\
120
+ " #{@additional_properties}>"
121
+ end
122
+
123
+ # Provides a debugging-friendly string with detailed object information.
124
+ def inspect
125
+ class_name = self.class.name.split('::').last
126
+ "<#{class_name} type: #{@type.inspect}, motion_prompt: #{@motion_prompt.inspect},"\
127
+ " mute_output_videos: #{@mute_output_videos.inspect}, quality: #{@quality.inspect},"\
128
+ " additional_properties: #{@additional_properties}>"
129
+ end
130
+ end
131
+ end