@@ -107,10 +107,15 @@ def update(
107107 cast_to = cast (Type [Optional [DeviceSettings ]], ResultWrapper [DeviceSettings ]),
108108 )
109109
110- def list (
110+ def edit (
111111 self ,
112112 * ,
113113 account_id : str ,
114+ disable_for_time : float | NotGiven = NOT_GIVEN ,
115+ gateway_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
116+ gateway_udp_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
117+ root_certificate_installation_enabled : bool | NotGiven = NOT_GIVEN ,
118+ use_zt_virtual_ip : bool | NotGiven = NOT_GIVEN ,
114119 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
115120 # The extra values given here take precedence over values defined on the client or passed to this method.
116121 extra_headers : Headers | None = None ,
@@ -119,9 +124,20 @@ def list(
119124 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
120125 ) -> Optional [DeviceSettings ]:
121126 """
122- Describes the current device settings for a Zero Trust account.
127+ Patches the current device settings for a Zero Trust account.
123128
124129 Args:
130+ disable_for_time: Sets the time limit, in seconds, that a user can use an override code to bypass
131+ WARP.
132+
133+ gateway_proxy_enabled: Enable gateway proxy filtering on TCP.
134+
135+ gateway_udp_proxy_enabled: Enable gateway proxy filtering on UDP.
136+
137+ root_certificate_installation_enabled: Enable installation of cloudflare managed root certificate.
138+
139+ use_zt_virtual_ip: Enable using CGNAT virtual IPv4.
140+
125141 extra_headers: Send extra headers
126142
127143 extra_query: Add additional query parameters to the request
@@ -132,8 +148,18 @@ def list(
132148 """
133149 if not account_id :
134150 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
135- return self ._get (
151+ return self ._patch (
136152 f"/accounts/{ account_id } /devices/settings" ,
153+ body = maybe_transform (
154+ {
155+ "disable_for_time" : disable_for_time ,
156+ "gateway_proxy_enabled" : gateway_proxy_enabled ,
157+ "gateway_udp_proxy_enabled" : gateway_udp_proxy_enabled ,
158+ "root_certificate_installation_enabled" : root_certificate_installation_enabled ,
159+ "use_zt_virtual_ip" : use_zt_virtual_ip ,
160+ },
161+ setting_edit_params .SettingEditParams ,
162+ ),
137163 options = make_request_options (
138164 extra_headers = extra_headers ,
139165 extra_query = extra_query ,
@@ -144,15 +170,10 @@ def list(
144170 cast_to = cast (Type [Optional [DeviceSettings ]], ResultWrapper [DeviceSettings ]),
145171 )
146172
147- def edit (
173+ def get (
148174 self ,
149175 * ,
150176 account_id : str ,
151- disable_for_time : float | NotGiven = NOT_GIVEN ,
152- gateway_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
153- gateway_udp_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
154- root_certificate_installation_enabled : bool | NotGiven = NOT_GIVEN ,
155- use_zt_virtual_ip : bool | NotGiven = NOT_GIVEN ,
156177 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
157178 # The extra values given here take precedence over values defined on the client or passed to this method.
158179 extra_headers : Headers | None = None ,
@@ -161,20 +182,9 @@ def edit(
161182 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
162183 ) -> Optional [DeviceSettings ]:
163184 """
164- Patches the current device settings for a Zero Trust account.
185+ Describes the current device settings for a Zero Trust account.
165186
166187 Args:
167- disable_for_time: Sets the time limit, in seconds, that a user can use an override code to bypass
168- WARP.
169-
170- gateway_proxy_enabled: Enable gateway proxy filtering on TCP.
171-
172- gateway_udp_proxy_enabled: Enable gateway proxy filtering on UDP.
173-
174- root_certificate_installation_enabled: Enable installation of cloudflare managed root certificate.
175-
176- use_zt_virtual_ip: Enable using CGNAT virtual IPv4.
177-
178188 extra_headers: Send extra headers
179189
180190 extra_query: Add additional query parameters to the request
@@ -185,18 +195,8 @@ def edit(
185195 """
186196 if not account_id :
187197 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
188- return self ._patch (
198+ return self ._get (
189199 f"/accounts/{ account_id } /devices/settings" ,
190- body = maybe_transform (
191- {
192- "disable_for_time" : disable_for_time ,
193- "gateway_proxy_enabled" : gateway_proxy_enabled ,
194- "gateway_udp_proxy_enabled" : gateway_udp_proxy_enabled ,
195- "root_certificate_installation_enabled" : root_certificate_installation_enabled ,
196- "use_zt_virtual_ip" : use_zt_virtual_ip ,
197- },
198- setting_edit_params .SettingEditParams ,
199- ),
200200 options = make_request_options (
201201 extra_headers = extra_headers ,
202202 extra_query = extra_query ,
@@ -291,10 +291,15 @@ async def update(
291291 cast_to = cast (Type [Optional [DeviceSettings ]], ResultWrapper [DeviceSettings ]),
292292 )
293293
294- async def list (
294+ async def edit (
295295 self ,
296296 * ,
297297 account_id : str ,
298+ disable_for_time : float | NotGiven = NOT_GIVEN ,
299+ gateway_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
300+ gateway_udp_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
301+ root_certificate_installation_enabled : bool | NotGiven = NOT_GIVEN ,
302+ use_zt_virtual_ip : bool | NotGiven = NOT_GIVEN ,
298303 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
299304 # The extra values given here take precedence over values defined on the client or passed to this method.
300305 extra_headers : Headers | None = None ,
@@ -303,9 +308,20 @@ async def list(
303308 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
304309 ) -> Optional [DeviceSettings ]:
305310 """
306- Describes the current device settings for a Zero Trust account.
311+ Patches the current device settings for a Zero Trust account.
307312
308313 Args:
314+ disable_for_time: Sets the time limit, in seconds, that a user can use an override code to bypass
315+ WARP.
316+
317+ gateway_proxy_enabled: Enable gateway proxy filtering on TCP.
318+
319+ gateway_udp_proxy_enabled: Enable gateway proxy filtering on UDP.
320+
321+ root_certificate_installation_enabled: Enable installation of cloudflare managed root certificate.
322+
323+ use_zt_virtual_ip: Enable using CGNAT virtual IPv4.
324+
309325 extra_headers: Send extra headers
310326
311327 extra_query: Add additional query parameters to the request
@@ -316,8 +332,18 @@ async def list(
316332 """
317333 if not account_id :
318334 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
319- return await self ._get (
335+ return await self ._patch (
320336 f"/accounts/{ account_id } /devices/settings" ,
337+ body = await async_maybe_transform (
338+ {
339+ "disable_for_time" : disable_for_time ,
340+ "gateway_proxy_enabled" : gateway_proxy_enabled ,
341+ "gateway_udp_proxy_enabled" : gateway_udp_proxy_enabled ,
342+ "root_certificate_installation_enabled" : root_certificate_installation_enabled ,
343+ "use_zt_virtual_ip" : use_zt_virtual_ip ,
344+ },
345+ setting_edit_params .SettingEditParams ,
346+ ),
321347 options = make_request_options (
322348 extra_headers = extra_headers ,
323349 extra_query = extra_query ,
@@ -328,15 +354,10 @@ async def list(
328354 cast_to = cast (Type [Optional [DeviceSettings ]], ResultWrapper [DeviceSettings ]),
329355 )
330356
331- async def edit (
357+ async def get (
332358 self ,
333359 * ,
334360 account_id : str ,
335- disable_for_time : float | NotGiven = NOT_GIVEN ,
336- gateway_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
337- gateway_udp_proxy_enabled : bool | NotGiven = NOT_GIVEN ,
338- root_certificate_installation_enabled : bool | NotGiven = NOT_GIVEN ,
339- use_zt_virtual_ip : bool | NotGiven = NOT_GIVEN ,
340361 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
341362 # The extra values given here take precedence over values defined on the client or passed to this method.
342363 extra_headers : Headers | None = None ,
@@ -345,20 +366,9 @@ async def edit(
345366 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
346367 ) -> Optional [DeviceSettings ]:
347368 """
348- Patches the current device settings for a Zero Trust account.
369+ Describes the current device settings for a Zero Trust account.
349370
350371 Args:
351- disable_for_time: Sets the time limit, in seconds, that a user can use an override code to bypass
352- WARP.
353-
354- gateway_proxy_enabled: Enable gateway proxy filtering on TCP.
355-
356- gateway_udp_proxy_enabled: Enable gateway proxy filtering on UDP.
357-
358- root_certificate_installation_enabled: Enable installation of cloudflare managed root certificate.
359-
360- use_zt_virtual_ip: Enable using CGNAT virtual IPv4.
361-
362372 extra_headers: Send extra headers
363373
364374 extra_query: Add additional query parameters to the request
@@ -369,18 +379,8 @@ async def edit(
369379 """
370380 if not account_id :
371381 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
372- return await self ._patch (
382+ return await self ._get (
373383 f"/accounts/{ account_id } /devices/settings" ,
374- body = await async_maybe_transform (
375- {
376- "disable_for_time" : disable_for_time ,
377- "gateway_proxy_enabled" : gateway_proxy_enabled ,
378- "gateway_udp_proxy_enabled" : gateway_udp_proxy_enabled ,
379- "root_certificate_installation_enabled" : root_certificate_installation_enabled ,
380- "use_zt_virtual_ip" : use_zt_virtual_ip ,
381- },
382- setting_edit_params .SettingEditParams ,
383- ),
384384 options = make_request_options (
385385 extra_headers = extra_headers ,
386386 extra_query = extra_query ,
@@ -399,12 +399,12 @@ def __init__(self, settings: SettingsResource) -> None:
399399 self .update = to_raw_response_wrapper (
400400 settings .update ,
401401 )
402- self .list = to_raw_response_wrapper (
403- settings .list ,
404- )
405402 self .edit = to_raw_response_wrapper (
406403 settings .edit ,
407404 )
405+ self .get = to_raw_response_wrapper (
406+ settings .get ,
407+ )
408408
409409
410410class AsyncSettingsResourceWithRawResponse :
@@ -414,12 +414,12 @@ def __init__(self, settings: AsyncSettingsResource) -> None:
414414 self .update = async_to_raw_response_wrapper (
415415 settings .update ,
416416 )
417- self .list = async_to_raw_response_wrapper (
418- settings .list ,
419- )
420417 self .edit = async_to_raw_response_wrapper (
421418 settings .edit ,
422419 )
420+ self .get = async_to_raw_response_wrapper (
421+ settings .get ,
422+ )
423423
424424
425425class SettingsResourceWithStreamingResponse :
@@ -429,12 +429,12 @@ def __init__(self, settings: SettingsResource) -> None:
429429 self .update = to_streamed_response_wrapper (
430430 settings .update ,
431431 )
432- self .list = to_streamed_response_wrapper (
433- settings .list ,
434- )
435432 self .edit = to_streamed_response_wrapper (
436433 settings .edit ,
437434 )
435+ self .get = to_streamed_response_wrapper (
436+ settings .get ,
437+ )
438438
439439
440440class AsyncSettingsResourceWithStreamingResponse :
@@ -444,9 +444,9 @@ def __init__(self, settings: AsyncSettingsResource) -> None:
444444 self .update = async_to_streamed_response_wrapper (
445445 settings .update ,
446446 )
447- self .list = async_to_streamed_response_wrapper (
448- settings .list ,
449- )
450447 self .edit = async_to_streamed_response_wrapper (
451448 settings .edit ,
452449 )
450+ self .get = async_to_streamed_response_wrapper (
451+ settings .get ,
452+ )
0 commit comments