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,297 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# VoiceoverToVideoRequest Model.
|
|
8
|
+
class VoiceoverToVideoRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Opaque file id of an uploaded voiceover audio file (e.g. `vg_file_...`).
|
|
13
|
+
# Upload the file first via `POST /v1/files/upload`. Attach a pre-computed
|
|
14
|
+
# transcript at upload time (via the `transcript` field on `POST
|
|
15
|
+
# /v1/files/upload`) to skip re-transcription.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :file_id
|
|
18
|
+
|
|
19
|
+
# Optional timed scene descriptions guiding what to show on screen during
|
|
20
|
+
# each absolute time range of the video. Ranges must be sorted by
|
|
21
|
+
# `startSeconds` and non-overlapping. Omit to let the workflow choose
|
|
22
|
+
# visuals automatically.
|
|
23
|
+
# @return [Array[SceneDescriptionRange]]
|
|
24
|
+
attr_accessor :scenes
|
|
25
|
+
|
|
26
|
+
# Aspect ratio as a width:height pair (e.g. 16 and 9 for 16:9). Not pixel
|
|
27
|
+
# dimensions.
|
|
28
|
+
# @return [AspectRatio]
|
|
29
|
+
attr_accessor :aspect_ratio
|
|
30
|
+
|
|
31
|
+
# Visual style for the generated b-roll.
|
|
32
|
+
# @return [WorkflowVisualStyle]
|
|
33
|
+
attr_accessor :visual_style
|
|
34
|
+
|
|
35
|
+
# How quickly visuals change. FAST shows more, shorter shots; SLOW holds
|
|
36
|
+
# each visual longer. Defaults to MEDIUM.
|
|
37
|
+
# @return [VisualPacing]
|
|
38
|
+
attr_accessor :visual_pacing
|
|
39
|
+
|
|
40
|
+
# Image generation quality tier for AI-generated visuals. Optional; when
|
|
41
|
+
# omitted, your account's Default AI quality for images is used (change it
|
|
42
|
+
# at https://app.videogen.io/settings/account). Only applies when
|
|
43
|
+
# `visualStyle.type` is AI_IMAGE; STOCK pulls existing footage and is
|
|
44
|
+
# unaffected.
|
|
45
|
+
# @return [ModelQuality4]
|
|
46
|
+
attr_accessor :quality
|
|
47
|
+
|
|
48
|
+
# Output language as a BCP-47 code (e.g. `en`, `es`, `fr`). Defaults to
|
|
49
|
+
# English.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :language
|
|
52
|
+
|
|
53
|
+
# Recommended. Optional id of a built-in stock actor or an ACTOR entity
|
|
54
|
+
# (e.g. `vg_enti_...`) with an image reference. When set, narration is
|
|
55
|
+
# delivered by that actor avatar. Omit or pass `null` for voiceover without
|
|
56
|
+
# an avatar.
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :actor_entity_id
|
|
59
|
+
|
|
60
|
+
# Avatar generation quality tier. Applies when `actorEntityId` is provided.
|
|
61
|
+
# Optional; when omitted, your account's Default AI quality for avatars is
|
|
62
|
+
# used.
|
|
63
|
+
# @return [ModelQuality3]
|
|
64
|
+
attr_accessor :avatar_quality
|
|
65
|
+
|
|
66
|
+
# Caption styling. Omit to use the default style with captions shown. Pass
|
|
67
|
+
# an object to override individual style fields (any omitted field uses the
|
|
68
|
+
# default). Pass `null` to hide captions entirely.
|
|
69
|
+
# @return [WorkflowCaptionStyle]
|
|
70
|
+
attr_accessor :caption_style
|
|
71
|
+
|
|
72
|
+
# Optional file id of an uploaded logo image to overlay on the video (e.g.
|
|
73
|
+
# `vg_file_...`). Upload the image first via `POST /v1/files/upload`. Only
|
|
74
|
+
# image files are accepted.
|
|
75
|
+
# @return [String]
|
|
76
|
+
attr_accessor :logo_file_id
|
|
77
|
+
|
|
78
|
+
# Optional production notes for the AI that builds the video — visual
|
|
79
|
+
# direction for how to illustrate the voiceover (e.g. on-screen code or text
|
|
80
|
+
# to display, specific b-roll to feature, or scene-by-scene staging). Never
|
|
81
|
+
# spoken; does not change the uploaded voiceover audio or its transcript.
|
|
82
|
+
# @return [String]
|
|
83
|
+
attr_accessor :workflow_agent_context
|
|
84
|
+
|
|
85
|
+
# Optional edits applied to the project after the video is built, in order.
|
|
86
|
+
# Each action runs asynchronously; the response returns one remix action id
|
|
87
|
+
# per action. Captions and a logo are set with the `captionStyle` and
|
|
88
|
+
# `logoFileId` request fields above; recommended remix actions here are
|
|
89
|
+
# `CONVERT_IMAGES_TO_VIDEOS` to animate still images into clips, and
|
|
90
|
+
# `ADD_TRANSITIONS` to stamp transitions between sections and assets. See
|
|
91
|
+
# the [Remix actions](/remix-actions) guide.
|
|
92
|
+
# @return [Array[Object]]
|
|
93
|
+
attr_accessor :remix_actions
|
|
94
|
+
|
|
95
|
+
# When true, the video's generated OUTPUT files (AI images, video clips,
|
|
96
|
+
# voiceover audio, avatars) are created as temporary: guaranteed available
|
|
97
|
+
# for 24 hours, after which they may be archived and later deleted. This
|
|
98
|
+
# also covers files produced by post-build remix actions (e.g. generated
|
|
99
|
+
# background music, image-to-video conversions). Use this when your
|
|
100
|
+
# integration downloads or re-hosts the results itself and does not need
|
|
101
|
+
# VideoGen to retain them. The project and its metadata are unaffected.
|
|
102
|
+
# Defaults to false.
|
|
103
|
+
# @return [TrueClass | FalseClass]
|
|
104
|
+
attr_accessor :is_output_temporary
|
|
105
|
+
|
|
106
|
+
# When true, generated files are hidden from the VideoGen Media page by
|
|
107
|
+
# default. They remain accessible through the API. Defaults to false.
|
|
108
|
+
# @return [TrueClass | FalseClass]
|
|
109
|
+
attr_accessor :hide_from_ui
|
|
110
|
+
|
|
111
|
+
# A mapping from model property names to API property names.
|
|
112
|
+
def self.names
|
|
113
|
+
@_hash = {} if @_hash.nil?
|
|
114
|
+
@_hash['file_id'] = 'fileId'
|
|
115
|
+
@_hash['scenes'] = 'scenes'
|
|
116
|
+
@_hash['aspect_ratio'] = 'aspectRatio'
|
|
117
|
+
@_hash['visual_style'] = 'visualStyle'
|
|
118
|
+
@_hash['visual_pacing'] = 'visualPacing'
|
|
119
|
+
@_hash['quality'] = 'quality'
|
|
120
|
+
@_hash['language'] = 'language'
|
|
121
|
+
@_hash['actor_entity_id'] = 'actorEntityId'
|
|
122
|
+
@_hash['avatar_quality'] = 'avatarQuality'
|
|
123
|
+
@_hash['caption_style'] = 'captionStyle'
|
|
124
|
+
@_hash['logo_file_id'] = 'logoFileId'
|
|
125
|
+
@_hash['workflow_agent_context'] = 'workflowAgentContext'
|
|
126
|
+
@_hash['remix_actions'] = 'remixActions'
|
|
127
|
+
@_hash['is_output_temporary'] = 'isOutputTemporary'
|
|
128
|
+
@_hash['hide_from_ui'] = 'hideFromUi'
|
|
129
|
+
@_hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# An array for optional fields
|
|
133
|
+
def self.optionals
|
|
134
|
+
%w[
|
|
135
|
+
scenes
|
|
136
|
+
aspect_ratio
|
|
137
|
+
visual_pacing
|
|
138
|
+
quality
|
|
139
|
+
language
|
|
140
|
+
actor_entity_id
|
|
141
|
+
avatar_quality
|
|
142
|
+
caption_style
|
|
143
|
+
logo_file_id
|
|
144
|
+
workflow_agent_context
|
|
145
|
+
remix_actions
|
|
146
|
+
is_output_temporary
|
|
147
|
+
hide_from_ui
|
|
148
|
+
]
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# An array for nullable fields
|
|
152
|
+
def self.nullables
|
|
153
|
+
%w[
|
|
154
|
+
actor_entity_id
|
|
155
|
+
caption_style
|
|
156
|
+
logo_file_id
|
|
157
|
+
]
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def initialize(file_id:, visual_style:, scenes: SKIP, aspect_ratio: SKIP,
|
|
161
|
+
visual_pacing: VisualPacing::MEDIUM, quality: SKIP,
|
|
162
|
+
language: SKIP, actor_entity_id: SKIP, avatar_quality: SKIP,
|
|
163
|
+
caption_style: SKIP, logo_file_id: SKIP,
|
|
164
|
+
workflow_agent_context: SKIP, remix_actions: SKIP,
|
|
165
|
+
is_output_temporary: false, hide_from_ui: false,
|
|
166
|
+
additional_properties: nil)
|
|
167
|
+
# Add additional model properties to the instance
|
|
168
|
+
additional_properties = {} if additional_properties.nil?
|
|
169
|
+
|
|
170
|
+
@file_id = file_id
|
|
171
|
+
@scenes = scenes unless scenes == SKIP
|
|
172
|
+
@aspect_ratio = aspect_ratio unless aspect_ratio == SKIP
|
|
173
|
+
@visual_style = visual_style
|
|
174
|
+
@visual_pacing = visual_pacing unless visual_pacing == SKIP
|
|
175
|
+
@quality = quality unless quality == SKIP
|
|
176
|
+
@language = language unless language == SKIP
|
|
177
|
+
@actor_entity_id = actor_entity_id unless actor_entity_id == SKIP
|
|
178
|
+
@avatar_quality = avatar_quality unless avatar_quality == SKIP
|
|
179
|
+
@caption_style = caption_style unless caption_style == SKIP
|
|
180
|
+
@logo_file_id = logo_file_id unless logo_file_id == SKIP
|
|
181
|
+
@workflow_agent_context = workflow_agent_context unless workflow_agent_context == SKIP
|
|
182
|
+
@remix_actions = remix_actions unless remix_actions == SKIP
|
|
183
|
+
@is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
|
|
184
|
+
@hide_from_ui = hide_from_ui unless hide_from_ui == SKIP
|
|
185
|
+
@additional_properties = additional_properties
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Creates an instance of the object from a hash.
|
|
189
|
+
def self.from_hash(hash)
|
|
190
|
+
return nil unless hash
|
|
191
|
+
|
|
192
|
+
# Extract variables from the hash.
|
|
193
|
+
file_id = hash.key?('fileId') ? hash['fileId'] : nil
|
|
194
|
+
visual_style = WorkflowVisualStyle.from_hash(hash['visualStyle']) if hash['visualStyle']
|
|
195
|
+
# Parameter is an array, so we need to iterate through it
|
|
196
|
+
scenes = nil
|
|
197
|
+
unless hash['scenes'].nil?
|
|
198
|
+
scenes = []
|
|
199
|
+
hash['scenes'].each do |structure|
|
|
200
|
+
scenes << (SceneDescriptionRange.from_hash(structure) if structure)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
scenes = SKIP unless hash.key?('scenes')
|
|
205
|
+
aspect_ratio = AspectRatio.from_hash(hash['aspectRatio']) if hash['aspectRatio']
|
|
206
|
+
visual_pacing = hash['visualPacing'] ||= VisualPacing::MEDIUM
|
|
207
|
+
quality = hash.key?('quality') ? hash['quality'] : SKIP
|
|
208
|
+
language = hash.key?('language') ? hash['language'] : SKIP
|
|
209
|
+
actor_entity_id =
|
|
210
|
+
hash.key?('actorEntityId') ? hash['actorEntityId'] : SKIP
|
|
211
|
+
avatar_quality = hash.key?('avatarQuality') ? hash['avatarQuality'] : SKIP
|
|
212
|
+
caption_style = WorkflowCaptionStyle.from_hash(hash['captionStyle']) if hash['captionStyle']
|
|
213
|
+
logo_file_id = hash.key?('logoFileId') ? hash['logoFileId'] : SKIP
|
|
214
|
+
workflow_agent_context =
|
|
215
|
+
hash.key?('workflowAgentContext') ? hash['workflowAgentContext'] : SKIP
|
|
216
|
+
remix_actions = hash.key?('remixActions') ? APIHelper.deserialize_union_type(
|
|
217
|
+
UnionTypeLookUp.get(:RemixAction15), hash['remixActions']
|
|
218
|
+
) : SKIP
|
|
219
|
+
is_output_temporary = hash['isOutputTemporary'] ||= false
|
|
220
|
+
hide_from_ui = hash['hideFromUi'] ||= false
|
|
221
|
+
|
|
222
|
+
# Create a new hash for additional properties, removing known properties.
|
|
223
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
224
|
+
|
|
225
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
226
|
+
new_hash, proc { |value| value }
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
# Create object from extracted values.
|
|
230
|
+
VoiceoverToVideoRequest.new(file_id: file_id,
|
|
231
|
+
visual_style: visual_style,
|
|
232
|
+
scenes: scenes,
|
|
233
|
+
aspect_ratio: aspect_ratio,
|
|
234
|
+
visual_pacing: visual_pacing,
|
|
235
|
+
quality: quality,
|
|
236
|
+
language: language,
|
|
237
|
+
actor_entity_id: actor_entity_id,
|
|
238
|
+
avatar_quality: avatar_quality,
|
|
239
|
+
caption_style: caption_style,
|
|
240
|
+
logo_file_id: logo_file_id,
|
|
241
|
+
workflow_agent_context: workflow_agent_context,
|
|
242
|
+
remix_actions: remix_actions,
|
|
243
|
+
is_output_temporary: is_output_temporary,
|
|
244
|
+
hide_from_ui: hide_from_ui,
|
|
245
|
+
additional_properties: additional_properties)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Validates an instance of the object from a given value.
|
|
249
|
+
# @param [VoiceoverToVideoRequest | Hash] The value against the validation is performed.
|
|
250
|
+
def self.validate(value)
|
|
251
|
+
if value.instance_of? self
|
|
252
|
+
return (
|
|
253
|
+
APIHelper.valid_type?(value.file_id,
|
|
254
|
+
->(val) { val.instance_of? String }) and
|
|
255
|
+
APIHelper.valid_type?(value.visual_style,
|
|
256
|
+
->(val) { WorkflowVisualStyle.validate(val) },
|
|
257
|
+
is_model_hash: true)
|
|
258
|
+
)
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
return false unless value.instance_of? Hash
|
|
262
|
+
|
|
263
|
+
(
|
|
264
|
+
APIHelper.valid_type?(value['fileId'],
|
|
265
|
+
->(val) { val.instance_of? String }) and
|
|
266
|
+
APIHelper.valid_type?(value['visualStyle'],
|
|
267
|
+
->(val) { WorkflowVisualStyle.validate(val) },
|
|
268
|
+
is_model_hash: true)
|
|
269
|
+
)
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Provides a human-readable string representation of the object.
|
|
273
|
+
def to_s
|
|
274
|
+
class_name = self.class.name.split('::').last
|
|
275
|
+
"<#{class_name} file_id: #{@file_id}, scenes: #{@scenes}, aspect_ratio: #{@aspect_ratio},"\
|
|
276
|
+
" visual_style: #{@visual_style}, visual_pacing: #{@visual_pacing}, quality: #{@quality},"\
|
|
277
|
+
" language: #{@language}, actor_entity_id: #{@actor_entity_id}, avatar_quality:"\
|
|
278
|
+
" #{@avatar_quality}, caption_style: #{@caption_style}, logo_file_id: #{@logo_file_id},"\
|
|
279
|
+
" workflow_agent_context: #{@workflow_agent_context}, remix_actions: #{@remix_actions},"\
|
|
280
|
+
" is_output_temporary: #{@is_output_temporary}, hide_from_ui: #{@hide_from_ui},"\
|
|
281
|
+
" additional_properties: #{@additional_properties}>"
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
285
|
+
def inspect
|
|
286
|
+
class_name = self.class.name.split('::').last
|
|
287
|
+
"<#{class_name} file_id: #{@file_id.inspect}, scenes: #{@scenes.inspect}, aspect_ratio:"\
|
|
288
|
+
" #{@aspect_ratio.inspect}, visual_style: #{@visual_style.inspect}, visual_pacing:"\
|
|
289
|
+
" #{@visual_pacing.inspect}, quality: #{@quality.inspect}, language: #{@language.inspect},"\
|
|
290
|
+
" actor_entity_id: #{@actor_entity_id.inspect}, avatar_quality: #{@avatar_quality.inspect},"\
|
|
291
|
+
" caption_style: #{@caption_style.inspect}, logo_file_id: #{@logo_file_id.inspect},"\
|
|
292
|
+
" workflow_agent_context: #{@workflow_agent_context.inspect}, remix_actions:"\
|
|
293
|
+
" #{@remix_actions.inspect}, is_output_temporary: #{@is_output_temporary.inspect},"\
|
|
294
|
+
" hide_from_ui: #{@hide_from_ui.inspect}, additional_properties: #{@additional_properties}>"
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Controls whether the VideoGen watermark is applied to the output. `AUTO`
|
|
8
|
+
# applies the watermark unless you have a Pro plan. `VIDEO_GEN` always applies
|
|
9
|
+
# it. `NONE` removes the watermark (requires Pro; returns an error if you
|
|
10
|
+
# don't have it).
|
|
11
|
+
class WatermarkMode
|
|
12
|
+
WATERMARK_MODE = [
|
|
13
|
+
# TODO: Write general description for NONE
|
|
14
|
+
NONE = 'NONE'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for VIDEO_GEN
|
|
17
|
+
VIDEO_GEN = 'VIDEO_GEN'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for AUTO
|
|
20
|
+
AUTO = 'AUTO'.freeze
|
|
21
|
+
].freeze
|
|
22
|
+
|
|
23
|
+
def self.validate(value)
|
|
24
|
+
return false if value.nil?
|
|
25
|
+
|
|
26
|
+
WATERMARK_MODE.include?(value)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.from_value(value, default_value = NONE)
|
|
30
|
+
return default_value if value.nil?
|
|
31
|
+
|
|
32
|
+
str = value.to_s.strip
|
|
33
|
+
|
|
34
|
+
case str.downcase
|
|
35
|
+
when 'none' then NONE
|
|
36
|
+
when 'video_gen' then VIDEO_GEN
|
|
37
|
+
when 'auto' then AUTO
|
|
38
|
+
else
|
|
39
|
+
default_value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
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
|
+
# WebhookEndpoint Model.
|
|
8
|
+
class WebhookEndpoint < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Webhook endpoint id (e.g. `ep_...`).
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :endpoint_id
|
|
15
|
+
|
|
16
|
+
# Webhook endpoint id (e.g. `ep_...`).
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :url
|
|
19
|
+
|
|
20
|
+
# Webhook endpoint id (e.g. `ep_...`).
|
|
21
|
+
# @return [Array[WebhookEventName]]
|
|
22
|
+
attr_accessor :events
|
|
23
|
+
|
|
24
|
+
# Webhook endpoint id (e.g. `ep_...`).
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :description
|
|
27
|
+
|
|
28
|
+
# Seconds since epoch (Unix timestamp) when the endpoint was created.
|
|
29
|
+
# @return [Integer]
|
|
30
|
+
attr_accessor :created_at
|
|
31
|
+
|
|
32
|
+
# HMAC secret for verifying [Standard
|
|
33
|
+
# Webhooks](https://www.standardwebhooks.com/) signatures. Only returned
|
|
34
|
+
# once on create; store it securely.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :signing_secret
|
|
37
|
+
|
|
38
|
+
# Last four characters of the signing secret, for display purposes.
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :signing_secret_last4
|
|
41
|
+
|
|
42
|
+
# A mapping from model property names to API property names.
|
|
43
|
+
def self.names
|
|
44
|
+
@_hash = {} if @_hash.nil?
|
|
45
|
+
@_hash['endpoint_id'] = 'endpointId'
|
|
46
|
+
@_hash['url'] = 'url'
|
|
47
|
+
@_hash['events'] = 'events'
|
|
48
|
+
@_hash['description'] = 'description'
|
|
49
|
+
@_hash['created_at'] = 'createdAt'
|
|
50
|
+
@_hash['signing_secret'] = 'signingSecret'
|
|
51
|
+
@_hash['signing_secret_last4'] = 'signingSecretLast4'
|
|
52
|
+
@_hash
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# An array for optional fields
|
|
56
|
+
def self.optionals
|
|
57
|
+
%w[
|
|
58
|
+
description
|
|
59
|
+
signing_secret
|
|
60
|
+
signing_secret_last4
|
|
61
|
+
]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for nullable fields
|
|
65
|
+
def self.nullables
|
|
66
|
+
%w[
|
|
67
|
+
description
|
|
68
|
+
]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def initialize(endpoint_id:, url:, events:, created_at:, description: SKIP,
|
|
72
|
+
signing_secret: SKIP, signing_secret_last4: SKIP,
|
|
73
|
+
additional_properties: nil)
|
|
74
|
+
# Add additional model properties to the instance
|
|
75
|
+
additional_properties = {} if additional_properties.nil?
|
|
76
|
+
|
|
77
|
+
@endpoint_id = endpoint_id
|
|
78
|
+
@url = url
|
|
79
|
+
@events = events
|
|
80
|
+
@description = description unless description == SKIP
|
|
81
|
+
@created_at = created_at
|
|
82
|
+
@signing_secret = signing_secret unless signing_secret == SKIP
|
|
83
|
+
@signing_secret_last4 = signing_secret_last4 unless signing_secret_last4 == SKIP
|
|
84
|
+
@additional_properties = additional_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Creates an instance of the object from a hash.
|
|
88
|
+
def self.from_hash(hash)
|
|
89
|
+
return nil unless hash
|
|
90
|
+
|
|
91
|
+
# Extract variables from the hash.
|
|
92
|
+
endpoint_id = hash.key?('endpointId') ? hash['endpointId'] : nil
|
|
93
|
+
url = hash.key?('url') ? hash['url'] : nil
|
|
94
|
+
events = hash.key?('events') ? hash['events'] : nil
|
|
95
|
+
created_at = hash.key?('createdAt') ? hash['createdAt'] : nil
|
|
96
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
97
|
+
signing_secret = hash.key?('signingSecret') ? hash['signingSecret'] : SKIP
|
|
98
|
+
signing_secret_last4 =
|
|
99
|
+
hash.key?('signingSecretLast4') ? hash['signingSecretLast4'] : SKIP
|
|
100
|
+
|
|
101
|
+
# Create a new hash for additional properties, removing known properties.
|
|
102
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
103
|
+
|
|
104
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
105
|
+
new_hash, proc { |value| value }
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# Create object from extracted values.
|
|
109
|
+
WebhookEndpoint.new(endpoint_id: endpoint_id,
|
|
110
|
+
url: url,
|
|
111
|
+
events: events,
|
|
112
|
+
created_at: created_at,
|
|
113
|
+
description: description,
|
|
114
|
+
signing_secret: signing_secret,
|
|
115
|
+
signing_secret_last4: signing_secret_last4,
|
|
116
|
+
additional_properties: additional_properties)
|
|
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} endpoint_id: #{@endpoint_id}, url: #{@url}, events: #{@events},"\
|
|
123
|
+
" description: #{@description}, created_at: #{@created_at}, signing_secret:"\
|
|
124
|
+
" #{@signing_secret}, signing_secret_last4: #{@signing_secret_last4}, additional_properties:"\
|
|
125
|
+
" #{@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} endpoint_id: #{@endpoint_id.inspect}, url: #{@url.inspect}, events:"\
|
|
132
|
+
" #{@events.inspect}, description: #{@description.inspect}, created_at:"\
|
|
133
|
+
" #{@created_at.inspect}, signing_secret: #{@signing_secret.inspect}, signing_secret_last4:"\
|
|
134
|
+
" #{@signing_secret_last4.inspect}, additional_properties: #{@additional_properties}>"
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
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
|
+
# WebhookEndpointListResponse Model.
|
|
8
|
+
class WebhookEndpointListResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Array[WebhookEndpoint]]
|
|
14
|
+
attr_accessor :endpoints
|
|
15
|
+
|
|
16
|
+
# When true, there are more endpoints 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['endpoints'] = 'endpoints'
|
|
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(endpoints:, 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
|
+
@endpoints = endpoints
|
|
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
|
+
endpoints = nil
|
|
64
|
+
unless hash['endpoints'].nil?
|
|
65
|
+
endpoints = []
|
|
66
|
+
hash['endpoints'].each do |structure|
|
|
67
|
+
endpoints << (WebhookEndpoint.from_hash(structure) if structure)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
endpoints = nil unless hash.key?('endpoints')
|
|
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
|
+
WebhookEndpointListResponse.new(endpoints: endpoints,
|
|
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} endpoints: #{@endpoints}, 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} endpoints: #{@endpoints.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,100 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# All webhook event types. Use when creating or listing webhook endpoints.
|
|
8
|
+
class WebhookEventName
|
|
9
|
+
WEBHOOK_EVENT_NAME = [
|
|
10
|
+
# TODO: Write general description for ENUM_TOOL_EXECUTIONSUCCEEDED
|
|
11
|
+
ENUM_TOOL_EXECUTIONSUCCEEDED = 'tool_execution.succeeded'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ENUM_TOOL_EXECUTIONFAILED
|
|
14
|
+
ENUM_TOOL_EXECUTIONFAILED = 'tool_execution.failed'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for ENUM_TOOL_EXECUTIONCANCELLED
|
|
17
|
+
ENUM_TOOL_EXECUTIONCANCELLED = 'tool_execution.cancelled'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for ENUM_WORKFLOW_RUNSUCCEEDED
|
|
20
|
+
ENUM_WORKFLOW_RUNSUCCEEDED = 'workflow_run.succeeded'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for ENUM_WORKFLOW_RUNFAILED
|
|
23
|
+
ENUM_WORKFLOW_RUNFAILED = 'workflow_run.failed'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for ENUM_WORKFLOW_RUNCANCELLED
|
|
26
|
+
ENUM_WORKFLOW_RUNCANCELLED = 'workflow_run.cancelled'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for ENUM_PROJECT_EXPORTSUCCEEDED
|
|
29
|
+
ENUM_PROJECT_EXPORTSUCCEEDED = 'project_export.succeeded'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for ENUM_PROJECT_EXPORTFAILED
|
|
32
|
+
ENUM_PROJECT_EXPORTFAILED = 'project_export.failed'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for ENUM_PROJECT_EXPORTCANCELLED
|
|
35
|
+
ENUM_PROJECT_EXPORTCANCELLED = 'project_export.cancelled'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for ENUM_ASSISTANT_MESSAGESUCCEEDED
|
|
38
|
+
ENUM_ASSISTANT_MESSAGESUCCEEDED = 'assistant_message.succeeded'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for ENUM_ASSISTANT_MESSAGEFAILED
|
|
41
|
+
ENUM_ASSISTANT_MESSAGEFAILED = 'assistant_message.failed'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for ENUM_ASSISTANT_MESSAGECANCELLED
|
|
44
|
+
ENUM_ASSISTANT_MESSAGECANCELLED = 'assistant_message.cancelled'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for ENUM_FILEUPLOADCOMPLETED
|
|
47
|
+
ENUM_FILEUPLOADCOMPLETED = 'file.upload.completed'.freeze,
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for ENUM_FILEUPLOADFAILED
|
|
50
|
+
ENUM_FILEUPLOADFAILED = 'file.upload.failed'.freeze,
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for ENUM_FILEPLAYBACK_READY
|
|
53
|
+
ENUM_FILEPLAYBACK_READY = 'file.playback_ready'.freeze,
|
|
54
|
+
|
|
55
|
+
# TODO: Write general description for ENUM_FILEDOWNLOAD_READY
|
|
56
|
+
ENUM_FILEDOWNLOAD_READY = 'file.download_ready'.freeze,
|
|
57
|
+
|
|
58
|
+
# TODO: Write general description for ENUM_FILEANALYSIS_COMPLETED
|
|
59
|
+
ENUM_FILEANALYSIS_COMPLETED = 'file.analysis_completed'.freeze,
|
|
60
|
+
|
|
61
|
+
# TODO: Write general description for ENUM_FILEANALYSIS_FAILED
|
|
62
|
+
ENUM_FILEANALYSIS_FAILED = 'file.analysis_failed'.freeze
|
|
63
|
+
].freeze
|
|
64
|
+
|
|
65
|
+
def self.validate(value)
|
|
66
|
+
return false if value.nil?
|
|
67
|
+
|
|
68
|
+
WEBHOOK_EVENT_NAME.include?(value)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def self.from_value(value, default_value = ENUM_TOOL_EXECUTIONSUCCEEDED)
|
|
72
|
+
return default_value if value.nil?
|
|
73
|
+
|
|
74
|
+
str = value.to_s.strip
|
|
75
|
+
|
|
76
|
+
case str.downcase
|
|
77
|
+
when 'enum_tool_executionsucceeded' then ENUM_TOOL_EXECUTIONSUCCEEDED
|
|
78
|
+
when 'enum_tool_executionfailed' then ENUM_TOOL_EXECUTIONFAILED
|
|
79
|
+
when 'enum_tool_executioncancelled' then ENUM_TOOL_EXECUTIONCANCELLED
|
|
80
|
+
when 'enum_workflow_runsucceeded' then ENUM_WORKFLOW_RUNSUCCEEDED
|
|
81
|
+
when 'enum_workflow_runfailed' then ENUM_WORKFLOW_RUNFAILED
|
|
82
|
+
when 'enum_workflow_runcancelled' then ENUM_WORKFLOW_RUNCANCELLED
|
|
83
|
+
when 'enum_project_exportsucceeded' then ENUM_PROJECT_EXPORTSUCCEEDED
|
|
84
|
+
when 'enum_project_exportfailed' then ENUM_PROJECT_EXPORTFAILED
|
|
85
|
+
when 'enum_project_exportcancelled' then ENUM_PROJECT_EXPORTCANCELLED
|
|
86
|
+
when 'enum_assistant_messagesucceeded' then ENUM_ASSISTANT_MESSAGESUCCEEDED
|
|
87
|
+
when 'enum_assistant_messagefailed' then ENUM_ASSISTANT_MESSAGEFAILED
|
|
88
|
+
when 'enum_assistant_messagecancelled' then ENUM_ASSISTANT_MESSAGECANCELLED
|
|
89
|
+
when 'enum_fileuploadcompleted' then ENUM_FILEUPLOADCOMPLETED
|
|
90
|
+
when 'enum_fileuploadfailed' then ENUM_FILEUPLOADFAILED
|
|
91
|
+
when 'enum_fileplayback_ready' then ENUM_FILEPLAYBACK_READY
|
|
92
|
+
when 'enum_filedownload_ready' then ENUM_FILEDOWNLOAD_READY
|
|
93
|
+
when 'enum_fileanalysis_completed' then ENUM_FILEANALYSIS_COMPLETED
|
|
94
|
+
when 'enum_fileanalysis_failed' then ENUM_FILEANALYSIS_FAILED
|
|
95
|
+
else
|
|
96
|
+
default_value
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|