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,51 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Lifecycle status shared by every asynchronous job (tool executions, workflow
8
+ # runs, remix actions, project exports, and timeline interchange jobs).
9
+ # `pending` and `running` are in-progress; `succeeded`, `failed`, and
10
+ # `cancelled` are terminal.
11
+ class JobStatus
12
+ JOB_STATUS = [
13
+ # TODO: Write general description for PENDING
14
+ PENDING = 'pending'.freeze,
15
+
16
+ # TODO: Write general description for RUNNING
17
+ RUNNING = 'running'.freeze,
18
+
19
+ # TODO: Write general description for SUCCEEDED
20
+ SUCCEEDED = 'succeeded'.freeze,
21
+
22
+ # TODO: Write general description for FAILED
23
+ FAILED = 'failed'.freeze,
24
+
25
+ # TODO: Write general description for CANCELLED
26
+ CANCELLED = 'cancelled'.freeze
27
+ ].freeze
28
+
29
+ def self.validate(value)
30
+ return false if value.nil?
31
+
32
+ JOB_STATUS.include?(value)
33
+ end
34
+
35
+ def self.from_value(value, default_value = PENDING)
36
+ return default_value if value.nil?
37
+
38
+ str = value.to_s.strip
39
+
40
+ case str.downcase
41
+ when 'pending' then PENDING
42
+ when 'running' then RUNNING
43
+ when 'succeeded' then SUCCEEDED
44
+ when 'failed' then FAILED
45
+ when 'cancelled' then CANCELLED
46
+ else
47
+ default_value
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,83 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # A language a project can be translated into.
8
+ class Language < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The language code to pass to a `TRANSLATE_PROJECT` remix action (e.g.
13
+ # `es`, `fr`, `ja`).
14
+ # @return [String]
15
+ attr_accessor :language_code
16
+
17
+ # Human-readable English name of the language (e.g. `Spanish`).
18
+ # @return [String]
19
+ attr_accessor :name
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['language_code'] = 'languageCode'
25
+ @_hash['name'] = 'name'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ []
32
+ end
33
+
34
+ # An array for nullable fields
35
+ def self.nullables
36
+ []
37
+ end
38
+
39
+ def initialize(language_code:, name:, additional_properties: nil)
40
+ # Add additional model properties to the instance
41
+ additional_properties = {} if additional_properties.nil?
42
+
43
+ @language_code = language_code
44
+ @name = name
45
+ @additional_properties = additional_properties
46
+ end
47
+
48
+ # Creates an instance of the object from a hash.
49
+ def self.from_hash(hash)
50
+ return nil unless hash
51
+
52
+ # Extract variables from the hash.
53
+ language_code = hash.key?('languageCode') ? hash['languageCode'] : nil
54
+ name = hash.key?('name') ? hash['name'] : nil
55
+
56
+ # Create a new hash for additional properties, removing known properties.
57
+ new_hash = hash.reject { |k, _| names.value?(k) }
58
+
59
+ additional_properties = APIHelper.get_additional_properties(
60
+ new_hash, proc { |value| value }
61
+ )
62
+
63
+ # Create object from extracted values.
64
+ Language.new(language_code: language_code,
65
+ name: name,
66
+ additional_properties: additional_properties)
67
+ end
68
+
69
+ # Provides a human-readable string representation of the object.
70
+ def to_s
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} language_code: #{@language_code}, name: #{@name}, additional_properties:"\
73
+ " #{@additional_properties}>"
74
+ end
75
+
76
+ # Provides a debugging-friendly string with detailed object information.
77
+ def inspect
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} language_code: #{@language_code.inspect}, name: #{@name.inspect},"\
80
+ " additional_properties: #{@additional_properties}>"
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,83 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # LanguageListResponse Model.
8
+ class LanguageListResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[Language]]
14
+ attr_accessor :languages
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['languages'] = 'languages'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ []
26
+ end
27
+
28
+ # An array for nullable fields
29
+ def self.nullables
30
+ []
31
+ end
32
+
33
+ def initialize(languages:, additional_properties: nil)
34
+ # Add additional model properties to the instance
35
+ additional_properties = {} if additional_properties.nil?
36
+
37
+ @languages = languages
38
+ @additional_properties = additional_properties
39
+ end
40
+
41
+ # Creates an instance of the object from a hash.
42
+ def self.from_hash(hash)
43
+ return nil unless hash
44
+
45
+ # Extract variables from the hash.
46
+ # Parameter is an array, so we need to iterate through it
47
+ languages = nil
48
+ unless hash['languages'].nil?
49
+ languages = []
50
+ hash['languages'].each do |structure|
51
+ languages << (Language.from_hash(structure) if structure)
52
+ end
53
+ end
54
+
55
+ languages = nil unless hash.key?('languages')
56
+
57
+ # Create a new hash for additional properties, removing known properties.
58
+ new_hash = hash.reject { |k, _| names.value?(k) }
59
+
60
+ additional_properties = APIHelper.get_additional_properties(
61
+ new_hash, proc { |value| value }
62
+ )
63
+
64
+ # Create object from extracted values.
65
+ LanguageListResponse.new(languages: languages,
66
+ additional_properties: additional_properties)
67
+ end
68
+
69
+ # Provides a human-readable string representation of the object.
70
+ def to_s
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} languages: #{@languages}, additional_properties:"\
73
+ " #{@additional_properties}>"
74
+ end
75
+
76
+ # Provides a debugging-friendly string with detailed object information.
77
+ def inspect
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} languages: #{@languages.inspect}, additional_properties:"\
80
+ " #{@additional_properties}>"
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,103 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # ListEntitiesResponse Model.
8
+ class ListEntitiesResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Array[Entity]]
14
+ attr_accessor :entities
15
+
16
+ # When true, there are more entities available. Pass `nextCursor` as the
17
+ # `cursor` query param to fetch the next page.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :has_more
20
+
21
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
22
+ # @return [String]
23
+ attr_accessor :next_cursor
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['entities'] = 'entities'
29
+ @_hash['has_more'] = 'hasMore'
30
+ @_hash['next_cursor'] = 'nextCursor'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ %w[
42
+ next_cursor
43
+ ]
44
+ end
45
+
46
+ def initialize(entities:, has_more:, next_cursor:,
47
+ additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @entities = entities
52
+ @has_more = has_more
53
+ @next_cursor = next_cursor
54
+ @additional_properties = additional_properties
55
+ end
56
+
57
+ # Creates an instance of the object from a hash.
58
+ def self.from_hash(hash)
59
+ return nil unless hash
60
+
61
+ # Extract variables from the hash.
62
+ # Parameter is an array, so we need to iterate through it
63
+ entities = nil
64
+ unless hash['entities'].nil?
65
+ entities = []
66
+ hash['entities'].each do |structure|
67
+ entities << (Entity.from_hash(structure) if structure)
68
+ end
69
+ end
70
+
71
+ entities = nil unless hash.key?('entities')
72
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
73
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
74
+
75
+ # Create a new hash for additional properties, removing known properties.
76
+ new_hash = hash.reject { |k, _| names.value?(k) }
77
+
78
+ additional_properties = APIHelper.get_additional_properties(
79
+ new_hash, proc { |value| value }
80
+ )
81
+
82
+ # Create object from extracted values.
83
+ ListEntitiesResponse.new(entities: entities,
84
+ has_more: has_more,
85
+ next_cursor: next_cursor,
86
+ additional_properties: additional_properties)
87
+ end
88
+
89
+ # Provides a human-readable string representation of the object.
90
+ def to_s
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} entities: #{@entities}, has_more: #{@has_more}, next_cursor:"\
93
+ " #{@next_cursor}, additional_properties: #{@additional_properties}>"
94
+ end
95
+
96
+ # Provides a debugging-friendly string with detailed object information.
97
+ def inspect
98
+ class_name = self.class.name.split('::').last
99
+ "<#{class_name} entities: #{@entities.inspect}, has_more: #{@has_more.inspect},"\
100
+ " next_cursor: #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,104 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # ListProjectExportsResponse Model.
8
+ class ListProjectExportsResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Fully hydrated exports for this project, newest first. Each includes
13
+ # status, signed download/thumbnail URLs, and the embedded `file`.
14
+ # @return [Array[ProjectExport]]
15
+ attr_accessor :exports
16
+
17
+ # When true, there are more exports available. Pass `nextCursor` as the
18
+ # `cursor` query param to fetch the next page.
19
+ # @return [TrueClass | FalseClass]
20
+ attr_accessor :has_more
21
+
22
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
23
+ # @return [String]
24
+ attr_accessor :next_cursor
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['exports'] = 'exports'
30
+ @_hash['has_more'] = 'hasMore'
31
+ @_hash['next_cursor'] = 'nextCursor'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ []
38
+ end
39
+
40
+ # An array for nullable fields
41
+ def self.nullables
42
+ %w[
43
+ next_cursor
44
+ ]
45
+ end
46
+
47
+ def initialize(exports:, has_more:, next_cursor:,
48
+ additional_properties: nil)
49
+ # Add additional model properties to the instance
50
+ additional_properties = {} if additional_properties.nil?
51
+
52
+ @exports = exports
53
+ @has_more = has_more
54
+ @next_cursor = next_cursor
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
+ # Parameter is an array, so we need to iterate through it
64
+ exports = nil
65
+ unless hash['exports'].nil?
66
+ exports = []
67
+ hash['exports'].each do |structure|
68
+ exports << (ProjectExport.from_hash(structure) if structure)
69
+ end
70
+ end
71
+
72
+ exports = nil unless hash.key?('exports')
73
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
74
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
75
+
76
+ # Create a new hash for additional properties, removing known properties.
77
+ new_hash = hash.reject { |k, _| names.value?(k) }
78
+
79
+ additional_properties = APIHelper.get_additional_properties(
80
+ new_hash, proc { |value| value }
81
+ )
82
+
83
+ # Create object from extracted values.
84
+ ListProjectExportsResponse.new(exports: exports,
85
+ has_more: has_more,
86
+ next_cursor: next_cursor,
87
+ additional_properties: additional_properties)
88
+ end
89
+
90
+ # Provides a human-readable string representation of the object.
91
+ def to_s
92
+ class_name = self.class.name.split('::').last
93
+ "<#{class_name} exports: #{@exports}, has_more: #{@has_more}, next_cursor: #{@next_cursor},"\
94
+ " additional_properties: #{@additional_properties}>"
95
+ end
96
+
97
+ # Provides a debugging-friendly string with detailed object information.
98
+ def inspect
99
+ class_name = self.class.name.split('::').last
100
+ "<#{class_name} exports: #{@exports.inspect}, has_more: #{@has_more.inspect}, next_cursor:"\
101
+ " #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,105 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Paginated list of projects, most recently updated first. By default only
8
+ # API-created projects are included; pass `includeUiProjects=true` on the
9
+ # request to also include dashboard-created projects.
10
+ class ListProjectsResponse < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # TODO: Write general description for this method
15
+ # @return [Array[ProjectResponse]]
16
+ attr_accessor :projects
17
+
18
+ # When true, there are more projects available. Pass `nextCursor` as the
19
+ # `cursor` query param to fetch the next page.
20
+ # @return [TrueClass | FalseClass]
21
+ attr_accessor :has_more
22
+
23
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
24
+ # @return [String]
25
+ attr_accessor :next_cursor
26
+
27
+ # A mapping from model property names to API property names.
28
+ def self.names
29
+ @_hash = {} if @_hash.nil?
30
+ @_hash['projects'] = 'projects'
31
+ @_hash['has_more'] = 'hasMore'
32
+ @_hash['next_cursor'] = 'nextCursor'
33
+ @_hash
34
+ end
35
+
36
+ # An array for optional fields
37
+ def self.optionals
38
+ []
39
+ end
40
+
41
+ # An array for nullable fields
42
+ def self.nullables
43
+ %w[
44
+ next_cursor
45
+ ]
46
+ end
47
+
48
+ def initialize(projects:, has_more:, next_cursor:,
49
+ additional_properties: nil)
50
+ # Add additional model properties to the instance
51
+ additional_properties = {} if additional_properties.nil?
52
+
53
+ @projects = projects
54
+ @has_more = has_more
55
+ @next_cursor = next_cursor
56
+ @additional_properties = additional_properties
57
+ end
58
+
59
+ # Creates an instance of the object from a hash.
60
+ def self.from_hash(hash)
61
+ return nil unless hash
62
+
63
+ # Extract variables from the hash.
64
+ # Parameter is an array, so we need to iterate through it
65
+ projects = nil
66
+ unless hash['projects'].nil?
67
+ projects = []
68
+ hash['projects'].each do |structure|
69
+ projects << (ProjectResponse.from_hash(structure) if structure)
70
+ end
71
+ end
72
+
73
+ projects = nil unless hash.key?('projects')
74
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
75
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
76
+
77
+ # Create a new hash for additional properties, removing known properties.
78
+ new_hash = hash.reject { |k, _| names.value?(k) }
79
+
80
+ additional_properties = APIHelper.get_additional_properties(
81
+ new_hash, proc { |value| value }
82
+ )
83
+
84
+ # Create object from extracted values.
85
+ ListProjectsResponse.new(projects: projects,
86
+ has_more: has_more,
87
+ next_cursor: next_cursor,
88
+ additional_properties: additional_properties)
89
+ end
90
+
91
+ # Provides a human-readable string representation of the object.
92
+ def to_s
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} projects: #{@projects}, has_more: #{@has_more}, next_cursor:"\
95
+ " #{@next_cursor}, additional_properties: #{@additional_properties}>"
96
+ end
97
+
98
+ # Provides a debugging-friendly string with detailed object information.
99
+ def inspect
100
+ class_name = self.class.name.split('::').last
101
+ "<#{class_name} projects: #{@projects.inspect}, has_more: #{@has_more.inspect},"\
102
+ " next_cursor: #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,103 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # ListRemixActionsResponse Model.
8
+ class ListRemixActionsResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Remix actions for the project, most recent first.
13
+ # @return [Array[RemixActionRun]]
14
+ attr_accessor :remix_actions
15
+
16
+ # When true, there are more remix actions available. Pass `nextCursor` as
17
+ # the `cursor` query param to fetch the next page.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :has_more
20
+
21
+ # Opaque cursor to fetch the next page. `null` when `hasMore` is false.
22
+ # @return [String]
23
+ attr_accessor :next_cursor
24
+
25
+ # A mapping from model property names to API property names.
26
+ def self.names
27
+ @_hash = {} if @_hash.nil?
28
+ @_hash['remix_actions'] = 'remixActions'
29
+ @_hash['has_more'] = 'hasMore'
30
+ @_hash['next_cursor'] = 'nextCursor'
31
+ @_hash
32
+ end
33
+
34
+ # An array for optional fields
35
+ def self.optionals
36
+ []
37
+ end
38
+
39
+ # An array for nullable fields
40
+ def self.nullables
41
+ %w[
42
+ next_cursor
43
+ ]
44
+ end
45
+
46
+ def initialize(remix_actions:, has_more:, next_cursor:,
47
+ additional_properties: nil)
48
+ # Add additional model properties to the instance
49
+ additional_properties = {} if additional_properties.nil?
50
+
51
+ @remix_actions = remix_actions
52
+ @has_more = has_more
53
+ @next_cursor = next_cursor
54
+ @additional_properties = additional_properties
55
+ end
56
+
57
+ # Creates an instance of the object from a hash.
58
+ def self.from_hash(hash)
59
+ return nil unless hash
60
+
61
+ # Extract variables from the hash.
62
+ # Parameter is an array, so we need to iterate through it
63
+ remix_actions = nil
64
+ unless hash['remixActions'].nil?
65
+ remix_actions = []
66
+ hash['remixActions'].each do |structure|
67
+ remix_actions << (RemixActionRun.from_hash(structure) if structure)
68
+ end
69
+ end
70
+
71
+ remix_actions = nil unless hash.key?('remixActions')
72
+ has_more = hash.key?('hasMore') ? hash['hasMore'] : nil
73
+ next_cursor = hash.key?('nextCursor') ? hash['nextCursor'] : nil
74
+
75
+ # Create a new hash for additional properties, removing known properties.
76
+ new_hash = hash.reject { |k, _| names.value?(k) }
77
+
78
+ additional_properties = APIHelper.get_additional_properties(
79
+ new_hash, proc { |value| value }
80
+ )
81
+
82
+ # Create object from extracted values.
83
+ ListRemixActionsResponse.new(remix_actions: remix_actions,
84
+ has_more: has_more,
85
+ next_cursor: next_cursor,
86
+ additional_properties: additional_properties)
87
+ end
88
+
89
+ # Provides a human-readable string representation of the object.
90
+ def to_s
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} remix_actions: #{@remix_actions}, has_more: #{@has_more}, next_cursor:"\
93
+ " #{@next_cursor}, additional_properties: #{@additional_properties}>"
94
+ end
95
+
96
+ # Provides a debugging-friendly string with detailed object information.
97
+ def inspect
98
+ class_name = self.class.name.split('::').last
99
+ "<#{class_name} remix_actions: #{@remix_actions.inspect}, has_more: #{@has_more.inspect},"\
100
+ " next_cursor: #{@next_cursor.inspect}, additional_properties: #{@additional_properties}>"
101
+ end
102
+ end
103
+ end