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,186 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Initializes a new instance of RequestLoggingConfiguration.
|
|
8
|
+
class RequestLoggingConfiguration < CoreLibrary::ApiRequestLoggingConfiguration
|
|
9
|
+
# @param log_body [Boolean] Indicates whether the message body should be logged. Default is false.
|
|
10
|
+
# @param log_headers [Boolean] Indicates whether the message headers should be logged. Default is false.
|
|
11
|
+
# @param headers_to_exclude [Array<String>] Array of headers not displayed in logging. Default is an empty array.
|
|
12
|
+
# @param headers_to_include [Array<String>] Array of headers to be displayed in logging. Default is an empty array.
|
|
13
|
+
# @param headers_to_unmask [Array<String>] Array of headers which values are non-sensitive to display in logging.
|
|
14
|
+
# Default is an empty array.
|
|
15
|
+
def initialize(log_body: false, log_headers: false, headers_to_include: nil,
|
|
16
|
+
headers_to_exclude: nil, headers_to_unmask: nil,
|
|
17
|
+
include_query_in_path: false)
|
|
18
|
+
super(
|
|
19
|
+
log_body,
|
|
20
|
+
log_headers,
|
|
21
|
+
headers_to_exclude,
|
|
22
|
+
headers_to_include,
|
|
23
|
+
headers_to_unmask,
|
|
24
|
+
include_query_in_path
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil,
|
|
29
|
+
headers_to_exclude: nil, headers_to_unmask: nil, include_query_in_path: nil)
|
|
30
|
+
log_body ||= self.log_body
|
|
31
|
+
log_headers ||= self.log_headers
|
|
32
|
+
headers_to_include ||= self.headers_to_include
|
|
33
|
+
headers_to_exclude ||= self.headers_to_exclude
|
|
34
|
+
headers_to_unmask ||= self.headers_to_unmask
|
|
35
|
+
include_query_in_path ||= self.include_query_in_path
|
|
36
|
+
|
|
37
|
+
RequestLoggingConfiguration.new(
|
|
38
|
+
log_body: log_body,
|
|
39
|
+
log_headers: log_headers,
|
|
40
|
+
headers_to_include: headers_to_include,
|
|
41
|
+
headers_to_exclude: headers_to_exclude,
|
|
42
|
+
headers_to_unmask: headers_to_unmask,
|
|
43
|
+
include_query_in_path: include_query_in_path
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.from_env
|
|
48
|
+
log_body = ENV['REQUEST_LOG_BODY']
|
|
49
|
+
log_headers = ENV['REQUEST_LOG_HEADERS']
|
|
50
|
+
headers_to_include = ENV['REQUEST_HEADERS_TO_INCLUDE']
|
|
51
|
+
headers_to_exclude = ENV['REQUEST_HEADERS_TO_EXCLUDE']
|
|
52
|
+
headers_to_unmask = ENV['REQUEST_HEADERS_TO_UNMASK']
|
|
53
|
+
include_query_in_path = ENV['REQUEST_INCLUDE_QUERY_IN_PATH']
|
|
54
|
+
|
|
55
|
+
new(
|
|
56
|
+
log_body: log_body,
|
|
57
|
+
log_headers: log_headers,
|
|
58
|
+
headers_to_include: headers_to_include,
|
|
59
|
+
headers_to_exclude: headers_to_exclude,
|
|
60
|
+
headers_to_unmask: headers_to_unmask,
|
|
61
|
+
include_query_in_path: include_query_in_path
|
|
62
|
+
)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def self.any_logging_configured?
|
|
66
|
+
%w[
|
|
67
|
+
REQUEST_LOG_BODY
|
|
68
|
+
REQUEST_LOG_HEADERS
|
|
69
|
+
REQUEST_HEADERS_TO_INCLUDE
|
|
70
|
+
REQUEST_HEADERS_TO_EXCLUDE
|
|
71
|
+
REQUEST_HEADERS_TO_UNMASK
|
|
72
|
+
REQUEST_INCLUDE_QUERY_IN_PATH
|
|
73
|
+
].any? { |key| ENV.key?(key) && !ENV[key].nil? && !ENV[key].empty? }
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes a new instance of ResponseLoggingConfiguration.
|
|
78
|
+
class ResponseLoggingConfiguration < CoreLibrary::ApiResponseLoggingConfiguration
|
|
79
|
+
def initialize(log_body: false, log_headers: false, headers_to_include: nil,
|
|
80
|
+
headers_to_exclude: nil, headers_to_unmask: nil)
|
|
81
|
+
super(
|
|
82
|
+
log_body,
|
|
83
|
+
log_headers,
|
|
84
|
+
headers_to_exclude,
|
|
85
|
+
headers_to_include,
|
|
86
|
+
headers_to_unmask
|
|
87
|
+
)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def clone_with(log_body: nil, log_headers: nil, headers_to_include: nil,
|
|
91
|
+
headers_to_exclude: nil, headers_to_unmask: nil)
|
|
92
|
+
log_body ||= self.log_body
|
|
93
|
+
log_headers ||= self.log_headers
|
|
94
|
+
headers_to_include ||= self.headers_to_include
|
|
95
|
+
headers_to_exclude ||= self.headers_to_exclude
|
|
96
|
+
headers_to_unmask ||= self.headers_to_unmask
|
|
97
|
+
|
|
98
|
+
ResponseLoggingConfiguration.new(
|
|
99
|
+
log_body: log_body,
|
|
100
|
+
log_headers: log_headers,
|
|
101
|
+
headers_to_include: headers_to_include,
|
|
102
|
+
headers_to_exclude: headers_to_exclude,
|
|
103
|
+
headers_to_unmask: headers_to_unmask
|
|
104
|
+
)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def self.from_env
|
|
108
|
+
log_body = ENV['RESPONSE_LOG_BODY']
|
|
109
|
+
log_headers = ENV['RESPONSE_LOG_HEADERS']
|
|
110
|
+
headers_to_include = ENV['RESPONSE_HEADERS_TO_INCLUDE']
|
|
111
|
+
headers_to_exclude = ENV['RESPONSE_HEADERS_TO_EXCLUDE']
|
|
112
|
+
headers_to_unmask = ENV['RESPONSE_HEADERS_TO_UNMASK']
|
|
113
|
+
|
|
114
|
+
new(
|
|
115
|
+
log_body: log_body,
|
|
116
|
+
log_headers: log_headers,
|
|
117
|
+
headers_to_include: headers_to_include,
|
|
118
|
+
headers_to_exclude: headers_to_exclude,
|
|
119
|
+
headers_to_unmask: headers_to_unmask
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def self.any_logging_configured?
|
|
124
|
+
%w[
|
|
125
|
+
RESPONSE_LOG_BODY
|
|
126
|
+
RESPONSE_LOG_HEADERS
|
|
127
|
+
RESPONSE_HEADERS_TO_INCLUDE
|
|
128
|
+
RESPONSE_HEADERS_TO_EXCLUDE
|
|
129
|
+
RESPONSE_HEADERS_TO_UNMASK
|
|
130
|
+
].any? { |key| ENV.key?(key) && !ENV[key].nil? && !ENV[key].empty? }
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Initializes a new instance of LoggingConfiguration.
|
|
135
|
+
class LoggingConfiguration < CoreLibrary::ApiLoggingConfiguration
|
|
136
|
+
def initialize(logger: nil, log_level: nil, mask_sensitive_headers: true,
|
|
137
|
+
request_logging_config: nil,
|
|
138
|
+
response_logging_config: nil)
|
|
139
|
+
request_logging_config ||= RequestLoggingConfiguration.new
|
|
140
|
+
response_logging_config ||= ResponseLoggingConfiguration.new
|
|
141
|
+
super(
|
|
142
|
+
logger,
|
|
143
|
+
log_level,
|
|
144
|
+
request_logging_config,
|
|
145
|
+
response_logging_config,
|
|
146
|
+
mask_sensitive_headers
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
def clone_with(logger: nil, log_level: nil, mask_sensitive_headers: nil,
|
|
151
|
+
request_logging_config: nil, response_logging_config: nil)
|
|
152
|
+
logger ||= self.logger
|
|
153
|
+
log_level ||= self.log_level
|
|
154
|
+
mask_sensitive_headers ||= self.mask_sensitive_headers
|
|
155
|
+
request_logging_config ||= self.request_logging_config.clone
|
|
156
|
+
response_logging_config ||= self.response_logging_config.clone
|
|
157
|
+
|
|
158
|
+
LoggingConfiguration.new(
|
|
159
|
+
logger: logger,
|
|
160
|
+
log_level: log_level,
|
|
161
|
+
mask_sensitive_headers: mask_sensitive_headers,
|
|
162
|
+
request_logging_config: request_logging_config,
|
|
163
|
+
response_logging_config: response_logging_config
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def self.from_env
|
|
168
|
+
log_level = ENV['LOG_LEVEL']
|
|
169
|
+
mask_sensitive_headers = ENV['MASK_SENSITIVE_HEADERS']
|
|
170
|
+
|
|
171
|
+
new(
|
|
172
|
+
log_level: log_level,
|
|
173
|
+
mask_sensitive_headers: mask_sensitive_headers,
|
|
174
|
+
request_logging_config: RequestLoggingConfiguration.from_env,
|
|
175
|
+
response_logging_config: ResponseLoggingConfiguration.from_env
|
|
176
|
+
)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def self.any_logging_configured?
|
|
180
|
+
RequestLoggingConfiguration.any_logging_configured? ||
|
|
181
|
+
ResponseLoggingConfiguration.any_logging_configured? ||
|
|
182
|
+
ENV.key?('LOG_LEVEL') ||
|
|
183
|
+
ENV.key?('MASK_SENSITIVE_HEADERS')
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Represents the generic logger facade
|
|
8
|
+
class AbstractLogger < Logger
|
|
9
|
+
# Logs a message with a specified log level and additional parameters.
|
|
10
|
+
# @param level [Symbol] The log level of the message.
|
|
11
|
+
# @param message [String] The message to log.
|
|
12
|
+
# @param params [Hash] Additional parameters to include in the log message.
|
|
13
|
+
def log(level, message, params)
|
|
14
|
+
raise NotImplementedError, 'This method needs to be implemented in a child class.'
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# ActOnAssistantActionRequest Model.
|
|
8
|
+
class ActOnAssistantActionRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Whether to approve (apply) or reject the action. Defaults to `APPROVE`.
|
|
13
|
+
# @return [ActOnAssistantActionRequestDecision]
|
|
14
|
+
attr_accessor :decision
|
|
15
|
+
|
|
16
|
+
# A mapping from model property names to API property names.
|
|
17
|
+
def self.names
|
|
18
|
+
@_hash = {} if @_hash.nil?
|
|
19
|
+
@_hash['decision'] = 'decision'
|
|
20
|
+
@_hash
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# An array for optional fields
|
|
24
|
+
def self.optionals
|
|
25
|
+
%w[
|
|
26
|
+
decision
|
|
27
|
+
]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# An array for nullable fields
|
|
31
|
+
def self.nullables
|
|
32
|
+
[]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def initialize(decision: ActOnAssistantActionRequestDecision::APPROVE,
|
|
36
|
+
additional_properties: nil)
|
|
37
|
+
# Add additional model properties to the instance
|
|
38
|
+
additional_properties = {} if additional_properties.nil?
|
|
39
|
+
|
|
40
|
+
@decision = decision unless decision == SKIP
|
|
41
|
+
@additional_properties = additional_properties
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
decision =
|
|
50
|
+
hash['decision'] ||= ActOnAssistantActionRequestDecision::APPROVE
|
|
51
|
+
|
|
52
|
+
# Create a new hash for additional properties, removing known properties.
|
|
53
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
54
|
+
|
|
55
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
56
|
+
new_hash, proc { |value| value }
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Create object from extracted values.
|
|
60
|
+
ActOnAssistantActionRequest.new(decision: decision,
|
|
61
|
+
additional_properties: additional_properties)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a human-readable string representation of the object.
|
|
65
|
+
def to_s
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} decision: #{@decision}, additional_properties: #{@additional_properties}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
71
|
+
def inspect
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} decision: #{@decision.inspect}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Whether to approve (apply) or reject the action. Defaults to `APPROVE`.
|
|
8
|
+
class ActOnAssistantActionRequestDecision
|
|
9
|
+
ACT_ON_ASSISTANT_ACTION_REQUEST_DECISION = [
|
|
10
|
+
# TODO: Write general description for APPROVE
|
|
11
|
+
APPROVE = 'APPROVE'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for REJECT
|
|
14
|
+
REJECT = 'REJECT'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
ACT_ON_ASSISTANT_ACTION_REQUEST_DECISION.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = APPROVE)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'approve' then APPROVE
|
|
30
|
+
when 'reject' then REJECT
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# Returned when a `POST /v1/assistants/{assistantId}/actions/{actionId}` call
|
|
8
|
+
# is accepted. Use `messageId` to poll the resulting assistant message.
|
|
9
|
+
class ActOnAssistantActionResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Opaque assistant message id for the assistant reply produced by acting on
|
|
14
|
+
# the action (e.g. `vg_mesg_...`). Poll `GET
|
|
15
|
+
# /v1/assistant-messages/{messageId}`.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :message_id
|
|
18
|
+
|
|
19
|
+
# A mapping from model property names to API property names.
|
|
20
|
+
def self.names
|
|
21
|
+
@_hash = {} if @_hash.nil?
|
|
22
|
+
@_hash['message_id'] = 'messageId'
|
|
23
|
+
@_hash
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# An array for optional fields
|
|
27
|
+
def self.optionals
|
|
28
|
+
[]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for nullable fields
|
|
32
|
+
def self.nullables
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def initialize(message_id:, additional_properties: nil)
|
|
37
|
+
# Add additional model properties to the instance
|
|
38
|
+
additional_properties = {} if additional_properties.nil?
|
|
39
|
+
|
|
40
|
+
@message_id = message_id
|
|
41
|
+
@additional_properties = additional_properties
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Creates an instance of the object from a hash.
|
|
45
|
+
def self.from_hash(hash)
|
|
46
|
+
return nil unless hash
|
|
47
|
+
|
|
48
|
+
# Extract variables from the hash.
|
|
49
|
+
message_id = hash.key?('messageId') ? hash['messageId'] : nil
|
|
50
|
+
|
|
51
|
+
# Create a new hash for additional properties, removing known properties.
|
|
52
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
53
|
+
|
|
54
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
55
|
+
new_hash, proc { |value| value }
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
ActOnAssistantActionResponse.new(message_id: message_id,
|
|
60
|
+
additional_properties: additional_properties)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Provides a human-readable string representation of the object.
|
|
64
|
+
def to_s
|
|
65
|
+
class_name = self.class.name.split('::').last
|
|
66
|
+
"<#{class_name} message_id: #{@message_id}, additional_properties:"\
|
|
67
|
+
" #{@additional_properties}>"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
71
|
+
def inspect
|
|
72
|
+
class_name = self.class.name.split('::').last
|
|
73
|
+
"<#{class_name} message_id: #{@message_id.inspect}, additional_properties:"\
|
|
74
|
+
" #{@additional_properties}>"
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# videogen
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module Videogen
|
|
7
|
+
# AddEntityReferenceRequest Model.
|
|
8
|
+
class AddEntityReferenceRequest < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The file id (e.g. `vg_file_...`) of an image to attach as a reference.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :file_id
|
|
15
|
+
|
|
16
|
+
# Optional description of the reference.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :description
|
|
19
|
+
|
|
20
|
+
# When true, make this the entity's primary reference (used for its
|
|
21
|
+
# thumbnail).
|
|
22
|
+
# @return [TrueClass | FalseClass]
|
|
23
|
+
attr_accessor :is_default
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['file_id'] = 'fileId'
|
|
29
|
+
@_hash['description'] = 'description'
|
|
30
|
+
@_hash['is_default'] = 'isDefault'
|
|
31
|
+
@_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for optional fields
|
|
35
|
+
def self.optionals
|
|
36
|
+
%w[
|
|
37
|
+
description
|
|
38
|
+
is_default
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(file_id:, description: SKIP, is_default: false,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@file_id = file_id
|
|
53
|
+
@description = description unless description == SKIP
|
|
54
|
+
@is_default = is_default unless is_default == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
file_id = hash.key?('fileId') ? hash['fileId'] : nil
|
|
64
|
+
description = hash.key?('description') ? hash['description'] : SKIP
|
|
65
|
+
is_default = hash['isDefault'] ||= false
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
AddEntityReferenceRequest.new(file_id: file_id,
|
|
76
|
+
description: description,
|
|
77
|
+
is_default: is_default,
|
|
78
|
+
additional_properties: additional_properties)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a human-readable string representation of the object.
|
|
82
|
+
def to_s
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} file_id: #{@file_id}, description: #{@description}, is_default:"\
|
|
85
|
+
" #{@is_default}, additional_properties: #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
89
|
+
def inspect
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} file_id: #{@file_id.inspect}, description: #{@description.inspect},"\
|
|
92
|
+
" is_default: #{@is_default.inspect}, additional_properties: #{@additional_properties}>"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
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
|
+
# Standard error body returned with every non-2xx response (the `default`
|
|
8
|
+
# response of every operation). The HTTP status code conveys the error class;
|
|
9
|
+
# this body carries the details: - `400` invalid request, `401` missing or
|
|
10
|
+
# invalid API key, `403` not permitted (e.g. plan or add-on required, see
|
|
11
|
+
# `requirement`), `404` not found, `409` conflict, `429` rate limited or out
|
|
12
|
+
# of credits, `5xx` server error. Common `code` values include
|
|
13
|
+
# `invalid_request`, `invalid_api_key`, `not_authorized`, `not_found`,
|
|
14
|
+
# `insufficient_credits`, and `rate_limited`. Always branch on `code` (and
|
|
15
|
+
# `requirement.type` when present) rather than parsing `message`.
|
|
16
|
+
class ApiError < BaseModel
|
|
17
|
+
SKIP = Object.new
|
|
18
|
+
private_constant :SKIP
|
|
19
|
+
|
|
20
|
+
# Human-readable error description. For display and logging only; do not
|
|
21
|
+
# branch on its exact text.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :message
|
|
24
|
+
|
|
25
|
+
# Machine-readable error code in snake_case (e.g. `invalid_api_key`,
|
|
26
|
+
# `insufficient_credits`). `null` when no specific code applies.
|
|
27
|
+
# @return [String]
|
|
28
|
+
attr_accessor :code
|
|
29
|
+
|
|
30
|
+
# What is needed to resolve the error. Present when the error can be fixed
|
|
31
|
+
# by fulfilling a specific requirement (e.g. purchasing an add-on); `null`
|
|
32
|
+
# otherwise.
|
|
33
|
+
# @return [ErrorRequirement]
|
|
34
|
+
attr_accessor :requirement
|
|
35
|
+
|
|
36
|
+
# Opaque internal error code for debugging. Include this when contacting
|
|
37
|
+
# support. `null` when not applicable.
|
|
38
|
+
# @return [String]
|
|
39
|
+
attr_accessor :internal_error_code
|
|
40
|
+
|
|
41
|
+
# A mapping from model property names to API property names.
|
|
42
|
+
def self.names
|
|
43
|
+
@_hash = {} if @_hash.nil?
|
|
44
|
+
@_hash['message'] = 'message'
|
|
45
|
+
@_hash['code'] = 'code'
|
|
46
|
+
@_hash['requirement'] = 'requirement'
|
|
47
|
+
@_hash['internal_error_code'] = 'internalErrorCode'
|
|
48
|
+
@_hash
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# An array for optional fields
|
|
52
|
+
def self.optionals
|
|
53
|
+
%w[
|
|
54
|
+
code
|
|
55
|
+
requirement
|
|
56
|
+
internal_error_code
|
|
57
|
+
]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# An array for nullable fields
|
|
61
|
+
def self.nullables
|
|
62
|
+
%w[
|
|
63
|
+
code
|
|
64
|
+
requirement
|
|
65
|
+
internal_error_code
|
|
66
|
+
]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def initialize(message:, code: SKIP, requirement: SKIP,
|
|
70
|
+
internal_error_code: SKIP, additional_properties: nil)
|
|
71
|
+
# Add additional model properties to the instance
|
|
72
|
+
additional_properties = {} if additional_properties.nil?
|
|
73
|
+
|
|
74
|
+
@message = message
|
|
75
|
+
@code = code unless code == SKIP
|
|
76
|
+
@requirement = requirement unless requirement == SKIP
|
|
77
|
+
@internal_error_code = internal_error_code unless internal_error_code == SKIP
|
|
78
|
+
@additional_properties = additional_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Creates an instance of the object from a hash.
|
|
82
|
+
def self.from_hash(hash)
|
|
83
|
+
return nil unless hash
|
|
84
|
+
|
|
85
|
+
# Extract variables from the hash.
|
|
86
|
+
message = hash.key?('message') ? hash['message'] : nil
|
|
87
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
88
|
+
requirement = ErrorRequirement.from_hash(hash['requirement']) if hash['requirement']
|
|
89
|
+
internal_error_code =
|
|
90
|
+
hash.key?('internalErrorCode') ? hash['internalErrorCode'] : SKIP
|
|
91
|
+
|
|
92
|
+
# Create a new hash for additional properties, removing known properties.
|
|
93
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
94
|
+
|
|
95
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
96
|
+
new_hash, proc { |value| value }
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
# Create object from extracted values.
|
|
100
|
+
ApiError.new(message: message,
|
|
101
|
+
code: code,
|
|
102
|
+
requirement: requirement,
|
|
103
|
+
internal_error_code: internal_error_code,
|
|
104
|
+
additional_properties: additional_properties)
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Validates an instance of the object from a given value.
|
|
108
|
+
# @param [ApiError | Hash] The value against the validation is performed.
|
|
109
|
+
def self.validate(value)
|
|
110
|
+
if value.instance_of? self
|
|
111
|
+
return APIHelper.valid_type?(value.message,
|
|
112
|
+
->(val) { val.instance_of? String })
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
return false unless value.instance_of? Hash
|
|
116
|
+
|
|
117
|
+
APIHelper.valid_type?(value['message'],
|
|
118
|
+
->(val) { val.instance_of? String })
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Provides a human-readable string representation of the object.
|
|
122
|
+
def to_s
|
|
123
|
+
class_name = self.class.name.split('::').last
|
|
124
|
+
"<#{class_name} message: #{@message}, code: #{@code}, requirement: #{@requirement},"\
|
|
125
|
+
" internal_error_code: #{@internal_error_code}, additional_properties:"\
|
|
126
|
+
" #{@additional_properties}>"
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
130
|
+
def inspect
|
|
131
|
+
class_name = self.class.name.split('::').last
|
|
132
|
+
"<#{class_name} message: #{@message.inspect}, code: #{@code.inspect}, requirement:"\
|
|
133
|
+
" #{@requirement.inspect}, internal_error_code: #{@internal_error_code.inspect},"\
|
|
134
|
+
" additional_properties: #{@additional_properties}>"
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
end
|