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,331 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from ..._utils import maybe_transform, async_maybe_transform
9
+ from ..._compat import cached_property
10
+ from ..._resource import SyncAPIResource, AsyncAPIResource
11
+ from ..._response import (
12
+ to_raw_response_wrapper,
13
+ to_streamed_response_wrapper,
14
+ async_to_raw_response_wrapper,
15
+ async_to_streamed_response_wrapper,
16
+ )
17
+ from ..._base_client import make_request_options
18
+ from ...types.streaming import quality_set_set_default_params
19
+ from ...types.streaming.quality_sets import QualitySets
20
+
21
+ __all__ = ["QualitySetsResource", "AsyncQualitySetsResource"]
22
+
23
+
24
+ class QualitySetsResource(SyncAPIResource):
25
+ @cached_property
26
+ def with_raw_response(self) -> QualitySetsResourceWithRawResponse:
27
+ """
28
+ This property can be used as a prefix for any HTTP method call to return
29
+ the raw response object instead of the parsed content.
30
+
31
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
32
+ """
33
+ return QualitySetsResourceWithRawResponse(self)
34
+
35
+ @cached_property
36
+ def with_streaming_response(self) -> QualitySetsResourceWithStreamingResponse:
37
+ """
38
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
39
+
40
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
41
+ """
42
+ return QualitySetsResourceWithStreamingResponse(self)
43
+
44
+ def list(
45
+ self,
46
+ *,
47
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
+ # The extra values given here take precedence over values defined on the client or passed to this method.
49
+ extra_headers: Headers | None = None,
50
+ extra_query: Query | None = None,
51
+ extra_body: Body | None = None,
52
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53
+ ) -> QualitySets:
54
+ """
55
+ Method returns a list of all custom quality sets.
56
+
57
+ Transcoding is designed to minimize video file size while maintaining maximum
58
+ visual quality. This is done so that the video can be delivered and viewed on
59
+ any device, on any Internet connection, anywhere in the world. It's always a
60
+ compromise between video/audio quality and delivery+viewing quality (QoE).
61
+
62
+ Our experts have selected the optimal parameters for transcoding, to ensure
63
+ maximum video/audio quality with the best compression. Default quality sets are
64
+ described in the
65
+ [documentation](https://gcore.com/docs/streaming-platform/live-streams-and-videos-protocols-and-codecs/output-parameters-after-transcoding-bitrate-frame-rate-and-codecs).
66
+ These values are the default for everyone. There is no need to configure
67
+ anything additional. Read more about qiality in our blog
68
+ [How we lowered the bitrate for live and VOD streaming by 32.5% without sacrificing quality](https://gcore.com/blog/how-we-lowered-the-bitrate-for-live-and-vod-streaming-by-32-5-without-sacrificing-quality/).
69
+ ![Quality ladder](https://demo-files.gvideo.io/apidocs/`encoding_ladder`.png)
70
+ Only for those cases when, in addition to the main parameters, it is necessary
71
+ to use your own, then it is necessary to use custom quality sets. How to use:
72
+
73
+ 1. By default custom quality set is empty – `{ "live":[],"vod":[] }`
74
+ 2. Request the use of custom quality sets from your manager or the Support Team.
75
+ 3. Please forward your requirements to us, since the parameters are set not by
76
+ you, but by our engineers. (We are working to ensure that later you can
77
+ create qualities by yourself.)
78
+ 4. Use the created quality sets through the these specified API methods. Here
79
+ are some common parameters of quality settings:
80
+
81
+ - Resolution: Determines the size of the video frame. I.e. 720p, 1080p, 4K, etc.
82
+ - Bitrate: Refers to the amount of data processed per unit of time.
83
+ - Codec: Codec used for transcoding can significantly affect quality. Popular
84
+ codecs include H.264 (AVC), H.265 (HEVC), and AV1.
85
+ - Frame Rate: Determines how many frames per second are displayed. Common frame
86
+ rates include 24fps, 30fps, and 60fps.
87
+ - Color Depth and Chroma Subsampling: These settings determine the accuracy of
88
+ color representation in the video.
89
+ - Audio Bitrate and Codec: Don't forget about the audio :) Bitrate and codec
90
+ used for audio can also affect the overall quality. Note: Custom quality set
91
+ is a paid feature.
92
+ """
93
+ return self._get(
94
+ "/streaming/quality_sets",
95
+ options=make_request_options(
96
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
97
+ ),
98
+ cast_to=QualitySets,
99
+ )
100
+
101
+ def set_default(
102
+ self,
103
+ *,
104
+ live: quality_set_set_default_params.Live | NotGiven = NOT_GIVEN,
105
+ vod: quality_set_set_default_params.Vod | NotGiven = NOT_GIVEN,
106
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
107
+ # The extra values given here take precedence over values defined on the client or passed to this method.
108
+ extra_headers: Headers | None = None,
109
+ extra_query: Query | None = None,
110
+ extra_body: Body | None = None,
111
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
112
+ ) -> QualitySets:
113
+ """Method to set default quality set for VOD and Live transcoding.
114
+
115
+ For changing
116
+ default quality set, specify the ID of the custom quality set from the method
117
+ GET /`quality_sets`. Default value can be reverted to the system defaults
118
+ (cleared) by setting `"id": null`.
119
+
120
+ Live transcoding management:
121
+
122
+ - You can specify quality set explicitly in POST /streams method, look at
123
+ attribute "`quality_set_id`".
124
+ - Otherwise these default values will be used by the system by default. VOD
125
+ transcoding management:
126
+ - You can specify quality set explicitly in POST /videos method, look at
127
+ attribute "`quality_set_id`".
128
+ - Otherwise these default values will be used by the system by default.
129
+
130
+ Args:
131
+ extra_headers: Send extra headers
132
+
133
+ extra_query: Add additional query parameters to the request
134
+
135
+ extra_body: Add additional JSON properties to the request
136
+
137
+ timeout: Override the client-level default timeout for this request, in seconds
138
+ """
139
+ return self._put(
140
+ "/streaming/quality_sets/default",
141
+ body=maybe_transform(
142
+ {
143
+ "live": live,
144
+ "vod": vod,
145
+ },
146
+ quality_set_set_default_params.QualitySetSetDefaultParams,
147
+ ),
148
+ options=make_request_options(
149
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150
+ ),
151
+ cast_to=QualitySets,
152
+ )
153
+
154
+
155
+ class AsyncQualitySetsResource(AsyncAPIResource):
156
+ @cached_property
157
+ def with_raw_response(self) -> AsyncQualitySetsResourceWithRawResponse:
158
+ """
159
+ This property can be used as a prefix for any HTTP method call to return
160
+ the raw response object instead of the parsed content.
161
+
162
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
163
+ """
164
+ return AsyncQualitySetsResourceWithRawResponse(self)
165
+
166
+ @cached_property
167
+ def with_streaming_response(self) -> AsyncQualitySetsResourceWithStreamingResponse:
168
+ """
169
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
170
+
171
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
172
+ """
173
+ return AsyncQualitySetsResourceWithStreamingResponse(self)
174
+
175
+ async def list(
176
+ self,
177
+ *,
178
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
179
+ # The extra values given here take precedence over values defined on the client or passed to this method.
180
+ extra_headers: Headers | None = None,
181
+ extra_query: Query | None = None,
182
+ extra_body: Body | None = None,
183
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
184
+ ) -> QualitySets:
185
+ """
186
+ Method returns a list of all custom quality sets.
187
+
188
+ Transcoding is designed to minimize video file size while maintaining maximum
189
+ visual quality. This is done so that the video can be delivered and viewed on
190
+ any device, on any Internet connection, anywhere in the world. It's always a
191
+ compromise between video/audio quality and delivery+viewing quality (QoE).
192
+
193
+ Our experts have selected the optimal parameters for transcoding, to ensure
194
+ maximum video/audio quality with the best compression. Default quality sets are
195
+ described in the
196
+ [documentation](https://gcore.com/docs/streaming-platform/live-streams-and-videos-protocols-and-codecs/output-parameters-after-transcoding-bitrate-frame-rate-and-codecs).
197
+ These values are the default for everyone. There is no need to configure
198
+ anything additional. Read more about qiality in our blog
199
+ [How we lowered the bitrate for live and VOD streaming by 32.5% without sacrificing quality](https://gcore.com/blog/how-we-lowered-the-bitrate-for-live-and-vod-streaming-by-32-5-without-sacrificing-quality/).
200
+ ![Quality ladder](https://demo-files.gvideo.io/apidocs/`encoding_ladder`.png)
201
+ Only for those cases when, in addition to the main parameters, it is necessary
202
+ to use your own, then it is necessary to use custom quality sets. How to use:
203
+
204
+ 1. By default custom quality set is empty – `{ "live":[],"vod":[] }`
205
+ 2. Request the use of custom quality sets from your manager or the Support Team.
206
+ 3. Please forward your requirements to us, since the parameters are set not by
207
+ you, but by our engineers. (We are working to ensure that later you can
208
+ create qualities by yourself.)
209
+ 4. Use the created quality sets through the these specified API methods. Here
210
+ are some common parameters of quality settings:
211
+
212
+ - Resolution: Determines the size of the video frame. I.e. 720p, 1080p, 4K, etc.
213
+ - Bitrate: Refers to the amount of data processed per unit of time.
214
+ - Codec: Codec used for transcoding can significantly affect quality. Popular
215
+ codecs include H.264 (AVC), H.265 (HEVC), and AV1.
216
+ - Frame Rate: Determines how many frames per second are displayed. Common frame
217
+ rates include 24fps, 30fps, and 60fps.
218
+ - Color Depth and Chroma Subsampling: These settings determine the accuracy of
219
+ color representation in the video.
220
+ - Audio Bitrate and Codec: Don't forget about the audio :) Bitrate and codec
221
+ used for audio can also affect the overall quality. Note: Custom quality set
222
+ is a paid feature.
223
+ """
224
+ return await self._get(
225
+ "/streaming/quality_sets",
226
+ options=make_request_options(
227
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
228
+ ),
229
+ cast_to=QualitySets,
230
+ )
231
+
232
+ async def set_default(
233
+ self,
234
+ *,
235
+ live: quality_set_set_default_params.Live | NotGiven = NOT_GIVEN,
236
+ vod: quality_set_set_default_params.Vod | NotGiven = NOT_GIVEN,
237
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
238
+ # The extra values given here take precedence over values defined on the client or passed to this method.
239
+ extra_headers: Headers | None = None,
240
+ extra_query: Query | None = None,
241
+ extra_body: Body | None = None,
242
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
243
+ ) -> QualitySets:
244
+ """Method to set default quality set for VOD and Live transcoding.
245
+
246
+ For changing
247
+ default quality set, specify the ID of the custom quality set from the method
248
+ GET /`quality_sets`. Default value can be reverted to the system defaults
249
+ (cleared) by setting `"id": null`.
250
+
251
+ Live transcoding management:
252
+
253
+ - You can specify quality set explicitly in POST /streams method, look at
254
+ attribute "`quality_set_id`".
255
+ - Otherwise these default values will be used by the system by default. VOD
256
+ transcoding management:
257
+ - You can specify quality set explicitly in POST /videos method, look at
258
+ attribute "`quality_set_id`".
259
+ - Otherwise these default values will be used by the system by default.
260
+
261
+ Args:
262
+ extra_headers: Send extra headers
263
+
264
+ extra_query: Add additional query parameters to the request
265
+
266
+ extra_body: Add additional JSON properties to the request
267
+
268
+ timeout: Override the client-level default timeout for this request, in seconds
269
+ """
270
+ return await self._put(
271
+ "/streaming/quality_sets/default",
272
+ body=await async_maybe_transform(
273
+ {
274
+ "live": live,
275
+ "vod": vod,
276
+ },
277
+ quality_set_set_default_params.QualitySetSetDefaultParams,
278
+ ),
279
+ options=make_request_options(
280
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
281
+ ),
282
+ cast_to=QualitySets,
283
+ )
284
+
285
+
286
+ class QualitySetsResourceWithRawResponse:
287
+ def __init__(self, quality_sets: QualitySetsResource) -> None:
288
+ self._quality_sets = quality_sets
289
+
290
+ self.list = to_raw_response_wrapper(
291
+ quality_sets.list,
292
+ )
293
+ self.set_default = to_raw_response_wrapper(
294
+ quality_sets.set_default,
295
+ )
296
+
297
+
298
+ class AsyncQualitySetsResourceWithRawResponse:
299
+ def __init__(self, quality_sets: AsyncQualitySetsResource) -> None:
300
+ self._quality_sets = quality_sets
301
+
302
+ self.list = async_to_raw_response_wrapper(
303
+ quality_sets.list,
304
+ )
305
+ self.set_default = async_to_raw_response_wrapper(
306
+ quality_sets.set_default,
307
+ )
308
+
309
+
310
+ class QualitySetsResourceWithStreamingResponse:
311
+ def __init__(self, quality_sets: QualitySetsResource) -> None:
312
+ self._quality_sets = quality_sets
313
+
314
+ self.list = to_streamed_response_wrapper(
315
+ quality_sets.list,
316
+ )
317
+ self.set_default = to_streamed_response_wrapper(
318
+ quality_sets.set_default,
319
+ )
320
+
321
+
322
+ class AsyncQualitySetsResourceWithStreamingResponse:
323
+ def __init__(self, quality_sets: AsyncQualitySetsResource) -> None:
324
+ self._quality_sets = quality_sets
325
+
326
+ self.list = async_to_streamed_response_wrapper(
327
+ quality_sets.list,
328
+ )
329
+ self.set_default = async_to_streamed_response_wrapper(
330
+ quality_sets.set_default,
331
+ )