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,387 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Hydrated file metadata with signed download URLs (always present and
|
|
8
|
+
# hydrated for a succeeded result). Its signed URLs follow the same 24-hour
|
|
9
|
+
# validity and automatic re-signing as `downloadUrl`.
|
|
10
|
+
class FileInfo1 < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# File id (e.g. `vg_file_...`).
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :file_id
|
|
17
|
+
|
|
18
|
+
# File type. Null when the file is still being processed and the type has
|
|
19
|
+
# not yet been determined.
|
|
20
|
+
# @return [FileType]
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
# File scope.
|
|
24
|
+
# - `GLOBAL`: user-uploaded or standalone generated files that persist
|
|
25
|
+
# indefinitely.
|
|
26
|
+
# - `PROJECT`: project-specific files (e.g. text-to-speech clips in a
|
|
27
|
+
# generated project).
|
|
28
|
+
# - `EXPORT`: project exports.
|
|
29
|
+
# - `TEMPORARY`: short-lived files guaranteed to be available for 24 hours,
|
|
30
|
+
# after which they may be archived at any time. Not analyzed (no
|
|
31
|
+
# description, transcript, or embedding).
|
|
32
|
+
# - `ENTITY`: files attached to a reusable entity (e.g. a voice sample for
|
|
33
|
+
# an actor), shared across your team.
|
|
34
|
+
# @return [FileInfoScope]
|
|
35
|
+
attr_accessor :scope
|
|
36
|
+
|
|
37
|
+
# Display name for the file.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :display_name
|
|
40
|
+
|
|
41
|
+
# Display name for the file.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :description
|
|
44
|
+
|
|
45
|
+
# Duration in seconds for video and audio files. Null for images.
|
|
46
|
+
# @return [Float]
|
|
47
|
+
attr_accessor :duration_seconds
|
|
48
|
+
|
|
49
|
+
# Timed transcript for video and audio files, when available, as a
|
|
50
|
+
# `Transcript` object with timed `words`. Null for images or when no
|
|
51
|
+
# transcript has been generated. For plain transcript text, use
|
|
52
|
+
# `transcriptText`.
|
|
53
|
+
# @return [Transcript]
|
|
54
|
+
attr_accessor :transcript
|
|
55
|
+
|
|
56
|
+
# Plain transcript text for video and audio files, when available. Null for
|
|
57
|
+
# images or when no transcript has been generated.
|
|
58
|
+
# @return [String]
|
|
59
|
+
attr_accessor :transcript_text
|
|
60
|
+
|
|
61
|
+
# Private signed URL for the highest-quality downloadable rendition,
|
|
62
|
+
# provided at the top level for convenience. Valid for 7 days from when it
|
|
63
|
+
# was signed. `null` when the rendition is still processing or the URL has
|
|
64
|
+
# not been signed yet. See `downloadUrlExpiresAt` for the exact expiry and
|
|
65
|
+
# `downloadSource` for the full rendition metadata; call `POST
|
|
66
|
+
# /v1/files/{fileId}/hydrate` to refresh it.
|
|
67
|
+
# @return [String]
|
|
68
|
+
attr_accessor :download_url
|
|
69
|
+
|
|
70
|
+
# Seconds since epoch (Unix timestamp) when `downloadUrl` expires. `null`
|
|
71
|
+
# when `downloadUrl` is null.
|
|
72
|
+
# @return [Integer]
|
|
73
|
+
attr_accessor :download_url_expires_at
|
|
74
|
+
|
|
75
|
+
# Private signed URL for the thumbnail rendition, provided at the top level
|
|
76
|
+
# for convenience. Valid for 7 days from when it was signed. `null` for file
|
|
77
|
+
# types that have no thumbnail (e.g. audio) or when it has not been signed
|
|
78
|
+
# yet. See `thumbnailSource` for the full rendition metadata.
|
|
79
|
+
# @return [String]
|
|
80
|
+
attr_accessor :thumbnail_url
|
|
81
|
+
|
|
82
|
+
# Seconds since epoch (Unix timestamp) when `thumbnailUrl` expires. `null`
|
|
83
|
+
# when `thumbnailUrl` is null.
|
|
84
|
+
# @return [Integer]
|
|
85
|
+
attr_accessor :thumbnail_url_expires_at
|
|
86
|
+
|
|
87
|
+
# Thumbnail image source. Populated after hydration.
|
|
88
|
+
# @return [FileSource]
|
|
89
|
+
attr_accessor :thumbnail_source
|
|
90
|
+
|
|
91
|
+
# Preview rendition source (720p for video, resized for images). Populated
|
|
92
|
+
# after hydration.
|
|
93
|
+
# @return [FileSource]
|
|
94
|
+
attr_accessor :preview_source
|
|
95
|
+
|
|
96
|
+
# Highest-quality downloadable rendition. Populated after hydration.
|
|
97
|
+
# @return [FileSource]
|
|
98
|
+
attr_accessor :download_source
|
|
99
|
+
|
|
100
|
+
# Private HLS streaming source. Populated for video and audio files once
|
|
101
|
+
# streaming renditions are ready. Uses a signed token; treat like other
|
|
102
|
+
# signed sources.
|
|
103
|
+
# @return [FileSource]
|
|
104
|
+
attr_accessor :hls_source
|
|
105
|
+
|
|
106
|
+
# Whether public preview is enabled for this file. When true,
|
|
107
|
+
# `staticPublicPreviewSource` is populated for all file types. For video and
|
|
108
|
+
# audio, `publicHlsUrl` and `publicPlaybackId` are also populated once embed
|
|
109
|
+
# streaming is ready.
|
|
110
|
+
# @return [TrueClass | FalseClass]
|
|
111
|
+
attr_accessor :is_public_preview_enabled
|
|
112
|
+
|
|
113
|
+
# Permanent public URL for the file's highest-quality rendition. Populated
|
|
114
|
+
# when `isPublicPreviewEnabled` is true. Does not expire (`expiresAt` is
|
|
115
|
+
# null). Use for direct links to images, downloads, or any file type. For
|
|
116
|
+
# embedded video or audio players, prefer `publicPlaybackId`.
|
|
117
|
+
# @return [FileSource]
|
|
118
|
+
attr_accessor :static_public_preview_source
|
|
119
|
+
|
|
120
|
+
# Public HLS streaming URL for video and audio. Only present when
|
|
121
|
+
# `isPublicPreviewEnabled` is true and embed streaming is ready. Prefer
|
|
122
|
+
# `publicPlaybackId` with `@videogen/player` for embeds.
|
|
123
|
+
# @return [String]
|
|
124
|
+
attr_accessor :public_hls_url
|
|
125
|
+
|
|
126
|
+
# Encoded public playback id (e.g. `vg_play_...`) for video and audio
|
|
127
|
+
# embeds. Pass this to `@videogen/player` or `@videogen/player-react`. Only
|
|
128
|
+
# present when `isPublicPreviewEnabled` is true and embed streaming is
|
|
129
|
+
# ready. For a permanent direct file URL (any type), use
|
|
130
|
+
# `staticPublicPreviewSource` instead.
|
|
131
|
+
# @return [String]
|
|
132
|
+
attr_accessor :public_playback_id
|
|
133
|
+
|
|
134
|
+
# Tool type that generated this file (e.g. `GENERATE_IMAGE`,
|
|
135
|
+
# `TEXT_TO_SPEECH`). Only present when the file was created by a tool
|
|
136
|
+
# execution.
|
|
137
|
+
# @return [String]
|
|
138
|
+
attr_accessor :source_tool_type
|
|
139
|
+
|
|
140
|
+
# Execution id of the tool call that generated this file (e.g.
|
|
141
|
+
# `vg_tool_...`). Only present when the file was created by a tool
|
|
142
|
+
# execution.
|
|
143
|
+
# @return [String]
|
|
144
|
+
attr_accessor :source_tool_execution_id
|
|
145
|
+
|
|
146
|
+
# Background analysis state for the file (used to populate `description`,
|
|
147
|
+
# `transcript`, `durationSeconds`, and the search embedding). Omitted when
|
|
148
|
+
# the file was returned via a path that does not check analysis progress
|
|
149
|
+
# (e.g. tool-result inline files and webhook payloads).
|
|
150
|
+
# @return [FileAnalysisMetadata1]
|
|
151
|
+
attr_accessor :file_analysis_metadata
|
|
152
|
+
|
|
153
|
+
# A mapping from model property names to API property names.
|
|
154
|
+
def self.names
|
|
155
|
+
@_hash = {} if @_hash.nil?
|
|
156
|
+
@_hash['file_id'] = 'fileId'
|
|
157
|
+
@_hash['type'] = 'type'
|
|
158
|
+
@_hash['scope'] = 'scope'
|
|
159
|
+
@_hash['display_name'] = 'displayName'
|
|
160
|
+
@_hash['description'] = 'description'
|
|
161
|
+
@_hash['duration_seconds'] = 'durationSeconds'
|
|
162
|
+
@_hash['transcript'] = 'transcript'
|
|
163
|
+
@_hash['transcript_text'] = 'transcriptText'
|
|
164
|
+
@_hash['download_url'] = 'downloadUrl'
|
|
165
|
+
@_hash['download_url_expires_at'] = 'downloadUrlExpiresAt'
|
|
166
|
+
@_hash['thumbnail_url'] = 'thumbnailUrl'
|
|
167
|
+
@_hash['thumbnail_url_expires_at'] = 'thumbnailUrlExpiresAt'
|
|
168
|
+
@_hash['thumbnail_source'] = 'thumbnailSource'
|
|
169
|
+
@_hash['preview_source'] = 'previewSource'
|
|
170
|
+
@_hash['download_source'] = 'downloadSource'
|
|
171
|
+
@_hash['hls_source'] = 'hlsSource'
|
|
172
|
+
@_hash['is_public_preview_enabled'] = 'isPublicPreviewEnabled'
|
|
173
|
+
@_hash['static_public_preview_source'] = 'staticPublicPreviewSource'
|
|
174
|
+
@_hash['public_hls_url'] = 'publicHlsUrl'
|
|
175
|
+
@_hash['public_playback_id'] = 'publicPlaybackId'
|
|
176
|
+
@_hash['source_tool_type'] = 'sourceToolType'
|
|
177
|
+
@_hash['source_tool_execution_id'] = 'sourceToolExecutionId'
|
|
178
|
+
@_hash['file_analysis_metadata'] = 'fileAnalysisMetadata'
|
|
179
|
+
@_hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# An array for optional fields
|
|
183
|
+
def self.optionals
|
|
184
|
+
%w[
|
|
185
|
+
type
|
|
186
|
+
display_name
|
|
187
|
+
description
|
|
188
|
+
duration_seconds
|
|
189
|
+
transcript
|
|
190
|
+
transcript_text
|
|
191
|
+
download_url
|
|
192
|
+
download_url_expires_at
|
|
193
|
+
thumbnail_url
|
|
194
|
+
thumbnail_url_expires_at
|
|
195
|
+
thumbnail_source
|
|
196
|
+
preview_source
|
|
197
|
+
download_source
|
|
198
|
+
hls_source
|
|
199
|
+
is_public_preview_enabled
|
|
200
|
+
static_public_preview_source
|
|
201
|
+
public_hls_url
|
|
202
|
+
public_playback_id
|
|
203
|
+
source_tool_type
|
|
204
|
+
source_tool_execution_id
|
|
205
|
+
file_analysis_metadata
|
|
206
|
+
]
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# An array for nullable fields
|
|
210
|
+
def self.nullables
|
|
211
|
+
%w[
|
|
212
|
+
type
|
|
213
|
+
description
|
|
214
|
+
duration_seconds
|
|
215
|
+
transcript
|
|
216
|
+
transcript_text
|
|
217
|
+
download_url
|
|
218
|
+
download_url_expires_at
|
|
219
|
+
thumbnail_url
|
|
220
|
+
thumbnail_url_expires_at
|
|
221
|
+
thumbnail_source
|
|
222
|
+
preview_source
|
|
223
|
+
download_source
|
|
224
|
+
hls_source
|
|
225
|
+
static_public_preview_source
|
|
226
|
+
public_hls_url
|
|
227
|
+
public_playback_id
|
|
228
|
+
]
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def initialize(file_id:, scope:, type: SKIP, display_name: SKIP,
|
|
232
|
+
description: SKIP, duration_seconds: SKIP, transcript: SKIP,
|
|
233
|
+
transcript_text: SKIP, download_url: SKIP,
|
|
234
|
+
download_url_expires_at: SKIP, thumbnail_url: SKIP,
|
|
235
|
+
thumbnail_url_expires_at: SKIP, thumbnail_source: SKIP,
|
|
236
|
+
preview_source: SKIP, download_source: SKIP,
|
|
237
|
+
hls_source: SKIP, is_public_preview_enabled: SKIP,
|
|
238
|
+
static_public_preview_source: SKIP, public_hls_url: SKIP,
|
|
239
|
+
public_playback_id: SKIP, source_tool_type: SKIP,
|
|
240
|
+
source_tool_execution_id: SKIP, file_analysis_metadata: SKIP,
|
|
241
|
+
additional_properties: nil)
|
|
242
|
+
# Add additional model properties to the instance
|
|
243
|
+
additional_properties = {} if additional_properties.nil?
|
|
244
|
+
|
|
245
|
+
@file_id = file_id
|
|
246
|
+
@type = type unless type == SKIP
|
|
247
|
+
@scope = scope
|
|
248
|
+
@display_name = display_name unless display_name == SKIP
|
|
249
|
+
@description = description unless description == SKIP
|
|
250
|
+
@duration_seconds = duration_seconds unless duration_seconds == SKIP
|
|
251
|
+
@transcript = transcript unless transcript == SKIP
|
|
252
|
+
@transcript_text = transcript_text unless transcript_text == SKIP
|
|
253
|
+
@download_url = download_url unless download_url == SKIP
|
|
254
|
+
@download_url_expires_at = download_url_expires_at unless download_url_expires_at == SKIP
|
|
255
|
+
@thumbnail_url = thumbnail_url unless thumbnail_url == SKIP
|
|
256
|
+
@thumbnail_url_expires_at = thumbnail_url_expires_at unless thumbnail_url_expires_at == SKIP
|
|
257
|
+
@thumbnail_source = thumbnail_source unless thumbnail_source == SKIP
|
|
258
|
+
@preview_source = preview_source unless preview_source == SKIP
|
|
259
|
+
@download_source = download_source unless download_source == SKIP
|
|
260
|
+
@hls_source = hls_source unless hls_source == SKIP
|
|
261
|
+
unless is_public_preview_enabled == SKIP
|
|
262
|
+
@is_public_preview_enabled =
|
|
263
|
+
is_public_preview_enabled
|
|
264
|
+
end
|
|
265
|
+
unless static_public_preview_source == SKIP
|
|
266
|
+
@static_public_preview_source =
|
|
267
|
+
static_public_preview_source
|
|
268
|
+
end
|
|
269
|
+
@public_hls_url = public_hls_url unless public_hls_url == SKIP
|
|
270
|
+
@public_playback_id = public_playback_id unless public_playback_id == SKIP
|
|
271
|
+
@source_tool_type = source_tool_type unless source_tool_type == SKIP
|
|
272
|
+
@source_tool_execution_id = source_tool_execution_id unless source_tool_execution_id == SKIP
|
|
273
|
+
@file_analysis_metadata = file_analysis_metadata unless file_analysis_metadata == SKIP
|
|
274
|
+
@additional_properties = additional_properties
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
# Creates an instance of the object from a hash.
|
|
278
|
+
def self.from_hash(hash)
|
|
279
|
+
return nil unless hash
|
|
280
|
+
|
|
281
|
+
# Extract variables from the hash.
|
|
282
|
+
file_id = hash.key?('fileId') ? hash['fileId'] : nil
|
|
283
|
+
scope = hash.key?('scope') ? hash['scope'] : nil
|
|
284
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
285
|
+
display_name = hash.key?('displayName') ? hash['displayName'] : SKIP
|
|
286
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
287
|
+
duration_seconds =
|
|
288
|
+
hash.key?('durationSeconds') ? hash['durationSeconds'] : SKIP
|
|
289
|
+
transcript = Transcript.from_hash(hash['transcript']) if hash['transcript']
|
|
290
|
+
transcript_text =
|
|
291
|
+
hash.key?('transcriptText') ? hash['transcriptText'] : SKIP
|
|
292
|
+
download_url = hash.key?('downloadUrl') ? hash['downloadUrl'] : SKIP
|
|
293
|
+
download_url_expires_at =
|
|
294
|
+
hash.key?('downloadUrlExpiresAt') ? hash['downloadUrlExpiresAt'] : SKIP
|
|
295
|
+
thumbnail_url = hash.key?('thumbnailUrl') ? hash['thumbnailUrl'] : SKIP
|
|
296
|
+
thumbnail_url_expires_at =
|
|
297
|
+
hash.key?('thumbnailUrlExpiresAt') ? hash['thumbnailUrlExpiresAt'] : SKIP
|
|
298
|
+
thumbnail_source = FileSource.from_hash(hash['thumbnailSource']) if hash['thumbnailSource']
|
|
299
|
+
preview_source = FileSource.from_hash(hash['previewSource']) if hash['previewSource']
|
|
300
|
+
download_source = FileSource.from_hash(hash['downloadSource']) if hash['downloadSource']
|
|
301
|
+
hls_source = FileSource.from_hash(hash['hlsSource']) if hash['hlsSource']
|
|
302
|
+
is_public_preview_enabled =
|
|
303
|
+
hash.key?('isPublicPreviewEnabled') ? hash['isPublicPreviewEnabled'] : SKIP
|
|
304
|
+
static_public_preview_source = FileSource.from_hash(hash['staticPublicPreviewSource']) if
|
|
305
|
+
hash['staticPublicPreviewSource']
|
|
306
|
+
public_hls_url = hash.key?('publicHlsUrl') ? hash['publicHlsUrl'] : SKIP
|
|
307
|
+
public_playback_id =
|
|
308
|
+
hash.key?('publicPlaybackId') ? hash['publicPlaybackId'] : SKIP
|
|
309
|
+
source_tool_type =
|
|
310
|
+
hash.key?('sourceToolType') ? hash['sourceToolType'] : SKIP
|
|
311
|
+
source_tool_execution_id =
|
|
312
|
+
hash.key?('sourceToolExecutionId') ? hash['sourceToolExecutionId'] : SKIP
|
|
313
|
+
file_analysis_metadata = FileAnalysisMetadata1.from_hash(hash['fileAnalysisMetadata']) if
|
|
314
|
+
hash['fileAnalysisMetadata']
|
|
315
|
+
|
|
316
|
+
# Create a new hash for additional properties, removing known properties.
|
|
317
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
318
|
+
|
|
319
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
320
|
+
new_hash, proc { |value| value }
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
# Create object from extracted values.
|
|
324
|
+
FileInfo1.new(file_id: file_id,
|
|
325
|
+
scope: scope,
|
|
326
|
+
type: type,
|
|
327
|
+
display_name: display_name,
|
|
328
|
+
description: description,
|
|
329
|
+
duration_seconds: duration_seconds,
|
|
330
|
+
transcript: transcript,
|
|
331
|
+
transcript_text: transcript_text,
|
|
332
|
+
download_url: download_url,
|
|
333
|
+
download_url_expires_at: download_url_expires_at,
|
|
334
|
+
thumbnail_url: thumbnail_url,
|
|
335
|
+
thumbnail_url_expires_at: thumbnail_url_expires_at,
|
|
336
|
+
thumbnail_source: thumbnail_source,
|
|
337
|
+
preview_source: preview_source,
|
|
338
|
+
download_source: download_source,
|
|
339
|
+
hls_source: hls_source,
|
|
340
|
+
is_public_preview_enabled: is_public_preview_enabled,
|
|
341
|
+
static_public_preview_source: static_public_preview_source,
|
|
342
|
+
public_hls_url: public_hls_url,
|
|
343
|
+
public_playback_id: public_playback_id,
|
|
344
|
+
source_tool_type: source_tool_type,
|
|
345
|
+
source_tool_execution_id: source_tool_execution_id,
|
|
346
|
+
file_analysis_metadata: file_analysis_metadata,
|
|
347
|
+
additional_properties: additional_properties)
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Provides a human-readable string representation of the object.
|
|
351
|
+
def to_s
|
|
352
|
+
class_name = self.class.name.split('::').last
|
|
353
|
+
"<#{class_name} file_id: #{@file_id}, type: #{@type}, scope: #{@scope}, display_name:"\
|
|
354
|
+
" #{@display_name}, description: #{@description}, duration_seconds: #{@duration_seconds},"\
|
|
355
|
+
" transcript: #{@transcript}, transcript_text: #{@transcript_text}, download_url:"\
|
|
356
|
+
" #{@download_url}, download_url_expires_at: #{@download_url_expires_at}, thumbnail_url:"\
|
|
357
|
+
" #{@thumbnail_url}, thumbnail_url_expires_at: #{@thumbnail_url_expires_at},"\
|
|
358
|
+
" thumbnail_source: #{@thumbnail_source}, preview_source: #{@preview_source},"\
|
|
359
|
+
" download_source: #{@download_source}, hls_source: #{@hls_source},"\
|
|
360
|
+
" is_public_preview_enabled: #{@is_public_preview_enabled}, static_public_preview_source:"\
|
|
361
|
+
" #{@static_public_preview_source}, public_hls_url: #{@public_hls_url}, public_playback_id:"\
|
|
362
|
+
" #{@public_playback_id}, source_tool_type: #{@source_tool_type}, source_tool_execution_id:"\
|
|
363
|
+
" #{@source_tool_execution_id}, file_analysis_metadata: #{@file_analysis_metadata},"\
|
|
364
|
+
" additional_properties: #{@additional_properties}>"
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
368
|
+
def inspect
|
|
369
|
+
class_name = self.class.name.split('::').last
|
|
370
|
+
"<#{class_name} file_id: #{@file_id.inspect}, type: #{@type.inspect}, scope:"\
|
|
371
|
+
" #{@scope.inspect}, display_name: #{@display_name.inspect}, description:"\
|
|
372
|
+
" #{@description.inspect}, duration_seconds: #{@duration_seconds.inspect}, transcript:"\
|
|
373
|
+
" #{@transcript.inspect}, transcript_text: #{@transcript_text.inspect}, download_url:"\
|
|
374
|
+
" #{@download_url.inspect}, download_url_expires_at: #{@download_url_expires_at.inspect},"\
|
|
375
|
+
" thumbnail_url: #{@thumbnail_url.inspect}, thumbnail_url_expires_at:"\
|
|
376
|
+
" #{@thumbnail_url_expires_at.inspect}, thumbnail_source: #{@thumbnail_source.inspect},"\
|
|
377
|
+
" preview_source: #{@preview_source.inspect}, download_source: #{@download_source.inspect},"\
|
|
378
|
+
" hls_source: #{@hls_source.inspect}, is_public_preview_enabled:"\
|
|
379
|
+
" #{@is_public_preview_enabled.inspect}, static_public_preview_source:"\
|
|
380
|
+
" #{@static_public_preview_source.inspect}, public_hls_url: #{@public_hls_url.inspect},"\
|
|
381
|
+
" public_playback_id: #{@public_playback_id.inspect}, source_tool_type:"\
|
|
382
|
+
" #{@source_tool_type.inspect}, source_tool_execution_id:"\
|
|
383
|
+
" #{@source_tool_execution_id.inspect}, file_analysis_metadata:"\
|
|
384
|
+
" #{@file_analysis_metadata.inspect}, additional_properties: #{@additional_properties}>"
|
|
385
|
+
end
|
|
386
|
+
end
|
|
387
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# File scope. - `GLOBAL`: user-uploaded or standalone generated files that
|
|
8
|
+
# persist indefinitely. - `PROJECT`: project-specific files (e.g.
|
|
9
|
+
# text-to-speech clips in a generated project). - `EXPORT`: project exports. -
|
|
10
|
+
# `TEMPORARY`: short-lived files guaranteed to be available for 24 hours,
|
|
11
|
+
# after which they may be archived at any time. Not analyzed (no description,
|
|
12
|
+
# transcript, or embedding). - `ENTITY`: files attached to a reusable entity
|
|
13
|
+
# (e.g. a voice sample for an actor), shared across your team.
|
|
14
|
+
class FileInfoScope
|
|
15
|
+
FILE_INFO_SCOPE = [
|
|
16
|
+
# TODO: Write general description for GLOBAL
|
|
17
|
+
GLOBAL = 'GLOBAL'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for PROJECT
|
|
20
|
+
PROJECT = 'PROJECT'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for EXPORT
|
|
23
|
+
EXPORT = 'EXPORT'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for TEMPORARY
|
|
26
|
+
TEMPORARY = 'TEMPORARY'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for ENTITY
|
|
29
|
+
ENTITY = 'ENTITY'.freeze
|
|
30
|
+
].freeze
|
|
31
|
+
|
|
32
|
+
def self.validate(value)
|
|
33
|
+
return false if value.nil?
|
|
34
|
+
|
|
35
|
+
FILE_INFO_SCOPE.include?(value)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.from_value(value, default_value = GLOBAL)
|
|
39
|
+
return default_value if value.nil?
|
|
40
|
+
|
|
41
|
+
str = value.to_s.strip
|
|
42
|
+
|
|
43
|
+
case str.downcase
|
|
44
|
+
when 'global' then GLOBAL
|
|
45
|
+
when 'project' then PROJECT
|
|
46
|
+
when 'export' then EXPORT
|
|
47
|
+
when 'temporary' then TEMPORARY
|
|
48
|
+
when 'entity' then ENTITY
|
|
49
|
+
else
|
|
50
|
+
default_value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# A rendition source for a file (e.g. thumbnail, preview, download). Contains
|
|
8
|
+
# a signed URL and metadata.
|
|
9
|
+
class FileSource < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# `pending`: asset is still processing or has not been hydrated yet.
|
|
14
|
+
# `ready`: signed URL is available. `failed`: rendition generation failed.
|
|
15
|
+
# `skipped`: rendition does not apply to this file type (e.g. thumbnail for
|
|
16
|
+
# audio).
|
|
17
|
+
# @return [FileSourceStatus]
|
|
18
|
+
attr_accessor :status
|
|
19
|
+
|
|
20
|
+
# Signed URL. Present when status is `ready` and file has been recently
|
|
21
|
+
# hydrated. If missing, call the hydrate endpoint.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :url
|
|
24
|
+
|
|
25
|
+
# Seconds since epoch (Unix timestamp) when the signed URL expires.
|
|
26
|
+
# @return [Integer]
|
|
27
|
+
attr_accessor :expires_at
|
|
28
|
+
|
|
29
|
+
# Rendition width in pixels, when known.
|
|
30
|
+
# @return [Integer]
|
|
31
|
+
attr_accessor :width
|
|
32
|
+
|
|
33
|
+
# Rendition height in pixels, when known.
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
attr_accessor :height
|
|
36
|
+
|
|
37
|
+
# File size in bytes, when known.
|
|
38
|
+
# @return [Integer]
|
|
39
|
+
attr_accessor :file_bytes
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['status'] = 'status'
|
|
45
|
+
@_hash['url'] = 'url'
|
|
46
|
+
@_hash['expires_at'] = 'expiresAt'
|
|
47
|
+
@_hash['width'] = 'width'
|
|
48
|
+
@_hash['height'] = 'height'
|
|
49
|
+
@_hash['file_bytes'] = 'fileBytes'
|
|
50
|
+
@_hash
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for optional fields
|
|
54
|
+
def self.optionals
|
|
55
|
+
%w[
|
|
56
|
+
url
|
|
57
|
+
expires_at
|
|
58
|
+
width
|
|
59
|
+
height
|
|
60
|
+
file_bytes
|
|
61
|
+
]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for nullable fields
|
|
65
|
+
def self.nullables
|
|
66
|
+
%w[
|
|
67
|
+
url
|
|
68
|
+
expires_at
|
|
69
|
+
width
|
|
70
|
+
height
|
|
71
|
+
file_bytes
|
|
72
|
+
]
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def initialize(status:, url: SKIP, expires_at: SKIP, width: SKIP,
|
|
76
|
+
height: SKIP, file_bytes: SKIP, additional_properties: nil)
|
|
77
|
+
# Add additional model properties to the instance
|
|
78
|
+
additional_properties = {} if additional_properties.nil?
|
|
79
|
+
|
|
80
|
+
@status = status
|
|
81
|
+
@url = url unless url == SKIP
|
|
82
|
+
@expires_at = expires_at unless expires_at == SKIP
|
|
83
|
+
@width = width unless width == SKIP
|
|
84
|
+
@height = height unless height == SKIP
|
|
85
|
+
@file_bytes = file_bytes unless file_bytes == SKIP
|
|
86
|
+
@additional_properties = additional_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Creates an instance of the object from a hash.
|
|
90
|
+
def self.from_hash(hash)
|
|
91
|
+
return nil unless hash
|
|
92
|
+
|
|
93
|
+
# Extract variables from the hash.
|
|
94
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
95
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
96
|
+
expires_at = hash.key?('expiresAt') ? hash['expiresAt'] : SKIP
|
|
97
|
+
width = hash.key?('width') ? hash['width'] : SKIP
|
|
98
|
+
height = hash.key?('height') ? hash['height'] : SKIP
|
|
99
|
+
file_bytes = hash.key?('fileBytes') ? hash['fileBytes'] : 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
|
+
FileSource.new(status: status,
|
|
110
|
+
url: url,
|
|
111
|
+
expires_at: expires_at,
|
|
112
|
+
width: width,
|
|
113
|
+
height: height,
|
|
114
|
+
file_bytes: file_bytes,
|
|
115
|
+
additional_properties: additional_properties)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Provides a human-readable string representation of the object.
|
|
119
|
+
def to_s
|
|
120
|
+
class_name = self.class.name.split('::').last
|
|
121
|
+
"<#{class_name} status: #{@status}, url: #{@url}, expires_at: #{@expires_at}, width:"\
|
|
122
|
+
" #{@width}, height: #{@height}, file_bytes: #{@file_bytes}, additional_properties:"\
|
|
123
|
+
" #{@additional_properties}>"
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
127
|
+
def inspect
|
|
128
|
+
class_name = self.class.name.split('::').last
|
|
129
|
+
"<#{class_name} status: #{@status.inspect}, url: #{@url.inspect}, expires_at:"\
|
|
130
|
+
" #{@expires_at.inspect}, width: #{@width.inspect}, height: #{@height.inspect}, file_bytes:"\
|
|
131
|
+
" #{@file_bytes.inspect}, additional_properties: #{@additional_properties}>"
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# `pending`: asset is still processing or has not been hydrated yet. `ready`:
|
|
8
|
+
# signed URL is available. `failed`: rendition generation failed. `skipped`:
|
|
9
|
+
# rendition does not apply to this file type (e.g. thumbnail for audio).
|
|
10
|
+
class FileSourceStatus
|
|
11
|
+
FILE_SOURCE_STATUS = [
|
|
12
|
+
# TODO: Write general description for PENDING
|
|
13
|
+
PENDING = 'pending'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for READY
|
|
16
|
+
READY = 'ready'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for FAILED
|
|
19
|
+
FAILED = 'failed'.freeze,
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for SKIPPED
|
|
22
|
+
SKIPPED = 'skipped'.freeze
|
|
23
|
+
].freeze
|
|
24
|
+
|
|
25
|
+
def self.validate(value)
|
|
26
|
+
return false if value.nil?
|
|
27
|
+
|
|
28
|
+
FILE_SOURCE_STATUS.include?(value)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def self.from_value(value, default_value = PENDING)
|
|
32
|
+
return default_value if value.nil?
|
|
33
|
+
|
|
34
|
+
str = value.to_s.strip
|
|
35
|
+
|
|
36
|
+
case str.downcase
|
|
37
|
+
when 'pending' then PENDING
|
|
38
|
+
when 'ready' then READY
|
|
39
|
+
when 'failed' then FAILED
|
|
40
|
+
when 'skipped' then SKIPPED
|
|
41
|
+
else
|
|
42
|
+
default_value
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# File type. `TEXT` covers plain-text and editor-interchange documents;
|
|
8
|
+
# `LOTTIE` is a JSON animation.
|
|
9
|
+
class FileType
|
|
10
|
+
FILE_TYPE = [
|
|
11
|
+
# TODO: Write general description for IMAGE
|
|
12
|
+
IMAGE = 'IMAGE'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for VIDEO
|
|
15
|
+
VIDEO = 'VIDEO'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for AUDIO
|
|
18
|
+
AUDIO = 'AUDIO'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for PDF
|
|
21
|
+
PDF = 'PDF'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for SLIDESHOW
|
|
24
|
+
SLIDESHOW = 'SLIDESHOW'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for TEXT
|
|
27
|
+
TEXT = 'TEXT'.freeze,
|
|
28
|
+
|
|
29
|
+
# TODO: Write general description for LOTTIE
|
|
30
|
+
LOTTIE = 'LOTTIE'.freeze
|
|
31
|
+
].freeze
|
|
32
|
+
|
|
33
|
+
def self.validate(value)
|
|
34
|
+
return false if value.nil?
|
|
35
|
+
|
|
36
|
+
FILE_TYPE.include?(value)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.from_value(value, default_value = IMAGE)
|
|
40
|
+
return default_value if value.nil?
|
|
41
|
+
|
|
42
|
+
str = value.to_s.strip
|
|
43
|
+
|
|
44
|
+
case str.downcase
|
|
45
|
+
when 'image' then IMAGE
|
|
46
|
+
when 'video' then VIDEO
|
|
47
|
+
when 'audio' then AUDIO
|
|
48
|
+
when 'pdf' then PDF
|
|
49
|
+
when 'slideshow' then SLIDESHOW
|
|
50
|
+
when 'text' then TEXT
|
|
51
|
+
when 'lottie' then LOTTIE
|
|
52
|
+
else
|
|
53
|
+
default_value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|