2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Any , Type , cast
5
+ from typing import Any , Type , Optional , cast
6
6
7
7
import httpx
8
8
@@ -55,7 +55,7 @@ def delete(
55
55
extra_query : Query | None = None ,
56
56
extra_body : Body | None = None ,
57
57
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
58
- ) -> AudioTrackDeleteResponse :
58
+ ) -> Optional [ AudioTrackDeleteResponse ] :
59
59
"""Deletes additional audio tracks on a video.
60
60
61
61
Deleting a default audio track is
@@ -83,7 +83,7 @@ def delete(
83
83
if not audio_identifier :
84
84
raise ValueError (f"Expected a non-empty value for `audio_identifier` but received { audio_identifier !r} " )
85
85
return cast (
86
- AudioTrackDeleteResponse ,
86
+ Optional [ AudioTrackDeleteResponse ] ,
87
87
self ._delete (
88
88
f"/accounts/{ account_id } /stream/{ identifier } /audio/{ audio_identifier } " ,
89
89
options = make_request_options (
@@ -112,7 +112,7 @@ def copy(
112
112
extra_query : Query | None = None ,
113
113
extra_body : Body | None = None ,
114
114
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
115
- ) -> Audio :
115
+ ) -> Optional [ Audio ] :
116
116
"""
117
117
Adds an additional audio track to a video using the provided audio track URL.
118
118
@@ -156,7 +156,7 @@ def copy(
156
156
timeout = timeout ,
157
157
post_parser = ResultWrapper ._unwrapper ,
158
158
),
159
- cast_to = cast (Type [Audio ], ResultWrapper [Audio ]),
159
+ cast_to = cast (Type [Optional [ Audio ] ], ResultWrapper [Audio ]),
160
160
)
161
161
162
162
def edit (
@@ -173,7 +173,7 @@ def edit(
173
173
extra_query : Query | None = None ,
174
174
extra_body : Body | None = None ,
175
175
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
176
- ) -> Audio :
176
+ ) -> Optional [ Audio ] :
177
177
"""Edits additional audio tracks on a video.
178
178
179
179
Editing the default status of an audio
@@ -222,7 +222,7 @@ def edit(
222
222
timeout = timeout ,
223
223
post_parser = ResultWrapper ._unwrapper ,
224
224
),
225
- cast_to = cast (Type [Audio ], ResultWrapper [Audio ]),
225
+ cast_to = cast (Type [Optional [ Audio ] ], ResultWrapper [Audio ]),
226
226
)
227
227
228
228
def get (
@@ -236,7 +236,7 @@ def get(
236
236
extra_query : Query | None = None ,
237
237
extra_body : Body | None = None ,
238
238
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
239
- ) -> AudioTrackGetResponse :
239
+ ) -> Optional [ AudioTrackGetResponse ] :
240
240
"""Lists additional audio tracks on a video.
241
241
242
242
Note this API will not return
@@ -268,7 +268,7 @@ def get(
268
268
timeout = timeout ,
269
269
post_parser = ResultWrapper ._unwrapper ,
270
270
),
271
- cast_to = cast (Type [AudioTrackGetResponse ], ResultWrapper [AudioTrackGetResponse ]),
271
+ cast_to = cast (Type [Optional [ AudioTrackGetResponse ] ], ResultWrapper [AudioTrackGetResponse ]),
272
272
)
273
273
274
274
@@ -293,7 +293,7 @@ async def delete(
293
293
extra_query : Query | None = None ,
294
294
extra_body : Body | None = None ,
295
295
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
296
- ) -> AudioTrackDeleteResponse :
296
+ ) -> Optional [ AudioTrackDeleteResponse ] :
297
297
"""Deletes additional audio tracks on a video.
298
298
299
299
Deleting a default audio track is
@@ -321,7 +321,7 @@ async def delete(
321
321
if not audio_identifier :
322
322
raise ValueError (f"Expected a non-empty value for `audio_identifier` but received { audio_identifier !r} " )
323
323
return cast (
324
- AudioTrackDeleteResponse ,
324
+ Optional [ AudioTrackDeleteResponse ] ,
325
325
await self ._delete (
326
326
f"/accounts/{ account_id } /stream/{ identifier } /audio/{ audio_identifier } " ,
327
327
options = make_request_options (
@@ -350,7 +350,7 @@ async def copy(
350
350
extra_query : Query | None = None ,
351
351
extra_body : Body | None = None ,
352
352
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
353
- ) -> Audio :
353
+ ) -> Optional [ Audio ] :
354
354
"""
355
355
Adds an additional audio track to a video using the provided audio track URL.
356
356
@@ -394,7 +394,7 @@ async def copy(
394
394
timeout = timeout ,
395
395
post_parser = ResultWrapper ._unwrapper ,
396
396
),
397
- cast_to = cast (Type [Audio ], ResultWrapper [Audio ]),
397
+ cast_to = cast (Type [Optional [ Audio ] ], ResultWrapper [Audio ]),
398
398
)
399
399
400
400
async def edit (
@@ -411,7 +411,7 @@ async def edit(
411
411
extra_query : Query | None = None ,
412
412
extra_body : Body | None = None ,
413
413
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
414
- ) -> Audio :
414
+ ) -> Optional [ Audio ] :
415
415
"""Edits additional audio tracks on a video.
416
416
417
417
Editing the default status of an audio
@@ -460,7 +460,7 @@ async def edit(
460
460
timeout = timeout ,
461
461
post_parser = ResultWrapper ._unwrapper ,
462
462
),
463
- cast_to = cast (Type [Audio ], ResultWrapper [Audio ]),
463
+ cast_to = cast (Type [Optional [ Audio ] ], ResultWrapper [Audio ]),
464
464
)
465
465
466
466
async def get (
@@ -474,7 +474,7 @@ async def get(
474
474
extra_query : Query | None = None ,
475
475
extra_body : Body | None = None ,
476
476
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
477
- ) -> AudioTrackGetResponse :
477
+ ) -> Optional [ AudioTrackGetResponse ] :
478
478
"""Lists additional audio tracks on a video.
479
479
480
480
Note this API will not return
@@ -506,7 +506,7 @@ async def get(
506
506
timeout = timeout ,
507
507
post_parser = ResultWrapper ._unwrapper ,
508
508
),
509
- cast_to = cast (Type [AudioTrackGetResponse ], ResultWrapper [AudioTrackGetResponse ]),
509
+ cast_to = cast (Type [Optional [ AudioTrackGetResponse ] ], ResultWrapper [AudioTrackGetResponse ]),
510
510
)
511
511
512
512
0 commit comments