gcore 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl

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.

Potentially problematic release.


This version of gcore might be problematic. Click here for more details.

Files changed (181) hide show
  1. gcore/_client.py +9 -0
  2. gcore/_models.py +24 -3
  3. gcore/_version.py +1 -1
  4. gcore/pagination.py +101 -1
  5. gcore/resources/__init__.py +14 -0
  6. gcore/resources/cloud/__init__.py +28 -0
  7. gcore/resources/cloud/cloud.py +64 -0
  8. gcore/resources/cloud/cost_reports.py +811 -0
  9. gcore/resources/cloud/file_shares/file_shares.py +10 -0
  10. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +61 -26
  11. gcore/resources/cloud/inference/registry_credentials.py +4 -6
  12. gcore/resources/cloud/usage_reports.py +337 -0
  13. gcore/resources/streaming/__init__.py +159 -0
  14. gcore/resources/streaming/ai_tasks.py +1288 -0
  15. gcore/resources/streaming/broadcasts.py +579 -0
  16. gcore/resources/streaming/directories.py +515 -0
  17. gcore/resources/streaming/players.py +577 -0
  18. gcore/resources/streaming/playlists.py +1059 -0
  19. gcore/resources/streaming/quality_sets.py +331 -0
  20. gcore/resources/streaming/restreams.py +484 -0
  21. gcore/resources/streaming/statistics.py +3224 -0
  22. gcore/resources/streaming/streaming.py +390 -0
  23. gcore/resources/streaming/streams/__init__.py +33 -0
  24. gcore/resources/streaming/streams/overlays.py +716 -0
  25. gcore/resources/streaming/streams/streams.py +1592 -0
  26. gcore/resources/streaming/videos/__init__.py +33 -0
  27. gcore/resources/streaming/videos/subtitles.py +623 -0
  28. gcore/resources/streaming/videos/videos.py +1553 -0
  29. gcore/resources/waap/ip_info.py +28 -10
  30. gcore/types/cloud/__init__.py +10 -0
  31. gcore/types/cloud/cost_report_aggregated.py +865 -0
  32. gcore/types/cloud/cost_report_aggregated_monthly.py +865 -0
  33. gcore/types/cloud/cost_report_detailed.py +1343 -0
  34. gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +394 -0
  35. gcore/types/cloud/cost_report_get_aggregated_params.py +409 -0
  36. gcore/types/cloud/cost_report_get_detailed_params.py +435 -0
  37. gcore/types/cloud/file_share.py +37 -3
  38. gcore/types/cloud/file_share_create_params.py +16 -0
  39. gcore/types/cloud/gpu_baremetal_cluster.py +2 -2
  40. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +9 -0
  41. gcore/types/cloud/quota_get_all_response.py +24 -2
  42. gcore/types/cloud/quota_get_by_region_response.py +24 -2
  43. gcore/types/cloud/quotas/request_create_params.py +12 -1
  44. gcore/types/cloud/quotas/request_get_response.py +12 -1
  45. gcore/types/cloud/quotas/request_list_response.py +12 -1
  46. gcore/types/cloud/usage_report.py +1612 -0
  47. gcore/types/cloud/usage_report_get_params.py +432 -0
  48. gcore/types/streaming/__init__.py +143 -0
  49. gcore/types/streaming/ai_contentmoderation_casm.py +39 -0
  50. gcore/types/streaming/ai_contentmoderation_hardnudity.py +54 -0
  51. gcore/types/streaming/ai_contentmoderation_nsfw.py +39 -0
  52. gcore/types/streaming/ai_contentmoderation_softnudity.py +66 -0
  53. gcore/types/streaming/ai_contentmoderation_sport.py +39 -0
  54. gcore/types/streaming/ai_contentmoderation_weapon.py +39 -0
  55. gcore/types/streaming/ai_task.py +205 -0
  56. gcore/types/streaming/ai_task_cancel_response.py +12 -0
  57. gcore/types/streaming/ai_task_create_params.py +168 -0
  58. gcore/types/streaming/ai_task_create_response.py +10 -0
  59. gcore/types/streaming/ai_task_get_ai_settings_params.py +27 -0
  60. gcore/types/streaming/ai_task_get_ai_settings_response.py +12 -0
  61. gcore/types/streaming/ai_task_get_response.py +313 -0
  62. gcore/types/streaming/ai_task_list_params.py +50 -0
  63. gcore/types/streaming/broadcast.py +71 -0
  64. gcore/types/streaming/broadcast_create_params.py +76 -0
  65. gcore/types/streaming/broadcast_list_params.py +12 -0
  66. gcore/types/streaming/broadcast_spectators_count.py +12 -0
  67. gcore/types/streaming/broadcast_update_params.py +76 -0
  68. gcore/types/streaming/clip.py +78 -0
  69. gcore/types/streaming/create_video_param.py +214 -0
  70. gcore/types/streaming/direct_upload_parameters.py +33 -0
  71. gcore/types/streaming/directories_tree.py +19 -0
  72. gcore/types/streaming/directory_base.py +31 -0
  73. gcore/types/streaming/directory_create_params.py +15 -0
  74. gcore/types/streaming/directory_get_response.py +19 -0
  75. gcore/types/streaming/directory_item.py +13 -0
  76. gcore/types/streaming/directory_update_params.py +18 -0
  77. gcore/types/streaming/directory_video.py +13 -0
  78. gcore/types/streaming/ffprobes.py +25 -0
  79. gcore/types/streaming/max_stream_series.py +21 -0
  80. gcore/types/streaming/meet_series.py +23 -0
  81. gcore/types/streaming/player.py +114 -0
  82. gcore/types/streaming/player_create_params.py +18 -0
  83. gcore/types/streaming/player_list_params.py +12 -0
  84. gcore/types/streaming/player_param.py +114 -0
  85. gcore/types/streaming/player_update_params.py +18 -0
  86. gcore/types/streaming/playlist.py +102 -0
  87. gcore/types/streaming/playlist_create.py +12 -0
  88. gcore/types/streaming/playlist_create_params.py +102 -0
  89. gcore/types/streaming/playlist_list_params.py +12 -0
  90. gcore/types/streaming/playlist_list_videos_response.py +10 -0
  91. gcore/types/streaming/playlist_update_params.py +102 -0
  92. gcore/types/streaming/playlist_video.py +215 -0
  93. gcore/types/streaming/popular_videos.py +17 -0
  94. gcore/types/streaming/quality_set_set_default_params.py +23 -0
  95. gcore/types/streaming/quality_sets.py +57 -0
  96. gcore/types/streaming/restream.py +37 -0
  97. gcore/types/streaming/restream_create_params.py +41 -0
  98. gcore/types/streaming/restream_list_params.py +12 -0
  99. gcore/types/streaming/restream_update_params.py +41 -0
  100. gcore/types/streaming/statistic_get_ffprobes_params.py +22 -0
  101. gcore/types/streaming/statistic_get_live_unique_viewers_params.py +26 -0
  102. gcore/types/streaming/statistic_get_live_unique_viewers_response.py +25 -0
  103. gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py +32 -0
  104. gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py +30 -0
  105. gcore/types/streaming/statistic_get_max_streams_series_params.py +20 -0
  106. gcore/types/streaming/statistic_get_meet_series_params.py +20 -0
  107. gcore/types/streaming/statistic_get_popular_videos_params.py +15 -0
  108. gcore/types/streaming/statistic_get_storage_series_params.py +20 -0
  109. gcore/types/streaming/statistic_get_stream_series_params.py +20 -0
  110. gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +27 -0
  111. gcore/types/streaming/statistic_get_unique_viewers_params.py +34 -0
  112. gcore/types/streaming/statistic_get_views_by_browsers_params.py +15 -0
  113. gcore/types/streaming/statistic_get_views_by_country_params.py +15 -0
  114. gcore/types/streaming/statistic_get_views_by_hostname_params.py +15 -0
  115. gcore/types/streaming/statistic_get_views_by_operating_system_params.py +15 -0
  116. gcore/types/streaming/statistic_get_views_by_referer_params.py +15 -0
  117. gcore/types/streaming/statistic_get_views_by_region_params.py +15 -0
  118. gcore/types/streaming/statistic_get_views_heatmap_params.py +21 -0
  119. gcore/types/streaming/statistic_get_views_params.py +34 -0
  120. gcore/types/streaming/statistic_get_vod_storage_volume_params.py +17 -0
  121. gcore/types/streaming/statistic_get_vod_transcoding_duration_params.py +17 -0
  122. gcore/types/streaming/statistic_get_vod_unique_viewers_cdn_params.py +26 -0
  123. gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py +32 -0
  124. gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py +30 -0
  125. gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_response.py +22 -0
  126. gcore/types/streaming/storage_series.py +23 -0
  127. gcore/types/streaming/stream.py +420 -0
  128. gcore/types/streaming/stream_create_clip_params.py +48 -0
  129. gcore/types/streaming/stream_create_params.py +165 -0
  130. gcore/types/streaming/stream_list_clips_response.py +10 -0
  131. gcore/types/streaming/stream_list_params.py +18 -0
  132. gcore/types/streaming/stream_series.py +21 -0
  133. gcore/types/streaming/stream_start_recording_response.py +76 -0
  134. gcore/types/streaming/stream_update_params.py +169 -0
  135. gcore/types/streaming/streams/__init__.py +11 -0
  136. gcore/types/streaming/streams/overlay.py +43 -0
  137. gcore/types/streaming/streams/overlay_create_params.py +36 -0
  138. gcore/types/streaming/streams/overlay_create_response.py +10 -0
  139. gcore/types/streaming/streams/overlay_list_response.py +10 -0
  140. gcore/types/streaming/streams/overlay_update_multiple_params.py +39 -0
  141. gcore/types/streaming/streams/overlay_update_multiple_response.py +10 -0
  142. gcore/types/streaming/streams/overlay_update_params.py +33 -0
  143. gcore/types/streaming/subtitle.py +12 -0
  144. gcore/types/streaming/subtitle_base.py +18 -0
  145. gcore/types/streaming/subtitle_base_param.py +18 -0
  146. gcore/types/streaming/unique_viewers.py +35 -0
  147. gcore/types/streaming/unique_viewers_cdn.py +17 -0
  148. gcore/types/streaming/video.py +444 -0
  149. gcore/types/streaming/video_create_multiple_params.py +28 -0
  150. gcore/types/streaming/video_create_multiple_response.py +10 -0
  151. gcore/types/streaming/video_create_params.py +13 -0
  152. gcore/types/streaming/video_create_response.py +10 -0
  153. gcore/types/streaming/video_list_names_params.py +13 -0
  154. gcore/types/streaming/video_list_params.py +59 -0
  155. gcore/types/streaming/video_update_params.py +214 -0
  156. gcore/types/streaming/videos/__init__.py +7 -0
  157. gcore/types/streaming/videos/subtitle_create_params.py +17 -0
  158. gcore/types/streaming/videos/subtitle_list_response.py +10 -0
  159. gcore/types/streaming/videos/subtitle_update_params.py +20 -0
  160. gcore/types/streaming/views.py +35 -0
  161. gcore/types/streaming/views_by_browser.py +17 -0
  162. gcore/types/streaming/views_by_country.py +19 -0
  163. gcore/types/streaming/views_by_hostname.py +17 -0
  164. gcore/types/streaming/views_by_operating_system.py +17 -0
  165. gcore/types/streaming/views_by_referer.py +17 -0
  166. gcore/types/streaming/views_by_region.py +19 -0
  167. gcore/types/streaming/views_heatmap.py +19 -0
  168. gcore/types/streaming/vod_statistics_series.py +21 -0
  169. gcore/types/streaming/vod_total_stream_duration_series.py +22 -0
  170. gcore/types/waap/domains/custom_rule_create_params.py +4 -4
  171. gcore/types/waap/domains/custom_rule_update_params.py +4 -4
  172. gcore/types/waap/ip_info_get_blocked_requests_params.py +5 -1
  173. gcore/types/waap/ip_info_get_counts_params.py +2 -1
  174. gcore/types/waap/ip_info_get_top_sessions_params.py +5 -1
  175. gcore/types/waap/ip_info_get_top_urls_params.py +5 -1
  176. gcore/types/waap/ip_info_get_top_user_agents_params.py +5 -1
  177. gcore/types/waap/waap_custom_rule.py +4 -4
  178. {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/METADATA +1 -1
  179. {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/RECORD +181 -33
  180. {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/WHEEL +0 -0
  181. {gcore-0.6.0.dist-info → gcore-0.7.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,313 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from pydantic import Field as FieldInfo
7
+
8
+ from .ai_task import AITask
9
+ from ..._models import BaseModel
10
+
11
+ __all__ = [
12
+ "AITaskGetResponse",
13
+ "AITaskGetResponseProcessingTime",
14
+ "AITaskGetResponseResult",
15
+ "AITaskGetResponseResultAIResultsTranscribe",
16
+ "AITaskGetResponseResultAIResultsTranscribeSubtitle",
17
+ "AITaskGetResponseResultAIResultsContentmoderationSport",
18
+ "AITaskGetResponseResultAIResultsContentmoderationSportFrame",
19
+ "AITaskGetResponseResultAIResultsContentmoderationWeapon",
20
+ "AITaskGetResponseResultAIResultsContentmoderationWeaponFrame",
21
+ "AITaskGetResponseResultAIResultsContentmoderationNsfw",
22
+ "AITaskGetResponseResultAIResultsContentmoderationNsfwFrame",
23
+ "AITaskGetResponseResultAIResultsContentmoderationHardnudity",
24
+ "AITaskGetResponseResultAIResultsContentmoderationHardnudityFrame",
25
+ "AITaskGetResponseResultAIResultsContentmoderationSoftnudity",
26
+ "AITaskGetResponseResultAIResultsContentmoderationSoftnudityFrame",
27
+ "AITaskGetResponseResultAIResultsContentmoderationCasm",
28
+ "AITaskGetResponseResultAIResultsContentmoderationCasmFrame",
29
+ "AITaskGetResponseResultAIResultsFailure",
30
+ ]
31
+
32
+
33
+ class AITaskGetResponseProcessingTime(BaseModel):
34
+ completed_at: Optional[str] = None
35
+ """Video processing end time. Format is date time in ISO 8601"""
36
+
37
+ started_at: Optional[str] = None
38
+ """Video processing start time. Format is date time in ISO 8601"""
39
+
40
+ total_time_sec: Optional[float] = None
41
+ """Duration of video processing in seconds"""
42
+
43
+
44
+ class AITaskGetResponseResultAIResultsTranscribeSubtitle(BaseModel):
45
+ end_time: Optional[str] = None
46
+ """End time of the phrase, when it ends in the video. Format is "HH:mm:ss.fff"."""
47
+
48
+ start_time: Optional[str] = None
49
+ """Start time of the phrase when it is heard in the video.
50
+
51
+ Format is "HH:mm:ss.fff".
52
+ """
53
+
54
+ text: Optional[str] = None
55
+ """A complete phrase that sounds during a specified period of time."""
56
+
57
+
58
+ class AITaskGetResponseResultAIResultsTranscribe(BaseModel):
59
+ concatenated_text: Optional[str] = None
60
+ """Full text of the analyzed video. The value is unstructured, unformatted text."""
61
+
62
+ languages: Optional[List[str]] = None
63
+ """An array of language codes that were discovered and/or used in transcription.
64
+
65
+ If the audio or subtitle language was explicitly specified in the initial
66
+ parameters, it will be copied here. For automatic detection the identified
67
+ languages will be displayed here. Also please note that for multilingual audio,
68
+ the first 5 languages are displayed in order of frequency of use.
69
+ """
70
+
71
+ speech_detected: Optional[bool] = None
72
+ """
73
+ Determines whether speech was detected or not. Please note: If the task is in
74
+ "SUCCESS" status and speech was not found in the entire file, then "false" will
75
+ be indicated here and the `subtitles` field will be empty.
76
+ """
77
+
78
+ subtitles: Optional[List[AITaskGetResponseResultAIResultsTranscribeSubtitle]] = None
79
+ """An array of phrases divided into time intervals, in the format "json".
80
+
81
+ Suitable when you need to display the result in chronometric form, or transfer
82
+ the text for further processing.
83
+ """
84
+
85
+ vtt_content: Optional[str] = FieldInfo(alias="vttContent", default=None)
86
+ """Auto generated subtitles in WebVTT format."""
87
+
88
+
89
+ class AITaskGetResponseResultAIResultsContentmoderationSportFrame(BaseModel):
90
+ confidence: Optional[float] = None
91
+ """Percentage of probability of identifying the activity"""
92
+
93
+ frame_number: Optional[int] = FieldInfo(alias="frame-number", default=None)
94
+ """Video frame number where activity was found"""
95
+
96
+ label: Optional[str] = None
97
+ """Type of detected activity"""
98
+
99
+
100
+ class AITaskGetResponseResultAIResultsContentmoderationSport(BaseModel):
101
+ detection_results: Optional[
102
+ List[
103
+ Literal[
104
+ "archery",
105
+ "arm wrestling",
106
+ "playing badminton",
107
+ "playing baseball",
108
+ "basketball dunk",
109
+ "bowling",
110
+ "boxing punch",
111
+ "boxing speed bag",
112
+ "catching or throwing baseball",
113
+ "catching or throwing softball",
114
+ "cricket",
115
+ "curling",
116
+ "disc golfing",
117
+ "dodgeball",
118
+ "fencing",
119
+ "football",
120
+ "golf chipping",
121
+ "golf driving",
122
+ "golf putting",
123
+ "hitting baseball",
124
+ "hockey stop",
125
+ "ice skating",
126
+ "javelin throw",
127
+ "juggling soccer ball",
128
+ "kayaking",
129
+ "kicking field goal",
130
+ "kicking soccer ball",
131
+ "playing cricket",
132
+ "playing field hockey",
133
+ "playing ice hockey",
134
+ "playing kickball",
135
+ "playing lacrosse",
136
+ "playing ping pong",
137
+ "playing polo",
138
+ "playing squash or racquetball",
139
+ "playing tennis",
140
+ "playing volleyball",
141
+ "pole vault",
142
+ "riding a bike",
143
+ "riding or walking with horse",
144
+ "roller skating",
145
+ "rowing",
146
+ "sailing",
147
+ "shooting goal (soccer)",
148
+ "skateboarding",
149
+ "skiing",
150
+ ]
151
+ ]
152
+ ] = None
153
+
154
+ frames: Optional[List[AITaskGetResponseResultAIResultsContentmoderationSportFrame]] = None
155
+
156
+ sport_detected: Optional[bool] = None
157
+ """A boolean value whether any sports were detected"""
158
+
159
+
160
+ class AITaskGetResponseResultAIResultsContentmoderationWeaponFrame(BaseModel):
161
+ confidence: Optional[float] = None
162
+ """Percentage of probability of identifying the object"""
163
+
164
+ frame_number: Optional[int] = FieldInfo(alias="frame-number", default=None)
165
+ """Video frame number where object was found"""
166
+
167
+ label: Optional[str] = None
168
+ """Type of detected object"""
169
+
170
+
171
+ class AITaskGetResponseResultAIResultsContentmoderationWeapon(BaseModel):
172
+ detection_results: Optional[List[Literal["gun", "heavy weapon", "knife"]]] = None
173
+
174
+ frames: Optional[List[AITaskGetResponseResultAIResultsContentmoderationWeaponFrame]] = None
175
+
176
+ weapon_detected: Optional[bool] = None
177
+ """A boolean value whether any weapon was detected"""
178
+
179
+
180
+ class AITaskGetResponseResultAIResultsContentmoderationNsfwFrame(BaseModel):
181
+ confidence: Optional[float] = None
182
+ """Percentage of probability of identifying the object"""
183
+
184
+ frame_number: Optional[int] = FieldInfo(alias="frame-number", default=None)
185
+ """Video frame number where object was found"""
186
+
187
+ label: Optional[str] = None
188
+ """Type of detected object"""
189
+
190
+
191
+ class AITaskGetResponseResultAIResultsContentmoderationNsfw(BaseModel):
192
+ detection_results: Optional[List[Literal["nsfw"]]] = None
193
+
194
+ frames: Optional[List[AITaskGetResponseResultAIResultsContentmoderationNsfwFrame]] = None
195
+
196
+ nsfw_detected: Optional[bool] = None
197
+ """A boolean value whether any Not Safe For Work content was detected"""
198
+
199
+
200
+ class AITaskGetResponseResultAIResultsContentmoderationHardnudityFrame(BaseModel):
201
+ confidence: Optional[float] = None
202
+ """Percentage of probability of identifying the object"""
203
+
204
+ frame_number: Optional[int] = FieldInfo(alias="frame-number", default=None)
205
+ """Video frame number where object was found"""
206
+
207
+ label: Optional[str] = None
208
+ """Type of detected object"""
209
+
210
+
211
+ class AITaskGetResponseResultAIResultsContentmoderationHardnudity(BaseModel):
212
+ detection_results: Optional[
213
+ List[
214
+ Literal[
215
+ "ANUS_EXPOSED",
216
+ "BUTTOCKS_EXPOSED",
217
+ "FEMALE_BREAST_EXPOSED",
218
+ "FEMALE_GENITALIA_EXPOSED",
219
+ "MALE_BREAST_EXPOSED",
220
+ "MALE_GENITALIA_EXPOSED",
221
+ ]
222
+ ]
223
+ ] = None
224
+
225
+ frames: Optional[List[AITaskGetResponseResultAIResultsContentmoderationHardnudityFrame]] = None
226
+
227
+ porn_detected: Optional[bool] = None
228
+ """A boolean value whether any nudity was detected"""
229
+
230
+
231
+ class AITaskGetResponseResultAIResultsContentmoderationSoftnudityFrame(BaseModel):
232
+ confidence: Optional[float] = None
233
+ """Percentage of probability of identifying the object"""
234
+
235
+ frame_number: Optional[int] = FieldInfo(alias="frame-number", default=None)
236
+ """Video frame number where object was found"""
237
+
238
+ label: Optional[str] = None
239
+ """Type of detected object"""
240
+
241
+
242
+ class AITaskGetResponseResultAIResultsContentmoderationSoftnudity(BaseModel):
243
+ detection_results: Optional[
244
+ List[
245
+ Literal[
246
+ "ANUS_COVERED",
247
+ "ANUS_EXPOSED",
248
+ "ARMPITS_COVERED",
249
+ "ARMPITS_EXPOSED",
250
+ "BELLY_COVERED",
251
+ "BELLY_EXPOSED",
252
+ "BUTTOCKS_COVERED",
253
+ "BUTTOCKS_EXPOSED",
254
+ "FACE_FEMALE",
255
+ "FACE_MALE",
256
+ "FEET_COVERED",
257
+ "FEET_EXPOSED",
258
+ "FEMALE_BREAST_COVERED",
259
+ "FEMALE_BREAST_EXPOSED",
260
+ "FEMALE_GENITALIA_COVERED",
261
+ "FEMALE_GENITALIA_EXPOSED",
262
+ "MALE_BREAST_EXPOSED",
263
+ "MALE_GENITALIA_EXPOSED",
264
+ ]
265
+ ]
266
+ ] = None
267
+
268
+ frames: Optional[List[AITaskGetResponseResultAIResultsContentmoderationSoftnudityFrame]] = None
269
+
270
+ porn_detected: Optional[bool] = None
271
+ """A boolean value whether any nudity and other body part was detected"""
272
+
273
+
274
+ class AITaskGetResponseResultAIResultsContentmoderationCasmFrame(BaseModel):
275
+ confidence: Optional[float] = None
276
+ """Percentage of probability of identifying the object"""
277
+
278
+ frame_number: Optional[int] = FieldInfo(alias="frame-number", default=None)
279
+ """Video frame number where object was found"""
280
+
281
+ label: Optional[str] = None
282
+ """Type of detected object"""
283
+
284
+
285
+ class AITaskGetResponseResultAIResultsContentmoderationCasm(BaseModel):
286
+ child_pornography_detected: Optional[bool] = None
287
+ """A boolean value whether child pornography was detected"""
288
+
289
+ detection_results: Optional[List[Literal["0-2", "3-9", "10-19"]]] = None
290
+
291
+ frames: Optional[List[AITaskGetResponseResultAIResultsContentmoderationCasmFrame]] = None
292
+
293
+
294
+ class AITaskGetResponseResultAIResultsFailure(BaseModel):
295
+ error: str
296
+
297
+
298
+ AITaskGetResponseResult: TypeAlias = Union[
299
+ AITaskGetResponseResultAIResultsTranscribe,
300
+ AITaskGetResponseResultAIResultsContentmoderationSport,
301
+ AITaskGetResponseResultAIResultsContentmoderationWeapon,
302
+ AITaskGetResponseResultAIResultsContentmoderationNsfw,
303
+ AITaskGetResponseResultAIResultsContentmoderationHardnudity,
304
+ AITaskGetResponseResultAIResultsContentmoderationSoftnudity,
305
+ AITaskGetResponseResultAIResultsContentmoderationCasm,
306
+ AITaskGetResponseResultAIResultsFailure,
307
+ ]
308
+
309
+
310
+ class AITaskGetResponse(AITask):
311
+ processing_time: Optional[AITaskGetResponseProcessingTime] = None
312
+
313
+ result: Optional[AITaskGetResponseResult] = None
@@ -0,0 +1,50 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, TypedDict
6
+
7
+ __all__ = ["AITaskListParams"]
8
+
9
+
10
+ class AITaskListParams(TypedDict, total=False):
11
+ date_created: str
12
+ """Time when task was created. Datetime in ISO 8601 format."""
13
+
14
+ limit: int
15
+ """Number of results to return per page."""
16
+
17
+ ordering: Literal["task_id", "status", "task_name", "started_at"]
18
+ """
19
+ Which field to use when ordering the results: `task_id`, status, and
20
+ `task_name`. Sorting is done in ascending (ASC) order. If parameter is omitted
21
+ then "`started_at` DESC" is used for ordering by default.
22
+ """
23
+
24
+ page: int
25
+ """Page to view from task list, starting from 1"""
26
+
27
+ search: str
28
+ """
29
+ This is an field for combined text search in the following fields: `task_id`,
30
+ `task_name`, status, and `task_data`. Both full and partial searches are
31
+ possible inside specified above fields. For example, you can filter tasks of a
32
+ certain category, or tasks by a specific original file. Example:
33
+
34
+ - To filter tasks of Content Moderation NSFW method:
35
+ `GET /streaming/ai/tasks?search=nsfw`
36
+ - To filter tasks of processing video from a specific origin:
37
+ `GET /streaming/ai/tasks?search=s3.eu-west-1.amazonaws.com`
38
+ """
39
+
40
+ status: Literal["FAILURE", "PENDING", "RECEIVED", "RETRY", "REVOKED", "STARTED", "SUCCESS"]
41
+ """Task status"""
42
+
43
+ task_id: str
44
+ """The task unique identifier to fiund"""
45
+
46
+ task_name: Literal["transcription", "content-moderation"]
47
+ """Type of the AI task.
48
+
49
+ Reflects the original API method that was used to create the AI task.
50
+ """
@@ -0,0 +1,71 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["Broadcast"]
8
+
9
+
10
+ class Broadcast(BaseModel):
11
+ name: str
12
+ """Broadcast name"""
13
+
14
+ ad_id: Optional[int] = None
15
+ """ID of ad to be displayed in a live stream.
16
+
17
+ If empty the default ad is show. If there is no default ad, no ad is shown
18
+ """
19
+
20
+ custom_iframe_url: Optional[str] = None
21
+ """Custom URL of iframe for video player to be shared via sharing button in player.
22
+
23
+ Auto generated iframe URL is provided by default
24
+ """
25
+
26
+ pending_message: Optional[str] = None
27
+ """A custom message that is shown if broadcast status is set to pending.
28
+
29
+ If empty, a default message is shown
30
+ """
31
+
32
+ player_id: Optional[int] = None
33
+ """ID of player to be used with a broadcast. If empty the default player is used"""
34
+
35
+ poster: Optional[str] = None
36
+ """Uploaded poster file"""
37
+
38
+ share_url: Optional[str] = None
39
+ """
40
+ Custom URL or iframe displayed in the link field when a user clicks on a sharing
41
+ button in player. If empty, the link field and social network sharing is
42
+ disabled
43
+ """
44
+
45
+ show_dvr_after_finish: Optional[bool] = None
46
+ """Regulates if a DVR record is shown once a broadcast is finished.
47
+
48
+ Has two possible values:
49
+
50
+ - **true** — record is shown
51
+ - **false** — record isn't shown
52
+
53
+ Default is false
54
+ """
55
+
56
+ status: Optional[str] = None
57
+ """
58
+ Broadcast statuses:
59
+ **Pending** — default “Broadcast isn’t started yet” or custom message (see `pending_message`
60
+ parameter) is shown, users don't see the live stream
61
+ **Live** — broadcast is live, and viewers can see it
62
+ **Paused** — “Broadcast is paused” message is shown, users don't see the live stream
63
+
64
+ **Finished** — “Broadcast is finished” message is shown, users don't see the
65
+ live stream
66
+ The users' browsers start displaying the message/stream immediately after you change
67
+ the broadcast status
68
+ """
69
+
70
+ stream_ids: Optional[List[int]] = None
71
+ """IDs of streams used in a broadcast"""
@@ -0,0 +1,76 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["BroadcastCreateParams", "Broadcast"]
9
+
10
+
11
+ class BroadcastCreateParams(TypedDict, total=False):
12
+ broadcast: Broadcast
13
+
14
+
15
+ class Broadcast(TypedDict, total=False):
16
+ name: Required[str]
17
+ """Broadcast name"""
18
+
19
+ ad_id: int
20
+ """ID of ad to be displayed in a live stream.
21
+
22
+ If empty the default ad is show. If there is no default ad, no ad is shown
23
+ """
24
+
25
+ custom_iframe_url: str
26
+ """Custom URL of iframe for video player to be shared via sharing button in player.
27
+
28
+ Auto generated iframe URL is provided by default
29
+ """
30
+
31
+ pending_message: str
32
+ """A custom message that is shown if broadcast status is set to pending.
33
+
34
+ If empty, a default message is shown
35
+ """
36
+
37
+ player_id: int
38
+ """ID of player to be used with a broadcast. If empty the default player is used"""
39
+
40
+ poster: str
41
+ """Uploaded poster file"""
42
+
43
+ share_url: str
44
+ """
45
+ Custom URL or iframe displayed in the link field when a user clicks on a sharing
46
+ button in player. If empty, the link field and social network sharing is
47
+ disabled
48
+ """
49
+
50
+ show_dvr_after_finish: bool
51
+ """Regulates if a DVR record is shown once a broadcast is finished.
52
+
53
+ Has two possible values:
54
+
55
+ - **true** — record is shown
56
+ - **false** — record isn't shown
57
+
58
+ Default is false
59
+ """
60
+
61
+ status: str
62
+ """
63
+ Broadcast statuses:
64
+ **Pending** — default “Broadcast isn’t started yet” or custom message (see `pending_message`
65
+ parameter) is shown, users don't see the live stream
66
+ **Live** — broadcast is live, and viewers can see it
67
+ **Paused** — “Broadcast is paused” message is shown, users don't see the live stream
68
+
69
+ **Finished** — “Broadcast is finished” message is shown, users don't see the
70
+ live stream
71
+ The users' browsers start displaying the message/stream immediately after you change
72
+ the broadcast status
73
+ """
74
+
75
+ stream_ids: Iterable[int]
76
+ """IDs of streams used in a broadcast"""
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["BroadcastListParams"]
8
+
9
+
10
+ class BroadcastListParams(TypedDict, total=False):
11
+ page: int
12
+ """Query parameter. Use it to list the paginated content"""
@@ -0,0 +1,12 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["BroadcastSpectatorsCount"]
8
+
9
+
10
+ class BroadcastSpectatorsCount(BaseModel):
11
+ spectators_count: Optional[int] = None
12
+ """Number of spectators at the moment"""
@@ -0,0 +1,76 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Required, TypedDict
7
+
8
+ __all__ = ["BroadcastUpdateParams", "Broadcast"]
9
+
10
+
11
+ class BroadcastUpdateParams(TypedDict, total=False):
12
+ broadcast: Broadcast
13
+
14
+
15
+ class Broadcast(TypedDict, total=False):
16
+ name: Required[str]
17
+ """Broadcast name"""
18
+
19
+ ad_id: int
20
+ """ID of ad to be displayed in a live stream.
21
+
22
+ If empty the default ad is show. If there is no default ad, no ad is shown
23
+ """
24
+
25
+ custom_iframe_url: str
26
+ """Custom URL of iframe for video player to be shared via sharing button in player.
27
+
28
+ Auto generated iframe URL is provided by default
29
+ """
30
+
31
+ pending_message: str
32
+ """A custom message that is shown if broadcast status is set to pending.
33
+
34
+ If empty, a default message is shown
35
+ """
36
+
37
+ player_id: int
38
+ """ID of player to be used with a broadcast. If empty the default player is used"""
39
+
40
+ poster: str
41
+ """Uploaded poster file"""
42
+
43
+ share_url: str
44
+ """
45
+ Custom URL or iframe displayed in the link field when a user clicks on a sharing
46
+ button in player. If empty, the link field and social network sharing is
47
+ disabled
48
+ """
49
+
50
+ show_dvr_after_finish: bool
51
+ """Regulates if a DVR record is shown once a broadcast is finished.
52
+
53
+ Has two possible values:
54
+
55
+ - **true** — record is shown
56
+ - **false** — record isn't shown
57
+
58
+ Default is false
59
+ """
60
+
61
+ status: str
62
+ """
63
+ Broadcast statuses:
64
+ **Pending** — default “Broadcast isn’t started yet” or custom message (see `pending_message`
65
+ parameter) is shown, users don't see the live stream
66
+ **Live** — broadcast is live, and viewers can see it
67
+ **Paused** — “Broadcast is paused” message is shown, users don't see the live stream
68
+
69
+ **Finished** — “Broadcast is finished” message is shown, users don't see the
70
+ live stream
71
+ The users' browsers start displaying the message/stream immediately after you change
72
+ the broadcast status
73
+ """
74
+
75
+ stream_ids: Iterable[int]
76
+ """IDs of streams used in a broadcast"""
@@ -0,0 +1,78 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["Clip"]
8
+
9
+
10
+ class Clip(BaseModel):
11
+ id: str
12
+ """ID of the clip"""
13
+
14
+ duration: int
15
+ """
16
+ Requested segment duration in seconds to be cut. Please, note that cutting is
17
+ based on the idea of instantly creating a clip, instead of precise timing. So
18
+ final segment may be:
19
+
20
+ - Less than the specified value if there is less data in the DVR than the
21
+ requested segment.
22
+ - Greater than the specified value, because segment is aligned to the first and
23
+ last key frames of already stored fragment in DVR, this way -1 and +1 chunks
24
+ can be added to left and right. Duration of cutted segment cannot be greater
25
+ than DVR duration for this stream. Therefore, to change the maximum, use
26
+ "`dvr_duration`" parameter of this stream.
27
+ """
28
+
29
+ created_at: Optional[str] = None
30
+ """Creation date and time. Format is date time in ISO 8601"""
31
+
32
+ expiration: Optional[int] = None
33
+ """
34
+ Expire time of the clip via a public link. Unix timestamp in seconds, absolute
35
+ value. This is the time how long the instant clip will be stored in the server
36
+ memory and can be accessed via public HLS/MP4 links. Download and/or use the
37
+ instant clip before this time expires. After the time has expired, the clip is
38
+ deleted from memory and is no longer available via the link. You need to create
39
+ a new segment, or use `vod_required: true` attribute. If value is omitted, then
40
+ expiration is counted as +3600 seconds (1 hour) to the end of the clip (i.e.
41
+ `unix timestamp = + + 3600`). Allowed range: 1m <= expiration <= 4h. Example:
42
+ `24.05.2024 14:00:00 (GMT) + 60 seconds of duration + 3600 seconds of expiration = 24.05.2024 15:01:00 (GMT) is Unix timestamp = 1716562860`
43
+ """
44
+
45
+ hls_master: Optional[str] = None
46
+ """Link to HLS .m3u8 with immediate clip.
47
+
48
+ The link retains same adaptive bitrate as in the stream for end viewers. For
49
+ additional restrictions, see the description of parameter "`mp4_master`".
50
+ """
51
+
52
+ mp4_master: Optional[str] = None
53
+ """Link to MP4 with immediate clip.
54
+
55
+ The link points to max rendition quality. Request of the URL can return:
56
+
57
+ - 200 OK – if the clip exists.
58
+ - 404 Not found – if the clip did not exist or has already ceased to exist.
59
+ - 425 Too early – if recording is on-going now. The file is incomplete and will
60
+ be accessible after start+duration time will come.
61
+ """
62
+
63
+ renditions: Optional[List[str]] = None
64
+ """List of available rendition heights"""
65
+
66
+ start: Optional[int] = None
67
+ """
68
+ Starting point of the segment to cut. Unix timestamp in seconds, absolute value.
69
+ Example: `24.05.2024 14:00:00 (GMT) is Unix timestamp = 1716559200` If a value
70
+ from the past is specified, it is used as the starting point for the segment to
71
+ cut. If the value is omitted, then clip will start from now.
72
+ """
73
+
74
+ video_id: Optional[int] = None
75
+ """ID of the created video if `vod_required`=true"""
76
+
77
+ vod_required: Optional[bool] = None
78
+ """Indicates if video needs to be stored as VOD"""