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,386 @@
1
+ # videogen
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
+
6
+ module Videogen
7
+ # Metadata for a generated file. Obtain ids from tool results or `GET
8
+ # /v1/files`.
9
+ class FileInfo < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # File id (e.g. `vg_file_...`).
14
+ # @return [String]
15
+ attr_accessor :file_id
16
+
17
+ # File type. Null when the file is still being processed and the type has
18
+ # not yet been determined.
19
+ # @return [FileType]
20
+ attr_accessor :type
21
+
22
+ # File scope.
23
+ # - `GLOBAL`: user-uploaded or standalone generated files that persist
24
+ # indefinitely.
25
+ # - `PROJECT`: project-specific files (e.g. text-to-speech clips in a
26
+ # generated project).
27
+ # - `EXPORT`: project exports.
28
+ # - `TEMPORARY`: short-lived files guaranteed to be available for 24 hours,
29
+ # after which they may be archived at any time. Not analyzed (no
30
+ # description, transcript, or embedding).
31
+ # - `ENTITY`: files attached to a reusable entity (e.g. a voice sample for
32
+ # an actor), shared across your team.
33
+ # @return [FileInfoScope]
34
+ attr_accessor :scope
35
+
36
+ # Display name for the file.
37
+ # @return [String]
38
+ attr_accessor :display_name
39
+
40
+ # Display name for the file.
41
+ # @return [String]
42
+ attr_accessor :description
43
+
44
+ # Duration in seconds for video and audio files. Null for images.
45
+ # @return [Float]
46
+ attr_accessor :duration_seconds
47
+
48
+ # Timed transcript for video and audio files, when available, as a
49
+ # `Transcript` object with timed `words`. Null for images or when no
50
+ # transcript has been generated. For plain transcript text, use
51
+ # `transcriptText`.
52
+ # @return [Transcript]
53
+ attr_accessor :transcript
54
+
55
+ # Plain transcript text for video and audio files, when available. Null for
56
+ # images or when no transcript has been generated.
57
+ # @return [String]
58
+ attr_accessor :transcript_text
59
+
60
+ # Private signed URL for the highest-quality downloadable rendition,
61
+ # provided at the top level for convenience. Valid for 7 days from when it
62
+ # was signed. `null` when the rendition is still processing or the URL has
63
+ # not been signed yet. See `downloadUrlExpiresAt` for the exact expiry and
64
+ # `downloadSource` for the full rendition metadata; call `POST
65
+ # /v1/files/{fileId}/hydrate` to refresh it.
66
+ # @return [String]
67
+ attr_accessor :download_url
68
+
69
+ # Seconds since epoch (Unix timestamp) when `downloadUrl` expires. `null`
70
+ # when `downloadUrl` is null.
71
+ # @return [Integer]
72
+ attr_accessor :download_url_expires_at
73
+
74
+ # Private signed URL for the thumbnail rendition, provided at the top level
75
+ # for convenience. Valid for 7 days from when it was signed. `null` for file
76
+ # types that have no thumbnail (e.g. audio) or when it has not been signed
77
+ # yet. See `thumbnailSource` for the full rendition metadata.
78
+ # @return [String]
79
+ attr_accessor :thumbnail_url
80
+
81
+ # Seconds since epoch (Unix timestamp) when `thumbnailUrl` expires. `null`
82
+ # when `thumbnailUrl` is null.
83
+ # @return [Integer]
84
+ attr_accessor :thumbnail_url_expires_at
85
+
86
+ # Thumbnail image source. Populated after hydration.
87
+ # @return [FileSource]
88
+ attr_accessor :thumbnail_source
89
+
90
+ # Preview rendition source (720p for video, resized for images). Populated
91
+ # after hydration.
92
+ # @return [FileSource]
93
+ attr_accessor :preview_source
94
+
95
+ # Highest-quality downloadable rendition. Populated after hydration.
96
+ # @return [FileSource]
97
+ attr_accessor :download_source
98
+
99
+ # Private HLS streaming source. Populated for video and audio files once
100
+ # streaming renditions are ready. Uses a signed token; treat like other
101
+ # signed sources.
102
+ # @return [FileSource]
103
+ attr_accessor :hls_source
104
+
105
+ # Whether public preview is enabled for this file. When true,
106
+ # `staticPublicPreviewSource` is populated for all file types. For video and
107
+ # audio, `publicHlsUrl` and `publicPlaybackId` are also populated once embed
108
+ # streaming is ready.
109
+ # @return [TrueClass | FalseClass]
110
+ attr_accessor :is_public_preview_enabled
111
+
112
+ # Permanent public URL for the file's highest-quality rendition. Populated
113
+ # when `isPublicPreviewEnabled` is true. Does not expire (`expiresAt` is
114
+ # null). Use for direct links to images, downloads, or any file type. For
115
+ # embedded video or audio players, prefer `publicPlaybackId`.
116
+ # @return [FileSource]
117
+ attr_accessor :static_public_preview_source
118
+
119
+ # Public HLS streaming URL for video and audio. Only present when
120
+ # `isPublicPreviewEnabled` is true and embed streaming is ready. Prefer
121
+ # `publicPlaybackId` with `@videogen/player` for embeds.
122
+ # @return [String]
123
+ attr_accessor :public_hls_url
124
+
125
+ # Encoded public playback id (e.g. `vg_play_...`) for video and audio
126
+ # embeds. Pass this to `@videogen/player` or `@videogen/player-react`. Only
127
+ # present when `isPublicPreviewEnabled` is true and embed streaming is
128
+ # ready. For a permanent direct file URL (any type), use
129
+ # `staticPublicPreviewSource` instead.
130
+ # @return [String]
131
+ attr_accessor :public_playback_id
132
+
133
+ # Tool type that generated this file (e.g. `GENERATE_IMAGE`,
134
+ # `TEXT_TO_SPEECH`). Only present when the file was created by a tool
135
+ # execution.
136
+ # @return [String]
137
+ attr_accessor :source_tool_type
138
+
139
+ # Execution id of the tool call that generated this file (e.g.
140
+ # `vg_tool_...`). Only present when the file was created by a tool
141
+ # execution.
142
+ # @return [String]
143
+ attr_accessor :source_tool_execution_id
144
+
145
+ # Background analysis state for the file (used to populate `description`,
146
+ # `transcript`, `durationSeconds`, and the search embedding). Omitted when
147
+ # the file was returned via a path that does not check analysis progress
148
+ # (e.g. tool-result inline files and webhook payloads).
149
+ # @return [FileAnalysisMetadata1]
150
+ attr_accessor :file_analysis_metadata
151
+
152
+ # A mapping from model property names to API property names.
153
+ def self.names
154
+ @_hash = {} if @_hash.nil?
155
+ @_hash['file_id'] = 'fileId'
156
+ @_hash['type'] = 'type'
157
+ @_hash['scope'] = 'scope'
158
+ @_hash['display_name'] = 'displayName'
159
+ @_hash['description'] = 'description'
160
+ @_hash['duration_seconds'] = 'durationSeconds'
161
+ @_hash['transcript'] = 'transcript'
162
+ @_hash['transcript_text'] = 'transcriptText'
163
+ @_hash['download_url'] = 'downloadUrl'
164
+ @_hash['download_url_expires_at'] = 'downloadUrlExpiresAt'
165
+ @_hash['thumbnail_url'] = 'thumbnailUrl'
166
+ @_hash['thumbnail_url_expires_at'] = 'thumbnailUrlExpiresAt'
167
+ @_hash['thumbnail_source'] = 'thumbnailSource'
168
+ @_hash['preview_source'] = 'previewSource'
169
+ @_hash['download_source'] = 'downloadSource'
170
+ @_hash['hls_source'] = 'hlsSource'
171
+ @_hash['is_public_preview_enabled'] = 'isPublicPreviewEnabled'
172
+ @_hash['static_public_preview_source'] = 'staticPublicPreviewSource'
173
+ @_hash['public_hls_url'] = 'publicHlsUrl'
174
+ @_hash['public_playback_id'] = 'publicPlaybackId'
175
+ @_hash['source_tool_type'] = 'sourceToolType'
176
+ @_hash['source_tool_execution_id'] = 'sourceToolExecutionId'
177
+ @_hash['file_analysis_metadata'] = 'fileAnalysisMetadata'
178
+ @_hash
179
+ end
180
+
181
+ # An array for optional fields
182
+ def self.optionals
183
+ %w[
184
+ type
185
+ display_name
186
+ description
187
+ duration_seconds
188
+ transcript
189
+ transcript_text
190
+ download_url
191
+ download_url_expires_at
192
+ thumbnail_url
193
+ thumbnail_url_expires_at
194
+ thumbnail_source
195
+ preview_source
196
+ download_source
197
+ hls_source
198
+ is_public_preview_enabled
199
+ static_public_preview_source
200
+ public_hls_url
201
+ public_playback_id
202
+ source_tool_type
203
+ source_tool_execution_id
204
+ file_analysis_metadata
205
+ ]
206
+ end
207
+
208
+ # An array for nullable fields
209
+ def self.nullables
210
+ %w[
211
+ type
212
+ description
213
+ duration_seconds
214
+ transcript
215
+ transcript_text
216
+ download_url
217
+ download_url_expires_at
218
+ thumbnail_url
219
+ thumbnail_url_expires_at
220
+ thumbnail_source
221
+ preview_source
222
+ download_source
223
+ hls_source
224
+ static_public_preview_source
225
+ public_hls_url
226
+ public_playback_id
227
+ ]
228
+ end
229
+
230
+ def initialize(file_id:, scope:, type: SKIP, display_name: SKIP,
231
+ description: SKIP, duration_seconds: SKIP, transcript: SKIP,
232
+ transcript_text: SKIP, download_url: SKIP,
233
+ download_url_expires_at: SKIP, thumbnail_url: SKIP,
234
+ thumbnail_url_expires_at: SKIP, thumbnail_source: SKIP,
235
+ preview_source: SKIP, download_source: SKIP,
236
+ hls_source: SKIP, is_public_preview_enabled: SKIP,
237
+ static_public_preview_source: SKIP, public_hls_url: SKIP,
238
+ public_playback_id: SKIP, source_tool_type: SKIP,
239
+ source_tool_execution_id: SKIP, file_analysis_metadata: SKIP,
240
+ additional_properties: nil)
241
+ # Add additional model properties to the instance
242
+ additional_properties = {} if additional_properties.nil?
243
+
244
+ @file_id = file_id
245
+ @type = type unless type == SKIP
246
+ @scope = scope
247
+ @display_name = display_name unless display_name == SKIP
248
+ @description = description unless description == SKIP
249
+ @duration_seconds = duration_seconds unless duration_seconds == SKIP
250
+ @transcript = transcript unless transcript == SKIP
251
+ @transcript_text = transcript_text unless transcript_text == SKIP
252
+ @download_url = download_url unless download_url == SKIP
253
+ @download_url_expires_at = download_url_expires_at unless download_url_expires_at == SKIP
254
+ @thumbnail_url = thumbnail_url unless thumbnail_url == SKIP
255
+ @thumbnail_url_expires_at = thumbnail_url_expires_at unless thumbnail_url_expires_at == SKIP
256
+ @thumbnail_source = thumbnail_source unless thumbnail_source == SKIP
257
+ @preview_source = preview_source unless preview_source == SKIP
258
+ @download_source = download_source unless download_source == SKIP
259
+ @hls_source = hls_source unless hls_source == SKIP
260
+ unless is_public_preview_enabled == SKIP
261
+ @is_public_preview_enabled =
262
+ is_public_preview_enabled
263
+ end
264
+ unless static_public_preview_source == SKIP
265
+ @static_public_preview_source =
266
+ static_public_preview_source
267
+ end
268
+ @public_hls_url = public_hls_url unless public_hls_url == SKIP
269
+ @public_playback_id = public_playback_id unless public_playback_id == SKIP
270
+ @source_tool_type = source_tool_type unless source_tool_type == SKIP
271
+ @source_tool_execution_id = source_tool_execution_id unless source_tool_execution_id == SKIP
272
+ @file_analysis_metadata = file_analysis_metadata unless file_analysis_metadata == SKIP
273
+ @additional_properties = additional_properties
274
+ end
275
+
276
+ # Creates an instance of the object from a hash.
277
+ def self.from_hash(hash)
278
+ return nil unless hash
279
+
280
+ # Extract variables from the hash.
281
+ file_id = hash.key?('fileId') ? hash['fileId'] : nil
282
+ scope = hash.key?('scope') ? hash['scope'] : nil
283
+ type = hash.key?('type') ? hash['type'] : SKIP
284
+ display_name = hash.key?('displayName') ? hash['displayName'] : SKIP
285
+ description = hash.key?('description') ? hash['description'] : SKIP
286
+ duration_seconds =
287
+ hash.key?('durationSeconds') ? hash['durationSeconds'] : SKIP
288
+ transcript = Transcript.from_hash(hash['transcript']) if hash['transcript']
289
+ transcript_text =
290
+ hash.key?('transcriptText') ? hash['transcriptText'] : SKIP
291
+ download_url = hash.key?('downloadUrl') ? hash['downloadUrl'] : SKIP
292
+ download_url_expires_at =
293
+ hash.key?('downloadUrlExpiresAt') ? hash['downloadUrlExpiresAt'] : SKIP
294
+ thumbnail_url = hash.key?('thumbnailUrl') ? hash['thumbnailUrl'] : SKIP
295
+ thumbnail_url_expires_at =
296
+ hash.key?('thumbnailUrlExpiresAt') ? hash['thumbnailUrlExpiresAt'] : SKIP
297
+ thumbnail_source = FileSource.from_hash(hash['thumbnailSource']) if hash['thumbnailSource']
298
+ preview_source = FileSource.from_hash(hash['previewSource']) if hash['previewSource']
299
+ download_source = FileSource.from_hash(hash['downloadSource']) if hash['downloadSource']
300
+ hls_source = FileSource.from_hash(hash['hlsSource']) if hash['hlsSource']
301
+ is_public_preview_enabled =
302
+ hash.key?('isPublicPreviewEnabled') ? hash['isPublicPreviewEnabled'] : SKIP
303
+ static_public_preview_source = FileSource.from_hash(hash['staticPublicPreviewSource']) if
304
+ hash['staticPublicPreviewSource']
305
+ public_hls_url = hash.key?('publicHlsUrl') ? hash['publicHlsUrl'] : SKIP
306
+ public_playback_id =
307
+ hash.key?('publicPlaybackId') ? hash['publicPlaybackId'] : SKIP
308
+ source_tool_type =
309
+ hash.key?('sourceToolType') ? hash['sourceToolType'] : SKIP
310
+ source_tool_execution_id =
311
+ hash.key?('sourceToolExecutionId') ? hash['sourceToolExecutionId'] : SKIP
312
+ file_analysis_metadata = FileAnalysisMetadata1.from_hash(hash['fileAnalysisMetadata']) if
313
+ hash['fileAnalysisMetadata']
314
+
315
+ # Create a new hash for additional properties, removing known properties.
316
+ new_hash = hash.reject { |k, _| names.value?(k) }
317
+
318
+ additional_properties = APIHelper.get_additional_properties(
319
+ new_hash, proc { |value| value }
320
+ )
321
+
322
+ # Create object from extracted values.
323
+ FileInfo.new(file_id: file_id,
324
+ scope: scope,
325
+ type: type,
326
+ display_name: display_name,
327
+ description: description,
328
+ duration_seconds: duration_seconds,
329
+ transcript: transcript,
330
+ transcript_text: transcript_text,
331
+ download_url: download_url,
332
+ download_url_expires_at: download_url_expires_at,
333
+ thumbnail_url: thumbnail_url,
334
+ thumbnail_url_expires_at: thumbnail_url_expires_at,
335
+ thumbnail_source: thumbnail_source,
336
+ preview_source: preview_source,
337
+ download_source: download_source,
338
+ hls_source: hls_source,
339
+ is_public_preview_enabled: is_public_preview_enabled,
340
+ static_public_preview_source: static_public_preview_source,
341
+ public_hls_url: public_hls_url,
342
+ public_playback_id: public_playback_id,
343
+ source_tool_type: source_tool_type,
344
+ source_tool_execution_id: source_tool_execution_id,
345
+ file_analysis_metadata: file_analysis_metadata,
346
+ additional_properties: additional_properties)
347
+ end
348
+
349
+ # Provides a human-readable string representation of the object.
350
+ def to_s
351
+ class_name = self.class.name.split('::').last
352
+ "<#{class_name} file_id: #{@file_id}, type: #{@type}, scope: #{@scope}, display_name:"\
353
+ " #{@display_name}, description: #{@description}, duration_seconds: #{@duration_seconds},"\
354
+ " transcript: #{@transcript}, transcript_text: #{@transcript_text}, download_url:"\
355
+ " #{@download_url}, download_url_expires_at: #{@download_url_expires_at}, thumbnail_url:"\
356
+ " #{@thumbnail_url}, thumbnail_url_expires_at: #{@thumbnail_url_expires_at},"\
357
+ " thumbnail_source: #{@thumbnail_source}, preview_source: #{@preview_source},"\
358
+ " download_source: #{@download_source}, hls_source: #{@hls_source},"\
359
+ " is_public_preview_enabled: #{@is_public_preview_enabled}, static_public_preview_source:"\
360
+ " #{@static_public_preview_source}, public_hls_url: #{@public_hls_url}, public_playback_id:"\
361
+ " #{@public_playback_id}, source_tool_type: #{@source_tool_type}, source_tool_execution_id:"\
362
+ " #{@source_tool_execution_id}, file_analysis_metadata: #{@file_analysis_metadata},"\
363
+ " additional_properties: #{@additional_properties}>"
364
+ end
365
+
366
+ # Provides a debugging-friendly string with detailed object information.
367
+ def inspect
368
+ class_name = self.class.name.split('::').last
369
+ "<#{class_name} file_id: #{@file_id.inspect}, type: #{@type.inspect}, scope:"\
370
+ " #{@scope.inspect}, display_name: #{@display_name.inspect}, description:"\
371
+ " #{@description.inspect}, duration_seconds: #{@duration_seconds.inspect}, transcript:"\
372
+ " #{@transcript.inspect}, transcript_text: #{@transcript_text.inspect}, download_url:"\
373
+ " #{@download_url.inspect}, download_url_expires_at: #{@download_url_expires_at.inspect},"\
374
+ " thumbnail_url: #{@thumbnail_url.inspect}, thumbnail_url_expires_at:"\
375
+ " #{@thumbnail_url_expires_at.inspect}, thumbnail_source: #{@thumbnail_source.inspect},"\
376
+ " preview_source: #{@preview_source.inspect}, download_source: #{@download_source.inspect},"\
377
+ " hls_source: #{@hls_source.inspect}, is_public_preview_enabled:"\
378
+ " #{@is_public_preview_enabled.inspect}, static_public_preview_source:"\
379
+ " #{@static_public_preview_source.inspect}, public_hls_url: #{@public_hls_url.inspect},"\
380
+ " public_playback_id: #{@public_playback_id.inspect}, source_tool_type:"\
381
+ " #{@source_tool_type.inspect}, source_tool_execution_id:"\
382
+ " #{@source_tool_execution_id.inspect}, file_analysis_metadata:"\
383
+ " #{@file_analysis_metadata.inspect}, additional_properties: #{@additional_properties}>"
384
+ end
385
+ end
386
+ end