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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +152 -0
- data/bin/console +15 -0
- data/lib/videogen/api_helper.rb +10 -0
- data/lib/videogen/apis/account_api.rb +31 -0
- data/lib/videogen/apis/assistant_api.rb +191 -0
- data/lib/videogen/apis/base_api.rb +67 -0
- data/lib/videogen/apis/entities_api.rb +230 -0
- data/lib/videogen/apis/files_api.rb +263 -0
- data/lib/videogen/apis/projects_api.rb +355 -0
- data/lib/videogen/apis/resources_api.rb +81 -0
- data/lib/videogen/apis/text_api.rb +39 -0
- data/lib/videogen/apis/tools_api.rb +494 -0
- data/lib/videogen/apis/webhooks_api.rb +94 -0
- data/lib/videogen/apis/workflows_api.rb +217 -0
- data/lib/videogen/client.rb +127 -0
- data/lib/videogen/configuration.rb +166 -0
- data/lib/videogen/exceptions/api_exception.rb +21 -0
- data/lib/videogen/http/api_response.rb +19 -0
- data/lib/videogen/http/auth/oauth_2.rb +53 -0
- data/lib/videogen/http/http_call_back.rb +10 -0
- data/lib/videogen/http/http_method_enum.rb +10 -0
- data/lib/videogen/http/http_request.rb +10 -0
- data/lib/videogen/http/http_response.rb +10 -0
- data/lib/videogen/http/proxy_settings.rb +22 -0
- data/lib/videogen/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/videogen/logging/sdk_logger.rb +17 -0
- data/lib/videogen/models/act_on_assistant_action_request.rb +77 -0
- data/lib/videogen/models/act_on_assistant_action_request_decision.rb +36 -0
- data/lib/videogen/models/act_on_assistant_action_response.rb +77 -0
- data/lib/videogen/models/add_entity_reference_request.rb +95 -0
- data/lib/videogen/models/api_error.rb +137 -0
- data/lib/videogen/models/aspect_ratio.rb +105 -0
- data/lib/videogen/models/aspect_ratio1.rb +82 -0
- data/lib/videogen/models/aspect_ratio2.rb +82 -0
- data/lib/videogen/models/aspect_ratio4.rb +83 -0
- data/lib/videogen/models/assistant_action.rb +148 -0
- data/lib/videogen/models/assistant_action_detail.rb +108 -0
- data/lib/videogen/models/assistant_action_detail1.rb +117 -0
- data/lib/videogen/models/assistant_action_kind.rb +52 -0
- data/lib/videogen/models/assistant_message.rb +167 -0
- data/lib/videogen/models/assistant_message1.rb +259 -0
- data/lib/videogen/models/assistant_message_attachment.rb +101 -0
- data/lib/videogen/models/assistant_message_status.rb +49 -0
- data/lib/videogen/models/assistant_workflow_suggestion.rb +133 -0
- data/lib/videogen/models/base_model.rb +110 -0
- data/lib/videogen/models/content_policy_config.rb +80 -0
- data/lib/videogen/models/create_entity_request.rb +96 -0
- data/lib/videogen/models/create_entity_request_entity_type.rb +47 -0
- data/lib/videogen/models/create_file_upload_request.rb +125 -0
- data/lib/videogen/models/create_timeline_interchange_request.rb +93 -0
- data/lib/videogen/models/create_timeline_interchange_response.rb +76 -0
- data/lib/videogen/models/create_webhook_endpoint_request.rb +94 -0
- data/lib/videogen/models/end_screen_mode.rb +43 -0
- data/lib/videogen/models/entity.rb +166 -0
- data/lib/videogen/models/entity_actor_config.rb +101 -0
- data/lib/videogen/models/entity_archive_response.rb +82 -0
- data/lib/videogen/models/entity_entity_type.rb +47 -0
- data/lib/videogen/models/entity_reference.rb +93 -0
- data/lib/videogen/models/error_requirement.rb +101 -0
- data/lib/videogen/models/executed_tool.rb +148 -0
- data/lib/videogen/models/export_delivery_destination.rb +110 -0
- data/lib/videogen/models/export_delivery_destination_type.rb +36 -0
- data/lib/videogen/models/export_project_quality.rb +44 -0
- data/lib/videogen/models/export_project_request.rb +124 -0
- data/lib/videogen/models/export_project_response.rb +76 -0
- data/lib/videogen/models/file_analysis_metadata.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata1.rb +112 -0
- data/lib/videogen/models/file_analysis_metadata_analysis_loading_state.rb +48 -0
- data/lib/videogen/models/file_info.rb +386 -0
- data/lib/videogen/models/file_info1.rb +387 -0
- data/lib/videogen/models/file_info_scope.rb +54 -0
- data/lib/videogen/models/file_source.rb +134 -0
- data/lib/videogen/models/file_source_status.rb +46 -0
- data/lib/videogen/models/file_type.rb +57 -0
- data/lib/videogen/models/file_type1.rb +56 -0
- data/lib/videogen/models/file_type2.rb +57 -0
- data/lib/videogen/models/file_upload_response.rb +82 -0
- data/lib/videogen/models/generate_avatar_request.rb +149 -0
- data/lib/videogen/models/generate_image_request.rb +187 -0
- data/lib/videogen/models/generate_motion_graphic_request.rb +193 -0
- data/lib/videogen/models/generate_music_request.rb +111 -0
- data/lib/videogen/models/generate_sound_effect_request.rb +139 -0
- data/lib/videogen/models/generate_text_request.rb +120 -0
- data/lib/videogen/models/generate_text_response.rb +72 -0
- data/lib/videogen/models/generate_video_clip_request.rb +297 -0
- data/lib/videogen/models/get_assistant_response.rb +135 -0
- data/lib/videogen/models/get_files_response.rb +102 -0
- data/lib/videogen/models/image_asset_request.rb +125 -0
- data/lib/videogen/models/job_status.rb +51 -0
- data/lib/videogen/models/language.rb +83 -0
- data/lib/videogen/models/language_list_response.rb +83 -0
- data/lib/videogen/models/list_entities_response.rb +103 -0
- data/lib/videogen/models/list_project_exports_response.rb +104 -0
- data/lib/videogen/models/list_projects_response.rb +105 -0
- data/lib/videogen/models/list_remix_actions_response.rb +103 -0
- data/lib/videogen/models/me_response.rb +114 -0
- data/lib/videogen/models/model_quality.rb +51 -0
- data/lib/videogen/models/model_quality1.rb +47 -0
- data/lib/videogen/models/model_quality10.rb +46 -0
- data/lib/videogen/models/model_quality11.rb +46 -0
- data/lib/videogen/models/model_quality12.rb +45 -0
- data/lib/videogen/models/model_quality13.rb +46 -0
- data/lib/videogen/models/model_quality2.rb +46 -0
- data/lib/videogen/models/model_quality3.rb +46 -0
- data/lib/videogen/models/model_quality4.rb +48 -0
- data/lib/videogen/models/model_quality9.rb +47 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode.rb +44 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode1.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode2.rb +41 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode3.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_mode4.rb +40 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes.rb +114 -0
- data/lib/videogen/models/motion_graphic_sub_tool_modes1.rb +116 -0
- data/lib/videogen/models/project_export.rb +207 -0
- data/lib/videogen/models/project_response.rb +151 -0
- data/lib/videogen/models/project_response_status.rb +36 -0
- data/lib/videogen/models/prompt_to_video_clip_request.rb +155 -0
- data/lib/videogen/models/pronunciation_replacement.rb +82 -0
- data/lib/videogen/models/remix_action.rb +111 -0
- data/lib/videogen/models/remix_action1.rb +123 -0
- data/lib/videogen/models/remix_action10.rb +115 -0
- data/lib/videogen/models/remix_action11.rb +148 -0
- data/lib/videogen/models/remix_action12.rb +89 -0
- data/lib/videogen/models/remix_action13.rb +105 -0
- data/lib/videogen/models/remix_action14.rb +138 -0
- data/lib/videogen/models/remix_action2.rb +101 -0
- data/lib/videogen/models/remix_action3.rb +85 -0
- data/lib/videogen/models/remix_action4.rb +120 -0
- data/lib/videogen/models/remix_action5.rb +88 -0
- data/lib/videogen/models/remix_action6.rb +106 -0
- data/lib/videogen/models/remix_action7.rb +137 -0
- data/lib/videogen/models/remix_action8.rb +131 -0
- data/lib/videogen/models/remix_action9.rb +120 -0
- data/lib/videogen/models/remix_action_discriminator_mapping_set_logo_position.rb +53 -0
- data/lib/videogen/models/remix_action_run.rb +150 -0
- data/lib/videogen/models/remix_action_type.rb +88 -0
- data/lib/videogen/models/remix_project_request.rb +105 -0
- data/lib/videogen/models/remix_project_response.rb +101 -0
- data/lib/videogen/models/remix_transition_style.rb +58 -0
- data/lib/videogen/models/remove_entity_reference_request.rb +73 -0
- data/lib/videogen/models/scene_description_range.rb +121 -0
- data/lib/videogen/models/script_to_video_request.rb +309 -0
- data/lib/videogen/models/search_files_request.rb +96 -0
- data/lib/videogen/models/search_files_response.rb +82 -0
- data/lib/videogen/models/search_files_result.rb +85 -0
- data/lib/videogen/models/send_assistant_message_request.rb +73 -0
- data/lib/videogen/models/send_assistant_message_response.rb +76 -0
- data/lib/videogen/models/slideshow_to_video_request.rb +276 -0
- data/lib/videogen/models/start_assistant_chat_request.rb +88 -0
- data/lib/videogen/models/start_assistant_chat_response.rb +105 -0
- data/lib/videogen/models/start_tool_execution_response.rb +76 -0
- data/lib/videogen/models/start_workflow_run_response.rb +141 -0
- data/lib/videogen/models/text_to_speech_request.rb +191 -0
- data/lib/videogen/models/timeline_interchange.rb +210 -0
- data/lib/videogen/models/timeline_interchange_format.rb +47 -0
- data/lib/videogen/models/timeline_interchange_media_delivery.rb +39 -0
- data/lib/videogen/models/tool_execution_list_response.rb +104 -0
- data/lib/videogen/models/tool_success_result.rb +152 -0
- data/lib/videogen/models/transcript.rb +97 -0
- data/lib/videogen/models/transcript_word.rb +93 -0
- data/lib/videogen/models/tts_voice.rb +162 -0
- data/lib/videogen/models/tts_voice_display_gender.rb +40 -0
- data/lib/videogen/models/tts_voice_list_response.rb +103 -0
- data/lib/videogen/models/update_entity_request.rb +88 -0
- data/lib/videogen/models/v1_entities_get_parameters_entity_type.rb +44 -0
- data/lib/videogen/models/video_asset_request.rb +125 -0
- data/lib/videogen/models/visual_pacing.rb +41 -0
- data/lib/videogen/models/voiceover_to_video_request.rb +297 -0
- data/lib/videogen/models/watermark_mode.rb +43 -0
- data/lib/videogen/models/webhook_endpoint.rb +137 -0
- data/lib/videogen/models/webhook_endpoint_list_response.rb +103 -0
- data/lib/videogen/models/webhook_event_name.rb +100 -0
- data/lib/videogen/models/workflow_caption_background_style.rb +133 -0
- data/lib/videogen/models/workflow_caption_background_style_type.rb +41 -0
- data/lib/videogen/models/workflow_caption_style.rb +220 -0
- data/lib/videogen/models/workflow_caption_style_font_weight.rb +64 -0
- data/lib/videogen/models/workflow_caption_style_text_justification.rb +40 -0
- data/lib/videogen/models/workflow_caption_style_vertical_alignment.rb +40 -0
- data/lib/videogen/models/workflow_rgb_color.rb +116 -0
- data/lib/videogen/models/workflow_run.rb +150 -0
- data/lib/videogen/models/workflow_run_list_response.rb +103 -0
- data/lib/videogen/models/workflow_type.rb +52 -0
- data/lib/videogen/models/workflow_type1.rb +52 -0
- data/lib/videogen/models/workflow_visual_style.rb +136 -0
- data/lib/videogen/models/workflow_visual_style_type.rb +38 -0
- data/lib/videogen/utilities/date_time_helper.rb +11 -0
- data/lib/videogen/utilities/file_wrapper.rb +28 -0
- data/lib/videogen/utilities/union_type_lookup.rb +188 -0
- data/lib/videogen.rb +213 -0
- metadata +275 -0
|
@@ -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
|
+
# Returned when a `POST /v1/assistants` call is accepted. Poll `messageId` for
|
|
8
|
+
# the pending assistant reply; keep `assistantId` / `projectId` to continue
|
|
9
|
+
# the chat and address the project.
|
|
10
|
+
class StartAssistantChatResponse < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Opaque assistant message id for the pending assistant reply (e.g.
|
|
15
|
+
# `vg_mesg_...`). Poll `GET /v1/assistant-messages/{messageId}`.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :message_id
|
|
18
|
+
|
|
19
|
+
# Opaque assistant chat id (e.g. `vg_asst_...`). Pass to `GET
|
|
20
|
+
# /v1/assistants/{assistantId}` and follow-up message/action calls.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :assistant_id
|
|
23
|
+
|
|
24
|
+
# Opaque project id for the new chat (e.g. `vg_proj_...`).
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :project_id
|
|
27
|
+
|
|
28
|
+
# Deep link to open this project in the VideoGen web app.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :project_url
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['message_id'] = 'messageId'
|
|
36
|
+
@_hash['assistant_id'] = 'assistantId'
|
|
37
|
+
@_hash['project_id'] = 'projectId'
|
|
38
|
+
@_hash['project_url'] = 'projectUrl'
|
|
39
|
+
@_hash
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for optional fields
|
|
43
|
+
def self.optionals
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(message_id:, assistant_id:, project_id:, project_url:,
|
|
53
|
+
additional_properties: nil)
|
|
54
|
+
# Add additional model properties to the instance
|
|
55
|
+
additional_properties = {} if additional_properties.nil?
|
|
56
|
+
|
|
57
|
+
@message_id = message_id
|
|
58
|
+
@assistant_id = assistant_id
|
|
59
|
+
@project_id = project_id
|
|
60
|
+
@project_url = project_url
|
|
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
|
+
message_id = hash.key?('messageId') ? hash['messageId'] : nil
|
|
70
|
+
assistant_id = hash.key?('assistantId') ? hash['assistantId'] : nil
|
|
71
|
+
project_id = hash.key?('projectId') ? hash['projectId'] : nil
|
|
72
|
+
project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
|
|
73
|
+
|
|
74
|
+
# Create a new hash for additional properties, removing known properties.
|
|
75
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
76
|
+
|
|
77
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
78
|
+
new_hash, proc { |value| value }
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# Create object from extracted values.
|
|
82
|
+
StartAssistantChatResponse.new(message_id: message_id,
|
|
83
|
+
assistant_id: assistant_id,
|
|
84
|
+
project_id: project_id,
|
|
85
|
+
project_url: project_url,
|
|
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} message_id: #{@message_id}, assistant_id: #{@assistant_id}, project_id:"\
|
|
93
|
+
" #{@project_id}, project_url: #{@project_url}, additional_properties:"\
|
|
94
|
+
" #{@additional_properties}>"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
98
|
+
def inspect
|
|
99
|
+
class_name = self.class.name.split('::').last
|
|
100
|
+
"<#{class_name} message_id: #{@message_id.inspect}, assistant_id: #{@assistant_id.inspect},"\
|
|
101
|
+
" project_id: #{@project_id.inspect}, project_url: #{@project_url.inspect},"\
|
|
102
|
+
" additional_properties: #{@additional_properties}>"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Returned when a tool execution is started. Use `toolExecutionId` to poll for
|
|
8
|
+
# results or cancel.
|
|
9
|
+
class StartToolExecutionResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Execution id (e.g. `vg_tool_...`).
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :tool_execution_id
|
|
16
|
+
|
|
17
|
+
# A mapping from model property names to API property names.
|
|
18
|
+
def self.names
|
|
19
|
+
@_hash = {} if @_hash.nil?
|
|
20
|
+
@_hash['tool_execution_id'] = 'toolExecutionId'
|
|
21
|
+
@_hash
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# An array for optional fields
|
|
25
|
+
def self.optionals
|
|
26
|
+
[]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An array for nullable fields
|
|
30
|
+
def self.nullables
|
|
31
|
+
[]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def initialize(tool_execution_id:, additional_properties: nil)
|
|
35
|
+
# Add additional model properties to the instance
|
|
36
|
+
additional_properties = {} if additional_properties.nil?
|
|
37
|
+
|
|
38
|
+
@tool_execution_id = tool_execution_id
|
|
39
|
+
@additional_properties = additional_properties
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Creates an instance of the object from a hash.
|
|
43
|
+
def self.from_hash(hash)
|
|
44
|
+
return nil unless hash
|
|
45
|
+
|
|
46
|
+
# Extract variables from the hash.
|
|
47
|
+
tool_execution_id =
|
|
48
|
+
hash.key?('toolExecutionId') ? hash['toolExecutionId'] : nil
|
|
49
|
+
|
|
50
|
+
# Create a new hash for additional properties, removing known properties.
|
|
51
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
52
|
+
|
|
53
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
54
|
+
new_hash, proc { |value| value }
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Create object from extracted values.
|
|
58
|
+
StartToolExecutionResponse.new(tool_execution_id: tool_execution_id,
|
|
59
|
+
additional_properties: additional_properties)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Provides a human-readable string representation of the object.
|
|
63
|
+
def to_s
|
|
64
|
+
class_name = self.class.name.split('::').last
|
|
65
|
+
"<#{class_name} tool_execution_id: #{@tool_execution_id}, additional_properties:"\
|
|
66
|
+
" #{@additional_properties}>"
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
70
|
+
def inspect
|
|
71
|
+
class_name = self.class.name.split('::').last
|
|
72
|
+
"<#{class_name} tool_execution_id: #{@tool_execution_id.inspect}, additional_properties:"\
|
|
73
|
+
" #{@additional_properties}>"
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Returned when a workflow run is accepted. Poll `GET
|
|
8
|
+
# /v1/workflows/runs/{workflowRunId}` or subscribe to webhooks for completion.
|
|
9
|
+
class StartWorkflowRunResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Opaque workflow run id (e.g. `vg_work_...`).
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :workflow_run_id
|
|
16
|
+
|
|
17
|
+
# Id of the project created for this workflow run (e.g. `vg_proj_...`).
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :project_id
|
|
20
|
+
|
|
21
|
+
# Deep link to open this project in the VideoGen web editor. Not required
|
|
22
|
+
# for an API-only integration: store `projectId` and use the Projects API
|
|
23
|
+
# (export, remix, metadata). Use `projectUrl` when a person should open the
|
|
24
|
+
# project in the app to review or edit it manually. The project is visible
|
|
25
|
+
# only to members of your team and any project collaborators, the same
|
|
26
|
+
# access model as a project created in the dashboard.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :project_url
|
|
29
|
+
|
|
30
|
+
# Opaque remix action ids (e.g. `vg_rmix_...`), one per `remixActions` entry
|
|
31
|
+
# in request order. Empty when no remix actions were requested. Each runs
|
|
32
|
+
# after the video is built; poll `GET
|
|
33
|
+
# /v1/projects/{projectId}/remix-actions`.
|
|
34
|
+
# @return [Array[String]]
|
|
35
|
+
attr_accessor :remix_action_ids
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['workflow_run_id'] = 'workflowRunId'
|
|
41
|
+
@_hash['project_id'] = 'projectId'
|
|
42
|
+
@_hash['project_url'] = 'projectUrl'
|
|
43
|
+
@_hash['remix_action_ids'] = 'remixActionIds'
|
|
44
|
+
@_hash
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for optional fields
|
|
48
|
+
def self.optionals
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# An array for nullable fields
|
|
53
|
+
def self.nullables
|
|
54
|
+
[]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def initialize(workflow_run_id:, project_id:, project_url:,
|
|
58
|
+
remix_action_ids:, additional_properties: nil)
|
|
59
|
+
# Add additional model properties to the instance
|
|
60
|
+
additional_properties = {} if additional_properties.nil?
|
|
61
|
+
|
|
62
|
+
@workflow_run_id = workflow_run_id
|
|
63
|
+
@project_id = project_id
|
|
64
|
+
@project_url = project_url
|
|
65
|
+
@remix_action_ids = remix_action_ids
|
|
66
|
+
@additional_properties = additional_properties
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Creates an instance of the object from a hash.
|
|
70
|
+
def self.from_hash(hash)
|
|
71
|
+
return nil unless hash
|
|
72
|
+
|
|
73
|
+
# Extract variables from the hash.
|
|
74
|
+
workflow_run_id = hash.key?('workflowRunId') ? hash['workflowRunId'] : nil
|
|
75
|
+
project_id = hash.key?('projectId') ? hash['projectId'] : nil
|
|
76
|
+
project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
|
|
77
|
+
remix_action_ids =
|
|
78
|
+
hash.key?('remixActionIds') ? hash['remixActionIds'] : nil
|
|
79
|
+
|
|
80
|
+
# Create a new hash for additional properties, removing known properties.
|
|
81
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
82
|
+
|
|
83
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
84
|
+
new_hash, proc { |value| value }
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Create object from extracted values.
|
|
88
|
+
StartWorkflowRunResponse.new(workflow_run_id: workflow_run_id,
|
|
89
|
+
project_id: project_id,
|
|
90
|
+
project_url: project_url,
|
|
91
|
+
remix_action_ids: remix_action_ids,
|
|
92
|
+
additional_properties: additional_properties)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Validates an instance of the object from a given value.
|
|
96
|
+
# @param [StartWorkflowRunResponse | Hash] The value against the validation is performed.
|
|
97
|
+
def self.validate(value)
|
|
98
|
+
if value.instance_of? self
|
|
99
|
+
return (
|
|
100
|
+
APIHelper.valid_type?(value.workflow_run_id,
|
|
101
|
+
->(val) { val.instance_of? String }) and
|
|
102
|
+
APIHelper.valid_type?(value.project_id,
|
|
103
|
+
->(val) { val.instance_of? String }) and
|
|
104
|
+
APIHelper.valid_type?(value.project_url,
|
|
105
|
+
->(val) { val.instance_of? String }) and
|
|
106
|
+
APIHelper.valid_type?(value.remix_action_ids,
|
|
107
|
+
->(val) { val.instance_of? String })
|
|
108
|
+
)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
return false unless value.instance_of? Hash
|
|
112
|
+
|
|
113
|
+
(
|
|
114
|
+
APIHelper.valid_type?(value['workflowRunId'],
|
|
115
|
+
->(val) { val.instance_of? String }) and
|
|
116
|
+
APIHelper.valid_type?(value['projectId'],
|
|
117
|
+
->(val) { val.instance_of? String }) and
|
|
118
|
+
APIHelper.valid_type?(value['projectUrl'],
|
|
119
|
+
->(val) { val.instance_of? String }) and
|
|
120
|
+
APIHelper.valid_type?(value['remixActionIds'],
|
|
121
|
+
->(val) { val.instance_of? String })
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Provides a human-readable string representation of the object.
|
|
126
|
+
def to_s
|
|
127
|
+
class_name = self.class.name.split('::').last
|
|
128
|
+
"<#{class_name} workflow_run_id: #{@workflow_run_id}, project_id: #{@project_id},"\
|
|
129
|
+
" project_url: #{@project_url}, remix_action_ids: #{@remix_action_ids},"\
|
|
130
|
+
" additional_properties: #{@additional_properties}>"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
134
|
+
def inspect
|
|
135
|
+
class_name = self.class.name.split('::').last
|
|
136
|
+
"<#{class_name} workflow_run_id: #{@workflow_run_id.inspect}, project_id:"\
|
|
137
|
+
" #{@project_id.inspect}, project_url: #{@project_url.inspect}, remix_action_ids:"\
|
|
138
|
+
" #{@remix_action_ids.inspect}, additional_properties: #{@additional_properties}>"
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# TextToSpeechRequest Model.
|
|
8
|
+
class TextToSpeechRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :tts_text
|
|
15
|
+
|
|
16
|
+
# Catalog `displayName` (e.g. `Matilda`) or voice id from `GET
|
|
17
|
+
# /v1/resources/tts-voices` (e.g. `vg_voic_...`). Only voices with
|
|
18
|
+
# `supportsDirectToolExecution` set to true are accepted.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :voice_id
|
|
21
|
+
|
|
22
|
+
# ISO-639-1 language hint for pronunciation (e.g. `en`, `es`, `zh`).
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :speech_language_code
|
|
25
|
+
|
|
26
|
+
# ISO-639-1 language hint for pronunciation (e.g. `en`, `es`, `zh`).
|
|
27
|
+
# @return [Array[PronunciationReplacement]]
|
|
28
|
+
attr_accessor :pronunciation_replacements
|
|
29
|
+
|
|
30
|
+
# When true, automatically expands numbers, symbols, acronyms, and other
|
|
31
|
+
# non-word tokens into their spoken forms before synthesis so the voice
|
|
32
|
+
# pronounces them correctly (e.g. `$100` → `one hundred dollars`, `NASA` →
|
|
33
|
+
# `nasa`, `3rd` → `third`). Defaults to false when omitted.
|
|
34
|
+
# @return [TrueClass | FalseClass]
|
|
35
|
+
attr_accessor :auto_expand_pronunciation_replacements
|
|
36
|
+
|
|
37
|
+
# Speech rate multiplier, between 0.5 (half speed) and 2 (double speed).
|
|
38
|
+
# Defaults to the voice's default speed.
|
|
39
|
+
# @return [Float]
|
|
40
|
+
attr_accessor :voice_speed
|
|
41
|
+
|
|
42
|
+
# Number of output results to generate. Defaults to 1.
|
|
43
|
+
# @return [Integer]
|
|
44
|
+
attr_accessor :num_results
|
|
45
|
+
|
|
46
|
+
# When true, generated files are temporary. Temporary files are guaranteed
|
|
47
|
+
# to be available for 24 hours, after which they may be archived at any
|
|
48
|
+
# time. Temporary files are not analyzed (no description, transcript, or
|
|
49
|
+
# embedding will be generated), so they will not appear in search results.
|
|
50
|
+
# Defaults to false.
|
|
51
|
+
# @return [TrueClass | FalseClass]
|
|
52
|
+
attr_accessor :is_output_temporary
|
|
53
|
+
|
|
54
|
+
# When true, generated files are hidden from the VideoGen Media page by
|
|
55
|
+
# default. They remain accessible through the API. Defaults to false.
|
|
56
|
+
# @return [TrueClass | FalseClass]
|
|
57
|
+
attr_accessor :hide_from_ui
|
|
58
|
+
|
|
59
|
+
# A mapping from model property names to API property names.
|
|
60
|
+
def self.names
|
|
61
|
+
@_hash = {} if @_hash.nil?
|
|
62
|
+
@_hash['tts_text'] = 'ttsText'
|
|
63
|
+
@_hash['voice_id'] = 'voiceId'
|
|
64
|
+
@_hash['speech_language_code'] = 'speechLanguageCode'
|
|
65
|
+
@_hash['pronunciation_replacements'] = 'pronunciationReplacements'
|
|
66
|
+
@_hash['auto_expand_pronunciation_replacements'] =
|
|
67
|
+
'autoExpandPronunciationReplacements'
|
|
68
|
+
@_hash['voice_speed'] = 'voiceSpeed'
|
|
69
|
+
@_hash['num_results'] = 'numResults'
|
|
70
|
+
@_hash['is_output_temporary'] = 'isOutputTemporary'
|
|
71
|
+
@_hash['hide_from_ui'] = 'hideFromUi'
|
|
72
|
+
@_hash
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# An array for optional fields
|
|
76
|
+
def self.optionals
|
|
77
|
+
%w[
|
|
78
|
+
speech_language_code
|
|
79
|
+
pronunciation_replacements
|
|
80
|
+
auto_expand_pronunciation_replacements
|
|
81
|
+
voice_speed
|
|
82
|
+
num_results
|
|
83
|
+
is_output_temporary
|
|
84
|
+
hide_from_ui
|
|
85
|
+
]
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# An array for nullable fields
|
|
89
|
+
def self.nullables
|
|
90
|
+
%w[
|
|
91
|
+
speech_language_code
|
|
92
|
+
]
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def initialize(tts_text:, voice_id:, speech_language_code: SKIP,
|
|
96
|
+
pronunciation_replacements: SKIP,
|
|
97
|
+
auto_expand_pronunciation_replacements: SKIP,
|
|
98
|
+
voice_speed: SKIP, num_results: 1,
|
|
99
|
+
is_output_temporary: false, hide_from_ui: false,
|
|
100
|
+
additional_properties: nil)
|
|
101
|
+
# Add additional model properties to the instance
|
|
102
|
+
additional_properties = {} if additional_properties.nil?
|
|
103
|
+
|
|
104
|
+
@tts_text = tts_text
|
|
105
|
+
@voice_id = voice_id
|
|
106
|
+
@speech_language_code = speech_language_code unless speech_language_code == SKIP
|
|
107
|
+
unless pronunciation_replacements == SKIP
|
|
108
|
+
@pronunciation_replacements =
|
|
109
|
+
pronunciation_replacements
|
|
110
|
+
end
|
|
111
|
+
unless auto_expand_pronunciation_replacements == SKIP
|
|
112
|
+
@auto_expand_pronunciation_replacements =
|
|
113
|
+
auto_expand_pronunciation_replacements
|
|
114
|
+
end
|
|
115
|
+
@voice_speed = voice_speed unless voice_speed == SKIP
|
|
116
|
+
@num_results = num_results unless num_results == SKIP
|
|
117
|
+
@is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
|
|
118
|
+
@hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
|
|
119
|
+
@additional_properties = additional_properties
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Creates an instance of the object from a hash.
|
|
123
|
+
def self.from_hash(hash)
|
|
124
|
+
return nil unless hash
|
|
125
|
+
|
|
126
|
+
# Extract variables from the hash.
|
|
127
|
+
tts_text = hash.key?('ttsText') ? hash['ttsText'] : nil
|
|
128
|
+
voice_id = hash.key?('voiceId') ? hash['voiceId'] : nil
|
|
129
|
+
speech_language_code =
|
|
130
|
+
hash.key?('speechLanguageCode') ? hash['speechLanguageCode'] : SKIP
|
|
131
|
+
# Parameter is an array, so we need to iterate through it
|
|
132
|
+
pronunciation_replacements = nil
|
|
133
|
+
unless hash['pronunciationReplacements'].nil?
|
|
134
|
+
pronunciation_replacements = []
|
|
135
|
+
hash['pronunciationReplacements'].each do |structure|
|
|
136
|
+
pronunciation_replacements << (PronunciationReplacement.from_hash(structure) if structure)
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
pronunciation_replacements = SKIP unless hash.key?('pronunciationReplacements')
|
|
141
|
+
auto_expand_pronunciation_replacements =
|
|
142
|
+
hash.key?('autoExpandPronunciationReplacements') ? hash['autoExpandPronunciationReplacements'] : SKIP
|
|
143
|
+
voice_speed = hash.key?('voiceSpeed') ? hash['voiceSpeed'] : SKIP
|
|
144
|
+
num_results = hash['numResults'] ||= 1
|
|
145
|
+
is_output_temporary = hash['isOutputTemporary'] ||= false
|
|
146
|
+
hide_from_ui = hash['hideFromUi'] ||= false
|
|
147
|
+
|
|
148
|
+
# Create a new hash for additional properties, removing known properties.
|
|
149
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
150
|
+
|
|
151
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
152
|
+
new_hash, proc { |value| value }
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
# Create object from extracted values.
|
|
156
|
+
TextToSpeechRequest.new(tts_text: tts_text,
|
|
157
|
+
voice_id: voice_id,
|
|
158
|
+
speech_language_code: speech_language_code,
|
|
159
|
+
pronunciation_replacements: pronunciation_replacements,
|
|
160
|
+
auto_expand_pronunciation_replacements: auto_expand_pronunciation_replacements,
|
|
161
|
+
voice_speed: voice_speed,
|
|
162
|
+
num_results: num_results,
|
|
163
|
+
is_output_temporary: is_output_temporary,
|
|
164
|
+
hide_from_ui: hide_from_ui,
|
|
165
|
+
additional_properties: additional_properties)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Provides a human-readable string representation of the object.
|
|
169
|
+
def to_s
|
|
170
|
+
class_name = self.class.name.split('::').last
|
|
171
|
+
"<#{class_name} tts_text: #{@tts_text}, voice_id: #{@voice_id}, speech_language_code:"\
|
|
172
|
+
" #{@speech_language_code}, pronunciation_replacements: #{@pronunciation_replacements},"\
|
|
173
|
+
" auto_expand_pronunciation_replacements: #{@auto_expand_pronunciation_replacements},"\
|
|
174
|
+
" voice_speed: #{@voice_speed}, num_results: #{@num_results}, is_output_temporary:"\
|
|
175
|
+
" #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui}, additional_properties:"\
|
|
176
|
+
" #{@additional_properties}>"
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
180
|
+
def inspect
|
|
181
|
+
class_name = self.class.name.split('::').last
|
|
182
|
+
"<#{class_name} tts_text: #{@tts_text.inspect}, voice_id: #{@voice_id.inspect},"\
|
|
183
|
+
" speech_language_code: #{@speech_language_code.inspect}, pronunciation_replacements:"\
|
|
184
|
+
" #{@pronunciation_replacements.inspect}, auto_expand_pronunciation_replacements:"\
|
|
185
|
+
" #{@auto_expand_pronunciation_replacements.inspect}, voice_speed: #{@voice_speed.inspect},"\
|
|
186
|
+
" num_results: #{@num_results.inspect}, is_output_temporary:"\
|
|
187
|
+
" #{@is_output_temporary.inspect}, hide_from_ui: #{@hide_from_ui.inspect},"\
|
|
188
|
+
" additional_properties: #{@additional_properties}>"
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
end
|