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,120 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Restyle every eligible still image in the project to a new look
|
|
8
|
+
# (image-to-image), replacing each image in place. Eligible images are non-SVG
|
|
9
|
+
# image assets backed by an uploaded or generated file. Runs asynchronously:
|
|
10
|
+
# one restyled image is generated per eligible image. If the project has no
|
|
11
|
+
# eligible images, the action is skipped and completes successfully without
|
|
12
|
+
# changing anything.
|
|
13
|
+
class RemixAction9 < BaseModel
|
|
14
|
+
SKIP = Object.new
|
|
15
|
+
private_constant :SKIP
|
|
16
|
+
|
|
17
|
+
# Discriminator value: REGENERATE_IMAGES
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_reader :type
|
|
20
|
+
|
|
21
|
+
# Describe the visual style to apply to every image (e.g. "watercolor
|
|
22
|
+
# painting", "cinematic film still").
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :style_prompt
|
|
25
|
+
|
|
26
|
+
# Image generation quality tier for the restyled images. Optional; when
|
|
27
|
+
# omitted, your account's Default AI quality for images is used (change it
|
|
28
|
+
# at https://app.videogen.io/settings/account).
|
|
29
|
+
# @return [ModelQuality2]
|
|
30
|
+
attr_accessor :quality
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['type'] = 'type'
|
|
36
|
+
@_hash['style_prompt'] = 'stylePrompt'
|
|
37
|
+
@_hash['quality'] = 'quality'
|
|
38
|
+
@_hash
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# An array for optional fields
|
|
42
|
+
def self.optionals
|
|
43
|
+
%w[
|
|
44
|
+
quality
|
|
45
|
+
]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
[]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def initialize(style_prompt:, quality: SKIP, additional_properties: nil)
|
|
54
|
+
# Add additional model properties to the instance
|
|
55
|
+
additional_properties = {} if additional_properties.nil?
|
|
56
|
+
|
|
57
|
+
@type = 'REGENERATE_IMAGES'
|
|
58
|
+
@style_prompt = style_prompt
|
|
59
|
+
@quality = quality unless quality == SKIP
|
|
60
|
+
@additional_properties = additional_properties
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Creates an instance of the object from a hash.
|
|
64
|
+
def self.from_hash(hash)
|
|
65
|
+
return nil unless hash
|
|
66
|
+
|
|
67
|
+
# Extract variables from the hash.
|
|
68
|
+
style_prompt = hash.key?('stylePrompt') ? hash['stylePrompt'] : nil
|
|
69
|
+
quality = hash.key?('quality') ? hash['quality'] : SKIP
|
|
70
|
+
|
|
71
|
+
# Create a new hash for additional properties, removing known properties.
|
|
72
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
73
|
+
|
|
74
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
75
|
+
new_hash, proc { |value| value }
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
# Create object from extracted values.
|
|
79
|
+
RemixAction9.new(style_prompt: style_prompt,
|
|
80
|
+
quality: quality,
|
|
81
|
+
additional_properties: additional_properties)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Validates an instance of the object from a given value.
|
|
85
|
+
# @param [RemixAction9 | Hash] The value against the validation is performed.
|
|
86
|
+
def self.validate(value)
|
|
87
|
+
if value.instance_of? self
|
|
88
|
+
return (
|
|
89
|
+
APIHelper.valid_type?(value.type,
|
|
90
|
+
->(val) { val.instance_of? String }) and
|
|
91
|
+
APIHelper.valid_type?(value.style_prompt,
|
|
92
|
+
->(val) { val.instance_of? String })
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
return false unless value.instance_of? Hash
|
|
97
|
+
|
|
98
|
+
(
|
|
99
|
+
APIHelper.valid_type?(value['type'],
|
|
100
|
+
->(val) { val.instance_of? String }) and
|
|
101
|
+
APIHelper.valid_type?(value['stylePrompt'],
|
|
102
|
+
->(val) { val.instance_of? String })
|
|
103
|
+
)
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Provides a human-readable string representation of the object.
|
|
107
|
+
def to_s
|
|
108
|
+
class_name = self.class.name.split('::').last
|
|
109
|
+
"<#{class_name} type: #{@type}, style_prompt: #{@style_prompt}, quality: #{@quality},"\
|
|
110
|
+
" additional_properties: #{@additional_properties}>"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
114
|
+
def inspect
|
|
115
|
+
class_name = self.class.name.split('::').last
|
|
116
|
+
"<#{class_name} type: #{@type.inspect}, style_prompt: #{@style_prompt.inspect}, quality:"\
|
|
117
|
+
" #{@quality.inspect}, additional_properties: #{@additional_properties}>"
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Position the logo is anchored to. Omit or pass `null` to keep the current
|
|
8
|
+
# position.
|
|
9
|
+
class RemixActionDiscriminatorMappingSetLogoPosition
|
|
10
|
+
REMIX_ACTION_DISCRIMINATOR_MAPPING_SET_LOGO_POSITION = [
|
|
11
|
+
# TODO: Write general description for TOP_LEFT
|
|
12
|
+
TOP_LEFT = 'TOP_LEFT'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for TOP_CENTER
|
|
15
|
+
TOP_CENTER = 'TOP_CENTER'.freeze,
|
|
16
|
+
|
|
17
|
+
# TODO: Write general description for TOP_RIGHT
|
|
18
|
+
TOP_RIGHT = 'TOP_RIGHT'.freeze,
|
|
19
|
+
|
|
20
|
+
# TODO: Write general description for BOTTOM_LEFT
|
|
21
|
+
BOTTOM_LEFT = 'BOTTOM_LEFT'.freeze,
|
|
22
|
+
|
|
23
|
+
# TODO: Write general description for BOTTOM_CENTER
|
|
24
|
+
BOTTOM_CENTER = 'BOTTOM_CENTER'.freeze,
|
|
25
|
+
|
|
26
|
+
# TODO: Write general description for BOTTOM_RIGHT
|
|
27
|
+
BOTTOM_RIGHT = 'BOTTOM_RIGHT'.freeze
|
|
28
|
+
].freeze
|
|
29
|
+
|
|
30
|
+
def self.validate(value)
|
|
31
|
+
return false if value.nil?
|
|
32
|
+
|
|
33
|
+
REMIX_ACTION_DISCRIMINATOR_MAPPING_SET_LOGO_POSITION.include?(value)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def self.from_value(value, default_value = TOP_LEFT)
|
|
37
|
+
return default_value if value.nil?
|
|
38
|
+
|
|
39
|
+
str = value.to_s.strip
|
|
40
|
+
|
|
41
|
+
case str.downcase
|
|
42
|
+
when 'top_left' then TOP_LEFT
|
|
43
|
+
when 'top_center' then TOP_CENTER
|
|
44
|
+
when 'top_right' then TOP_RIGHT
|
|
45
|
+
when 'bottom_left' then BOTTOM_LEFT
|
|
46
|
+
when 'bottom_center' then BOTTOM_CENTER
|
|
47
|
+
when 'bottom_right' then BOTTOM_RIGHT
|
|
48
|
+
else
|
|
49
|
+
default_value
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# RemixActionRun Model.
|
|
8
|
+
class RemixActionRun < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Opaque remix action id (e.g. `vg_rmix_...`).
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :remix_action_id
|
|
15
|
+
|
|
16
|
+
# The kind of edit a remix action applies.
|
|
17
|
+
# @return [RemixActionType]
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
# Lifecycle status shared by every asynchronous job (tool executions,
|
|
21
|
+
# workflow runs, remix actions, project exports, and timeline interchange
|
|
22
|
+
# jobs). `pending` and `running` are in-progress; `succeeded`, `failed`, and
|
|
23
|
+
# `cancelled` are terminal.
|
|
24
|
+
# @return [JobStatus]
|
|
25
|
+
attr_accessor :status
|
|
26
|
+
|
|
27
|
+
# Id of the project this remix action edits (e.g. `vg_proj_...`).
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :project_id
|
|
30
|
+
|
|
31
|
+
# Deep link to open this project in the VideoGen web editor. Not required
|
|
32
|
+
# for an API-only integration: store `projectId` and use the Projects API
|
|
33
|
+
# (export, remix, metadata). Use `projectUrl` when a person should open the
|
|
34
|
+
# project in the app to review or edit it manually. The project is visible
|
|
35
|
+
# only to members of your team and any project collaborators, the same
|
|
36
|
+
# access model as a project created in the dashboard.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :project_url
|
|
39
|
+
|
|
40
|
+
# Completion progress for the current attempt (0-100). Always `100` when
|
|
41
|
+
# `status` is `succeeded`.
|
|
42
|
+
# @return [Float]
|
|
43
|
+
attr_accessor :progress_percentage
|
|
44
|
+
|
|
45
|
+
# Zero-based index of the current or most recent execution attempt.
|
|
46
|
+
# @return [Integer]
|
|
47
|
+
attr_accessor :attempt_index
|
|
48
|
+
|
|
49
|
+
# Error details. Always present as a field; `null` unless `status` is
|
|
50
|
+
# `failed`.
|
|
51
|
+
# @return [ApiError]
|
|
52
|
+
attr_accessor :error
|
|
53
|
+
|
|
54
|
+
# A mapping from model property names to API property names.
|
|
55
|
+
def self.names
|
|
56
|
+
@_hash = {} if @_hash.nil?
|
|
57
|
+
@_hash['remix_action_id'] = 'remixActionId'
|
|
58
|
+
@_hash['type'] = 'type'
|
|
59
|
+
@_hash['status'] = 'status'
|
|
60
|
+
@_hash['project_id'] = 'projectId'
|
|
61
|
+
@_hash['project_url'] = 'projectUrl'
|
|
62
|
+
@_hash['progress_percentage'] = 'progressPercentage'
|
|
63
|
+
@_hash['attempt_index'] = 'attemptIndex'
|
|
64
|
+
@_hash['error'] = 'error'
|
|
65
|
+
@_hash
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# An array for optional fields
|
|
69
|
+
def self.optionals
|
|
70
|
+
[]
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# An array for nullable fields
|
|
74
|
+
def self.nullables
|
|
75
|
+
%w[
|
|
76
|
+
error
|
|
77
|
+
]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def initialize(remix_action_id:, type:, status:, project_id:, project_url:,
|
|
81
|
+
progress_percentage:, attempt_index:, error:,
|
|
82
|
+
additional_properties: nil)
|
|
83
|
+
# Add additional model properties to the instance
|
|
84
|
+
additional_properties = {} if additional_properties.nil?
|
|
85
|
+
|
|
86
|
+
@remix_action_id = remix_action_id
|
|
87
|
+
@type = type
|
|
88
|
+
@status = status
|
|
89
|
+
@project_id = project_id
|
|
90
|
+
@project_url = project_url
|
|
91
|
+
@progress_percentage = progress_percentage
|
|
92
|
+
@attempt_index = attempt_index
|
|
93
|
+
@error = error
|
|
94
|
+
@additional_properties = additional_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Creates an instance of the object from a hash.
|
|
98
|
+
def self.from_hash(hash)
|
|
99
|
+
return nil unless hash
|
|
100
|
+
|
|
101
|
+
# Extract variables from the hash.
|
|
102
|
+
remix_action_id = hash.key?('remixActionId') ? hash['remixActionId'] : nil
|
|
103
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
104
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
105
|
+
project_id = hash.key?('projectId') ? hash['projectId'] : nil
|
|
106
|
+
project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
|
|
107
|
+
progress_percentage =
|
|
108
|
+
hash.key?('progressPercentage') ? hash['progressPercentage'] : nil
|
|
109
|
+
attempt_index = hash.key?('attemptIndex') ? hash['attemptIndex'] : nil
|
|
110
|
+
error = ApiError.from_hash(hash['error']) if hash['error']
|
|
111
|
+
|
|
112
|
+
# Create a new hash for additional properties, removing known properties.
|
|
113
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
114
|
+
|
|
115
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
116
|
+
new_hash, proc { |value| value }
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
# Create object from extracted values.
|
|
120
|
+
RemixActionRun.new(remix_action_id: remix_action_id,
|
|
121
|
+
type: type,
|
|
122
|
+
status: status,
|
|
123
|
+
project_id: project_id,
|
|
124
|
+
project_url: project_url,
|
|
125
|
+
progress_percentage: progress_percentage,
|
|
126
|
+
attempt_index: attempt_index,
|
|
127
|
+
error: error,
|
|
128
|
+
additional_properties: additional_properties)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Provides a human-readable string representation of the object.
|
|
132
|
+
def to_s
|
|
133
|
+
class_name = self.class.name.split('::').last
|
|
134
|
+
"<#{class_name} remix_action_id: #{@remix_action_id}, type: #{@type}, status: #{@status},"\
|
|
135
|
+
" project_id: #{@project_id}, project_url: #{@project_url}, progress_percentage:"\
|
|
136
|
+
" #{@progress_percentage}, attempt_index: #{@attempt_index}, error: #{@error},"\
|
|
137
|
+
" additional_properties: #{@additional_properties}>"
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
141
|
+
def inspect
|
|
142
|
+
class_name = self.class.name.split('::').last
|
|
143
|
+
"<#{class_name} remix_action_id: #{@remix_action_id.inspect}, type: #{@type.inspect},"\
|
|
144
|
+
" status: #{@status.inspect}, project_id: #{@project_id.inspect}, project_url:"\
|
|
145
|
+
" #{@project_url.inspect}, progress_percentage: #{@progress_percentage.inspect},"\
|
|
146
|
+
" attempt_index: #{@attempt_index.inspect}, error: #{@error.inspect}, additional_properties:"\
|
|
147
|
+
" #{@additional_properties}>"
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
end
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# The kind of edit a remix action applies.
|
|
8
|
+
class RemixActionType
|
|
9
|
+
REMIX_ACTION_TYPE = [
|
|
10
|
+
# TODO: Write general description for SET_BACKGROUND_MUSIC
|
|
11
|
+
SET_BACKGROUND_MUSIC = 'SET_BACKGROUND_MUSIC'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SET_LOGO
|
|
14
|
+
SET_LOGO = 'SET_LOGO'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for ENABLE_CAPTIONS
|
|
17
|
+
ENABLE_CAPTIONS = 'ENABLE_CAPTIONS'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for DISABLE_CAPTIONS
|
|
20
|
+
DISABLE_CAPTIONS = 'DISABLE_CAPTIONS'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for ADD_TRANSITIONS
|
|
23
|
+
ADD_TRANSITIONS = 'ADD_TRANSITIONS'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for ADD_ZOOM
|
|
26
|
+
ADD_ZOOM = 'ADD_ZOOM'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for RESIZE_PROJECT
|
|
29
|
+
RESIZE_PROJECT = 'RESIZE_PROJECT'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for CLEAN_UP_TRANSCRIPT
|
|
32
|
+
CLEAN_UP_TRANSCRIPT = 'CLEAN_UP_TRANSCRIPT'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for CONVERT_IMAGES_TO_VIDEOS
|
|
35
|
+
CONVERT_IMAGES_TO_VIDEOS = 'CONVERT_IMAGES_TO_VIDEOS'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for REGENERATE_IMAGES
|
|
38
|
+
REGENERATE_IMAGES = 'REGENERATE_IMAGES'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for UPSCALE_ASSETS
|
|
41
|
+
UPSCALE_ASSETS = 'UPSCALE_ASSETS'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for CHANGE_NARRATOR
|
|
44
|
+
CHANGE_NARRATOR = 'CHANGE_NARRATOR'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for SHUFFLE_STOCK_VISUALS
|
|
47
|
+
SHUFFLE_STOCK_VISUALS = 'SHUFFLE_STOCK_VISUALS'.freeze,
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for GENERATE_MUSIC
|
|
50
|
+
GENERATE_MUSIC = 'GENERATE_MUSIC'.freeze,
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for TRANSLATE_PROJECT
|
|
53
|
+
TRANSLATE_PROJECT = 'TRANSLATE_PROJECT'.freeze
|
|
54
|
+
].freeze
|
|
55
|
+
|
|
56
|
+
def self.validate(value)
|
|
57
|
+
return false if value.nil?
|
|
58
|
+
|
|
59
|
+
REMIX_ACTION_TYPE.include?(value)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def self.from_value(value, default_value = SET_BACKGROUND_MUSIC)
|
|
63
|
+
return default_value if value.nil?
|
|
64
|
+
|
|
65
|
+
str = value.to_s.strip
|
|
66
|
+
|
|
67
|
+
case str.downcase
|
|
68
|
+
when 'set_background_music' then SET_BACKGROUND_MUSIC
|
|
69
|
+
when 'set_logo' then SET_LOGO
|
|
70
|
+
when 'enable_captions' then ENABLE_CAPTIONS
|
|
71
|
+
when 'disable_captions' then DISABLE_CAPTIONS
|
|
72
|
+
when 'add_transitions' then ADD_TRANSITIONS
|
|
73
|
+
when 'add_zoom' then ADD_ZOOM
|
|
74
|
+
when 'resize_project' then RESIZE_PROJECT
|
|
75
|
+
when 'clean_up_transcript' then CLEAN_UP_TRANSCRIPT
|
|
76
|
+
when 'convert_images_to_videos' then CONVERT_IMAGES_TO_VIDEOS
|
|
77
|
+
when 'regenerate_images' then REGENERATE_IMAGES
|
|
78
|
+
when 'upscale_assets' then UPSCALE_ASSETS
|
|
79
|
+
when 'change_narrator' then CHANGE_NARRATOR
|
|
80
|
+
when 'shuffle_stock_visuals' then SHUFFLE_STOCK_VISUALS
|
|
81
|
+
when 'generate_music' then GENERATE_MUSIC
|
|
82
|
+
when 'translate_project' then TRANSLATE_PROJECT
|
|
83
|
+
else
|
|
84
|
+
default_value
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -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
|
+
# RemixProjectRequest Model.
|
|
8
|
+
class RemixProjectRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Ordered list of edits to apply. Each runs asynchronously as its own remix
|
|
13
|
+
# action. Must contain at least one action.
|
|
14
|
+
# @return [Array[Object]]
|
|
15
|
+
attr_accessor :remix_actions
|
|
16
|
+
|
|
17
|
+
# When true, the project is duplicated first and the edits are applied to
|
|
18
|
+
# the copy, leaving the original untouched. The response's `projectId` is
|
|
19
|
+
# the copy. Defaults to false (edits the project in place).
|
|
20
|
+
# @return [TrueClass | FalseClass]
|
|
21
|
+
attr_accessor :save_as_new_project
|
|
22
|
+
|
|
23
|
+
# A mapping from model property names to API property names.
|
|
24
|
+
def self.names
|
|
25
|
+
@_hash = {} if @_hash.nil?
|
|
26
|
+
@_hash['remix_actions'] = 'remixActions'
|
|
27
|
+
@_hash['save_as_new_project'] = 'saveAsNewProject'
|
|
28
|
+
@_hash
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for optional fields
|
|
32
|
+
def self.optionals
|
|
33
|
+
%w[
|
|
34
|
+
save_as_new_project
|
|
35
|
+
]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(remix_actions:, save_as_new_project: SKIP,
|
|
44
|
+
additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@remix_actions = remix_actions
|
|
49
|
+
@save_as_new_project = save_as_new_project unless save_as_new_project == SKIP
|
|
50
|
+
@additional_properties = additional_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
remix_actions = hash.key?('remixActions') ? APIHelper.deserialize_union_type(
|
|
59
|
+
UnionTypeLookUp.get(:RemixAction152), hash['remixActions']
|
|
60
|
+
) : nil
|
|
61
|
+
save_as_new_project =
|
|
62
|
+
hash.key?('saveAsNewProject') ? hash['saveAsNewProject'] : SKIP
|
|
63
|
+
|
|
64
|
+
# Create a new hash for additional properties, removing known properties.
|
|
65
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
66
|
+
|
|
67
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
68
|
+
new_hash, proc { |value| value }
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Create object from extracted values.
|
|
72
|
+
RemixProjectRequest.new(remix_actions: remix_actions,
|
|
73
|
+
save_as_new_project: save_as_new_project,
|
|
74
|
+
additional_properties: additional_properties)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Validates an instance of the object from a given value.
|
|
78
|
+
# @param [RemixProjectRequest | Hash] The value against the validation is performed.
|
|
79
|
+
def self.validate(value)
|
|
80
|
+
if value.instance_of? self
|
|
81
|
+
return UnionTypeLookUp.get(:RemixAction152)
|
|
82
|
+
.validate(value.remix_actions)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
return false unless value.instance_of? Hash
|
|
86
|
+
|
|
87
|
+
UnionTypeLookUp.get(:RemixAction152)
|
|
88
|
+
.validate(value['remixActions'])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Provides a human-readable string representation of the object.
|
|
92
|
+
def to_s
|
|
93
|
+
class_name = self.class.name.split('::').last
|
|
94
|
+
"<#{class_name} remix_actions: #{@remix_actions}, save_as_new_project:"\
|
|
95
|
+
" #{@save_as_new_project}, additional_properties: #{@additional_properties}>"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
99
|
+
def inspect
|
|
100
|
+
class_name = self.class.name.split('::').last
|
|
101
|
+
"<#{class_name} remix_actions: #{@remix_actions.inspect}, save_as_new_project:"\
|
|
102
|
+
" #{@save_as_new_project.inspect}, additional_properties: #{@additional_properties}>"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,101 @@
|
|
|
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 remix actions are accepted. Poll `GET
|
|
8
|
+
# /v1/projects/{projectId}/remix-actions` for status.
|
|
9
|
+
class RemixProjectResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Id of the edited project (e.g. `vg_proj_...`; the duplicate when
|
|
14
|
+
# `saveAsNewProject` was true).
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :project_id
|
|
17
|
+
|
|
18
|
+
# Deep link to open this project in the VideoGen web editor. Not required
|
|
19
|
+
# for an API-only integration: store `projectId` and use the Projects API
|
|
20
|
+
# (export, remix, metadata). Use `projectUrl` when a person should open the
|
|
21
|
+
# project in the app to review or edit it manually. The project is visible
|
|
22
|
+
# only to members of your team and any project collaborators, the same
|
|
23
|
+
# access model as a project created in the dashboard.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :project_url
|
|
26
|
+
|
|
27
|
+
# Opaque remix action ids (e.g. `vg_rmix_...`), one per requested action in
|
|
28
|
+
# order.
|
|
29
|
+
# @return [Array[String]]
|
|
30
|
+
attr_accessor :remix_action_ids
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['project_id'] = 'projectId'
|
|
36
|
+
@_hash['project_url'] = 'projectUrl'
|
|
37
|
+
@_hash['remix_action_ids'] = 'remixActionIds'
|
|
38
|
+
@_hash
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# An array for optional fields
|
|
42
|
+
def self.optionals
|
|
43
|
+
[]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# An array for nullable fields
|
|
47
|
+
def self.nullables
|
|
48
|
+
[]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def initialize(project_id:, project_url:, remix_action_ids:,
|
|
52
|
+
additional_properties: nil)
|
|
53
|
+
# Add additional model properties to the instance
|
|
54
|
+
additional_properties = {} if additional_properties.nil?
|
|
55
|
+
|
|
56
|
+
@project_id = project_id
|
|
57
|
+
@project_url = project_url
|
|
58
|
+
@remix_action_ids = remix_action_ids
|
|
59
|
+
@additional_properties = additional_properties
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Creates an instance of the object from a hash.
|
|
63
|
+
def self.from_hash(hash)
|
|
64
|
+
return nil unless hash
|
|
65
|
+
|
|
66
|
+
# Extract variables from the hash.
|
|
67
|
+
project_id = hash.key?('projectId') ? hash['projectId'] : nil
|
|
68
|
+
project_url = hash.key?('projectUrl') ? hash['projectUrl'] : nil
|
|
69
|
+
remix_action_ids =
|
|
70
|
+
hash.key?('remixActionIds') ? hash['remixActionIds'] : nil
|
|
71
|
+
|
|
72
|
+
# Create a new hash for additional properties, removing known properties.
|
|
73
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
74
|
+
|
|
75
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
76
|
+
new_hash, proc { |value| value }
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
# Create object from extracted values.
|
|
80
|
+
RemixProjectResponse.new(project_id: project_id,
|
|
81
|
+
project_url: project_url,
|
|
82
|
+
remix_action_ids: remix_action_ids,
|
|
83
|
+
additional_properties: additional_properties)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Provides a human-readable string representation of the object.
|
|
87
|
+
def to_s
|
|
88
|
+
class_name = self.class.name.split('::').last
|
|
89
|
+
"<#{class_name} project_id: #{@project_id}, project_url: #{@project_url}, remix_action_ids:"\
|
|
90
|
+
" #{@remix_action_ids}, additional_properties: #{@additional_properties}>"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
94
|
+
def inspect
|
|
95
|
+
class_name = self.class.name.split('::').last
|
|
96
|
+
"<#{class_name} project_id: #{@project_id.inspect}, project_url: #{@project_url.inspect},"\
|
|
97
|
+
" remix_action_ids: #{@remix_action_ids.inspect}, additional_properties:"\
|
|
98
|
+
" #{@additional_properties}>"
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# A transition applied at a boundary. `DYNAMIC` auto-varies the style across
|
|
8
|
+
# boundaries; `NONE` removes transitions; the rest apply that fixed style
|
|
9
|
+
# everywhere.
|
|
10
|
+
class RemixTransitionStyle
|
|
11
|
+
REMIX_TRANSITION_STYLE = [
|
|
12
|
+
# TODO: Write general description for DYNAMIC
|
|
13
|
+
DYNAMIC = 'DYNAMIC'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for NONE
|
|
16
|
+
NONE = 'NONE'.freeze,
|
|
17
|
+
|
|
18
|
+
# TODO: Write general description for FADE
|
|
19
|
+
FADE = 'FADE'.freeze,
|
|
20
|
+
|
|
21
|
+
# TODO: Write general description for RISE
|
|
22
|
+
RISE = 'RISE'.freeze,
|
|
23
|
+
|
|
24
|
+
# TODO: Write general description for PAN
|
|
25
|
+
PAN = 'PAN'.freeze,
|
|
26
|
+
|
|
27
|
+
# TODO: Write general description for POP
|
|
28
|
+
POP = 'POP'.freeze,
|
|
29
|
+
|
|
30
|
+
# TODO: Write general description for WIPE
|
|
31
|
+
WIPE = 'WIPE'.freeze
|
|
32
|
+
].freeze
|
|
33
|
+
|
|
34
|
+
def self.validate(value)
|
|
35
|
+
return false if value.nil?
|
|
36
|
+
|
|
37
|
+
REMIX_TRANSITION_STYLE.include?(value)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def self.from_value(value, default_value = DYNAMIC)
|
|
41
|
+
return default_value if value.nil?
|
|
42
|
+
|
|
43
|
+
str = value.to_s.strip
|
|
44
|
+
|
|
45
|
+
case str.downcase
|
|
46
|
+
when 'dynamic' then DYNAMIC
|
|
47
|
+
when 'none' then NONE
|
|
48
|
+
when 'fade' then FADE
|
|
49
|
+
when 'rise' then RISE
|
|
50
|
+
when 'pan' then PAN
|
|
51
|
+
when 'pop' then POP
|
|
52
|
+
when 'wipe' then WIPE
|
|
53
|
+
else
|
|
54
|
+
default_value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|