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,150 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # WorkflowRun Model.
8
+ class WorkflowRun < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Opaque workflow run id.
13
+ # @return [String]
14
+ attr_accessor :workflow_run_id
15
+
16
+ # Lifecycle status shared by every asynchronous job (tool executions,
17
+ # workflow runs, remix actions, project exports, and timeline interchange
18
+ # jobs). `pending` and `running` are in-progress; `succeeded`, `failed`, and
19
+ # `cancelled` are terminal.
20
+ # @return [JobStatus]
21
+ attr_accessor :status
22
+
23
+ # Workflow type identifier.
24
+ # @return [WorkflowType]
25
+ attr_accessor :workflow_type
26
+
27
+ # Completion progress for the current attempt (0-100). Always `100` when
28
+ # `status` is `succeeded`.
29
+ # @return [Float]
30
+ attr_accessor :progress_percentage
31
+
32
+ # Zero-based index of the current or most recent execution attempt.
33
+ # @return [Integer]
34
+ attr_accessor :attempt_index
35
+
36
+ # Id of the project created for this workflow run (e.g. `vg_proj_...`).
37
+ # @return [String]
38
+ attr_accessor :project_id
39
+
40
+ # Deep link to open this project in the VideoGen web editor. Not required
41
+ # for an API-only integration: store `projectId` and use the Projects API
42
+ # (export, remix, metadata). Use `projectUrl` when a person should open the
43
+ # project in the app to review or edit it manually. The project is visible
44
+ # only to members of your team and any project collaborators, the same
45
+ # access model as a project created in the dashboard.
46
+ # @return [String]
47
+ attr_accessor :project_url
48
+
49
+ # Error details. Always present as a field; `null` unless `status` is
50
+ # `failed`.
51
+ # @return [ApiError]
52
+ attr_accessor :error
53
+
54
+ # A mapping from model property names to API property names.
55
+ def self.names
56
+ @_hash = {} if @_hash.nil?
57
+ @_hash['workflow_run_id'] = 'workflowRunId'
58
+ @_hash['status'] = 'status'
59
+ @_hash['workflow_type'] = 'workflowType'
60
+ @_hash['progress_percentage'] = 'progressPercentage'
61
+ @_hash['attempt_index'] = 'attemptIndex'
62
+ @_hash['project_id'] = 'projectId'
63
+ @_hash['project_url'] = 'projectUrl'
64
+ @_hash['error'] = 'error'
65
+ @_hash
66
+ end
67
+
68
+ # An array for optional fields
69
+ def self.optionals
70
+ []
71
+ end
72
+
73
+ # An array for nullable fields
74
+ def self.nullables
75
+ %w[
76
+ error
77
+ ]
78
+ end
79
+
80
+ def initialize(workflow_run_id:, status:, workflow_type:,
81
+ progress_percentage:, attempt_index:, project_id:,
82
+ project_url:, error:, additional_properties: nil)
83
+ # Add additional model properties to the instance
84
+ additional_properties = {} if additional_properties.nil?
85
+
86
+ @workflow_run_id = workflow_run_id
87
+ @status = status
88
+ @workflow_type = workflow_type
89
+ @progress_percentage = progress_percentage
90
+ @attempt_index = attempt_index
91
+ @project_id = project_id
92
+ @project_url = project_url
93
+ @error = error
94
+ @additional_properties = additional_properties
95
+ end
96
+
97
+ # Creates an instance of the object from a hash.
98
+ def self.from_hash(hash)
99
+ return nil unless hash
100
+
101
+ # Extract variables from the hash.
102
+ workflow_run_id = hash.key?('workflowRunId') ? hash['workflowRunId'] : nil
103
+ status = hash.key?('status') ? hash['status'] : nil
104
+ workflow_type = hash.key?('workflowType') ? hash['workflowType'] : nil
105
+ progress_percentage =
106
+ hash.key?('progressPercentage') ? hash['progressPercentage'] : nil
107
+ attempt_index = hash.key?('attemptIndex') ? hash['attemptIndex'] : nil
108
+ project_id = hash.key?('projectId') ? hash['projectId'] : nil
109
+ project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
110
+ error = ApiError.from_hash(hash['error']) if hash['error']
111
+
112
+ # Create a new hash for additional properties, removing known properties.
113
+ new_hash = hash.reject { |k, _| names.value?(k) }
114
+
115
+ additional_properties = APIHelper.get_additional_properties(
116
+ new_hash, proc { |value| value }
117
+ )
118
+
119
+ # Create object from extracted values.
120
+ WorkflowRun.new(workflow_run_id: workflow_run_id,
121
+ status: status,
122
+ workflow_type: workflow_type,
123
+ progress_percentage: progress_percentage,
124
+ attempt_index: attempt_index,
125
+ project_id: project_id,
126
+ project_url: project_url,
127
+ error: error,
128
+ additional_properties: additional_properties)
129
+ end
130
+
131
+ # Provides a human-readable string representation of the object.
132
+ def to_s
133
+ class_name = self.class.name.split('::').last
134
+ "<#{class_name} workflow_run_id: #{@workflow_run_id}, status: #{@status}, workflow_type:"\
135
+ " #{@workflow_type}, progress_percentage: #{@progress_percentage}, attempt_index:"\
136
+ " #{@attempt_index}, project_id: #{@project_id}, project_url: #{@project_url}, error:"\
137
+ " #{@error}, 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} workflow_run_id: #{@workflow_run_id.inspect}, status: #{@status.inspect},"\
144
+ " workflow_type: #{@workflow_type.inspect}, progress_percentage:"\
145
+ " #{@progress_percentage.inspect}, attempt_index: #{@attempt_index.inspect}, project_id:"\
146
+ " #{@project_id.inspect}, project_url: #{@project_url.inspect}, error: #{@error.inspect},"\
147
+ " additional_properties: #{@additional_properties}>"
148
+ end
149
+ end
150
+ end
@@ -0,0 +1,103 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Paginated list of API-started workflow runs, most recently created first.
8
+ class WorkflowRunListResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[WorkflowRun]]
14
+ attr_accessor :workflow_runs
15
+
16
+ # When true, there are more runs available. Pass `nextCursor` as the
17
+ # `cursor` query param to fetch the next page.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :has_more
20
+
21
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
22
+ # @return [String]
23
+ attr_accessor :next_cursor
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['workflow_runs'] = 'workflowRuns'
29
+ @_hash['has_more'] = 'hasMore'
30
+ @_hash['next_cursor'] = 'nextCursor'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ %w[
42
+ next_cursor
43
+ ]
44
+ end
45
+
46
+ def initialize(workflow_runs:, has_more:, next_cursor:,
47
+ additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @workflow_runs = workflow_runs
52
+ @has_more = has_more
53
+ @next_cursor = next_cursor
54
+ @additional_properties = additional_properties
55
+ end
56
+
57
+ # Creates an instance of the object from a hash.
58
+ def self.from_hash(hash)
59
+ return nil unless hash
60
+
61
+ # Extract variables from the hash.
62
+ # Parameter is an array, so we need to iterate through it
63
+ workflow_runs = nil
64
+ unless hash['workflowRuns'].nil?
65
+ workflow_runs = []
66
+ hash['workflowRuns'].each do |structure|
67
+ workflow_runs << (WorkflowRun.from_hash(structure) if structure)
68
+ end
69
+ end
70
+
71
+ workflow_runs = nil unless hash.key?('workflowRuns')
72
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
73
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
74
+
75
+ # Create a new hash for additional properties, removing known properties.
76
+ new_hash = hash.reject { |k, _| names.value?(k) }
77
+
78
+ additional_properties = APIHelper.get_additional_properties(
79
+ new_hash, proc { |value| value }
80
+ )
81
+
82
+ # Create object from extracted values.
83
+ WorkflowRunListResponse.new(workflow_runs: workflow_runs,
84
+ has_more: has_more,
85
+ next_cursor: next_cursor,
86
+ additional_properties: additional_properties)
87
+ end
88
+
89
+ # Provides a human-readable string representation of the object.
90
+ def to_s
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} workflow_runs: #{@workflow_runs}, has_more: #{@has_more}, next_cursor:"\
93
+ " #{@next_cursor}, additional_properties: #{@additional_properties}>"
94
+ end
95
+
96
+ # Provides a debugging-friendly string with detailed object information.
97
+ def inspect
98
+ class_name = self.class.name.split('::').last
99
+ "<#{class_name} workflow_runs: #{@workflow_runs.inspect}, has_more: #{@has_more.inspect},"\
100
+ " next_cursor: #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,52 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Workflow type identifier.
8
+ class WorkflowType
9
+ WORKFLOW_TYPE = [
10
+ # TODO: Write general description for SCRIPT_TO_VIDEO
11
+ SCRIPT_TO_VIDEO = 'SCRIPT_TO_VIDEO'.freeze,
12
+
13
+ # TODO: Write general description for VOICEOVER_TO_VIDEO
14
+ VOICEOVER_TO_VIDEO = 'VOICEOVER_TO_VIDEO'.freeze,
15
+
16
+ # TODO: Write general description for SLIDESHOW_TO_VIDEO
17
+ SLIDESHOW_TO_VIDEO = 'SLIDESHOW_TO_VIDEO'.freeze,
18
+
19
+ # TODO: Write general description for STORYBOARD_TO_VIDEO
20
+ STORYBOARD_TO_VIDEO = 'STORYBOARD_TO_VIDEO'.freeze,
21
+
22
+ # TODO: Write general description for PROMPT_TO_VIDEO_CLIP
23
+ PROMPT_TO_VIDEO_CLIP = 'PROMPT_TO_VIDEO_CLIP'.freeze,
24
+
25
+ # TODO: Write general description for CREATIVE_BRIEF_TO_VIDEO
26
+ CREATIVE_BRIEF_TO_VIDEO = 'CREATIVE_BRIEF_TO_VIDEO'.freeze
27
+ ].freeze
28
+
29
+ def self.validate(value)
30
+ return false if value.nil?
31
+
32
+ WORKFLOW_TYPE.include?(value)
33
+ end
34
+
35
+ def self.from_value(value, default_value = SCRIPT_TO_VIDEO)
36
+ return default_value if value.nil?
37
+
38
+ str = value.to_s.strip
39
+
40
+ case str.downcase
41
+ when 'script_to_video' then SCRIPT_TO_VIDEO
42
+ when 'voiceover_to_video' then VOICEOVER_TO_VIDEO
43
+ when 'slideshow_to_video' then SLIDESHOW_TO_VIDEO
44
+ when 'storyboard_to_video' then STORYBOARD_TO_VIDEO
45
+ when 'prompt_to_video_clip' then PROMPT_TO_VIDEO_CLIP
46
+ when 'creative_brief_to_video' then CREATIVE_BRIEF_TO_VIDEO
47
+ else
48
+ default_value
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,52 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Identifier of the suggested workflow.
8
+ class WorkflowType1
9
+ WORKFLOW_TYPE1 = [
10
+ # TODO: Write general description for SCRIPT_TO_VIDEO
11
+ SCRIPT_TO_VIDEO = 'SCRIPT_TO_VIDEO'.freeze,
12
+
13
+ # TODO: Write general description for VOICEOVER_TO_VIDEO
14
+ VOICEOVER_TO_VIDEO = 'VOICEOVER_TO_VIDEO'.freeze,
15
+
16
+ # TODO: Write general description for SLIDESHOW_TO_VIDEO
17
+ SLIDESHOW_TO_VIDEO = 'SLIDESHOW_TO_VIDEO'.freeze,
18
+
19
+ # TODO: Write general description for STORYBOARD_TO_VIDEO
20
+ STORYBOARD_TO_VIDEO = 'STORYBOARD_TO_VIDEO'.freeze,
21
+
22
+ # TODO: Write general description for PROMPT_TO_VIDEO_CLIP
23
+ PROMPT_TO_VIDEO_CLIP = 'PROMPT_TO_VIDEO_CLIP'.freeze,
24
+
25
+ # TODO: Write general description for CREATIVE_BRIEF_TO_VIDEO
26
+ CREATIVE_BRIEF_TO_VIDEO = 'CREATIVE_BRIEF_TO_VIDEO'.freeze
27
+ ].freeze
28
+
29
+ def self.validate(value)
30
+ return false if value.nil?
31
+
32
+ WORKFLOW_TYPE1.include?(value)
33
+ end
34
+
35
+ def self.from_value(value, default_value = SCRIPT_TO_VIDEO)
36
+ return default_value if value.nil?
37
+
38
+ str = value.to_s.strip
39
+
40
+ case str.downcase
41
+ when 'script_to_video' then SCRIPT_TO_VIDEO
42
+ when 'voiceover_to_video' then VOICEOVER_TO_VIDEO
43
+ when 'slideshow_to_video' then SLIDESHOW_TO_VIDEO
44
+ when 'storyboard_to_video' then STORYBOARD_TO_VIDEO
45
+ when 'prompt_to_video_clip' then PROMPT_TO_VIDEO_CLIP
46
+ when 'creative_brief_to_video' then CREATIVE_BRIEF_TO_VIDEO
47
+ else
48
+ default_value
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,136 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Visual style for the generated b-roll.
8
+ class WorkflowVisualStyle < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # STOCK pulls stock footage and images. AI_IMAGE generates a styled image
13
+ # for each section. Pass `entityId` to match a saved visual-style entity, or
14
+ # `aiStyle` for a free-form look.
15
+ # @return [WorkflowVisualStyleType]
16
+ attr_accessor :type
17
+
18
+ # Only applies when type is AI_IMAGE and `entityId` is omitted. A free-form
19
+ # description of the look applied to every generated image (e.g. `vintage
20
+ # 1970s film photography, warm grain`). See the AI styles reference for
21
+ # example descriptions of the app's default styles. Required when type is
22
+ # AI_IMAGE and `entityId` is omitted.
23
+ # @return [String]
24
+ attr_accessor :ai_style
25
+
26
+ # Only applies when type is AI_IMAGE. The id of a VISUAL_STYLE entity (e.g.
27
+ # `vg_enti_...`) whose reference images guide every generated image. When
28
+ # set, generated images match that entity instead of `aiStyle`.
29
+ # @return [String]
30
+ attr_accessor :entity_id
31
+
32
+ # Only applies when type is AI_IMAGE. When true, featured b-roll images you
33
+ # provide are re-rendered in the chosen style so they match the generated
34
+ # look (no effect on featured b-roll videos). Defaults to true.
35
+ # @return [TrueClass | FalseClass]
36
+ attr_accessor :restyle_featured_b_roll_with_ai_style
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['ai_style'] = 'aiStyle'
43
+ @_hash['entity_id'] = 'entityId'
44
+ @_hash['restyle_featured_b_roll_with_ai_style'] =
45
+ 'restyleFeaturedBRollWithAiStyle'
46
+ @_hash
47
+ end
48
+
49
+ # An array for optional fields
50
+ def self.optionals
51
+ %w[
52
+ ai_style
53
+ entity_id
54
+ restyle_featured_b_roll_with_ai_style
55
+ ]
56
+ end
57
+
58
+ # An array for nullable fields
59
+ def self.nullables
60
+ []
61
+ end
62
+
63
+ def initialize(type:, ai_style: SKIP, entity_id: SKIP,
64
+ restyle_featured_b_roll_with_ai_style: true,
65
+ additional_properties: nil)
66
+ # Add additional model properties to the instance
67
+ additional_properties = {} if additional_properties.nil?
68
+
69
+ @type = type
70
+ @ai_style = ai_style unless ai_style == SKIP
71
+ @entity_id = entity_id unless entity_id == SKIP
72
+ unless restyle_featured_b_roll_with_ai_style == SKIP
73
+ @restyle_featured_b_roll_with_ai_style =
74
+ restyle_featured_b_roll_with_ai_style
75
+ end
76
+ @additional_properties = additional_properties
77
+ end
78
+
79
+ # Creates an instance of the object from a hash.
80
+ def self.from_hash(hash)
81
+ return nil unless hash
82
+
83
+ # Extract variables from the hash.
84
+ type = hash.key?('type') ? hash['type'] : nil
85
+ ai_style = hash.key?('aiStyle') ? hash['aiStyle'] : SKIP
86
+ entity_id = hash.key?('entityId') ? hash['entityId'] : SKIP
87
+ restyle_featured_b_roll_with_ai_style =
88
+ hash['restyleFeaturedBRollWithAiStyle'] ||= true
89
+
90
+ # Create a new hash for additional properties, removing known properties.
91
+ new_hash = hash.reject { |k, _| names.value?(k) }
92
+
93
+ additional_properties = APIHelper.get_additional_properties(
94
+ new_hash, proc { |value| value }
95
+ )
96
+
97
+ # Create object from extracted values.
98
+ WorkflowVisualStyle.new(type: type,
99
+ ai_style: ai_style,
100
+ entity_id: entity_id,
101
+ restyle_featured_b_roll_with_ai_style: restyle_featured_b_roll_with_ai_style,
102
+ additional_properties: additional_properties)
103
+ end
104
+
105
+ # Validates an instance of the object from a given value.
106
+ # @param [WorkflowVisualStyle | Hash] The value against the validation is performed.
107
+ def self.validate(value)
108
+ if value.instance_of? self
109
+ return APIHelper.valid_type?(value.type,
110
+ ->(val) { WorkflowVisualStyleType.validate(val) })
111
+ end
112
+
113
+ return false unless value.instance_of? Hash
114
+
115
+ APIHelper.valid_type?(value['type'],
116
+ ->(val) { WorkflowVisualStyleType.validate(val) })
117
+ end
118
+
119
+ # Provides a human-readable string representation of the object.
120
+ def to_s
121
+ class_name = self.class.name.split('::').last
122
+ "<#{class_name} type: #{@type}, ai_style: #{@ai_style}, entity_id: #{@entity_id},"\
123
+ " restyle_featured_b_roll_with_ai_style: #{@restyle_featured_b_roll_with_ai_style},"\
124
+ " additional_properties: #{@additional_properties}>"
125
+ end
126
+
127
+ # Provides a debugging-friendly string with detailed object information.
128
+ def inspect
129
+ class_name = self.class.name.split('::').last
130
+ "<#{class_name} type: #{@type.inspect}, ai_style: #{@ai_style.inspect}, entity_id:"\
131
+ " #{@entity_id.inspect}, restyle_featured_b_roll_with_ai_style:"\
132
+ " #{@restyle_featured_b_roll_with_ai_style.inspect}, additional_properties:"\
133
+ " #{@additional_properties}>"
134
+ end
135
+ end
136
+ end
@@ -0,0 +1,38 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # STOCK pulls stock footage and images. AI_IMAGE generates a styled image for
8
+ # each section. Pass `entityId` to match a saved visual-style entity, or
9
+ # `aiStyle` for a free-form look.
10
+ class WorkflowVisualStyleType
11
+ WORKFLOW_VISUAL_STYLE_TYPE = [
12
+ # TODO: Write general description for STOCK
13
+ STOCK = 'STOCK'.freeze,
14
+
15
+ # TODO: Write general description for AI_IMAGE
16
+ AI_IMAGE = 'AI_IMAGE'.freeze
17
+ ].freeze
18
+
19
+ def self.validate(value)
20
+ return false if value.nil?
21
+
22
+ WORKFLOW_VISUAL_STYLE_TYPE.include?(value)
23
+ end
24
+
25
+ def self.from_value(value, default_value = STOCK)
26
+ return default_value if value.nil?
27
+
28
+ str = value.to_s.strip
29
+
30
+ case str.downcase
31
+ when 'stock' then STOCK
32
+ when 'ai_image' then AI_IMAGE
33
+ else
34
+ default_value
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,11 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module Videogen
8
+ # A utility that supports dateTime conversion to different formats
9
+ class DateTimeHelper < CoreLibrary::DateTimeHelper
10
+ end
11
+ end
@@ -0,0 +1,28 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A utility to allow users to set the content-type for files
8
+ class FileWrapper < CoreLibrary::FileWrapper
9
+ # The constructor.
10
+ # @param [File] file The file to be sent in the request.
11
+ # @param [string] content_type The content type of the provided file.
12
+ def initialize(file, content_type: 'application/octet-stream')
13
+ super
14
+ end
15
+
16
+ # Provides a human-readable string representation of the object.
17
+ def to_s
18
+ class_name = self.class.name.split('::').last
19
+ "<#{class_name} file: #{@file}, content_type: #{@content_type}>"
20
+ end
21
+
22
+ # Provides a debugging-friendly string with detailed object information.
23
+ def to_inspect
24
+ class_name = self.class.name.split('::').last
25
+ "<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>"
26
+ end
27
+ end
28
+ end