1515 AssetsResourceWithStreamingResponse ,
1616 AsyncAssetsResourceWithStreamingResponse ,
1717)
18- from ..._types import Body , Query , Headers , NotGiven , not_given
19- from ..._utils import path_template , maybe_transform , async_maybe_transform
18+ from ..._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
19+ from ..._utils import maybe_transform , async_maybe_transform
2020from ..._compat import cached_property
2121from ..._resource import SyncAPIResource , AsyncAPIResource
2222from ..._response import (
@@ -77,8 +77,8 @@ def update(
7777 * ,
7878 state : Literal ["default" , "customized" ],
7979 url : str ,
80- account_id : str | None = None ,
81- zone_id : str | None = None ,
80+ account_id : str | Omit = omit ,
81+ zone_id : str | Omit = omit ,
8282 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8383 # The extra values given here take precedence over values defined on the client or passed to this method.
8484 extra_headers : Headers | None = None ,
@@ -110,10 +110,6 @@ def update(
110110 """
111111 if not identifier :
112112 raise ValueError (f"Expected a non-empty value for `identifier` but received { identifier !r} " )
113- if account_id is None :
114- account_id = self ._client ._get_account_id_path_param ()
115- if zone_id is None :
116- zone_id = self ._client ._get_zone_id_path_param ()
117113 if account_id and zone_id :
118114 raise ValueError ("You cannot provide both account_id and zone_id" )
119115
@@ -127,12 +123,7 @@ def update(
127123 account_or_zone = "zones"
128124 account_or_zone_id = zone_id
129125 return self ._put (
130- path_template (
131- "/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}" ,
132- identifier = identifier ,
133- account_or_zone = account_or_zone ,
134- account_or_zone_id = account_or_zone_id ,
135- ),
126+ f"/{ account_or_zone } /{ account_or_zone_id } /custom_pages/{ identifier } " ,
136127 body = maybe_transform (
137128 {
138129 "state" : state ,
@@ -153,8 +144,8 @@ def update(
153144 def list (
154145 self ,
155146 * ,
156- account_id : str | None = None ,
157- zone_id : str | None = None ,
147+ account_id : str | Omit = omit ,
148+ zone_id : str | Omit = omit ,
158149 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
159150 # The extra values given here take precedence over values defined on the client or passed to this method.
160151 extra_headers : Headers | None = None ,
@@ -178,10 +169,6 @@ def list(
178169
179170 timeout: Override the client-level default timeout for this request, in seconds
180171 """
181- if account_id is None :
182- account_id = self ._client ._get_account_id_path_param ()
183- if zone_id is None :
184- zone_id = self ._client ._get_zone_id_path_param ()
185172 if account_id and zone_id :
186173 raise ValueError ("You cannot provide both account_id and zone_id" )
187174
@@ -195,11 +182,7 @@ def list(
195182 account_or_zone = "zones"
196183 account_or_zone_id = zone_id
197184 return self ._get_api_list (
198- path_template (
199- "/{account_or_zone}/{account_or_zone_id}/custom_pages" ,
200- account_or_zone = account_or_zone ,
201- account_or_zone_id = account_or_zone_id ,
202- ),
185+ f"/{ account_or_zone } /{ account_or_zone_id } /custom_pages" ,
203186 page = SyncSinglePage [CustomPageListResponse ],
204187 options = make_request_options (
205188 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
@@ -222,8 +205,8 @@ def get(
222205 "waf_challenge" ,
223206 ],
224207 * ,
225- account_id : str | None = None ,
226- zone_id : str | None = None ,
208+ account_id : str | Omit = omit ,
209+ zone_id : str | Omit = omit ,
227210 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228211 # The extra values given here take precedence over values defined on the client or passed to this method.
229212 extra_headers : Headers | None = None ,
@@ -251,10 +234,6 @@ def get(
251234 """
252235 if not identifier :
253236 raise ValueError (f"Expected a non-empty value for `identifier` but received { identifier !r} " )
254- if account_id is None :
255- account_id = self ._client ._get_account_id_path_param ()
256- if zone_id is None :
257- zone_id = self ._client ._get_zone_id_path_param ()
258237 if account_id and zone_id :
259238 raise ValueError ("You cannot provide both account_id and zone_id" )
260239
@@ -268,12 +247,7 @@ def get(
268247 account_or_zone = "zones"
269248 account_or_zone_id = zone_id
270249 return self ._get (
271- path_template (
272- "/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}" ,
273- identifier = identifier ,
274- account_or_zone = account_or_zone ,
275- account_or_zone_id = account_or_zone_id ,
276- ),
250+ f"/{ account_or_zone } /{ account_or_zone_id } /custom_pages/{ identifier } " ,
277251 options = make_request_options (
278252 extra_headers = extra_headers ,
279253 extra_query = extra_query ,
@@ -326,8 +300,8 @@ async def update(
326300 * ,
327301 state : Literal ["default" , "customized" ],
328302 url : str ,
329- account_id : str | None = None ,
330- zone_id : str | None = None ,
303+ account_id : str | Omit = omit ,
304+ zone_id : str | Omit = omit ,
331305 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
332306 # The extra values given here take precedence over values defined on the client or passed to this method.
333307 extra_headers : Headers | None = None ,
@@ -359,10 +333,6 @@ async def update(
359333 """
360334 if not identifier :
361335 raise ValueError (f"Expected a non-empty value for `identifier` but received { identifier !r} " )
362- if account_id is None :
363- account_id = self ._client ._get_account_id_path_param ()
364- if zone_id is None :
365- zone_id = self ._client ._get_zone_id_path_param ()
366336 if account_id and zone_id :
367337 raise ValueError ("You cannot provide both account_id and zone_id" )
368338
@@ -376,12 +346,7 @@ async def update(
376346 account_or_zone = "zones"
377347 account_or_zone_id = zone_id
378348 return await self ._put (
379- path_template (
380- "/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}" ,
381- identifier = identifier ,
382- account_or_zone = account_or_zone ,
383- account_or_zone_id = account_or_zone_id ,
384- ),
349+ f"/{ account_or_zone } /{ account_or_zone_id } /custom_pages/{ identifier } " ,
385350 body = await async_maybe_transform (
386351 {
387352 "state" : state ,
@@ -402,8 +367,8 @@ async def update(
402367 def list (
403368 self ,
404369 * ,
405- account_id : str | None = None ,
406- zone_id : str | None = None ,
370+ account_id : str | Omit = omit ,
371+ zone_id : str | Omit = omit ,
407372 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
408373 # The extra values given here take precedence over values defined on the client or passed to this method.
409374 extra_headers : Headers | None = None ,
@@ -427,10 +392,6 @@ def list(
427392
428393 timeout: Override the client-level default timeout for this request, in seconds
429394 """
430- if account_id is None :
431- account_id = self ._client ._get_account_id_path_param ()
432- if zone_id is None :
433- zone_id = self ._client ._get_zone_id_path_param ()
434395 if account_id and zone_id :
435396 raise ValueError ("You cannot provide both account_id and zone_id" )
436397
@@ -444,11 +405,7 @@ def list(
444405 account_or_zone = "zones"
445406 account_or_zone_id = zone_id
446407 return self ._get_api_list (
447- path_template (
448- "/{account_or_zone}/{account_or_zone_id}/custom_pages" ,
449- account_or_zone = account_or_zone ,
450- account_or_zone_id = account_or_zone_id ,
451- ),
408+ f"/{ account_or_zone } /{ account_or_zone_id } /custom_pages" ,
452409 page = AsyncSinglePage [CustomPageListResponse ],
453410 options = make_request_options (
454411 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
@@ -471,8 +428,8 @@ async def get(
471428 "waf_challenge" ,
472429 ],
473430 * ,
474- account_id : str | None = None ,
475- zone_id : str | None = None ,
431+ account_id : str | Omit = omit ,
432+ zone_id : str | Omit = omit ,
476433 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
477434 # The extra values given here take precedence over values defined on the client or passed to this method.
478435 extra_headers : Headers | None = None ,
@@ -500,10 +457,6 @@ async def get(
500457 """
501458 if not identifier :
502459 raise ValueError (f"Expected a non-empty value for `identifier` but received { identifier !r} " )
503- if account_id is None :
504- account_id = self ._client ._get_account_id_path_param ()
505- if zone_id is None :
506- zone_id = self ._client ._get_zone_id_path_param ()
507460 if account_id and zone_id :
508461 raise ValueError ("You cannot provide both account_id and zone_id" )
509462
@@ -517,12 +470,7 @@ async def get(
517470 account_or_zone = "zones"
518471 account_or_zone_id = zone_id
519472 return await self ._get (
520- path_template (
521- "/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}" ,
522- identifier = identifier ,
523- account_or_zone = account_or_zone ,
524- account_or_zone_id = account_or_zone_id ,
525- ),
473+ f"/{ account_or_zone } /{ account_or_zone_id } /custom_pages/{ identifier } " ,
526474 options = make_request_options (
527475 extra_headers = extra_headers ,
528476 extra_query = extra_query ,
0 commit comments