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.
Files changed (192) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +152 -0
  4. data/bin/console +15 -0
  5. data/lib/videogen/api_helper.rb +10 -0
  6. data/lib/videogen/apis/account_api.rb +31 -0
  7. data/lib/videogen/apis/assistant_api.rb +191 -0
  8. data/lib/videogen/apis/base_api.rb +67 -0
  9. data/lib/videogen/apis/entities_api.rb +230 -0
  10. data/lib/videogen/apis/files_api.rb +263 -0
  11. data/lib/videogen/apis/projects_api.rb +355 -0
  12. data/lib/videogen/apis/resources_api.rb +81 -0
  13. data/lib/videogen/apis/text_api.rb +39 -0
  14. data/lib/videogen/apis/tools_api.rb +494 -0
  15. data/lib/videogen/apis/webhooks_api.rb +94 -0
  16. data/lib/videogen/apis/workflows_api.rb +217 -0
  17. data/lib/videogen/client.rb +127 -0
  18. data/lib/videogen/configuration.rb +166 -0
  19. data/lib/videogen/exceptions/api_exception.rb +21 -0
  20. data/lib/videogen/http/api_response.rb +19 -0
  21. data/lib/videogen/http/auth/oauth_2.rb +53 -0
  22. data/lib/videogen/http/http_call_back.rb +10 -0
  23. data/lib/videogen/http/http_method_enum.rb +10 -0
  24. data/lib/videogen/http/http_request.rb +10 -0
  25. data/lib/videogen/http/http_response.rb +10 -0
  26. data/lib/videogen/http/proxy_settings.rb +22 -0
  27. data/lib/videogen/logging/configuration/api_logging_configuration.rb +186 -0
  28. data/lib/videogen/logging/sdk_logger.rb +17 -0
  29. data/lib/videogen/models/act_on_assistant_action_request.rb +77 -0
  30. data/lib/videogen/models/act_on_assistant_action_request_decision.rb +36 -0
  31. data/lib/videogen/models/act_on_assistant_action_response.rb +77 -0
  32. data/lib/videogen/models/add_entity_reference_request.rb +95 -0
  33. data/lib/videogen/models/api_error.rb +137 -0
  34. data/lib/videogen/models/aspect_ratio.rb +105 -0
  35. data/lib/videogen/models/aspect_ratio1.rb +82 -0
  36. data/lib/videogen/models/aspect_ratio2.rb +82 -0
  37. data/lib/videogen/models/aspect_ratio4.rb +83 -0
  38. data/lib/videogen/models/assistant_action.rb +148 -0
  39. data/lib/videogen/models/assistant_action_detail.rb +108 -0
  40. data/lib/videogen/models/assistant_action_detail1.rb +117 -0
  41. data/lib/videogen/models/assistant_action_kind.rb +52 -0
  42. data/lib/videogen/models/assistant_message.rb +167 -0
  43. data/lib/videogen/models/assistant_message1.rb +259 -0
  44. data/lib/videogen/models/assistant_message_attachment.rb +101 -0
  45. data/lib/videogen/models/assistant_message_status.rb +49 -0
  46. data/lib/videogen/models/assistant_workflow_suggestion.rb +133 -0
  47. data/lib/videogen/models/base_model.rb +110 -0
  48. data/lib/videogen/models/content_policy_config.rb +80 -0
  49. data/lib/videogen/models/create_entity_request.rb +96 -0
  50. data/lib/videogen/models/create_entity_request_entity_type.rb +47 -0
  51. data/lib/videogen/models/create_file_upload_request.rb +125 -0
  52. data/lib/videogen/models/create_timeline_interchange_request.rb +93 -0
  53. data/lib/videogen/models/create_timeline_interchange_response.rb +76 -0
  54. data/lib/videogen/models/create_webhook_endpoint_request.rb +94 -0
  55. data/lib/videogen/models/end_screen_mode.rb +43 -0
  56. data/lib/videogen/models/entity.rb +166 -0
  57. data/lib/videogen/models/entity_actor_config.rb +101 -0
  58. data/lib/videogen/models/entity_archive_response.rb +82 -0
  59. data/lib/videogen/models/entity_entity_type.rb +47 -0
  60. data/lib/videogen/models/entity_reference.rb +93 -0
  61. data/lib/videogen/models/error_requirement.rb +101 -0
  62. data/lib/videogen/models/executed_tool.rb +148 -0
  63. data/lib/videogen/models/export_delivery_destination.rb +110 -0
  64. data/lib/videogen/models/export_delivery_destination_type.rb +36 -0
  65. data/lib/videogen/models/export_project_quality.rb +44 -0
  66. data/lib/videogen/models/export_project_request.rb +124 -0
  67. data/lib/videogen/models/export_project_response.rb +76 -0
  68. data/lib/videogen/models/file_analysis_metadata.rb +112 -0
  69. data/lib/videogen/models/file_analysis_metadata1.rb +112 -0
  70. data/lib/videogen/models/file_analysis_metadata_analysis_loading_state.rb +48 -0
  71. data/lib/videogen/models/file_info.rb +386 -0
  72. data/lib/videogen/models/file_info1.rb +387 -0
  73. data/lib/videogen/models/file_info_scope.rb +54 -0
  74. data/lib/videogen/models/file_source.rb +134 -0
  75. data/lib/videogen/models/file_source_status.rb +46 -0
  76. data/lib/videogen/models/file_type.rb +57 -0
  77. data/lib/videogen/models/file_type1.rb +56 -0
  78. data/lib/videogen/models/file_type2.rb +57 -0
  79. data/lib/videogen/models/file_upload_response.rb +82 -0
  80. data/lib/videogen/models/generate_avatar_request.rb +149 -0
  81. data/lib/videogen/models/generate_image_request.rb +187 -0
  82. data/lib/videogen/models/generate_motion_graphic_request.rb +193 -0
  83. data/lib/videogen/models/generate_music_request.rb +111 -0
  84. data/lib/videogen/models/generate_sound_effect_request.rb +139 -0
  85. data/lib/videogen/models/generate_text_request.rb +120 -0
  86. data/lib/videogen/models/generate_text_response.rb +72 -0
  87. data/lib/videogen/models/generate_video_clip_request.rb +297 -0
  88. data/lib/videogen/models/get_assistant_response.rb +135 -0
  89. data/lib/videogen/models/get_files_response.rb +102 -0
  90. data/lib/videogen/models/image_asset_request.rb +125 -0
  91. data/lib/videogen/models/job_status.rb +51 -0
  92. data/lib/videogen/models/language.rb +83 -0
  93. data/lib/videogen/models/language_list_response.rb +83 -0
  94. data/lib/videogen/models/list_entities_response.rb +103 -0
  95. data/lib/videogen/models/list_project_exports_response.rb +104 -0
  96. data/lib/videogen/models/list_projects_response.rb +105 -0
  97. data/lib/videogen/models/list_remix_actions_response.rb +103 -0
  98. data/lib/videogen/models/me_response.rb +114 -0
  99. data/lib/videogen/models/model_quality.rb +51 -0
  100. data/lib/videogen/models/model_quality1.rb +47 -0
  101. data/lib/videogen/models/model_quality10.rb +46 -0
  102. data/lib/videogen/models/model_quality11.rb +46 -0
  103. data/lib/videogen/models/model_quality12.rb +45 -0
  104. data/lib/videogen/models/model_quality13.rb +46 -0
  105. data/lib/videogen/models/model_quality2.rb +46 -0
  106. data/lib/videogen/models/model_quality3.rb +46 -0
  107. data/lib/videogen/models/model_quality4.rb +48 -0
  108. data/lib/videogen/models/model_quality9.rb +47 -0
  109. data/lib/videogen/models/motion_graphic_sub_tool_mode.rb +44 -0
  110. data/lib/videogen/models/motion_graphic_sub_tool_mode1.rb +40 -0
  111. data/lib/videogen/models/motion_graphic_sub_tool_mode2.rb +41 -0
  112. data/lib/videogen/models/motion_graphic_sub_tool_mode3.rb +40 -0
  113. data/lib/videogen/models/motion_graphic_sub_tool_mode4.rb +40 -0
  114. data/lib/videogen/models/motion_graphic_sub_tool_modes.rb +114 -0
  115. data/lib/videogen/models/motion_graphic_sub_tool_modes1.rb +116 -0
  116. data/lib/videogen/models/project_export.rb +207 -0
  117. data/lib/videogen/models/project_response.rb +151 -0
  118. data/lib/videogen/models/project_response_status.rb +36 -0
  119. data/lib/videogen/models/prompt_to_video_clip_request.rb +155 -0
  120. data/lib/videogen/models/pronunciation_replacement.rb +82 -0
  121. data/lib/videogen/models/remix_action.rb +111 -0
  122. data/lib/videogen/models/remix_action1.rb +123 -0
  123. data/lib/videogen/models/remix_action10.rb +115 -0
  124. data/lib/videogen/models/remix_action11.rb +148 -0
  125. data/lib/videogen/models/remix_action12.rb +89 -0
  126. data/lib/videogen/models/remix_action13.rb +105 -0
  127. data/lib/videogen/models/remix_action14.rb +138 -0
  128. data/lib/videogen/models/remix_action2.rb +101 -0
  129. data/lib/videogen/models/remix_action3.rb +85 -0
  130. data/lib/videogen/models/remix_action4.rb +120 -0
  131. data/lib/videogen/models/remix_action5.rb +88 -0
  132. data/lib/videogen/models/remix_action6.rb +106 -0
  133. data/lib/videogen/models/remix_action7.rb +137 -0
  134. data/lib/videogen/models/remix_action8.rb +131 -0
  135. data/lib/videogen/models/remix_action9.rb +120 -0
  136. data/lib/videogen/models/remix_action_discriminator_mapping_set_logo_position.rb +53 -0
  137. data/lib/videogen/models/remix_action_run.rb +150 -0
  138. data/lib/videogen/models/remix_action_type.rb +88 -0
  139. data/lib/videogen/models/remix_project_request.rb +105 -0
  140. data/lib/videogen/models/remix_project_response.rb +101 -0
  141. data/lib/videogen/models/remix_transition_style.rb +58 -0
  142. data/lib/videogen/models/remove_entity_reference_request.rb +73 -0
  143. data/lib/videogen/models/scene_description_range.rb +121 -0
  144. data/lib/videogen/models/script_to_video_request.rb +309 -0
  145. data/lib/videogen/models/search_files_request.rb +96 -0
  146. data/lib/videogen/models/search_files_response.rb +82 -0
  147. data/lib/videogen/models/search_files_result.rb +85 -0
  148. data/lib/videogen/models/send_assistant_message_request.rb +73 -0
  149. data/lib/videogen/models/send_assistant_message_response.rb +76 -0
  150. data/lib/videogen/models/slideshow_to_video_request.rb +276 -0
  151. data/lib/videogen/models/start_assistant_chat_request.rb +88 -0
  152. data/lib/videogen/models/start_assistant_chat_response.rb +105 -0
  153. data/lib/videogen/models/start_tool_execution_response.rb +76 -0
  154. data/lib/videogen/models/start_workflow_run_response.rb +141 -0
  155. data/lib/videogen/models/text_to_speech_request.rb +191 -0
  156. data/lib/videogen/models/timeline_interchange.rb +210 -0
  157. data/lib/videogen/models/timeline_interchange_format.rb +47 -0
  158. data/lib/videogen/models/timeline_interchange_media_delivery.rb +39 -0
  159. data/lib/videogen/models/tool_execution_list_response.rb +104 -0
  160. data/lib/videogen/models/tool_success_result.rb +152 -0
  161. data/lib/videogen/models/transcript.rb +97 -0
  162. data/lib/videogen/models/transcript_word.rb +93 -0
  163. data/lib/videogen/models/tts_voice.rb +162 -0
  164. data/lib/videogen/models/tts_voice_display_gender.rb +40 -0
  165. data/lib/videogen/models/tts_voice_list_response.rb +103 -0
  166. data/lib/videogen/models/update_entity_request.rb +88 -0
  167. data/lib/videogen/models/v1_entities_get_parameters_entity_type.rb +44 -0
  168. data/lib/videogen/models/video_asset_request.rb +125 -0
  169. data/lib/videogen/models/visual_pacing.rb +41 -0
  170. data/lib/videogen/models/voiceover_to_video_request.rb +297 -0
  171. data/lib/videogen/models/watermark_mode.rb +43 -0
  172. data/lib/videogen/models/webhook_endpoint.rb +137 -0
  173. data/lib/videogen/models/webhook_endpoint_list_response.rb +103 -0
  174. data/lib/videogen/models/webhook_event_name.rb +100 -0
  175. data/lib/videogen/models/workflow_caption_background_style.rb +133 -0
  176. data/lib/videogen/models/workflow_caption_background_style_type.rb +41 -0
  177. data/lib/videogen/models/workflow_caption_style.rb +220 -0
  178. data/lib/videogen/models/workflow_caption_style_font_weight.rb +64 -0
  179. data/lib/videogen/models/workflow_caption_style_text_justification.rb +40 -0
  180. data/lib/videogen/models/workflow_caption_style_vertical_alignment.rb +40 -0
  181. data/lib/videogen/models/workflow_rgb_color.rb +116 -0
  182. data/lib/videogen/models/workflow_run.rb +150 -0
  183. data/lib/videogen/models/workflow_run_list_response.rb +103 -0
  184. data/lib/videogen/models/workflow_type.rb +52 -0
  185. data/lib/videogen/models/workflow_type1.rb +52 -0
  186. data/lib/videogen/models/workflow_visual_style.rb +136 -0
  187. data/lib/videogen/models/workflow_visual_style_type.rb +38 -0
  188. data/lib/videogen/utilities/date_time_helper.rb +11 -0
  189. data/lib/videogen/utilities/file_wrapper.rb +28 -0
  190. data/lib/videogen/utilities/union_type_lookup.rb +188 -0
  191. data/lib/videogen.rb +213 -0
  192. metadata +275 -0
@@ -0,0 +1,93 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A single timed word of a transcript.
8
+ class TranscriptWord < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Start time of the word in seconds from the beginning of the audio.
13
+ # @return [Float]
14
+ attr_accessor :start_seconds
15
+
16
+ # End time of the word in seconds from the beginning of the audio. Must be
17
+ # greater than `startSeconds`.
18
+ # @return [Float]
19
+ attr_accessor :end_seconds
20
+
21
+ # The spoken word, used verbatim for narration timing and captions.
22
+ # @return [String]
23
+ attr_accessor :word
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['start_seconds'] = 'startSeconds'
29
+ @_hash['end_seconds'] = 'endSeconds'
30
+ @_hash['word'] = 'word'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ []
42
+ end
43
+
44
+ def initialize(start_seconds:, end_seconds:, word:,
45
+ additional_properties: nil)
46
+ # Add additional model properties to the instance
47
+ additional_properties = {} if additional_properties.nil?
48
+
49
+ @start_seconds = start_seconds
50
+ @end_seconds = end_seconds
51
+ @word = word
52
+ @additional_properties = additional_properties
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ start_seconds = hash.key?('startSeconds') ? hash['startSeconds'] : nil
61
+ end_seconds = hash.key?('endSeconds') ? hash['endSeconds'] : nil
62
+ word = hash.key?('word') ? hash['word'] : nil
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
+ TranscriptWord.new(start_seconds: start_seconds,
73
+ end_seconds: end_seconds,
74
+ word: word,
75
+ additional_properties: additional_properties)
76
+ end
77
+
78
+ # Provides a human-readable string representation of the object.
79
+ def to_s
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} start_seconds: #{@start_seconds}, end_seconds: #{@end_seconds}, word:"\
82
+ " #{@word}, additional_properties: #{@additional_properties}>"
83
+ end
84
+
85
+ # Provides a debugging-friendly string with detailed object information.
86
+ def inspect
87
+ class_name = self.class.name.split('::').last
88
+ "<#{class_name} start_seconds: #{@start_seconds.inspect}, end_seconds:"\
89
+ " #{@end_seconds.inspect}, word: #{@word.inspect}, additional_properties:"\
90
+ " #{@additional_properties}>"
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,162 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A text-to-speech voice.
8
+ class TtsVoice < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Voice id (e.g. `vg_voic_...`). Pass this or `displayName` as `voiceId` to
13
+ # `POST /v1/tools/text-to-speech`.
14
+ # @return [String]
15
+ attr_accessor :voice_id
16
+
17
+ # Locale tag for the voice (e.g. `en-US`, `es-ES`).
18
+ # @return [String]
19
+ attr_accessor :language_code
20
+
21
+ # Human-readable voice name.
22
+ # @return [String]
23
+ attr_accessor :display_name
24
+
25
+ # Voice gender.
26
+ # @return [TtsVoiceDisplayGender]
27
+ attr_accessor :display_gender
28
+
29
+ # Accent (e.g. `american`, `british`).
30
+ # @return [String]
31
+ attr_accessor :accent
32
+
33
+ # Description of the voice.
34
+ # @return [String]
35
+ attr_accessor :description
36
+
37
+ # When false, this voice cannot be used directly with `POST
38
+ # /v1/tools/text-to-speech`. All voices, regardless of this field, can be
39
+ # used in full video generation workflows such as script-to-video.
40
+ # @return [TrueClass | FalseClass]
41
+ attr_accessor :supports_direct_tool_execution
42
+
43
+ # When true, this voice can synthesize text in any language regardless of
44
+ # its `languageCode`. When false, the voice only supports its listed
45
+ # language.
46
+ # @return [TrueClass | FalseClass]
47
+ attr_accessor :supports_all_languages
48
+
49
+ # When true, this voice is deprecated and may be removed in a future API
50
+ # version. Prefer non-deprecated voices for new integrations.
51
+ # @return [TrueClass | FalseClass]
52
+ attr_accessor :is_deprecated
53
+
54
+ # A mapping from model property names to API property names.
55
+ def self.names
56
+ @_hash = {} if @_hash.nil?
57
+ @_hash['voice_id'] = 'voiceId'
58
+ @_hash['language_code'] = 'languageCode'
59
+ @_hash['display_name'] = 'displayName'
60
+ @_hash['display_gender'] = 'displayGender'
61
+ @_hash['accent'] = 'accent'
62
+ @_hash['description'] = 'description'
63
+ @_hash['supports_direct_tool_execution'] = 'supportsDirectToolExecution'
64
+ @_hash['supports_all_languages'] = 'supportsAllLanguages'
65
+ @_hash['is_deprecated'] = 'isDeprecated'
66
+ @_hash
67
+ end
68
+
69
+ # An array for optional fields
70
+ def self.optionals
71
+ %w[
72
+ accent
73
+ description
74
+ ]
75
+ end
76
+
77
+ # An array for nullable fields
78
+ def self.nullables
79
+ %w[
80
+ accent
81
+ description
82
+ ]
83
+ end
84
+
85
+ def initialize(voice_id:, language_code:, display_name:, display_gender:,
86
+ supports_direct_tool_execution:, supports_all_languages:,
87
+ is_deprecated:, accent: SKIP, description: SKIP,
88
+ additional_properties: nil)
89
+ # Add additional model properties to the instance
90
+ additional_properties = {} if additional_properties.nil?
91
+
92
+ @voice_id = voice_id
93
+ @language_code = language_code
94
+ @display_name = display_name
95
+ @display_gender = display_gender
96
+ @accent = accent unless accent == SKIP
97
+ @description = description unless description == SKIP
98
+ @supports_direct_tool_execution = supports_direct_tool_execution
99
+ @supports_all_languages = supports_all_languages
100
+ @is_deprecated = is_deprecated
101
+ @additional_properties = additional_properties
102
+ end
103
+
104
+ # Creates an instance of the object from a hash.
105
+ def self.from_hash(hash)
106
+ return nil unless hash
107
+
108
+ # Extract variables from the hash.
109
+ voice_id = hash.key?('voiceId') ? hash['voiceId'] : nil
110
+ language_code = hash.key?('languageCode') ? hash['languageCode'] : nil
111
+ display_name = hash.key?('displayName') ? hash['displayName'] : nil
112
+ display_gender = hash.key?('displayGender') ? hash['displayGender'] : nil
113
+ supports_direct_tool_execution =
114
+ hash.key?('supportsDirectToolExecution') ? hash['supportsDirectToolExecution'] : nil
115
+ supports_all_languages =
116
+ hash.key?('supportsAllLanguages') ? hash['supportsAllLanguages'] : nil
117
+ is_deprecated = hash.key?('isDeprecated') ? hash['isDeprecated'] : nil
118
+ accent = hash.key?('accent') ? hash['accent'] : SKIP
119
+ description = hash.key?('description') ? hash['description'] : SKIP
120
+
121
+ # Create a new hash for additional properties, removing known properties.
122
+ new_hash = hash.reject { |k, _| names.value?(k) }
123
+
124
+ additional_properties = APIHelper.get_additional_properties(
125
+ new_hash, proc { |value| value }
126
+ )
127
+
128
+ # Create object from extracted values.
129
+ TtsVoice.new(voice_id: voice_id,
130
+ language_code: language_code,
131
+ display_name: display_name,
132
+ display_gender: display_gender,
133
+ supports_direct_tool_execution: supports_direct_tool_execution,
134
+ supports_all_languages: supports_all_languages,
135
+ is_deprecated: is_deprecated,
136
+ accent: accent,
137
+ description: description,
138
+ additional_properties: additional_properties)
139
+ end
140
+
141
+ # Provides a human-readable string representation of the object.
142
+ def to_s
143
+ class_name = self.class.name.split('::').last
144
+ "<#{class_name} voice_id: #{@voice_id}, language_code: #{@language_code}, display_name:"\
145
+ " #{@display_name}, display_gender: #{@display_gender}, accent: #{@accent}, description:"\
146
+ " #{@description}, supports_direct_tool_execution: #{@supports_direct_tool_execution},"\
147
+ " supports_all_languages: #{@supports_all_languages}, is_deprecated: #{@is_deprecated},"\
148
+ " additional_properties: #{@additional_properties}>"
149
+ end
150
+
151
+ # Provides a debugging-friendly string with detailed object information.
152
+ def inspect
153
+ class_name = self.class.name.split('::').last
154
+ "<#{class_name} voice_id: #{@voice_id.inspect}, language_code: #{@language_code.inspect},"\
155
+ " display_name: #{@display_name.inspect}, display_gender: #{@display_gender.inspect},"\
156
+ " accent: #{@accent.inspect}, description: #{@description.inspect},"\
157
+ " supports_direct_tool_execution: #{@supports_direct_tool_execution.inspect},"\
158
+ " supports_all_languages: #{@supports_all_languages.inspect}, is_deprecated:"\
159
+ " #{@is_deprecated.inspect}, additional_properties: #{@additional_properties}>"
160
+ end
161
+ end
162
+ end
@@ -0,0 +1,40 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Voice gender.
8
+ class TtsVoiceDisplayGender
9
+ TTS_VOICE_DISPLAY_GENDER = [
10
+ # TODO: Write general description for MALE
11
+ MALE = 'MALE'.freeze,
12
+
13
+ # TODO: Write general description for FEMALE
14
+ FEMALE = 'FEMALE'.freeze,
15
+
16
+ # TODO: Write general description for NEUTRAL
17
+ NEUTRAL = 'NEUTRAL'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ TTS_VOICE_DISPLAY_GENDER.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = MALE)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'male' then MALE
33
+ when 'female' then FEMALE
34
+ when 'neutral' then NEUTRAL
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,103 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # TtsVoiceListResponse Model.
8
+ class TtsVoiceListResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[TtsVoice]]
14
+ attr_accessor :tts_voices
15
+
16
+ # When true, there are more voices available. Pass `nextCursor` as the
17
+ # `cursor` query param to fetch the next page.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :has_more
20
+
21
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
22
+ # @return [String]
23
+ attr_accessor :next_cursor
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['tts_voices'] = 'ttsVoices'
29
+ @_hash['has_more'] = 'hasMore'
30
+ @_hash['next_cursor'] = 'nextCursor'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ %w[
42
+ next_cursor
43
+ ]
44
+ end
45
+
46
+ def initialize(tts_voices:, has_more:, next_cursor:,
47
+ additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @tts_voices = tts_voices
52
+ @has_more = has_more
53
+ @next_cursor = next_cursor
54
+ @additional_properties = additional_properties
55
+ end
56
+
57
+ # Creates an instance of the object from a hash.
58
+ def self.from_hash(hash)
59
+ return nil unless hash
60
+
61
+ # Extract variables from the hash.
62
+ # Parameter is an array, so we need to iterate through it
63
+ tts_voices = nil
64
+ unless hash['ttsVoices'].nil?
65
+ tts_voices = []
66
+ hash['ttsVoices'].each do |structure|
67
+ tts_voices << (TtsVoice.from_hash(structure) if structure)
68
+ end
69
+ end
70
+
71
+ tts_voices = nil unless hash.key?('ttsVoices')
72
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
73
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
74
+
75
+ # Create a new hash for additional properties, removing known properties.
76
+ new_hash = hash.reject { |k, _| names.value?(k) }
77
+
78
+ additional_properties = APIHelper.get_additional_properties(
79
+ new_hash, proc { |value| value }
80
+ )
81
+
82
+ # Create object from extracted values.
83
+ TtsVoiceListResponse.new(tts_voices: tts_voices,
84
+ has_more: has_more,
85
+ next_cursor: next_cursor,
86
+ additional_properties: additional_properties)
87
+ end
88
+
89
+ # Provides a human-readable string representation of the object.
90
+ def to_s
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} tts_voices: #{@tts_voices}, has_more: #{@has_more}, next_cursor:"\
93
+ " #{@next_cursor}, additional_properties: #{@additional_properties}>"
94
+ end
95
+
96
+ # Provides a debugging-friendly string with detailed object information.
97
+ def inspect
98
+ class_name = self.class.name.split('::').last
99
+ "<#{class_name} tts_voices: #{@tts_voices.inspect}, has_more: #{@has_more.inspect},"\
100
+ " next_cursor: #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,88 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # At least one field must be provided.
8
+ class UpdateEntityRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # New display name. Omit to leave unchanged.
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # New description. Omit to leave unchanged.
17
+ # @return [String]
18
+ attr_accessor :description
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['name'] = 'name'
24
+ @_hash['description'] = 'description'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ name
32
+ description
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ %w[
39
+ name
40
+ description
41
+ ]
42
+ end
43
+
44
+ def initialize(name: SKIP, description: SKIP, additional_properties: nil)
45
+ # Add additional model properties to the instance
46
+ additional_properties = {} if additional_properties.nil?
47
+
48
+ @name = name unless name == SKIP
49
+ @description = description unless description == 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
+ name = hash.key?('name') ? hash['name'] : SKIP
59
+ description = hash.key?('description') ? hash['description'] : SKIP
60
+
61
+ # Create a new hash for additional properties, removing known properties.
62
+ new_hash = hash.reject { |k, _| names.value?(k) }
63
+
64
+ additional_properties = APIHelper.get_additional_properties(
65
+ new_hash, proc { |value| value }
66
+ )
67
+
68
+ # Create object from extracted values.
69
+ UpdateEntityRequest.new(name: name,
70
+ description: description,
71
+ additional_properties: additional_properties)
72
+ end
73
+
74
+ # Provides a human-readable string representation of the object.
75
+ def to_s
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} name: #{@name}, description: #{@description}, additional_properties:"\
78
+ " #{@additional_properties}>"
79
+ end
80
+
81
+ # Provides a debugging-friendly string with detailed object information.
82
+ def inspect
83
+ class_name = self.class.name.split('::').last
84
+ "<#{class_name} name: #{@name.inspect}, description: #{@description.inspect},"\
85
+ " additional_properties: #{@additional_properties}>"
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,44 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # V1EntitiesGetParametersEntityType.
8
+ class V1EntitiesGetParametersEntityType
9
+ V1_ENTITIES_GET_PARAMETERS_ENTITY_TYPE = [
10
+ # TODO: Write general description for ACTOR
11
+ ACTOR = 'ACTOR'.freeze,
12
+
13
+ # TODO: Write general description for PRODUCT
14
+ PRODUCT = 'PRODUCT'.freeze,
15
+
16
+ # TODO: Write general description for VISUAL_STYLE
17
+ VISUAL_STYLE = 'VISUAL_STYLE'.freeze,
18
+
19
+ # TODO: Write general description for SLIDESHOW_THEME
20
+ SLIDESHOW_THEME = 'SLIDESHOW_THEME'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ V1_ENTITIES_GET_PARAMETERS_ENTITY_TYPE.include?(value)
27
+ end
28
+
29
+ def self.from_value(value, default_value = ACTOR)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'actor' then ACTOR
36
+ when 'product' then PRODUCT
37
+ when 'visual_style' then VISUAL_STYLE
38
+ when 'slideshow_theme' then SLIDESHOW_THEME
39
+ else
40
+ default_value
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,125 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # VideoAssetRequest Model.
8
+ class VideoAssetRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # File id of the source video (e.g. `vg_file_...`). Upload a file first via
13
+ # `POST /v1/files/upload`, then pass the returned id here.
14
+ # @return [String]
15
+ attr_accessor :video_file_id
16
+
17
+ # Controls whether the VideoGen watermark is applied to the output. `AUTO`
18
+ # applies the watermark unless you have a Pro plan. `VIDEO_GEN` always
19
+ # applies it. `NONE` removes the watermark (requires Pro; returns an error
20
+ # if you don't have it).
21
+ # @return [WatermarkMode]
22
+ attr_accessor :watermark_mode
23
+
24
+ # Number of output results to generate. Defaults to 1.
25
+ # @return [Integer]
26
+ attr_accessor :num_results
27
+
28
+ # When true, generated files are temporary. Temporary files are guaranteed
29
+ # to be available for 24 hours, after which they may be archived at any
30
+ # time. Temporary files are not analyzed (no description, transcript, or
31
+ # embedding will be generated), so they will not appear in search results.
32
+ # Defaults to false.
33
+ # @return [TrueClass | FalseClass]
34
+ attr_accessor :is_output_temporary
35
+
36
+ # When true, generated files are hidden from the VideoGen Media page by
37
+ # default. They remain accessible through the API. Defaults to false.
38
+ # @return [TrueClass | FalseClass]
39
+ attr_accessor :hide_from_ui
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['video_file_id'] = 'videoFileId'
45
+ @_hash['watermark_mode'] = 'watermarkMode'
46
+ @_hash['num_results'] = 'numResults'
47
+ @_hash['is_output_temporary'] = 'isOutputTemporary'
48
+ @_hash['hide_from_ui'] = 'hideFromUi'
49
+ @_hash
50
+ end
51
+
52
+ # An array for optional fields
53
+ def self.optionals
54
+ %w[
55
+ watermark_mode
56
+ num_results
57
+ is_output_temporary
58
+ hide_from_ui
59
+ ]
60
+ end
61
+
62
+ # An array for nullable fields
63
+ def self.nullables
64
+ []
65
+ end
66
+
67
+ def initialize(video_file_id:, watermark_mode: WatermarkMode::AUTO,
68
+ num_results: 1, is_output_temporary: false,
69
+ hide_from_ui: false, additional_properties: nil)
70
+ # Add additional model properties to the instance
71
+ additional_properties = {} if additional_properties.nil?
72
+
73
+ @video_file_id = video_file_id
74
+ @watermark_mode = watermark_mode unless watermark_mode == SKIP
75
+ @num_results = num_results unless num_results == SKIP
76
+ @is_output_temporary = is_output_temporary unless is_output_temporary == SKIP
77
+ @hide_from_ui = hide_from_ui unless hide_from_ui == 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
+ video_file_id = hash.key?('videoFileId') ? hash['videoFileId'] : nil
87
+ watermark_mode = hash['watermarkMode'] ||= WatermarkMode::AUTO
88
+ num_results = hash['numResults'] ||= 1
89
+ is_output_temporary = hash['isOutputTemporary'] ||= false
90
+ hide_from_ui = hash['hideFromUi'] ||= false
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
+ VideoAssetRequest.new(video_file_id: video_file_id,
101
+ watermark_mode: watermark_mode,
102
+ num_results: num_results,
103
+ is_output_temporary: is_output_temporary,
104
+ hide_from_ui: hide_from_ui,
105
+ additional_properties: additional_properties)
106
+ end
107
+
108
+ # Provides a human-readable string representation of the object.
109
+ def to_s
110
+ class_name = self.class.name.split('::').last
111
+ "<#{class_name} video_file_id: #{@video_file_id}, watermark_mode: #{@watermark_mode},"\
112
+ " num_results: #{@num_results}, is_output_temporary: #{@is_output_temporary}, hide_from_ui:"\
113
+ " #{@hide_from_ui}, additional_properties: #{@additional_properties}>"
114
+ end
115
+
116
+ # Provides a debugging-friendly string with detailed object information.
117
+ def inspect
118
+ class_name = self.class.name.split('::').last
119
+ "<#{class_name} video_file_id: #{@video_file_id.inspect}, watermark_mode:"\
120
+ " #{@watermark_mode.inspect}, num_results: #{@num_results.inspect}, is_output_temporary:"\
121
+ " #{@is_output_temporary.inspect}, hide_from_ui: #{@hide_from_ui.inspect},"\
122
+ " additional_properties: #{@additional_properties}>"
123
+ end
124
+ end
125
+ end
@@ -0,0 +1,41 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # How quickly visuals change. FAST shows more, shorter shots; SLOW holds each
8
+ # visual longer. Defaults to MEDIUM.
9
+ class VisualPacing
10
+ VISUAL_PACING = [
11
+ # TODO: Write general description for FAST
12
+ FAST = 'FAST'.freeze,
13
+
14
+ # TODO: Write general description for MEDIUM
15
+ MEDIUM = 'MEDIUM'.freeze,
16
+
17
+ # TODO: Write general description for SLOW
18
+ SLOW = 'SLOW'.freeze
19
+ ].freeze
20
+
21
+ def self.validate(value)
22
+ return false if value.nil?
23
+
24
+ VISUAL_PACING.include?(value)
25
+ end
26
+
27
+ def self.from_value(value, default_value = FAST)
28
+ return default_value if value.nil?
29
+
30
+ str = value.to_s.strip
31
+
32
+ case str.downcase
33
+ when 'fast' then FAST
34
+ when 'medium' then MEDIUM
35
+ when 'slow' then SLOW
36
+ else
37
+ default_value
38
+ end
39
+ end
40
+ end
41
+ end