2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Type , cast
5
+ from typing import Type , Optional , cast
6
6
from typing_extensions import Literal
7
7
8
8
import httpx
@@ -62,7 +62,7 @@ def clear(
62
62
extra_query : Query | None = None ,
63
63
extra_body : Body | None = None ,
64
64
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
65
- ) -> CacheReserveClearResponse :
65
+ ) -> Optional [ CacheReserveClearResponse ] :
66
66
"""
67
67
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
68
68
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
@@ -90,9 +90,9 @@ def clear(
90
90
extra_query = extra_query ,
91
91
extra_body = extra_body ,
92
92
timeout = timeout ,
93
- post_parser = ResultWrapper [CacheReserveClearResponse ]._unwrapper ,
93
+ post_parser = ResultWrapper [Optional [ CacheReserveClearResponse ] ]._unwrapper ,
94
94
),
95
- cast_to = cast (Type [CacheReserveClearResponse ], ResultWrapper [CacheReserveClearResponse ]),
95
+ cast_to = cast (Type [Optional [ CacheReserveClearResponse ] ], ResultWrapper [CacheReserveClearResponse ]),
96
96
)
97
97
98
98
def edit (
@@ -106,7 +106,7 @@ def edit(
106
106
extra_query : Query | None = None ,
107
107
extra_body : Body | None = None ,
108
108
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
109
- ) -> CacheReserveEditResponse :
109
+ ) -> Optional [ CacheReserveEditResponse ] :
110
110
"""
111
111
Increase cache lifetimes by automatically storing all cacheable files into
112
112
Cloudflare's persistent object storage buckets. Requires Cache Reserve
@@ -138,9 +138,9 @@ def edit(
138
138
extra_query = extra_query ,
139
139
extra_body = extra_body ,
140
140
timeout = timeout ,
141
- post_parser = ResultWrapper [CacheReserveEditResponse ]._unwrapper ,
141
+ post_parser = ResultWrapper [Optional [ CacheReserveEditResponse ] ]._unwrapper ,
142
142
),
143
- cast_to = cast (Type [CacheReserveEditResponse ], ResultWrapper [CacheReserveEditResponse ]),
143
+ cast_to = cast (Type [Optional [ CacheReserveEditResponse ] ], ResultWrapper [CacheReserveEditResponse ]),
144
144
)
145
145
146
146
def get (
@@ -153,7 +153,7 @@ def get(
153
153
extra_query : Query | None = None ,
154
154
extra_body : Body | None = None ,
155
155
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
156
- ) -> CacheReserveGetResponse :
156
+ ) -> Optional [ CacheReserveGetResponse ] :
157
157
"""
158
158
Increase cache lifetimes by automatically storing all cacheable files into
159
159
Cloudflare's persistent object storage buckets. Requires Cache Reserve
@@ -182,9 +182,9 @@ def get(
182
182
extra_query = extra_query ,
183
183
extra_body = extra_body ,
184
184
timeout = timeout ,
185
- post_parser = ResultWrapper [CacheReserveGetResponse ]._unwrapper ,
185
+ post_parser = ResultWrapper [Optional [ CacheReserveGetResponse ] ]._unwrapper ,
186
186
),
187
- cast_to = cast (Type [CacheReserveGetResponse ], ResultWrapper [CacheReserveGetResponse ]),
187
+ cast_to = cast (Type [Optional [ CacheReserveGetResponse ] ], ResultWrapper [CacheReserveGetResponse ]),
188
188
)
189
189
190
190
def status (
@@ -197,7 +197,7 @@ def status(
197
197
extra_query : Query | None = None ,
198
198
extra_body : Body | None = None ,
199
199
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
200
- ) -> CacheReserveStatusResponse :
200
+ ) -> Optional [ CacheReserveStatusResponse ] :
201
201
"""
202
202
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
203
203
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
@@ -224,9 +224,9 @@ def status(
224
224
extra_query = extra_query ,
225
225
extra_body = extra_body ,
226
226
timeout = timeout ,
227
- post_parser = ResultWrapper [CacheReserveStatusResponse ]._unwrapper ,
227
+ post_parser = ResultWrapper [Optional [ CacheReserveStatusResponse ] ]._unwrapper ,
228
228
),
229
- cast_to = cast (Type [CacheReserveStatusResponse ], ResultWrapper [CacheReserveStatusResponse ]),
229
+ cast_to = cast (Type [Optional [ CacheReserveStatusResponse ] ], ResultWrapper [CacheReserveStatusResponse ]),
230
230
)
231
231
232
232
@@ -261,7 +261,7 @@ async def clear(
261
261
extra_query : Query | None = None ,
262
262
extra_body : Body | None = None ,
263
263
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
264
- ) -> CacheReserveClearResponse :
264
+ ) -> Optional [ CacheReserveClearResponse ] :
265
265
"""
266
266
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
267
267
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
@@ -289,9 +289,9 @@ async def clear(
289
289
extra_query = extra_query ,
290
290
extra_body = extra_body ,
291
291
timeout = timeout ,
292
- post_parser = ResultWrapper [CacheReserveClearResponse ]._unwrapper ,
292
+ post_parser = ResultWrapper [Optional [ CacheReserveClearResponse ] ]._unwrapper ,
293
293
),
294
- cast_to = cast (Type [CacheReserveClearResponse ], ResultWrapper [CacheReserveClearResponse ]),
294
+ cast_to = cast (Type [Optional [ CacheReserveClearResponse ] ], ResultWrapper [CacheReserveClearResponse ]),
295
295
)
296
296
297
297
async def edit (
@@ -305,7 +305,7 @@ async def edit(
305
305
extra_query : Query | None = None ,
306
306
extra_body : Body | None = None ,
307
307
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
308
- ) -> CacheReserveEditResponse :
308
+ ) -> Optional [ CacheReserveEditResponse ] :
309
309
"""
310
310
Increase cache lifetimes by automatically storing all cacheable files into
311
311
Cloudflare's persistent object storage buckets. Requires Cache Reserve
@@ -337,9 +337,9 @@ async def edit(
337
337
extra_query = extra_query ,
338
338
extra_body = extra_body ,
339
339
timeout = timeout ,
340
- post_parser = ResultWrapper [CacheReserveEditResponse ]._unwrapper ,
340
+ post_parser = ResultWrapper [Optional [ CacheReserveEditResponse ] ]._unwrapper ,
341
341
),
342
- cast_to = cast (Type [CacheReserveEditResponse ], ResultWrapper [CacheReserveEditResponse ]),
342
+ cast_to = cast (Type [Optional [ CacheReserveEditResponse ] ], ResultWrapper [CacheReserveEditResponse ]),
343
343
)
344
344
345
345
async def get (
@@ -352,7 +352,7 @@ async def get(
352
352
extra_query : Query | None = None ,
353
353
extra_body : Body | None = None ,
354
354
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
355
- ) -> CacheReserveGetResponse :
355
+ ) -> Optional [ CacheReserveGetResponse ] :
356
356
"""
357
357
Increase cache lifetimes by automatically storing all cacheable files into
358
358
Cloudflare's persistent object storage buckets. Requires Cache Reserve
@@ -381,9 +381,9 @@ async def get(
381
381
extra_query = extra_query ,
382
382
extra_body = extra_body ,
383
383
timeout = timeout ,
384
- post_parser = ResultWrapper [CacheReserveGetResponse ]._unwrapper ,
384
+ post_parser = ResultWrapper [Optional [ CacheReserveGetResponse ] ]._unwrapper ,
385
385
),
386
- cast_to = cast (Type [CacheReserveGetResponse ], ResultWrapper [CacheReserveGetResponse ]),
386
+ cast_to = cast (Type [Optional [ CacheReserveGetResponse ] ], ResultWrapper [CacheReserveGetResponse ]),
387
387
)
388
388
389
389
async def status (
@@ -396,7 +396,7 @@ async def status(
396
396
extra_query : Query | None = None ,
397
397
extra_body : Body | None = None ,
398
398
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
399
- ) -> CacheReserveStatusResponse :
399
+ ) -> Optional [ CacheReserveStatusResponse ] :
400
400
"""
401
401
You can use Cache Reserve Clear to clear your Cache Reserve, but you must first
402
402
disable Cache Reserve. In most cases, this will be accomplished within 24 hours.
@@ -423,9 +423,9 @@ async def status(
423
423
extra_query = extra_query ,
424
424
extra_body = extra_body ,
425
425
timeout = timeout ,
426
- post_parser = ResultWrapper [CacheReserveStatusResponse ]._unwrapper ,
426
+ post_parser = ResultWrapper [Optional [ CacheReserveStatusResponse ] ]._unwrapper ,
427
427
),
428
- cast_to = cast (Type [CacheReserveStatusResponse ], ResultWrapper [CacheReserveStatusResponse ]),
428
+ cast_to = cast (Type [Optional [ CacheReserveStatusResponse ] ], ResultWrapper [CacheReserveStatusResponse ]),
429
429
)
430
430
431
431
0 commit comments