22
33from __future__ import annotations
44
5- from typing import Any , Optional , cast , overload
5+ from typing import Any , cast , overload
66from typing_extensions import Literal
77
88import httpx
@@ -54,7 +54,7 @@ def update(
5454 extra_query : Query | None = None ,
5555 extra_body : Body | None = None ,
5656 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
57- ) -> Optional [ BotManagementUpdateResponse ] :
57+ ) -> BotManagementUpdateResponse :
5858 """
5959 Updates the Bot Management configuration for a zone.
6060
@@ -101,7 +101,7 @@ def update(
101101 extra_query : Query | None = None ,
102102 extra_body : Body | None = None ,
103103 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
104- ) -> Optional [ BotManagementUpdateResponse ] :
104+ ) -> BotManagementUpdateResponse :
105105 """
106106 Updates the Bot Management configuration for a zone.
107107
@@ -157,7 +157,7 @@ def update(
157157 extra_query : Query | None = None ,
158158 extra_body : Body | None = None ,
159159 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
160- ) -> Optional [ BotManagementUpdateResponse ] :
160+ ) -> BotManagementUpdateResponse :
161161 """
162162 Updates the Bot Management configuration for a zone.
163163
@@ -212,7 +212,7 @@ def update(
212212 extra_query : Query | None = None ,
213213 extra_body : Body | None = None ,
214214 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
215- ) -> Optional [ BotManagementUpdateResponse ] :
215+ ) -> BotManagementUpdateResponse :
216216 """
217217 Updates the Bot Management configuration for a zone.
218218
@@ -268,11 +268,11 @@ def update(
268268 extra_query : Query | None = None ,
269269 extra_body : Body | None = None ,
270270 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
271- ) -> Optional [ BotManagementUpdateResponse ] :
271+ ) -> BotManagementUpdateResponse :
272272 if not zone_id :
273273 raise ValueError (f"Expected a non-empty value for `zone_id` but received { zone_id !r} " )
274274 return cast (
275- Optional [ BotManagementUpdateResponse ] ,
275+ BotManagementUpdateResponse ,
276276 self ._put (
277277 f"/zones/{ zone_id } /bot_management" ,
278278 body = maybe_transform (
@@ -294,7 +294,7 @@ def update(
294294 extra_query = extra_query ,
295295 extra_body = extra_body ,
296296 timeout = timeout ,
297- post_parser = ResultWrapper [Optional [ BotManagementUpdateResponse ] ]._unwrapper ,
297+ post_parser = ResultWrapper [BotManagementUpdateResponse ]._unwrapper ,
298298 ),
299299 cast_to = cast (
300300 Any , ResultWrapper [BotManagementUpdateResponse ]
@@ -312,7 +312,7 @@ def get(
312312 extra_query : Query | None = None ,
313313 extra_body : Body | None = None ,
314314 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
315- ) -> Optional [ BotManagementGetResponse ] :
315+ ) -> BotManagementGetResponse :
316316 """
317317 Retrieve a zone's Bot Management Config
318318
@@ -330,15 +330,15 @@ def get(
330330 if not zone_id :
331331 raise ValueError (f"Expected a non-empty value for `zone_id` but received { zone_id !r} " )
332332 return cast (
333- Optional [ BotManagementGetResponse ] ,
333+ BotManagementGetResponse ,
334334 self ._get (
335335 f"/zones/{ zone_id } /bot_management" ,
336336 options = make_request_options (
337337 extra_headers = extra_headers ,
338338 extra_query = extra_query ,
339339 extra_body = extra_body ,
340340 timeout = timeout ,
341- post_parser = ResultWrapper [Optional [ BotManagementGetResponse ] ]._unwrapper ,
341+ post_parser = ResultWrapper [BotManagementGetResponse ]._unwrapper ,
342342 ),
343343 cast_to = cast (
344344 Any , ResultWrapper [BotManagementGetResponse ]
@@ -369,7 +369,7 @@ async def update(
369369 extra_query : Query | None = None ,
370370 extra_body : Body | None = None ,
371371 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
372- ) -> Optional [ BotManagementUpdateResponse ] :
372+ ) -> BotManagementUpdateResponse :
373373 """
374374 Updates the Bot Management configuration for a zone.
375375
@@ -416,7 +416,7 @@ async def update(
416416 extra_query : Query | None = None ,
417417 extra_body : Body | None = None ,
418418 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
419- ) -> Optional [ BotManagementUpdateResponse ] :
419+ ) -> BotManagementUpdateResponse :
420420 """
421421 Updates the Bot Management configuration for a zone.
422422
@@ -472,7 +472,7 @@ async def update(
472472 extra_query : Query | None = None ,
473473 extra_body : Body | None = None ,
474474 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
475- ) -> Optional [ BotManagementUpdateResponse ] :
475+ ) -> BotManagementUpdateResponse :
476476 """
477477 Updates the Bot Management configuration for a zone.
478478
@@ -527,7 +527,7 @@ async def update(
527527 extra_query : Query | None = None ,
528528 extra_body : Body | None = None ,
529529 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
530- ) -> Optional [ BotManagementUpdateResponse ] :
530+ ) -> BotManagementUpdateResponse :
531531 """
532532 Updates the Bot Management configuration for a zone.
533533
@@ -583,11 +583,11 @@ async def update(
583583 extra_query : Query | None = None ,
584584 extra_body : Body | None = None ,
585585 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
586- ) -> Optional [ BotManagementUpdateResponse ] :
586+ ) -> BotManagementUpdateResponse :
587587 if not zone_id :
588588 raise ValueError (f"Expected a non-empty value for `zone_id` but received { zone_id !r} " )
589589 return cast (
590- Optional [ BotManagementUpdateResponse ] ,
590+ BotManagementUpdateResponse ,
591591 await self ._put (
592592 f"/zones/{ zone_id } /bot_management" ,
593593 body = await async_maybe_transform (
@@ -609,7 +609,7 @@ async def update(
609609 extra_query = extra_query ,
610610 extra_body = extra_body ,
611611 timeout = timeout ,
612- post_parser = ResultWrapper [Optional [ BotManagementUpdateResponse ] ]._unwrapper ,
612+ post_parser = ResultWrapper [BotManagementUpdateResponse ]._unwrapper ,
613613 ),
614614 cast_to = cast (
615615 Any , ResultWrapper [BotManagementUpdateResponse ]
@@ -627,7 +627,7 @@ async def get(
627627 extra_query : Query | None = None ,
628628 extra_body : Body | None = None ,
629629 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
630- ) -> Optional [ BotManagementGetResponse ] :
630+ ) -> BotManagementGetResponse :
631631 """
632632 Retrieve a zone's Bot Management Config
633633
@@ -645,15 +645,15 @@ async def get(
645645 if not zone_id :
646646 raise ValueError (f"Expected a non-empty value for `zone_id` but received { zone_id !r} " )
647647 return cast (
648- Optional [ BotManagementGetResponse ] ,
648+ BotManagementGetResponse ,
649649 await self ._get (
650650 f"/zones/{ zone_id } /bot_management" ,
651651 options = make_request_options (
652652 extra_headers = extra_headers ,
653653 extra_query = extra_query ,
654654 extra_body = extra_body ,
655655 timeout = timeout ,
656- post_parser = ResultWrapper [Optional [ BotManagementGetResponse ] ]._unwrapper ,
656+ post_parser = ResultWrapper [BotManagementGetResponse ]._unwrapper ,
657657 ),
658658 cast_to = cast (
659659 Any , ResultWrapper [BotManagementGetResponse ]
0 commit comments