33from __future__ import annotations
44
55from typing import Type , Iterable , cast
6- from typing_extensions import Literal
76
87import httpx
98
3231from ...._base_client import (
3332 make_request_options ,
3433)
35- from ....types .rulesets import phase_update_params
34+ from ....types .rulesets import Kind , Phase , phase_update_params
35+ from ....types .rulesets .kind import Kind
36+ from ....types .rulesets .phase import Phase
3637from ....types .rulesets .phase_get_response import PhaseGetResponse
3738from ....types .rulesets .phase_update_response import PhaseUpdateResponse
3839
@@ -54,64 +55,15 @@ def with_streaming_response(self) -> PhasesResourceWithStreamingResponse:
5455
5556 def update (
5657 self ,
57- ruleset_phase : Literal [
58- "ddos_l4" ,
59- "ddos_l7" ,
60- "http_config_settings" ,
61- "http_custom_errors" ,
62- "http_log_custom_fields" ,
63- "http_ratelimit" ,
64- "http_request_cache_settings" ,
65- "http_request_dynamic_redirect" ,
66- "http_request_firewall_custom" ,
67- "http_request_firewall_managed" ,
68- "http_request_late_transform" ,
69- "http_request_origin" ,
70- "http_request_redirect" ,
71- "http_request_sanitize" ,
72- "http_request_sbfm" ,
73- "http_request_select_configuration" ,
74- "http_request_transform" ,
75- "http_response_compression" ,
76- "http_response_firewall_managed" ,
77- "http_response_headers_transform" ,
78- "magic_transit" ,
79- "magic_transit_ids_managed" ,
80- "magic_transit_managed" ,
81- ],
58+ ruleset_phase : Phase ,
8259 * ,
8360 rules : Iterable [phase_update_params .Rule ],
8461 account_id : str | NotGiven = NOT_GIVEN ,
8562 zone_id : str | NotGiven = NOT_GIVEN ,
8663 description : str | NotGiven = NOT_GIVEN ,
87- kind : Literal [ "managed" , "custom" , "root" , "zone" ] | NotGiven = NOT_GIVEN ,
64+ kind : Kind | NotGiven = NOT_GIVEN ,
8865 name : str | NotGiven = NOT_GIVEN ,
89- phase : Literal [
90- "ddos_l4" ,
91- "ddos_l7" ,
92- "http_config_settings" ,
93- "http_custom_errors" ,
94- "http_log_custom_fields" ,
95- "http_ratelimit" ,
96- "http_request_cache_settings" ,
97- "http_request_dynamic_redirect" ,
98- "http_request_firewall_custom" ,
99- "http_request_firewall_managed" ,
100- "http_request_late_transform" ,
101- "http_request_origin" ,
102- "http_request_redirect" ,
103- "http_request_sanitize" ,
104- "http_request_sbfm" ,
105- "http_request_select_configuration" ,
106- "http_request_transform" ,
107- "http_response_compression" ,
108- "http_response_firewall_managed" ,
109- "http_response_headers_transform" ,
110- "magic_transit" ,
111- "magic_transit_ids_managed" ,
112- "magic_transit_managed" ,
113- ]
114- | NotGiven = NOT_GIVEN ,
66+ phase : Phase | NotGiven = NOT_GIVEN ,
11567 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
11668 # The extra values given here take precedence over values defined on the client or passed to this method.
11769 extra_headers : Headers | None = None ,
@@ -185,31 +137,7 @@ def update(
185137
186138 def get (
187139 self ,
188- ruleset_phase : Literal [
189- "ddos_l4" ,
190- "ddos_l7" ,
191- "http_config_settings" ,
192- "http_custom_errors" ,
193- "http_log_custom_fields" ,
194- "http_ratelimit" ,
195- "http_request_cache_settings" ,
196- "http_request_dynamic_redirect" ,
197- "http_request_firewall_custom" ,
198- "http_request_firewall_managed" ,
199- "http_request_late_transform" ,
200- "http_request_origin" ,
201- "http_request_redirect" ,
202- "http_request_sanitize" ,
203- "http_request_sbfm" ,
204- "http_request_select_configuration" ,
205- "http_request_transform" ,
206- "http_response_compression" ,
207- "http_response_firewall_managed" ,
208- "http_response_headers_transform" ,
209- "magic_transit" ,
210- "magic_transit_ids_managed" ,
211- "magic_transit_managed" ,
212- ],
140+ ruleset_phase : Phase ,
213141 * ,
214142 account_id : str | NotGiven = NOT_GIVEN ,
215143 zone_id : str | NotGiven = NOT_GIVEN ,
@@ -281,64 +209,15 @@ def with_streaming_response(self) -> AsyncPhasesResourceWithStreamingResponse:
281209
282210 async def update (
283211 self ,
284- ruleset_phase : Literal [
285- "ddos_l4" ,
286- "ddos_l7" ,
287- "http_config_settings" ,
288- "http_custom_errors" ,
289- "http_log_custom_fields" ,
290- "http_ratelimit" ,
291- "http_request_cache_settings" ,
292- "http_request_dynamic_redirect" ,
293- "http_request_firewall_custom" ,
294- "http_request_firewall_managed" ,
295- "http_request_late_transform" ,
296- "http_request_origin" ,
297- "http_request_redirect" ,
298- "http_request_sanitize" ,
299- "http_request_sbfm" ,
300- "http_request_select_configuration" ,
301- "http_request_transform" ,
302- "http_response_compression" ,
303- "http_response_firewall_managed" ,
304- "http_response_headers_transform" ,
305- "magic_transit" ,
306- "magic_transit_ids_managed" ,
307- "magic_transit_managed" ,
308- ],
212+ ruleset_phase : Phase ,
309213 * ,
310214 rules : Iterable [phase_update_params .Rule ],
311215 account_id : str | NotGiven = NOT_GIVEN ,
312216 zone_id : str | NotGiven = NOT_GIVEN ,
313217 description : str | NotGiven = NOT_GIVEN ,
314- kind : Literal [ "managed" , "custom" , "root" , "zone" ] | NotGiven = NOT_GIVEN ,
218+ kind : Kind | NotGiven = NOT_GIVEN ,
315219 name : str | NotGiven = NOT_GIVEN ,
316- phase : Literal [
317- "ddos_l4" ,
318- "ddos_l7" ,
319- "http_config_settings" ,
320- "http_custom_errors" ,
321- "http_log_custom_fields" ,
322- "http_ratelimit" ,
323- "http_request_cache_settings" ,
324- "http_request_dynamic_redirect" ,
325- "http_request_firewall_custom" ,
326- "http_request_firewall_managed" ,
327- "http_request_late_transform" ,
328- "http_request_origin" ,
329- "http_request_redirect" ,
330- "http_request_sanitize" ,
331- "http_request_sbfm" ,
332- "http_request_select_configuration" ,
333- "http_request_transform" ,
334- "http_response_compression" ,
335- "http_response_firewall_managed" ,
336- "http_response_headers_transform" ,
337- "magic_transit" ,
338- "magic_transit_ids_managed" ,
339- "magic_transit_managed" ,
340- ]
341- | NotGiven = NOT_GIVEN ,
220+ phase : Phase | NotGiven = NOT_GIVEN ,
342221 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
343222 # The extra values given here take precedence over values defined on the client or passed to this method.
344223 extra_headers : Headers | None = None ,
@@ -412,31 +291,7 @@ async def update(
412291
413292 async def get (
414293 self ,
415- ruleset_phase : Literal [
416- "ddos_l4" ,
417- "ddos_l7" ,
418- "http_config_settings" ,
419- "http_custom_errors" ,
420- "http_log_custom_fields" ,
421- "http_ratelimit" ,
422- "http_request_cache_settings" ,
423- "http_request_dynamic_redirect" ,
424- "http_request_firewall_custom" ,
425- "http_request_firewall_managed" ,
426- "http_request_late_transform" ,
427- "http_request_origin" ,
428- "http_request_redirect" ,
429- "http_request_sanitize" ,
430- "http_request_sbfm" ,
431- "http_request_select_configuration" ,
432- "http_request_transform" ,
433- "http_response_compression" ,
434- "http_response_firewall_managed" ,
435- "http_response_headers_transform" ,
436- "magic_transit" ,
437- "magic_transit_ids_managed" ,
438- "magic_transit_managed" ,
439- ],
294+ ruleset_phase : Phase ,
440295 * ,
441296 account_id : str | NotGiven = NOT_GIVEN ,
442297 zone_id : str | NotGiven = NOT_GIVEN ,
0 commit comments