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
+ # CreateTimelineInterchangeRequest Model.
8
+ class CreateTimelineInterchangeRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Editor interchange document format. `FCPXML` is Final Cut Pro (also
13
+ # imported by DaVinci Resolve and others). `PREMIERE_XML` is the Final Cut 7
14
+ # `xmeml` XML that Adobe Premiere Pro imports natively. `OTIO` is
15
+ # OpenTimelineIO, the vendor-neutral format. `SRT` is a SubRip caption
16
+ # sidecar.
17
+ # @return [TimelineInterchangeFormat]
18
+ attr_accessor :format
19
+
20
+ # How the interchange document references media. `REMOTE_URLS` produces a
21
+ # single document that links to signed media URLs. `BUNDLE` produces a zip
22
+ # containing the document plus every referenced media file, referenced by
23
+ # relative path, for durable offline relinking.
24
+ # @return [TimelineInterchangeMediaDelivery]
25
+ attr_accessor :media_delivery
26
+
27
+ # A mapping from model property names to API property names.
28
+ def self.names
29
+ @_hash = {} if @_hash.nil?
30
+ @_hash['format'] = 'format'
31
+ @_hash['media_delivery'] = 'mediaDelivery'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ format
39
+ media_delivery
40
+ ]
41
+ end
42
+
43
+ # An array for nullable fields
44
+ def self.nullables
45
+ []
46
+ end
47
+
48
+ def initialize(format: SKIP, media_delivery: SKIP,
49
+ additional_properties: nil)
50
+ # Add additional model properties to the instance
51
+ additional_properties = {} if additional_properties.nil?
52
+
53
+ @format = format unless format == SKIP
54
+ @media_delivery = media_delivery unless media_delivery == 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
+ format = hash.key?('format') ? hash['format'] : SKIP
64
+ media_delivery = hash.key?('mediaDelivery') ? hash['mediaDelivery'] : SKIP
65
+
66
+ # Create a new hash for additional properties, removing known properties.
67
+ new_hash = hash.reject { |k, _| names.value?(k) }
68
+
69
+ additional_properties = APIHelper.get_additional_properties(
70
+ new_hash, proc { |value| value }
71
+ )
72
+
73
+ # Create object from extracted values.
74
+ CreateTimelineInterchangeRequest.new(format: format,
75
+ media_delivery: media_delivery,
76
+ additional_properties: additional_properties)
77
+ end
78
+
79
+ # Provides a human-readable string representation of the object.
80
+ def to_s
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} format: #{@format}, media_delivery: #{@media_delivery},"\
83
+ " additional_properties: #{@additional_properties}>"
84
+ end
85
+
86
+ # Provides a debugging-friendly string with detailed object information.
87
+ def inspect
88
+ class_name = self.class.name.split('::').last
89
+ "<#{class_name} format: #{@format.inspect}, media_delivery: #{@media_delivery.inspect},"\
90
+ " additional_properties: #{@additional_properties}>"
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,76 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # CreateTimelineInterchangeResponse Model.
8
+ class CreateTimelineInterchangeResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Opaque timeline interchange job id (e.g. `vg_inte_...`). Poll `GET
13
+ # /v1/timeline-interchange/{interchangeJobId}` for completion.
14
+ # @return [String]
15
+ attr_accessor :interchange_job_id
16
+
17
+ # A mapping from model property names to API property names.
18
+ def self.names
19
+ @_hash = {} if @_hash.nil?
20
+ @_hash['interchange_job_id'] = 'interchangeJobId'
21
+ @_hash
22
+ end
23
+
24
+ # An array for optional fields
25
+ def self.optionals
26
+ []
27
+ end
28
+
29
+ # An array for nullable fields
30
+ def self.nullables
31
+ []
32
+ end
33
+
34
+ def initialize(interchange_job_id:, additional_properties: nil)
35
+ # Add additional model properties to the instance
36
+ additional_properties = {} if additional_properties.nil?
37
+
38
+ @interchange_job_id = interchange_job_id
39
+ @additional_properties = additional_properties
40
+ end
41
+
42
+ # Creates an instance of the object from a hash.
43
+ def self.from_hash(hash)
44
+ return nil unless hash
45
+
46
+ # Extract variables from the hash.
47
+ interchange_job_id =
48
+ hash.key?('interchangeJobId') ? hash['interchangeJobId'] : nil
49
+
50
+ # Create a new hash for additional properties, removing known properties.
51
+ new_hash = hash.reject { |k, _| names.value?(k) }
52
+
53
+ additional_properties = APIHelper.get_additional_properties(
54
+ new_hash, proc { |value| value }
55
+ )
56
+
57
+ # Create object from extracted values.
58
+ CreateTimelineInterchangeResponse.new(interchange_job_id: interchange_job_id,
59
+ additional_properties: additional_properties)
60
+ end
61
+
62
+ # Provides a human-readable string representation of the object.
63
+ def to_s
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} interchange_job_id: #{@interchange_job_id}, additional_properties:"\
66
+ " #{@additional_properties}>"
67
+ end
68
+
69
+ # Provides a debugging-friendly string with detailed object information.
70
+ def inspect
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} interchange_job_id: #{@interchange_job_id.inspect}, additional_properties:"\
73
+ " #{@additional_properties}>"
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,94 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # CreateWebhookEndpointRequest Model.
8
+ class CreateWebhookEndpointRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # HTTPS URL that will receive webhook POST requests.
13
+ # @return [String]
14
+ attr_accessor :url
15
+
16
+ # HTTPS URL that will receive webhook POST requests.
17
+ # @return [String]
18
+ attr_accessor :description
19
+
20
+ # Webhook event names to subscribe to. Must contain at least one event.
21
+ # @return [Array[WebhookEventName]]
22
+ attr_accessor :events
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['url'] = 'url'
28
+ @_hash['description'] = 'description'
29
+ @_hash['events'] = 'events'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ description
37
+ ]
38
+ end
39
+
40
+ # An array for nullable fields
41
+ def self.nullables
42
+ %w[
43
+ description
44
+ ]
45
+ end
46
+
47
+ def initialize(url:, events:, description: SKIP, additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @url = url
52
+ @description = description unless description == SKIP
53
+ @events = events
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
+ url = hash.key?('url') ? hash['url'] : nil
63
+ events = hash.key?('events') ? hash['events'] : nil
64
+ description = hash.key?('description') ? hash['description'] : SKIP
65
+
66
+ # Create a new hash for additional properties, removing known properties.
67
+ new_hash = hash.reject { |k, _| names.value?(k) }
68
+
69
+ additional_properties = APIHelper.get_additional_properties(
70
+ new_hash, proc { |value| value }
71
+ )
72
+
73
+ # Create object from extracted values.
74
+ CreateWebhookEndpointRequest.new(url: url,
75
+ events: events,
76
+ description: description,
77
+ additional_properties: additional_properties)
78
+ end
79
+
80
+ # Provides a human-readable string representation of the object.
81
+ def to_s
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} url: #{@url}, description: #{@description}, events: #{@events},"\
84
+ " additional_properties: #{@additional_properties}>"
85
+ end
86
+
87
+ # Provides a debugging-friendly string with detailed object information.
88
+ def inspect
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} url: #{@url.inspect}, description: #{@description.inspect}, events:"\
91
+ " #{@events.inspect}, additional_properties: #{@additional_properties}>"
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,43 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Controls whether a short 'Made with VideoGen' end screen is appended to the
8
+ # output. `AUTO` appends it unless you have a Pro plan. `VIDEO_GEN` always
9
+ # appends it. `NONE` removes it (requires Pro; returns an error if you don't
10
+ # have it).
11
+ class EndScreenMode
12
+ END_SCREEN_MODE = [
13
+ # TODO: Write general description for NONE
14
+ NONE = 'NONE'.freeze,
15
+
16
+ # TODO: Write general description for VIDEO_GEN
17
+ VIDEO_GEN = 'VIDEO_GEN'.freeze,
18
+
19
+ # TODO: Write general description for AUTO
20
+ AUTO = 'AUTO'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ END_SCREEN_MODE.include?(value)
27
+ end
28
+
29
+ def self.from_value(value, default_value = NONE)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'none' then NONE
36
+ when 'video_gen' then VIDEO_GEN
37
+ when 'auto' then AUTO
38
+ else
39
+ default_value
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,166 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A reusable actor, product, visual style, or slideshow theme. Attach its
8
+ # reference images to workflows for consistent characters, looks, and slide
9
+ # designs.
10
+ class Entity < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # The entity id (e.g. `vg_enti_...`).
15
+ # @return [String]
16
+ attr_accessor :entity_id
17
+
18
+ # ACTOR features a consistent character; PRODUCT features a consistent
19
+ # product or object; VISUAL_STYLE guides the look of generated images;
20
+ # SLIDESHOW_THEME is a shared slide design system (fonts, colors, layout)
21
+ # applied to every slide of a slideshow-to-video deck.
22
+ # @return [EntityEntityType]
23
+ attr_accessor :entity_type
24
+
25
+ # Display name.
26
+ # @return [String]
27
+ attr_accessor :name
28
+
29
+ # Optional description. Empty string when not set.
30
+ # @return [String]
31
+ attr_accessor :description
32
+
33
+ # Voice and presenter summary for ACTOR entities. Null for non-ACTOR
34
+ # entities.
35
+ # @return [EntityActorConfig]
36
+ attr_accessor :actor_config
37
+
38
+ # Reference images attached to the entity.
39
+ # @return [Array[EntityReference]]
40
+ attr_accessor :references
41
+
42
+ # Seconds since epoch (Unix timestamp) when the entity was created.
43
+ # @return [Integer]
44
+ attr_accessor :created_at
45
+
46
+ # Seconds since epoch (Unix timestamp) when the entity was last updated.
47
+ # @return [Integer]
48
+ attr_accessor :updated_at
49
+
50
+ # When true, this is a VideoGen catalog entity. Built-in entities cannot be
51
+ # updated, archived, or have references added or removed.
52
+ # @return [TrueClass | FalseClass]
53
+ attr_accessor :is_built_in
54
+
55
+ # A mapping from model property names to API property names.
56
+ def self.names
57
+ @_hash = {} if @_hash.nil?
58
+ @_hash['entity_id'] = 'entityId'
59
+ @_hash['entity_type'] = 'entityType'
60
+ @_hash['name'] = 'name'
61
+ @_hash['description'] = 'description'
62
+ @_hash['actor_config'] = 'actorConfig'
63
+ @_hash['references'] = 'references'
64
+ @_hash['created_at'] = 'createdAt'
65
+ @_hash['updated_at'] = 'updatedAt'
66
+ @_hash['is_built_in'] = 'isBuiltIn'
67
+ @_hash
68
+ end
69
+
70
+ # An array for optional fields
71
+ def self.optionals
72
+ %w[
73
+ actor_config
74
+ is_built_in
75
+ ]
76
+ end
77
+
78
+ # An array for nullable fields
79
+ def self.nullables
80
+ %w[
81
+ actor_config
82
+ ]
83
+ end
84
+
85
+ def initialize(entity_id:, entity_type:, name:, description:, references:,
86
+ created_at:, updated_at:, actor_config: SKIP,
87
+ is_built_in: SKIP, additional_properties: nil)
88
+ # Add additional model properties to the instance
89
+ additional_properties = {} if additional_properties.nil?
90
+
91
+ @entity_id = entity_id
92
+ @entity_type = entity_type
93
+ @name = name
94
+ @description = description
95
+ @actor_config = actor_config unless actor_config == SKIP
96
+ @references = references
97
+ @created_at = created_at
98
+ @updated_at = updated_at
99
+ @is_built_in = is_built_in unless is_built_in == SKIP
100
+ @additional_properties = additional_properties
101
+ end
102
+
103
+ # Creates an instance of the object from a hash.
104
+ def self.from_hash(hash)
105
+ return nil unless hash
106
+
107
+ # Extract variables from the hash.
108
+ entity_id = hash.key?('entityId') ? hash['entityId'] : nil
109
+ entity_type = hash.key?('entityType') ? hash['entityType'] : nil
110
+ name = hash.key?('name') ? hash['name'] : nil
111
+ description = hash.key?('description') ? hash['description'] : nil
112
+ # Parameter is an array, so we need to iterate through it
113
+ references = nil
114
+ unless hash['references'].nil?
115
+ references = []
116
+ hash['references'].each do |structure|
117
+ references << (EntityReference.from_hash(structure) if structure)
118
+ end
119
+ end
120
+
121
+ references = nil unless hash.key?('references')
122
+ created_at = hash.key?('createdAt') ? hash['createdAt'] : nil
123
+ updated_at = hash.key?('updatedAt') ? hash['updatedAt'] : nil
124
+ actor_config = EntityActorConfig.from_hash(hash['actorConfig']) if hash['actorConfig']
125
+ is_built_in = hash.key?('isBuiltIn') ? hash['isBuiltIn'] : SKIP
126
+
127
+ # Create a new hash for additional properties, removing known properties.
128
+ new_hash = hash.reject { |k, _| names.value?(k) }
129
+
130
+ additional_properties = APIHelper.get_additional_properties(
131
+ new_hash, proc { |value| value }
132
+ )
133
+
134
+ # Create object from extracted values.
135
+ Entity.new(entity_id: entity_id,
136
+ entity_type: entity_type,
137
+ name: name,
138
+ description: description,
139
+ references: references,
140
+ created_at: created_at,
141
+ updated_at: updated_at,
142
+ actor_config: actor_config,
143
+ is_built_in: is_built_in,
144
+ additional_properties: additional_properties)
145
+ end
146
+
147
+ # Provides a human-readable string representation of the object.
148
+ def to_s
149
+ class_name = self.class.name.split('::').last
150
+ "<#{class_name} entity_id: #{@entity_id}, entity_type: #{@entity_type}, name: #{@name},"\
151
+ " description: #{@description}, actor_config: #{@actor_config}, references: #{@references},"\
152
+ " created_at: #{@created_at}, updated_at: #{@updated_at}, is_built_in: #{@is_built_in},"\
153
+ " additional_properties: #{@additional_properties}>"
154
+ end
155
+
156
+ # Provides a debugging-friendly string with detailed object information.
157
+ def inspect
158
+ class_name = self.class.name.split('::').last
159
+ "<#{class_name} entity_id: #{@entity_id.inspect}, entity_type: #{@entity_type.inspect},"\
160
+ " name: #{@name.inspect}, description: #{@description.inspect}, actor_config:"\
161
+ " #{@actor_config.inspect}, references: #{@references.inspect}, created_at:"\
162
+ " #{@created_at.inspect}, updated_at: #{@updated_at.inspect}, is_built_in:"\
163
+ " #{@is_built_in.inspect}, additional_properties: #{@additional_properties}>"
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,101 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Read-only voice and avatar summary for an ACTOR entity. Always null for
8
+ # non-ACTOR entities.
9
+ class EntityActorConfig < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Display name of the actor's voice when one is configured. Null otherwise.
14
+ # @return [String]
15
+ attr_accessor :voice_display_name
16
+
17
+ # True when the actor has a configured voice.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :has_voice
20
+
21
+ # True when the actor has a built-in presenter or image reference that can
22
+ # be used with `actorEntityId` for avatar generation.
23
+ # @return [TrueClass | FalseClass]
24
+ attr_accessor :has_avatar_presenter
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['voice_display_name'] = 'voiceDisplayName'
30
+ @_hash['has_voice'] = 'hasVoice'
31
+ @_hash['has_avatar_presenter'] = 'hasAvatarPresenter'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ voice_display_name
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ %w[
45
+ voice_display_name
46
+ ]
47
+ end
48
+
49
+ def initialize(has_voice:, has_avatar_presenter:, voice_display_name: SKIP,
50
+ additional_properties: nil)
51
+ # Add additional model properties to the instance
52
+ additional_properties = {} if additional_properties.nil?
53
+
54
+ @voice_display_name = voice_display_name unless voice_display_name == SKIP
55
+ @has_voice = has_voice
56
+ @has_avatar_presenter = has_avatar_presenter
57
+ @additional_properties = additional_properties
58
+ end
59
+
60
+ # Creates an instance of the object from a hash.
61
+ def self.from_hash(hash)
62
+ return nil unless hash
63
+
64
+ # Extract variables from the hash.
65
+ has_voice = hash.key?('hasVoice') ? hash['hasVoice'] : nil
66
+ has_avatar_presenter =
67
+ hash.key?('hasAvatarPresenter') ? hash['hasAvatarPresenter'] : nil
68
+ voice_display_name =
69
+ hash.key?('voiceDisplayName') ? hash['voiceDisplayName'] : SKIP
70
+
71
+ # Create a new hash for additional properties, removing known properties.
72
+ new_hash = hash.reject { |k, _| names.value?(k) }
73
+
74
+ additional_properties = APIHelper.get_additional_properties(
75
+ new_hash, proc { |value| value }
76
+ )
77
+
78
+ # Create object from extracted values.
79
+ EntityActorConfig.new(has_voice: has_voice,
80
+ has_avatar_presenter: has_avatar_presenter,
81
+ voice_display_name: voice_display_name,
82
+ additional_properties: additional_properties)
83
+ end
84
+
85
+ # Provides a human-readable string representation of the object.
86
+ def to_s
87
+ class_name = self.class.name.split('::').last
88
+ "<#{class_name} voice_display_name: #{@voice_display_name}, has_voice: #{@has_voice},"\
89
+ " has_avatar_presenter: #{@has_avatar_presenter}, additional_properties:"\
90
+ " #{@additional_properties}>"
91
+ end
92
+
93
+ # Provides a debugging-friendly string with detailed object information.
94
+ def inspect
95
+ class_name = self.class.name.split('::').last
96
+ "<#{class_name} voice_display_name: #{@voice_display_name.inspect}, has_voice:"\
97
+ " #{@has_voice.inspect}, has_avatar_presenter: #{@has_avatar_presenter.inspect},"\
98
+ " additional_properties: #{@additional_properties}>"
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,82 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # EntityArchiveResponse Model.
8
+ class EntityArchiveResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The id of the archived entity.
13
+ # @return [String]
14
+ attr_accessor :entity_id
15
+
16
+ # Always true on success.
17
+ # @return [TrueClass | FalseClass]
18
+ attr_accessor :archived
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['entity_id'] = 'entityId'
24
+ @_hash['archived'] = 'archived'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(entity_id:, archived:, additional_properties: nil)
39
+ # Add additional model properties to the instance
40
+ additional_properties = {} if additional_properties.nil?
41
+
42
+ @entity_id = entity_id
43
+ @archived = archived
44
+ @additional_properties = additional_properties
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ entity_id = hash.key?('entityId') ? hash['entityId'] : nil
53
+ archived = hash.key?('archived') ? hash['archived'] : nil
54
+
55
+ # Create a new hash for additional properties, removing known properties.
56
+ new_hash = hash.reject { |k, _| names.value?(k) }
57
+
58
+ additional_properties = APIHelper.get_additional_properties(
59
+ new_hash, proc { |value| value }
60
+ )
61
+
62
+ # Create object from extracted values.
63
+ EntityArchiveResponse.new(entity_id: entity_id,
64
+ archived: archived,
65
+ additional_properties: additional_properties)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} entity_id: #{@entity_id}, archived: #{@archived}, additional_properties:"\
72
+ " #{@additional_properties}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} entity_id: #{@entity_id.inspect}, archived: #{@archived.inspect},"\
79
+ " additional_properties: #{@additional_properties}>"
80
+ end
81
+ end
82
+ end