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,41 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Whether the motion graphic may generate video clips. Requires a paid plan.
8
+ # Defaults to AUTO.
9
+ class MotionGraphicSubToolMode2
10
+ MOTION_GRAPHIC_SUB_TOOL_MODE2 = [
11
+ # TODO: Write general description for AUTO
12
+ AUTO = 'AUTO'.freeze,
13
+
14
+ # TODO: Write general description for ENABLED
15
+ ENABLED = 'ENABLED'.freeze,
16
+
17
+ # TODO: Write general description for DISABLED
18
+ DISABLED = 'DISABLED'.freeze
19
+ ].freeze
20
+
21
+ def self.validate(value)
22
+ return false if value.nil?
23
+
24
+ MOTION_GRAPHIC_SUB_TOOL_MODE2.include?(value)
25
+ end
26
+
27
+ def self.from_value(value, default_value = AUTO)
28
+ return default_value if value.nil?
29
+
30
+ str = value.to_s.strip
31
+
32
+ case str.downcase
33
+ when 'auto' then AUTO
34
+ when 'enabled' then ENABLED
35
+ when 'disabled' then DISABLED
36
+ else
37
+ default_value
38
+ end
39
+ end
40
+ end
41
+ 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
+ # Whether the motion graphic may generate voiceover audio. Defaults to AUTO.
8
+ class MotionGraphicSubToolMode3
9
+ MOTION_GRAPHIC_SUB_TOOL_MODE3 = [
10
+ # TODO: Write general description for AUTO
11
+ AUTO = 'AUTO'.freeze,
12
+
13
+ # TODO: Write general description for ENABLED
14
+ ENABLED = 'ENABLED'.freeze,
15
+
16
+ # TODO: Write general description for DISABLED
17
+ DISABLED = 'DISABLED'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ MOTION_GRAPHIC_SUB_TOOL_MODE3.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = AUTO)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'auto' then AUTO
33
+ when 'enabled' then ENABLED
34
+ when 'disabled' then DISABLED
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ 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
+ # Whether the motion graphic may search stock media. Defaults to AUTO.
8
+ class MotionGraphicSubToolMode4
9
+ MOTION_GRAPHIC_SUB_TOOL_MODE4 = [
10
+ # TODO: Write general description for AUTO
11
+ AUTO = 'AUTO'.freeze,
12
+
13
+ # TODO: Write general description for ENABLED
14
+ ENABLED = 'ENABLED'.freeze,
15
+
16
+ # TODO: Write general description for DISABLED
17
+ DISABLED = 'DISABLED'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ MOTION_GRAPHIC_SUB_TOOL_MODE4.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = AUTO)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'auto' then AUTO
33
+ when 'enabled' then ENABLED
34
+ when 'disabled' then DISABLED
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,114 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Per-capability access modes for a motion graphic. Any omitted capability
8
+ # defaults to AUTO.
9
+ class MotionGraphicSubToolModes < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Whether the motion graphic may generate images. Defaults to AUTO.
14
+ # @return [MotionGraphicSubToolMode1]
15
+ attr_accessor :generate_images
16
+
17
+ # Whether the motion graphic may generate video clips. Requires a paid plan.
18
+ # Defaults to AUTO.
19
+ # @return [MotionGraphicSubToolMode2]
20
+ attr_accessor :generate_video_clips
21
+
22
+ # Whether the motion graphic may generate voiceover audio. Defaults to AUTO.
23
+ # @return [MotionGraphicSubToolMode3]
24
+ attr_accessor :generate_voiceover
25
+
26
+ # Whether the motion graphic may search stock media. Defaults to AUTO.
27
+ # @return [MotionGraphicSubToolMode4]
28
+ attr_accessor :search_stock_media
29
+
30
+ # A mapping from model property names to API property names.
31
+ def self.names
32
+ @_hash = {} if @_hash.nil?
33
+ @_hash['generate_images'] = 'generateImages'
34
+ @_hash['generate_video_clips'] = 'generateVideoClips'
35
+ @_hash['generate_voiceover'] = 'generateVoiceover'
36
+ @_hash['search_stock_media'] = 'searchStockMedia'
37
+ @_hash
38
+ end
39
+
40
+ # An array for optional fields
41
+ def self.optionals
42
+ %w[
43
+ generate_images
44
+ generate_video_clips
45
+ generate_voiceover
46
+ search_stock_media
47
+ ]
48
+ end
49
+
50
+ # An array for nullable fields
51
+ def self.nullables
52
+ []
53
+ end
54
+
55
+ def initialize(generate_images: SKIP, generate_video_clips: SKIP,
56
+ generate_voiceover: SKIP, search_stock_media: SKIP,
57
+ additional_properties: nil)
58
+ # Add additional model properties to the instance
59
+ additional_properties = {} if additional_properties.nil?
60
+
61
+ @generate_images = generate_images unless generate_images == SKIP
62
+ @generate_video_clips = generate_video_clips unless generate_video_clips == SKIP
63
+ @generate_voiceover = generate_voiceover unless generate_voiceover == SKIP
64
+ @search_stock_media = search_stock_media unless search_stock_media == SKIP
65
+ @additional_properties = additional_properties
66
+ end
67
+
68
+ # Creates an instance of the object from a hash.
69
+ def self.from_hash(hash)
70
+ return nil unless hash
71
+
72
+ # Extract variables from the hash.
73
+ generate_images =
74
+ hash.key?('generateImages') ? hash['generateImages'] : SKIP
75
+ generate_video_clips =
76
+ hash.key?('generateVideoClips') ? hash['generateVideoClips'] : SKIP
77
+ generate_voiceover =
78
+ hash.key?('generateVoiceover') ? hash['generateVoiceover'] : SKIP
79
+ search_stock_media =
80
+ hash.key?('searchStockMedia') ? hash['searchStockMedia'] : SKIP
81
+
82
+ # Create a new hash for additional properties, removing known properties.
83
+ new_hash = hash.reject { |k, _| names.value?(k) }
84
+
85
+ additional_properties = APIHelper.get_additional_properties(
86
+ new_hash, proc { |value| value }
87
+ )
88
+
89
+ # Create object from extracted values.
90
+ MotionGraphicSubToolModes.new(generate_images: generate_images,
91
+ generate_video_clips: generate_video_clips,
92
+ generate_voiceover: generate_voiceover,
93
+ search_stock_media: search_stock_media,
94
+ additional_properties: additional_properties)
95
+ end
96
+
97
+ # Provides a human-readable string representation of the object.
98
+ def to_s
99
+ class_name = self.class.name.split('::').last
100
+ "<#{class_name} generate_images: #{@generate_images}, generate_video_clips:"\
101
+ " #{@generate_video_clips}, generate_voiceover: #{@generate_voiceover}, search_stock_media:"\
102
+ " #{@search_stock_media}, additional_properties: #{@additional_properties}>"
103
+ end
104
+
105
+ # Provides a debugging-friendly string with detailed object information.
106
+ def inspect
107
+ class_name = self.class.name.split('::').last
108
+ "<#{class_name} generate_images: #{@generate_images.inspect}, generate_video_clips:"\
109
+ " #{@generate_video_clips.inspect}, generate_voiceover: #{@generate_voiceover.inspect},"\
110
+ " search_stock_media: #{@search_stock_media.inspect}, additional_properties:"\
111
+ " #{@additional_properties}>"
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,116 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Optional per-capability controls for the media the motion graphic may
8
+ # generate or fetch (generated images, generated video clips, generated
9
+ # voiceover, and stock media search). Each capability is AUTO, ENABLED, or
10
+ # DISABLED. Omit to use AUTO for every capability.
11
+ class MotionGraphicSubToolModes1 < BaseModel
12
+ SKIP = Object.new
13
+ private_constant :SKIP
14
+
15
+ # Whether the motion graphic may generate images. Defaults to AUTO.
16
+ # @return [MotionGraphicSubToolMode1]
17
+ attr_accessor :generate_images
18
+
19
+ # Whether the motion graphic may generate video clips. Requires a paid plan.
20
+ # Defaults to AUTO.
21
+ # @return [MotionGraphicSubToolMode2]
22
+ attr_accessor :generate_video_clips
23
+
24
+ # Whether the motion graphic may generate voiceover audio. Defaults to AUTO.
25
+ # @return [MotionGraphicSubToolMode3]
26
+ attr_accessor :generate_voiceover
27
+
28
+ # Whether the motion graphic may search stock media. Defaults to AUTO.
29
+ # @return [MotionGraphicSubToolMode4]
30
+ attr_accessor :search_stock_media
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['generate_images'] = 'generateImages'
36
+ @_hash['generate_video_clips'] = 'generateVideoClips'
37
+ @_hash['generate_voiceover'] = 'generateVoiceover'
38
+ @_hash['search_stock_media'] = 'searchStockMedia'
39
+ @_hash
40
+ end
41
+
42
+ # An array for optional fields
43
+ def self.optionals
44
+ %w[
45
+ generate_images
46
+ generate_video_clips
47
+ generate_voiceover
48
+ search_stock_media
49
+ ]
50
+ end
51
+
52
+ # An array for nullable fields
53
+ def self.nullables
54
+ []
55
+ end
56
+
57
+ def initialize(generate_images: SKIP, generate_video_clips: SKIP,
58
+ generate_voiceover: SKIP, search_stock_media: SKIP,
59
+ additional_properties: nil)
60
+ # Add additional model properties to the instance
61
+ additional_properties = {} if additional_properties.nil?
62
+
63
+ @generate_images = generate_images unless generate_images == SKIP
64
+ @generate_video_clips = generate_video_clips unless generate_video_clips == SKIP
65
+ @generate_voiceover = generate_voiceover unless generate_voiceover == SKIP
66
+ @search_stock_media = search_stock_media unless search_stock_media == SKIP
67
+ @additional_properties = additional_properties
68
+ end
69
+
70
+ # Creates an instance of the object from a hash.
71
+ def self.from_hash(hash)
72
+ return nil unless hash
73
+
74
+ # Extract variables from the hash.
75
+ generate_images =
76
+ hash.key?('generateImages') ? hash['generateImages'] : SKIP
77
+ generate_video_clips =
78
+ hash.key?('generateVideoClips') ? hash['generateVideoClips'] : SKIP
79
+ generate_voiceover =
80
+ hash.key?('generateVoiceover') ? hash['generateVoiceover'] : SKIP
81
+ search_stock_media =
82
+ hash.key?('searchStockMedia') ? hash['searchStockMedia'] : SKIP
83
+
84
+ # Create a new hash for additional properties, removing known properties.
85
+ new_hash = hash.reject { |k, _| names.value?(k) }
86
+
87
+ additional_properties = APIHelper.get_additional_properties(
88
+ new_hash, proc { |value| value }
89
+ )
90
+
91
+ # Create object from extracted values.
92
+ MotionGraphicSubToolModes1.new(generate_images: generate_images,
93
+ generate_video_clips: generate_video_clips,
94
+ generate_voiceover: generate_voiceover,
95
+ search_stock_media: search_stock_media,
96
+ additional_properties: additional_properties)
97
+ end
98
+
99
+ # Provides a human-readable string representation of the object.
100
+ def to_s
101
+ class_name = self.class.name.split('::').last
102
+ "<#{class_name} generate_images: #{@generate_images}, generate_video_clips:"\
103
+ " #{@generate_video_clips}, generate_voiceover: #{@generate_voiceover}, search_stock_media:"\
104
+ " #{@search_stock_media}, additional_properties: #{@additional_properties}>"
105
+ end
106
+
107
+ # Provides a debugging-friendly string with detailed object information.
108
+ def inspect
109
+ class_name = self.class.name.split('::').last
110
+ "<#{class_name} generate_images: #{@generate_images.inspect}, generate_video_clips:"\
111
+ " #{@generate_video_clips.inspect}, generate_voiceover: #{@generate_voiceover.inspect},"\
112
+ " search_stock_media: #{@search_stock_media.inspect}, additional_properties:"\
113
+ " #{@additional_properties}>"
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,207 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # ProjectExport Model.
8
+ class ProjectExport < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Opaque export id (e.g. `vg_expo_...`) matching the original request.
13
+ # @return [String]
14
+ attr_accessor :export_id
15
+
16
+ # Id of the exported project (e.g. `vg_proj_...`).
17
+ # @return [String]
18
+ attr_accessor :project_id
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
+ # Completion progress for the current attempt (0-100). Always `100` when
28
+ # `status` is `succeeded`.
29
+ # @return [Float]
30
+ attr_accessor :progress_percentage
31
+
32
+ # Zero-based index of the current or most recent export attempt.
33
+ # @return [Integer]
34
+ attr_accessor :attempt_index
35
+
36
+ # Private signed MP4 download URL, valid for 7 days from when it was signed.
37
+ # Always present as a field; `null` until `status` is `succeeded`. This
38
+ # endpoint automatically re-signs the URL when it is within an hour of
39
+ # expiring, so a fresh call to get the export always returns a URL valid
40
+ # long enough to use. See `downloadUrlExpiresAt` for the exact expiry. To
41
+ # fetch a fresh URL directly from the underlying file at any time, use
42
+ # `exportFileId` with the hydrate-file endpoint.
43
+ # @return [String]
44
+ attr_accessor :download_url
45
+
46
+ # Seconds since epoch (Unix timestamp) when `downloadUrl` expires. `null`
47
+ # while `downloadUrl` is null.
48
+ # @return [Integer]
49
+ attr_accessor :download_url_expires_at
50
+
51
+ # Private signed thumbnail URL, valid for 7 days from when it was signed.
52
+ # Always present as a field; `null` until `status` is `succeeded` (and when
53
+ # no thumbnail is available). Re-signed automatically on the same terms as
54
+ # `downloadUrl`.
55
+ # @return [String]
56
+ attr_accessor :thumbnail_url
57
+
58
+ # Seconds since epoch (Unix timestamp) when `thumbnailUrl` expires. `null`
59
+ # while `thumbnailUrl` is null.
60
+ # @return [Integer]
61
+ attr_accessor :thumbnail_url_expires_at
62
+
63
+ # File id (e.g. `vg_file_...`) of the exported MP4. Always present as a
64
+ # field; `null` until `status` is `succeeded`. Pass it to `POST
65
+ # /v1/files/{fileId}/hydrate` to fetch fresh signed URLs directly from the
66
+ # file at any time, which is useful once the 24-hour URLs above have
67
+ # expired.
68
+ # @return [String]
69
+ attr_accessor :export_file_id
70
+
71
+ # Hydrated export file metadata with signed download URLs. Always present as
72
+ # a field; `null` until `status` is `succeeded`. Its signed URLs follow the
73
+ # same 24-hour validity and automatic re-signing as `downloadUrl`.
74
+ # @return [FileInfo]
75
+ attr_accessor :file
76
+
77
+ # Error details. Always present as a field; `null` unless `status` is
78
+ # `failed`.
79
+ # @return [ApiError]
80
+ attr_accessor :error
81
+
82
+ # A mapping from model property names to API property names.
83
+ def self.names
84
+ @_hash = {} if @_hash.nil?
85
+ @_hash['export_id'] = 'exportId'
86
+ @_hash['project_id'] = 'projectId'
87
+ @_hash['status'] = 'status'
88
+ @_hash['progress_percentage'] = 'progressPercentage'
89
+ @_hash['attempt_index'] = 'attemptIndex'
90
+ @_hash['download_url'] = 'downloadUrl'
91
+ @_hash['download_url_expires_at'] = 'downloadUrlExpiresAt'
92
+ @_hash['thumbnail_url'] = 'thumbnailUrl'
93
+ @_hash['thumbnail_url_expires_at'] = 'thumbnailUrlExpiresAt'
94
+ @_hash['export_file_id'] = 'exportFileId'
95
+ @_hash['file'] = 'file'
96
+ @_hash['error'] = 'error'
97
+ @_hash
98
+ end
99
+
100
+ # An array for optional fields
101
+ def self.optionals
102
+ []
103
+ end
104
+
105
+ # An array for nullable fields
106
+ def self.nullables
107
+ %w[
108
+ download_url
109
+ download_url_expires_at
110
+ thumbnail_url
111
+ thumbnail_url_expires_at
112
+ export_file_id
113
+ file
114
+ error
115
+ ]
116
+ end
117
+
118
+ def initialize(export_id:, project_id:, status:, progress_percentage:,
119
+ attempt_index:, download_url:, download_url_expires_at:,
120
+ thumbnail_url:, thumbnail_url_expires_at:, export_file_id:,
121
+ file:, error:, additional_properties: nil)
122
+ # Add additional model properties to the instance
123
+ additional_properties = {} if additional_properties.nil?
124
+
125
+ @export_id = export_id
126
+ @project_id = project_id
127
+ @status = status
128
+ @progress_percentage = progress_percentage
129
+ @attempt_index = attempt_index
130
+ @download_url = download_url
131
+ @download_url_expires_at = download_url_expires_at
132
+ @thumbnail_url = thumbnail_url
133
+ @thumbnail_url_expires_at = thumbnail_url_expires_at
134
+ @export_file_id = export_file_id
135
+ @file = file
136
+ @error = error
137
+ @additional_properties = additional_properties
138
+ end
139
+
140
+ # Creates an instance of the object from a hash.
141
+ def self.from_hash(hash)
142
+ return nil unless hash
143
+
144
+ # Extract variables from the hash.
145
+ export_id = hash.key?('exportId') ? hash['exportId'] : nil
146
+ project_id = hash.key?('projectId') ? hash['projectId'] : nil
147
+ status = hash.key?('status') ? hash['status'] : nil
148
+ progress_percentage =
149
+ hash.key?('progressPercentage') ? hash['progressPercentage'] : nil
150
+ attempt_index = hash.key?('attemptIndex') ? hash['attemptIndex'] : nil
151
+ download_url = hash.key?('downloadUrl') ? hash['downloadUrl'] : nil
152
+ download_url_expires_at =
153
+ hash.key?('downloadUrlExpiresAt') ? hash['downloadUrlExpiresAt'] : nil
154
+ thumbnail_url = hash.key?('thumbnailUrl') ? hash['thumbnailUrl'] : nil
155
+ thumbnail_url_expires_at =
156
+ hash.key?('thumbnailUrlExpiresAt') ? hash['thumbnailUrlExpiresAt'] : nil
157
+ export_file_id = hash.key?('exportFileId') ? hash['exportFileId'] : nil
158
+ file = FileInfo.from_hash(hash['file']) if hash['file']
159
+ error = ApiError.from_hash(hash['error']) if hash['error']
160
+
161
+ # Create a new hash for additional properties, removing known properties.
162
+ new_hash = hash.reject { |k, _| names.value?(k) }
163
+
164
+ additional_properties = APIHelper.get_additional_properties(
165
+ new_hash, proc { |value| value }
166
+ )
167
+
168
+ # Create object from extracted values.
169
+ ProjectExport.new(export_id: export_id,
170
+ project_id: project_id,
171
+ status: status,
172
+ progress_percentage: progress_percentage,
173
+ attempt_index: attempt_index,
174
+ download_url: download_url,
175
+ download_url_expires_at: download_url_expires_at,
176
+ thumbnail_url: thumbnail_url,
177
+ thumbnail_url_expires_at: thumbnail_url_expires_at,
178
+ export_file_id: export_file_id,
179
+ file: file,
180
+ error: error,
181
+ additional_properties: additional_properties)
182
+ end
183
+
184
+ # Provides a human-readable string representation of the object.
185
+ def to_s
186
+ class_name = self.class.name.split('::').last
187
+ "<#{class_name} export_id: #{@export_id}, project_id: #{@project_id}, status: #{@status},"\
188
+ " progress_percentage: #{@progress_percentage}, attempt_index: #{@attempt_index},"\
189
+ " download_url: #{@download_url}, download_url_expires_at: #{@download_url_expires_at},"\
190
+ " thumbnail_url: #{@thumbnail_url}, thumbnail_url_expires_at: #{@thumbnail_url_expires_at},"\
191
+ " export_file_id: #{@export_file_id}, file: #{@file}, error: #{@error},"\
192
+ " additional_properties: #{@additional_properties}>"
193
+ end
194
+
195
+ # Provides a debugging-friendly string with detailed object information.
196
+ def inspect
197
+ class_name = self.class.name.split('::').last
198
+ "<#{class_name} export_id: #{@export_id.inspect}, project_id: #{@project_id.inspect},"\
199
+ " status: #{@status.inspect}, progress_percentage: #{@progress_percentage.inspect},"\
200
+ " attempt_index: #{@attempt_index.inspect}, download_url: #{@download_url.inspect},"\
201
+ " download_url_expires_at: #{@download_url_expires_at.inspect}, thumbnail_url:"\
202
+ " #{@thumbnail_url.inspect}, thumbnail_url_expires_at: #{@thumbnail_url_expires_at.inspect},"\
203
+ " export_file_id: #{@export_file_id.inspect}, file: #{@file.inspect}, error:"\
204
+ " #{@error.inspect}, additional_properties: #{@additional_properties}>"
205
+ end
206
+ end
207
+ end