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,133 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Background drawn behind caption text.
8
+ class WorkflowCaptionBackgroundStyle < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # RECT draws one rectangle behind the whole line; WRAPPED hugs the text;
13
+ # WORD_BY_WORD draws a box per word.
14
+ # @return [WorkflowCaptionBackgroundStyleType]
15
+ attr_accessor :type
16
+
17
+ # An RGB color. Each channel is an integer from 0 to 255.
18
+ # @return [WorkflowRgbColor]
19
+ attr_accessor :background_color
20
+
21
+ # Corner rounding as a proportion of the background height, between 0
22
+ # (square corners) and 1 (fully rounded).
23
+ # @return [Float]
24
+ attr_accessor :border_radius_proportion
25
+
26
+ # Background opacity from 0 (transparent) to 1 (opaque).
27
+ # @return [Float]
28
+ attr_accessor :opacity_proportion
29
+
30
+ # A mapping from model property names to API property names.
31
+ def self.names
32
+ @_hash = {} if @_hash.nil?
33
+ @_hash['type'] = 'type'
34
+ @_hash['background_color'] = 'backgroundColor'
35
+ @_hash['border_radius_proportion'] = 'borderRadiusProportion'
36
+ @_hash['opacity_proportion'] = 'opacityProportion'
37
+ @_hash
38
+ end
39
+
40
+ # An array for optional fields
41
+ def self.optionals
42
+ %w[
43
+ border_radius_proportion
44
+ opacity_proportion
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(type:, background_color:, border_radius_proportion: SKIP,
54
+ opacity_proportion: SKIP, additional_properties: nil)
55
+ # Add additional model properties to the instance
56
+ additional_properties = {} if additional_properties.nil?
57
+
58
+ @type = type
59
+ @background_color = background_color
60
+ @border_radius_proportion = border_radius_proportion unless border_radius_proportion == SKIP
61
+ @opacity_proportion = opacity_proportion unless opacity_proportion == SKIP
62
+ @additional_properties = additional_properties
63
+ end
64
+
65
+ # Creates an instance of the object from a hash.
66
+ def self.from_hash(hash)
67
+ return nil unless hash
68
+
69
+ # Extract variables from the hash.
70
+ type = hash.key?('type') ? hash['type'] : nil
71
+ background_color = WorkflowRgbColor.from_hash(hash['backgroundColor']) if
72
+ hash['backgroundColor']
73
+ border_radius_proportion =
74
+ hash.key?('borderRadiusProportion') ? hash['borderRadiusProportion'] : SKIP
75
+ opacity_proportion =
76
+ hash.key?('opacityProportion') ? hash['opacityProportion'] : SKIP
77
+
78
+ # Create a new hash for additional properties, removing known properties.
79
+ new_hash = hash.reject { |k, _| names.value?(k) }
80
+
81
+ additional_properties = APIHelper.get_additional_properties(
82
+ new_hash, proc { |value| value }
83
+ )
84
+
85
+ # Create object from extracted values.
86
+ WorkflowCaptionBackgroundStyle.new(type: type,
87
+ background_color: background_color,
88
+ border_radius_proportion: border_radius_proportion,
89
+ opacity_proportion: opacity_proportion,
90
+ additional_properties: additional_properties)
91
+ end
92
+
93
+ # Validates an instance of the object from a given value.
94
+ # @param [WorkflowCaptionBackgroundStyle | Hash] The value against the validation is performed.
95
+ def self.validate(value)
96
+ if value.instance_of? self
97
+ return (
98
+ APIHelper.valid_type?(value.type,
99
+ ->(val) { WorkflowCaptionBackgroundStyleType.validate(val) }) and
100
+ APIHelper.valid_type?(value.background_color,
101
+ ->(val) { WorkflowRgbColor.validate(val) },
102
+ is_model_hash: true)
103
+ )
104
+ end
105
+
106
+ return false unless value.instance_of? Hash
107
+
108
+ (
109
+ APIHelper.valid_type?(value['type'],
110
+ ->(val) { WorkflowCaptionBackgroundStyleType.validate(val) }) and
111
+ APIHelper.valid_type?(value['backgroundColor'],
112
+ ->(val) { WorkflowRgbColor.validate(val) },
113
+ is_model_hash: true)
114
+ )
115
+ end
116
+
117
+ # Provides a human-readable string representation of the object.
118
+ def to_s
119
+ class_name = self.class.name.split('::').last
120
+ "<#{class_name} type: #{@type}, background_color: #{@background_color},"\
121
+ " border_radius_proportion: #{@border_radius_proportion}, opacity_proportion:"\
122
+ " #{@opacity_proportion}, additional_properties: #{@additional_properties}>"
123
+ end
124
+
125
+ # Provides a debugging-friendly string with detailed object information.
126
+ def inspect
127
+ class_name = self.class.name.split('::').last
128
+ "<#{class_name} type: #{@type.inspect}, background_color: #{@background_color.inspect},"\
129
+ " border_radius_proportion: #{@border_radius_proportion.inspect}, opacity_proportion:"\
130
+ " #{@opacity_proportion.inspect}, additional_properties: #{@additional_properties}>"
131
+ end
132
+ end
133
+ 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
+ # RECT draws one rectangle behind the whole line; WRAPPED hugs the text;
8
+ # WORD_BY_WORD draws a box per word.
9
+ class WorkflowCaptionBackgroundStyleType
10
+ WORKFLOW_CAPTION_BACKGROUND_STYLE_TYPE = [
11
+ # TODO: Write general description for RECT
12
+ RECT = 'RECT'.freeze,
13
+
14
+ # TODO: Write general description for WRAPPED
15
+ WRAPPED = 'WRAPPED'.freeze,
16
+
17
+ # TODO: Write general description for WORD_BY_WORD
18
+ WORD_BY_WORD = 'WORD_BY_WORD'.freeze
19
+ ].freeze
20
+
21
+ def self.validate(value)
22
+ return false if value.nil?
23
+
24
+ WORKFLOW_CAPTION_BACKGROUND_STYLE_TYPE.include?(value)
25
+ end
26
+
27
+ def self.from_value(value, default_value = RECT)
28
+ return default_value if value.nil?
29
+
30
+ str = value.to_s.strip
31
+
32
+ case str.downcase
33
+ when 'rect' then RECT
34
+ when 'wrapped' then WRAPPED
35
+ when 'word_by_word' then WORD_BY_WORD
36
+ else
37
+ default_value
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,220 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Caption styling. Any omitted field falls back to the VideoGen default
8
+ # caption style. Provide an empty object (`{}`) to keep the default style but
9
+ # ensure captions are shown. Pass `null` for the whole `captionStyle` field to
10
+ # hide captions entirely.
11
+ class WorkflowCaptionStyle < BaseModel
12
+ SKIP = Object.new
13
+ private_constant :SKIP
14
+
15
+ # Font family name.
16
+ # @return [String]
17
+ attr_accessor :font_name
18
+
19
+ # Font size in pixels at 1080p. Must be greater than 0.
20
+ # @return [Float]
21
+ attr_accessor :font_size
22
+
23
+ # Numeric font weight (400 = regular, 700 = bold).
24
+ # @return [WorkflowCaptionStyleFontWeight]
25
+ attr_accessor :font_weight
26
+
27
+ # An RGB color. Each channel is an integer from 0 to 255.
28
+ # @return [WorkflowRgbColor]
29
+ attr_accessor :text_color
30
+
31
+ # An RGB color. Each channel is an integer from 0 to 255.
32
+ # @return [WorkflowCaptionStyleTextJustification]
33
+ attr_accessor :text_justification
34
+
35
+ # Vertical position of the caption block in the frame.
36
+ # @return [WorkflowCaptionStyleVerticalAlignment]
37
+ attr_accessor :vertical_alignment
38
+
39
+ # Outline color around glyphs, or null for no outline.
40
+ # @return [WorkflowRgbColor]
41
+ attr_accessor :stroke_color
42
+
43
+ # Outline thickness in pixels. 0 disables the outline.
44
+ # @return [Float]
45
+ attr_accessor :stroke_weight
46
+
47
+ # Background drawn behind the text, or null for no background.
48
+ # @return [WorkflowCaptionBackgroundStyle]
49
+ attr_accessor :background_style
50
+
51
+ # Color applied to the currently spoken word for karaoke-style highlighting,
52
+ # or null to keep the base text color.
53
+ # @return [WorkflowRgbColor]
54
+ attr_accessor :spoken_text_color
55
+
56
+ # Outline color applied to the currently spoken word, or null.
57
+ # @return [WorkflowRgbColor]
58
+ attr_accessor :spoken_text_stroke_color
59
+
60
+ # When true, a word keeps the spoken-text color after it has been spoken
61
+ # instead of reverting.
62
+ # @return [TrueClass | FalseClass]
63
+ attr_accessor :persist_spoken_text_color
64
+
65
+ # A mapping from model property names to API property names.
66
+ def self.names
67
+ @_hash = {} if @_hash.nil?
68
+ @_hash['font_name'] = 'fontName'
69
+ @_hash['font_size'] = 'fontSize'
70
+ @_hash['font_weight'] = 'fontWeight'
71
+ @_hash['text_color'] = 'textColor'
72
+ @_hash['text_justification'] = 'textJustification'
73
+ @_hash['vertical_alignment'] = 'verticalAlignment'
74
+ @_hash['stroke_color'] = 'strokeColor'
75
+ @_hash['stroke_weight'] = 'strokeWeight'
76
+ @_hash['background_style'] = 'backgroundStyle'
77
+ @_hash['spoken_text_color'] = 'spokenTextColor'
78
+ @_hash['spoken_text_stroke_color'] = 'spokenTextStrokeColor'
79
+ @_hash['persist_spoken_text_color'] = 'persistSpokenTextColor'
80
+ @_hash
81
+ end
82
+
83
+ # An array for optional fields
84
+ def self.optionals
85
+ %w[
86
+ font_name
87
+ font_size
88
+ font_weight
89
+ text_color
90
+ text_justification
91
+ vertical_alignment
92
+ stroke_color
93
+ stroke_weight
94
+ background_style
95
+ spoken_text_color
96
+ spoken_text_stroke_color
97
+ persist_spoken_text_color
98
+ ]
99
+ end
100
+
101
+ # An array for nullable fields
102
+ def self.nullables
103
+ %w[
104
+ stroke_color
105
+ background_style
106
+ spoken_text_color
107
+ spoken_text_stroke_color
108
+ ]
109
+ end
110
+
111
+ def initialize(font_name: SKIP, font_size: SKIP, font_weight: SKIP,
112
+ text_color: SKIP, text_justification: SKIP,
113
+ vertical_alignment: SKIP, stroke_color: SKIP,
114
+ stroke_weight: SKIP, background_style: SKIP,
115
+ spoken_text_color: SKIP, spoken_text_stroke_color: SKIP,
116
+ persist_spoken_text_color: SKIP, additional_properties: nil)
117
+ # Add additional model properties to the instance
118
+ additional_properties = {} if additional_properties.nil?
119
+
120
+ @font_name = font_name unless font_name == SKIP
121
+ @font_size = font_size unless font_size == SKIP
122
+ @font_weight = font_weight unless font_weight == SKIP
123
+ @text_color = text_color unless text_color == SKIP
124
+ @text_justification = text_justification unless text_justification == SKIP
125
+ @vertical_alignment = vertical_alignment unless vertical_alignment == SKIP
126
+ @stroke_color = stroke_color unless stroke_color == SKIP
127
+ @stroke_weight = stroke_weight unless stroke_weight == SKIP
128
+ @background_style = background_style unless background_style == SKIP
129
+ @spoken_text_color = spoken_text_color unless spoken_text_color == SKIP
130
+ @spoken_text_stroke_color = spoken_text_stroke_color unless spoken_text_stroke_color == SKIP
131
+ unless persist_spoken_text_color == SKIP
132
+ @persist_spoken_text_color =
133
+ persist_spoken_text_color
134
+ end
135
+ @additional_properties = additional_properties
136
+ end
137
+
138
+ # Creates an instance of the object from a hash.
139
+ def self.from_hash(hash)
140
+ return nil unless hash
141
+
142
+ # Extract variables from the hash.
143
+ font_name = hash.key?('fontName') ? hash['fontName'] : SKIP
144
+ font_size = hash.key?('fontSize') ? hash['fontSize'] : SKIP
145
+ font_weight = hash.key?('fontWeight') ? hash['fontWeight'] : SKIP
146
+ text_color = WorkflowRgbColor.from_hash(hash['textColor']) if hash['textColor']
147
+ text_justification =
148
+ hash.key?('textJustification') ? hash['textJustification'] : SKIP
149
+ vertical_alignment =
150
+ hash.key?('verticalAlignment') ? hash['verticalAlignment'] : SKIP
151
+ stroke_color = WorkflowRgbColor.from_hash(hash['strokeColor']) if hash['strokeColor']
152
+ stroke_weight = hash.key?('strokeWeight') ? hash['strokeWeight'] : SKIP
153
+ background_style = WorkflowCaptionBackgroundStyle.from_hash(hash['backgroundStyle']) if
154
+ hash['backgroundStyle']
155
+ spoken_text_color = WorkflowRgbColor.from_hash(hash['spokenTextColor']) if
156
+ hash['spokenTextColor']
157
+ spoken_text_stroke_color = WorkflowRgbColor.from_hash(hash['spokenTextStrokeColor']) if
158
+ hash['spokenTextStrokeColor']
159
+ persist_spoken_text_color =
160
+ hash.key?('persistSpokenTextColor') ? hash['persistSpokenTextColor'] : SKIP
161
+
162
+ # Create a new hash for additional properties, removing known properties.
163
+ new_hash = hash.reject { |k, _| names.value?(k) }
164
+
165
+ additional_properties = APIHelper.get_additional_properties(
166
+ new_hash, proc { |value| value }
167
+ )
168
+
169
+ # Create object from extracted values.
170
+ WorkflowCaptionStyle.new(font_name: font_name,
171
+ font_size: font_size,
172
+ font_weight: font_weight,
173
+ text_color: text_color,
174
+ text_justification: text_justification,
175
+ vertical_alignment: vertical_alignment,
176
+ stroke_color: stroke_color,
177
+ stroke_weight: stroke_weight,
178
+ background_style: background_style,
179
+ spoken_text_color: spoken_text_color,
180
+ spoken_text_stroke_color: spoken_text_stroke_color,
181
+ persist_spoken_text_color: persist_spoken_text_color,
182
+ additional_properties: additional_properties)
183
+ end
184
+
185
+ # Validates an instance of the object from a given value.
186
+ # @param [WorkflowCaptionStyle | Hash] The value against the validation is performed.
187
+ def self.validate(value)
188
+ return true if value.instance_of? self
189
+
190
+ return false unless value.instance_of? Hash
191
+
192
+ true
193
+ end
194
+
195
+ # Provides a human-readable string representation of the object.
196
+ def to_s
197
+ class_name = self.class.name.split('::').last
198
+ "<#{class_name} font_name: #{@font_name}, font_size: #{@font_size}, font_weight:"\
199
+ " #{@font_weight}, text_color: #{@text_color}, text_justification: #{@text_justification},"\
200
+ " vertical_alignment: #{@vertical_alignment}, stroke_color: #{@stroke_color}, stroke_weight:"\
201
+ " #{@stroke_weight}, background_style: #{@background_style}, spoken_text_color:"\
202
+ " #{@spoken_text_color}, spoken_text_stroke_color: #{@spoken_text_stroke_color},"\
203
+ " persist_spoken_text_color: #{@persist_spoken_text_color}, additional_properties:"\
204
+ " #{@additional_properties}>"
205
+ end
206
+
207
+ # Provides a debugging-friendly string with detailed object information.
208
+ def inspect
209
+ class_name = self.class.name.split('::').last
210
+ "<#{class_name} font_name: #{@font_name.inspect}, font_size: #{@font_size.inspect},"\
211
+ " font_weight: #{@font_weight.inspect}, text_color: #{@text_color.inspect},"\
212
+ " text_justification: #{@text_justification.inspect}, vertical_alignment:"\
213
+ " #{@vertical_alignment.inspect}, stroke_color: #{@stroke_color.inspect}, stroke_weight:"\
214
+ " #{@stroke_weight.inspect}, background_style: #{@background_style.inspect},"\
215
+ " spoken_text_color: #{@spoken_text_color.inspect}, spoken_text_stroke_color:"\
216
+ " #{@spoken_text_stroke_color.inspect}, persist_spoken_text_color:"\
217
+ " #{@persist_spoken_text_color.inspect}, additional_properties: #{@additional_properties}>"
218
+ end
219
+ end
220
+ end
@@ -0,0 +1,64 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Numeric font weight (400 = regular, 700 = bold).
8
+ class WorkflowCaptionStyleFontWeight
9
+ WORKFLOW_CAPTION_STYLE_FONT_WEIGHT = [
10
+ # TODO: Write general description for ENUM_100
11
+ ENUM_100 = '100'.freeze,
12
+
13
+ # TODO: Write general description for ENUM_200
14
+ ENUM_200 = '200'.freeze,
15
+
16
+ # TODO: Write general description for ENUM_300
17
+ ENUM_300 = '300'.freeze,
18
+
19
+ # TODO: Write general description for ENUM_400
20
+ ENUM_400 = '400'.freeze,
21
+
22
+ # TODO: Write general description for ENUM_500
23
+ ENUM_500 = '500'.freeze,
24
+
25
+ # TODO: Write general description for ENUM_600
26
+ ENUM_600 = '600'.freeze,
27
+
28
+ # TODO: Write general description for ENUM_700
29
+ ENUM_700 = '700'.freeze,
30
+
31
+ # TODO: Write general description for ENUM_800
32
+ ENUM_800 = '800'.freeze,
33
+
34
+ # TODO: Write general description for ENUM_900
35
+ ENUM_900 = '900'.freeze
36
+ ].freeze
37
+
38
+ def self.validate(value)
39
+ return false if value.nil?
40
+
41
+ WORKFLOW_CAPTION_STYLE_FONT_WEIGHT.include?(value)
42
+ end
43
+
44
+ def self.from_value(value, default_value = ENUM_100)
45
+ return default_value if value.nil?
46
+
47
+ str = value.to_s.strip
48
+
49
+ case str.downcase
50
+ when 'enum_100' then ENUM_100
51
+ when 'enum_200' then ENUM_200
52
+ when 'enum_300' then ENUM_300
53
+ when 'enum_400' then ENUM_400
54
+ when 'enum_500' then ENUM_500
55
+ when 'enum_600' then ENUM_600
56
+ when 'enum_700' then ENUM_700
57
+ when 'enum_800' then ENUM_800
58
+ when 'enum_900' then ENUM_900
59
+ else
60
+ default_value
61
+ end
62
+ end
63
+ end
64
+ 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
+ # WorkflowCaptionStyleTextJustification.
8
+ class WorkflowCaptionStyleTextJustification
9
+ WORKFLOW_CAPTION_STYLE_TEXT_JUSTIFICATION = [
10
+ # TODO: Write general description for LEFT
11
+ LEFT = 'LEFT'.freeze,
12
+
13
+ # TODO: Write general description for CENTER
14
+ CENTER = 'CENTER'.freeze,
15
+
16
+ # TODO: Write general description for RIGHT
17
+ RIGHT = 'RIGHT'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ WORKFLOW_CAPTION_STYLE_TEXT_JUSTIFICATION.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = LEFT)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'left' then LEFT
33
+ when 'center' then CENTER
34
+ when 'right' then RIGHT
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
+ # Vertical position of the caption block in the frame.
8
+ class WorkflowCaptionStyleVerticalAlignment
9
+ WORKFLOW_CAPTION_STYLE_VERTICAL_ALIGNMENT = [
10
+ # TODO: Write general description for TOP
11
+ TOP = 'TOP'.freeze,
12
+
13
+ # TODO: Write general description for MIDDLE
14
+ MIDDLE = 'MIDDLE'.freeze,
15
+
16
+ # TODO: Write general description for BOTTOM
17
+ BOTTOM = 'BOTTOM'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ WORKFLOW_CAPTION_STYLE_VERTICAL_ALIGNMENT.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = TOP)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'top' then TOP
33
+ when 'middle' then MIDDLE
34
+ when 'bottom' then BOTTOM
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ 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
+ # An RGB color. Each channel is an integer from 0 to 255.
8
+ class WorkflowRgbColor < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :red
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [Integer]
18
+ attr_accessor :green
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :blue
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['red'] = 'red'
28
+ @_hash['green'] = 'green'
29
+ @_hash['blue'] = 'blue'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ []
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(red:, green:, blue:, additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @red = red
48
+ @green = green
49
+ @blue = blue
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
+ red = hash.key?('red') ? hash['red'] : nil
59
+ green = hash.key?('green') ? hash['green'] : nil
60
+ blue = hash.key?('blue') ? hash['blue'] : nil
61
+
62
+ # Create a new hash for additional properties, removing known properties.
63
+ new_hash = hash.reject { |k, _| names.value?(k) }
64
+
65
+ additional_properties = APIHelper.get_additional_properties(
66
+ new_hash, proc { |value| value }
67
+ )
68
+
69
+ # Create object from extracted values.
70
+ WorkflowRgbColor.new(red: red,
71
+ green: green,
72
+ blue: blue,
73
+ additional_properties: additional_properties)
74
+ end
75
+
76
+ # Validates an instance of the object from a given value.
77
+ # @param [WorkflowRgbColor | Hash] The value against the validation is performed.
78
+ def self.validate(value)
79
+ if value.instance_of? self
80
+ return (
81
+ APIHelper.valid_type?(value.red,
82
+ ->(val) { val.instance_of? Integer }) and
83
+ APIHelper.valid_type?(value.green,
84
+ ->(val) { val.instance_of? Integer }) and
85
+ APIHelper.valid_type?(value.blue,
86
+ ->(val) { val.instance_of? Integer })
87
+ )
88
+ end
89
+
90
+ return false unless value.instance_of? Hash
91
+
92
+ (
93
+ APIHelper.valid_type?(value['red'],
94
+ ->(val) { val.instance_of? Integer }) and
95
+ APIHelper.valid_type?(value['green'],
96
+ ->(val) { val.instance_of? Integer }) and
97
+ APIHelper.valid_type?(value['blue'],
98
+ ->(val) { val.instance_of? Integer })
99
+ )
100
+ end
101
+
102
+ # Provides a human-readable string representation of the object.
103
+ def to_s
104
+ class_name = self.class.name.split('::').last
105
+ "<#{class_name} red: #{@red}, green: #{@green}, blue: #{@blue}, additional_properties:"\
106
+ " #{@additional_properties}>"
107
+ end
108
+
109
+ # Provides a debugging-friendly string with detailed object information.
110
+ def inspect
111
+ class_name = self.class.name.split('::').last
112
+ "<#{class_name} red: #{@red.inspect}, green: #{@green.inspect}, blue: #{@blue.inspect},"\
113
+ " additional_properties: #{@additional_properties}>"
114
+ end
115
+ end
116
+ end