From 33a45ae2d34c94fddfb7bb83c26c1f412600391a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 21:06:40 +0000 Subject: [PATCH] feat(api): update via SDK Studio (#223) --- .stats.yml | 2 +- api.md | 11 - .../resources/zones/settings/settings.py | 212 ------------ src/cloudflare/types/zones/__init__.py | 3 - .../types/zones/setting_edit_params.py | 207 ------------ .../types/zones/setting_edit_response.py | 253 --------------- .../types/zones/setting_get_response.py | 253 --------------- .../types/zones/settings/__init__.py | 56 ---- .../zones/settings/zone_setting_0rtt_param.py | 15 - .../zone_setting_advanced_ddos_param.py | 15 - .../zone_setting_always_online_param.py | 15 - .../zone_setting_always_use_https_param.py | 15 - ..._setting_automatic_https_rewrites_param.py | 15 - .../settings/zone_setting_brotli_param.py | 15 - .../zone_setting_browser_cache_ttl_param.py | 46 --- .../zone_setting_browser_check_param.py | 15 - .../settings/zone_setting_buffering_param.py | 15 - .../zone_setting_cache_level_param.py | 15 - .../zone_setting_challenge_ttl_param.py | 17 - .../settings/zone_setting_ciphers_param.py | 16 - .../zone_setting_development_mode_param.py | 15 - .../zone_setting_early_hints_param.py | 15 - .../zone_setting_email_obfuscation_param.py | 15 - .../zone_setting_hotlink_protection_param.py | 15 - .../settings/zone_setting_http2_param.py | 15 - .../settings/zone_setting_http3_param.py | 15 - .../zone_setting_ip_geolocation_param.py | 15 - .../zones/settings/zone_setting_ipv6_param.py | 15 - .../zone_setting_min_tls_version_param.py | 15 - .../settings/zone_setting_minify_param.py | 26 -- .../settings/zone_setting_mirage_param.py | 15 - .../zone_setting_mobile_redirect_param.py | 33 -- ..._setting_opportunistic_encryption_param.py | 15 - .../zone_setting_opportunistic_onion_param.py | 15 - ...tting_origin_error_page_pass_thru_param.py | 15 - .../zone_setting_prefetch_preload_param.py | 15 - .../zone_setting_pseudo_ipv4_param.py | 15 - .../zone_setting_security_header_param.py | 34 -- .../zone_setting_security_level_param.py | 15 - .../zone_setting_server_side_exclude_param.py | 15 - ...tting_sort_query_string_for_cache_param.py | 15 - .../zones/settings/zone_setting_ssl_param.py | 15 - .../settings/zone_setting_tls_1_3_param.py | 15 - .../zone_setting_tls_client_auth_param.py | 15 - ...one_setting_true_client_ip_header_param.py | 15 - .../zones/settings/zone_setting_waf_param.py | 15 - .../zones/settings/zone_setting_webp_param.py | 15 - .../settings/zone_setting_websockets_param.py | 15 - tests/api_resources/zones/test_settings.py | 302 ------------------ 49 files changed, 1 insertion(+), 1980 deletions(-) delete mode 100644 src/cloudflare/types/zones/setting_edit_params.py delete mode 100644 src/cloudflare/types/zones/setting_edit_response.py delete mode 100644 src/cloudflare/types/zones/setting_get_response.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_always_online_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_brotli_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_buffering_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_http2_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_http3_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_minify_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_mirage_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_security_header_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_security_level_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_ssl_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_waf_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_webp_param.py delete mode 100644 src/cloudflare/types/zones/settings/zone_setting_websockets_param.py delete mode 100644 tests/api_resources/zones/test_settings.py diff --git a/.stats.yml b/.stats.yml index 8bd1d4afd6e7..c4813cf44d2e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 1299 +configured_endpoints: 1297 diff --git a/api.md b/api.md index e7bbe6b3587c..28804129a473 100644 --- a/api.md +++ b/api.md @@ -394,17 +394,6 @@ Methods: ## Settings -Types: - -```python -from cloudflare.types.zones import SettingEditResponse, SettingGetResponse -``` - -Methods: - -- client.zones.settings.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.get(\*, zone_id) -> Optional - ### ZeroRTT Types: diff --git a/src/cloudflare/resources/zones/settings/settings.py b/src/cloudflare/resources/zones/settings/settings.py index 10df9fed82bb..963366372966 100644 --- a/src/cloudflare/resources/zones/settings/settings.py +++ b/src/cloudflare/resources/zones/settings/settings.py @@ -2,10 +2,6 @@ from __future__ import annotations -from typing import Type, Iterable, Optional, cast - -import httpx - from .nel import ( NEL, AsyncNEL, @@ -118,11 +114,6 @@ ZeroRTTWithStreamingResponse, AsyncZeroRTTWithStreamingResponse, ) -from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) from .websocket import ( Websocket, AsyncWebsocket, @@ -157,13 +148,6 @@ AsyncPseudoIPV4WithStreamingResponse, ) from ...._resource import SyncAPIResource, AsyncAPIResource -from ...._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ...._wrappers import ResultWrapper from .advanced_ddos import ( AdvancedDDoS, AsyncAdvancedDDoS, @@ -212,7 +196,6 @@ RocketLoaderWithStreamingResponse, AsyncRocketLoaderWithStreamingResponse, ) -from ....types.zones import SettingGetResponse, SettingEditResponse, setting_edit_params from .image_resizing import ( ImageResizing, AsyncImageResizing, @@ -237,9 +220,6 @@ SecurityLevelWithStreamingResponse, AsyncSecurityLevelWithStreamingResponse, ) -from ...._base_client import ( - make_request_options, -) from .min_tls_version import ( MinTLSVersion, AsyncMinTLSVersion, @@ -649,88 +629,6 @@ def with_raw_response(self) -> SettingsWithRawResponse: def with_streaming_response(self) -> SettingsWithStreamingResponse: return SettingsWithStreamingResponse(self) - def edit( - self, - *, - zone_id: str, - items: Iterable[setting_edit_params.Item], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingEditResponse]: - """ - Edit settings for a zone. - - Args: - zone_id: Identifier - - items: One or more zone setting objects. Must contain an ID and a value. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._patch( - f"/zones/{zone_id}/settings", - body=maybe_transform({"items": items}, setting_edit_params.SettingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[Optional[SettingEditResponse]], ResultWrapper[SettingEditResponse]), - ) - - def get( - self, - *, - zone_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingGetResponse]: - """ - Available settings for your user in relation to a zone. - - Args: - zone_id: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( - f"/zones/{zone_id}/settings", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[Optional[SettingGetResponse]], ResultWrapper[SettingGetResponse]), - ) - class AsyncSettings(AsyncAPIResource): @cached_property @@ -945,100 +843,11 @@ def with_raw_response(self) -> AsyncSettingsWithRawResponse: def with_streaming_response(self) -> AsyncSettingsWithStreamingResponse: return AsyncSettingsWithStreamingResponse(self) - async def edit( - self, - *, - zone_id: str, - items: Iterable[setting_edit_params.Item], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingEditResponse]: - """ - Edit settings for a zone. - - Args: - zone_id: Identifier - - items: One or more zone setting objects. Must contain an ID and a value. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._patch( - f"/zones/{zone_id}/settings", - body=await async_maybe_transform({"items": items}, setting_edit_params.SettingEditParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[Optional[SettingEditResponse]], ResultWrapper[SettingEditResponse]), - ) - - async def get( - self, - *, - zone_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SettingGetResponse]: - """ - Available settings for your user in relation to a zone. - - Args: - zone_id: Identifier - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not zone_id: - raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( - f"/zones/{zone_id}/settings", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast(Type[Optional[SettingGetResponse]], ResultWrapper[SettingGetResponse]), - ) - class SettingsWithRawResponse: def __init__(self, settings: Settings) -> None: self._settings = settings - self.edit = to_raw_response_wrapper( - settings.edit, - ) - self.get = to_raw_response_wrapper( - settings.get, - ) - @cached_property def zero_rtt(self) -> ZeroRTTWithRawResponse: return ZeroRTTWithRawResponse(self._settings.zero_rtt) @@ -1248,13 +1057,6 @@ class AsyncSettingsWithRawResponse: def __init__(self, settings: AsyncSettings) -> None: self._settings = settings - self.edit = async_to_raw_response_wrapper( - settings.edit, - ) - self.get = async_to_raw_response_wrapper( - settings.get, - ) - @cached_property def zero_rtt(self) -> AsyncZeroRTTWithRawResponse: return AsyncZeroRTTWithRawResponse(self._settings.zero_rtt) @@ -1464,13 +1266,6 @@ class SettingsWithStreamingResponse: def __init__(self, settings: Settings) -> None: self._settings = settings - self.edit = to_streamed_response_wrapper( - settings.edit, - ) - self.get = to_streamed_response_wrapper( - settings.get, - ) - @cached_property def zero_rtt(self) -> ZeroRTTWithStreamingResponse: return ZeroRTTWithStreamingResponse(self._settings.zero_rtt) @@ -1680,13 +1475,6 @@ class AsyncSettingsWithStreamingResponse: def __init__(self, settings: AsyncSettings) -> None: self._settings = settings - self.edit = async_to_streamed_response_wrapper( - settings.edit, - ) - self.get = async_to_streamed_response_wrapper( - settings.get, - ) - @cached_property def zero_rtt(self) -> AsyncZeroRTTWithStreamingResponse: return AsyncZeroRTTWithStreamingResponse(self._settings.zero_rtt) diff --git a/src/cloudflare/types/zones/__init__.py b/src/cloudflare/types/zones/__init__.py index 06c40c2f66d0..095a293ecef3 100644 --- a/src/cloudflare/types/zones/__init__.py +++ b/src/cloudflare/types/zones/__init__.py @@ -5,9 +5,6 @@ from .dns_setting import DNSSetting as DNSSetting from .hold_create_params import HoldCreateParams as HoldCreateParams from .hold_delete_params import HoldDeleteParams as HoldDeleteParams -from .setting_edit_params import SettingEditParams as SettingEditParams -from .setting_get_response import SettingGetResponse as SettingGetResponse -from .setting_edit_response import SettingEditResponse as SettingEditResponse from .dns_setting_edit_params import DNSSettingEditParams as DNSSettingEditParams from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py deleted file mode 100644 index cf0c7c0befe4..000000000000 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ /dev/null @@ -1,207 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union, Iterable -from typing_extensions import Literal, Required, TypedDict - -from .settings import ( - ZoneSettingNELParam, - ZoneSettingSSLParam, - ZoneSettingWAFParam, - ZoneSetting0rttParam, - ZoneSettingIPV6Param, - ZoneSettingWebPParam, - ZoneSettingHTTP2Param, - ZoneSettingHTTP3Param, - ZoneSettingBrotliParam, - ZoneSettingMinifyParam, - ZoneSettingMirageParam, - ZoneSettingPolishParam, - ZoneSettingTLS1_3Param, - ZoneSettingCiphersParam, - ZoneSettingBufferingParam, - ZoneSettingCacheLevelParam, - ZoneSettingEarlyHintsParam, - ZoneSettingPseudoIPV4Param, - ZoneSettingWebsocketsParam, - ZoneSettingAdvancedDDoSParam, - ZoneSettingAlwaysOnlineParam, - ZoneSettingBrowserCheckParam, - ZoneSettingChallengeTTLParam, - ZoneSettingRocketLoaderParam, - ZoneSettingImageResizingParam, - ZoneSettingIPGeolocationParam, - ZoneSettingMinTLSVersionParam, - ZoneSettingSecurityLevelParam, - ZoneSettingTLSClientAuthParam, - ZoneSettingAlwaysUseHTTPSParam, - ZoneSettingMobileRedirectParam, - ZoneSettingOrangeToOrangeParam, - ZoneSettingSecurityHeaderParam, - ZoneSettingSSLRecommenderParam, - ZoneSettingBrowserCacheTTLParam, - ZoneSettingDevelopmentModeParam, - ZoneSettingPrefetchPreloadParam, - ZoneSettingEmailObfuscationParam, - ZoneSettingH2PrioritizationParam, - ZoneSettingProxyReadTimeoutParam, - ZoneSettingHotlinkProtectionParam, - ZoneSettingServerSideExcludeParam, - ZoneSettingOpportunisticOnionParam, - ZoneSettingTrueClientIPHeaderParam, - ZoneSettingAutomaticHTTPSRewritesParam, - ZoneSettingOpportunisticEncryptionParam, - ZoneSettingOriginErrorPagePassThruParam, - ZoneSettingSortQueryStringForCacheParam, - ZoneSettingAutomaticPlatformOptimizationParam, -) - -__all__ = [ - "SettingEditParams", - "Item", - "ItemZonesCNAMEFlattening", - "ItemZonesEdgeCacheTTL", - "ItemZonesMaxUpload", - "ItemZonesSchemasAutomaticPlatformOptimization", - "ItemZonesSha1Support", - "ItemZonesTLS1_2Only", -] - - -class SettingEditParams(TypedDict, total=False): - zone_id: Required[str] - """Identifier""" - - items: Required[Iterable[Item]] - """One or more zone setting objects. Must contain an ID and a value.""" - - -class ItemZonesCNAMEFlattening(TypedDict, total=False): - id: Required[Literal["cname_flattening"]] - """How to flatten the cname destination.""" - - value: Required[Literal["flatten_at_root", "flatten_all"]] - """Current value of the zone setting.""" - - -class ItemZonesEdgeCacheTTL(TypedDict, total=False): - id: Required[Literal["edge_cache_ttl"]] - """ID of the zone setting.""" - - value: Required[ - Literal[ - 30, - 60, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 518400, - 604800, - ] - ] - """Current value of the zone setting.""" - - -class ItemZonesMaxUpload(TypedDict, total=False): - id: Required[Literal["max_upload"]] - """identifier of the zone setting.""" - - value: Required[Literal[100, 200, 500]] - """Current value of the zone setting.""" - - -class ItemZonesSchemasAutomaticPlatformOptimization(TypedDict, total=False): - id: Required[Literal["automatic_platform_optimization"]] - """ID of the zone setting.""" - - value: Required[ZoneSettingAutomaticPlatformOptimizationParam] - """Current value of the zone setting.""" - - -class ItemZonesSha1Support(TypedDict, total=False): - id: Required[Literal["sha1_support"]] - """Zone setting identifier.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" - - -class ItemZonesTLS1_2Only(TypedDict, total=False): - id: Required[Literal["tls_1_2_only"]] - """Zone setting identifier.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" - - -Item = Union[ - ZoneSetting0rttParam, - ZoneSettingAdvancedDDoSParam, - ZoneSettingAlwaysOnlineParam, - ZoneSettingAlwaysUseHTTPSParam, - ZoneSettingAutomaticHTTPSRewritesParam, - ZoneSettingBrotliParam, - ZoneSettingBrowserCacheTTLParam, - ZoneSettingBrowserCheckParam, - ZoneSettingCacheLevelParam, - ZoneSettingChallengeTTLParam, - ZoneSettingCiphersParam, - ItemZonesCNAMEFlattening, - ZoneSettingDevelopmentModeParam, - ZoneSettingEarlyHintsParam, - ItemZonesEdgeCacheTTL, - ZoneSettingEmailObfuscationParam, - ZoneSettingH2PrioritizationParam, - ZoneSettingHotlinkProtectionParam, - ZoneSettingHTTP2Param, - ZoneSettingHTTP3Param, - ZoneSettingImageResizingParam, - ZoneSettingIPGeolocationParam, - ZoneSettingIPV6Param, - ItemZonesMaxUpload, - ZoneSettingMinTLSVersionParam, - ZoneSettingMinifyParam, - ZoneSettingMirageParam, - ZoneSettingMobileRedirectParam, - ZoneSettingNELParam, - ZoneSettingOpportunisticEncryptionParam, - ZoneSettingOpportunisticOnionParam, - ZoneSettingOrangeToOrangeParam, - ZoneSettingOriginErrorPagePassThruParam, - ZoneSettingPolishParam, - ZoneSettingPrefetchPreloadParam, - ZoneSettingProxyReadTimeoutParam, - ZoneSettingPseudoIPV4Param, - ZoneSettingBufferingParam, - ZoneSettingRocketLoaderParam, - ItemZonesSchemasAutomaticPlatformOptimization, - ZoneSettingSecurityHeaderParam, - ZoneSettingSecurityLevelParam, - ZoneSettingServerSideExcludeParam, - ItemZonesSha1Support, - ZoneSettingSortQueryStringForCacheParam, - ZoneSettingSSLParam, - ZoneSettingSSLRecommenderParam, - ItemZonesTLS1_2Only, - ZoneSettingTLS1_3Param, - ZoneSettingTLSClientAuthParam, - ZoneSettingTrueClientIPHeaderParam, - ZoneSettingWAFParam, - ZoneSettingWebPParam, - ZoneSettingWebsocketsParam, -] diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py deleted file mode 100644 index 28cc6aa5e875..000000000000 --- a/src/cloudflare/types/zones/setting_edit_response.py +++ /dev/null @@ -1,253 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from .settings import ( - ZoneSettingNEL, - ZoneSettingSSL, - ZoneSettingWAF, - ZoneSetting0rtt, - ZoneSettingIPV6, - ZoneSettingWebP, - ZoneSettingHTTP2, - ZoneSettingHTTP3, - ZoneSettingBrotli, - ZoneSettingMinify, - ZoneSettingMirage, - ZoneSettingPolish, - ZoneSettingTLS1_3, - ZoneSettingCiphers, - ZoneSettingBuffering, - ZoneSettingCacheLevel, - ZoneSettingEarlyHints, - ZoneSettingPseudoIPV4, - ZoneSettingWebsockets, - ZoneSettingAdvancedDDoS, - ZoneSettingAlwaysOnline, - ZoneSettingBrowserCheck, - ZoneSettingChallengeTTL, - ZoneSettingRocketLoader, - ZoneSettingImageResizing, - ZoneSettingIPGeolocation, - ZoneSettingMinTLSVersion, - ZoneSettingSecurityLevel, - ZoneSettingTLSClientAuth, - ZoneSettingAlwaysUseHTTPS, - ZoneSettingMobileRedirect, - ZoneSettingOrangeToOrange, - ZoneSettingSecurityHeader, - ZoneSettingSSLRecommender, - ZoneSettingBrowserCacheTTL, - ZoneSettingDevelopmentMode, - ZoneSettingPrefetchPreload, - ZoneSettingEmailObfuscation, - ZoneSettingH2Prioritization, - ZoneSettingProxyReadTimeout, - ZoneSettingHotlinkProtection, - ZoneSettingServerSideExclude, - ZoneSettingOpportunisticOnion, - ZoneSettingTrueClientIPHeader, - ZoneSettingAutomaticHTTPSRewrites, - ZoneSettingOpportunisticEncryption, - ZoneSettingOriginErrorPagePassThru, - ZoneSettingSortQueryStringForCache, - ZoneSettingAutomaticPlatformOptimization, -) -from ..._models import BaseModel - -__all__ = [ - "SettingEditResponse", - "SettingEditResponseItem", - "SettingEditResponseItemZonesCNAMEFlattening", - "SettingEditResponseItemZonesEdgeCacheTTL", - "SettingEditResponseItemZonesMaxUpload", - "SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization", - "SettingEditResponseItemZonesSha1Support", - "SettingEditResponseItemZonesTLS1_2Only", -] - - -class SettingEditResponseItemZonesCNAMEFlattening(BaseModel): - id: Literal["cname_flattening"] - """How to flatten the cname destination.""" - - value: Literal["flatten_at_root", "flatten_all"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesEdgeCacheTTL(BaseModel): - id: Literal["edge_cache_ttl"] - """ID of the zone setting.""" - - value: Literal[ - 30, - 60, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 518400, - 604800, - ] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesMaxUpload(BaseModel): - id: Literal["max_upload"] - """identifier of the zone setting.""" - - value: Literal[100, 200, 500] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel): - id: Literal["automatic_platform_optimization"] - """ID of the zone setting.""" - - value: ZoneSettingAutomaticPlatformOptimization - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesSha1Support(BaseModel): - id: Literal["sha1_support"] - """Zone setting identifier.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingEditResponseItemZonesTLS1_2Only(BaseModel): - id: Literal["tls_1_2_only"] - """Zone setting identifier.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -SettingEditResponseItem = Union[ - ZoneSetting0rtt, - ZoneSettingAdvancedDDoS, - ZoneSettingAlwaysOnline, - ZoneSettingAlwaysUseHTTPS, - ZoneSettingAutomaticHTTPSRewrites, - ZoneSettingBrotli, - ZoneSettingBrowserCacheTTL, - ZoneSettingBrowserCheck, - ZoneSettingCacheLevel, - ZoneSettingChallengeTTL, - ZoneSettingCiphers, - SettingEditResponseItemZonesCNAMEFlattening, - ZoneSettingDevelopmentMode, - ZoneSettingEarlyHints, - SettingEditResponseItemZonesEdgeCacheTTL, - ZoneSettingEmailObfuscation, - ZoneSettingH2Prioritization, - ZoneSettingHotlinkProtection, - ZoneSettingHTTP2, - ZoneSettingHTTP3, - ZoneSettingImageResizing, - ZoneSettingIPGeolocation, - ZoneSettingIPV6, - SettingEditResponseItemZonesMaxUpload, - ZoneSettingMinTLSVersion, - ZoneSettingMinify, - ZoneSettingMirage, - ZoneSettingMobileRedirect, - ZoneSettingNEL, - ZoneSettingOpportunisticEncryption, - ZoneSettingOpportunisticOnion, - ZoneSettingOrangeToOrange, - ZoneSettingOriginErrorPagePassThru, - ZoneSettingPolish, - ZoneSettingPrefetchPreload, - ZoneSettingProxyReadTimeout, - ZoneSettingPseudoIPV4, - ZoneSettingBuffering, - ZoneSettingRocketLoader, - SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization, - ZoneSettingSecurityHeader, - ZoneSettingSecurityLevel, - ZoneSettingServerSideExclude, - SettingEditResponseItemZonesSha1Support, - ZoneSettingSortQueryStringForCache, - ZoneSettingSSL, - ZoneSettingSSLRecommender, - SettingEditResponseItemZonesTLS1_2Only, - ZoneSettingTLS1_3, - ZoneSettingTLSClientAuth, - ZoneSettingTrueClientIPHeader, - ZoneSettingWAF, - ZoneSettingWebP, - ZoneSettingWebsockets, -] - -SettingEditResponse = List[SettingEditResponseItem] diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py deleted file mode 100644 index f4d66ec47690..000000000000 --- a/src/cloudflare/types/zones/setting_get_response.py +++ /dev/null @@ -1,253 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Union, Optional -from datetime import datetime -from typing_extensions import Literal - -from .settings import ( - ZoneSettingNEL, - ZoneSettingSSL, - ZoneSettingWAF, - ZoneSetting0rtt, - ZoneSettingIPV6, - ZoneSettingWebP, - ZoneSettingHTTP2, - ZoneSettingHTTP3, - ZoneSettingBrotli, - ZoneSettingMinify, - ZoneSettingMirage, - ZoneSettingPolish, - ZoneSettingTLS1_3, - ZoneSettingCiphers, - ZoneSettingBuffering, - ZoneSettingCacheLevel, - ZoneSettingEarlyHints, - ZoneSettingPseudoIPV4, - ZoneSettingWebsockets, - ZoneSettingAdvancedDDoS, - ZoneSettingAlwaysOnline, - ZoneSettingBrowserCheck, - ZoneSettingChallengeTTL, - ZoneSettingRocketLoader, - ZoneSettingImageResizing, - ZoneSettingIPGeolocation, - ZoneSettingMinTLSVersion, - ZoneSettingSecurityLevel, - ZoneSettingTLSClientAuth, - ZoneSettingAlwaysUseHTTPS, - ZoneSettingMobileRedirect, - ZoneSettingOrangeToOrange, - ZoneSettingSecurityHeader, - ZoneSettingSSLRecommender, - ZoneSettingBrowserCacheTTL, - ZoneSettingDevelopmentMode, - ZoneSettingPrefetchPreload, - ZoneSettingEmailObfuscation, - ZoneSettingH2Prioritization, - ZoneSettingProxyReadTimeout, - ZoneSettingHotlinkProtection, - ZoneSettingServerSideExclude, - ZoneSettingOpportunisticOnion, - ZoneSettingTrueClientIPHeader, - ZoneSettingAutomaticHTTPSRewrites, - ZoneSettingOpportunisticEncryption, - ZoneSettingOriginErrorPagePassThru, - ZoneSettingSortQueryStringForCache, - ZoneSettingAutomaticPlatformOptimization, -) -from ..._models import BaseModel - -__all__ = [ - "SettingGetResponse", - "SettingGetResponseItem", - "SettingGetResponseItemZonesCNAMEFlattening", - "SettingGetResponseItemZonesEdgeCacheTTL", - "SettingGetResponseItemZonesMaxUpload", - "SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization", - "SettingGetResponseItemZonesSha1Support", - "SettingGetResponseItemZonesTLS1_2Only", -] - - -class SettingGetResponseItemZonesCNAMEFlattening(BaseModel): - id: Literal["cname_flattening"] - """How to flatten the cname destination.""" - - value: Literal["flatten_at_root", "flatten_all"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesEdgeCacheTTL(BaseModel): - id: Literal["edge_cache_ttl"] - """ID of the zone setting.""" - - value: Literal[ - 30, - 60, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 518400, - 604800, - ] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesMaxUpload(BaseModel): - id: Literal["max_upload"] - """identifier of the zone setting.""" - - value: Literal[100, 200, 500] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel): - id: Literal["automatic_platform_optimization"] - """ID of the zone setting.""" - - value: ZoneSettingAutomaticPlatformOptimization - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesSha1Support(BaseModel): - id: Literal["sha1_support"] - """Zone setting identifier.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -class SettingGetResponseItemZonesTLS1_2Only(BaseModel): - id: Literal["tls_1_2_only"] - """Zone setting identifier.""" - - value: Literal["off", "on"] - """Current value of the zone setting.""" - - editable: Optional[Literal[True, False]] = None - """ - Whether or not this setting can be modified for this zone (based on your - Cloudflare plan level). - """ - - modified_on: Optional[datetime] = None - """last time this setting was modified.""" - - -SettingGetResponseItem = Union[ - ZoneSetting0rtt, - ZoneSettingAdvancedDDoS, - ZoneSettingAlwaysOnline, - ZoneSettingAlwaysUseHTTPS, - ZoneSettingAutomaticHTTPSRewrites, - ZoneSettingBrotli, - ZoneSettingBrowserCacheTTL, - ZoneSettingBrowserCheck, - ZoneSettingCacheLevel, - ZoneSettingChallengeTTL, - ZoneSettingCiphers, - SettingGetResponseItemZonesCNAMEFlattening, - ZoneSettingDevelopmentMode, - ZoneSettingEarlyHints, - SettingGetResponseItemZonesEdgeCacheTTL, - ZoneSettingEmailObfuscation, - ZoneSettingH2Prioritization, - ZoneSettingHotlinkProtection, - ZoneSettingHTTP2, - ZoneSettingHTTP3, - ZoneSettingImageResizing, - ZoneSettingIPGeolocation, - ZoneSettingIPV6, - SettingGetResponseItemZonesMaxUpload, - ZoneSettingMinTLSVersion, - ZoneSettingMinify, - ZoneSettingMirage, - ZoneSettingMobileRedirect, - ZoneSettingNEL, - ZoneSettingOpportunisticEncryption, - ZoneSettingOpportunisticOnion, - ZoneSettingOrangeToOrange, - ZoneSettingOriginErrorPagePassThru, - ZoneSettingPolish, - ZoneSettingPrefetchPreload, - ZoneSettingProxyReadTimeout, - ZoneSettingPseudoIPV4, - ZoneSettingBuffering, - ZoneSettingRocketLoader, - SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization, - ZoneSettingSecurityHeader, - ZoneSettingSecurityLevel, - ZoneSettingServerSideExclude, - SettingGetResponseItemZonesSha1Support, - ZoneSettingSortQueryStringForCache, - ZoneSettingSSL, - ZoneSettingSSLRecommender, - SettingGetResponseItemZonesTLS1_2Only, - ZoneSettingTLS1_3, - ZoneSettingTLSClientAuth, - ZoneSettingTrueClientIPHeader, - ZoneSettingWAF, - ZoneSettingWebP, - ZoneSettingWebsockets, -] - -SettingGetResponse = List[SettingGetResponseItem] diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py index e92df35a6b64..1f42c45a1c6b 100644 --- a/src/cloudflare/types/zones/settings/__init__.py +++ b/src/cloudflare/types/zones/settings/__init__.py @@ -35,27 +35,17 @@ from .early_hint_edit_params import EarlyHintEditParams as EarlyHintEditParams from .zone_setting_buffering import ZoneSettingBuffering as ZoneSettingBuffering from .zone_setting_nel_param import ZoneSettingNELParam as ZoneSettingNELParam -from .zone_setting_ssl_param import ZoneSettingSSLParam as ZoneSettingSSLParam -from .zone_setting_waf_param import ZoneSettingWAFParam as ZoneSettingWAFParam from .cache_level_edit_params import CacheLevelEditParams as CacheLevelEditParams from .pseudo_ipv4_edit_params import PseudoIPV4EditParams as PseudoIPV4EditParams -from .zone_setting_0rtt_param import ZoneSetting0rttParam as ZoneSetting0rttParam -from .zone_setting_ipv6_param import ZoneSettingIPV6Param as ZoneSettingIPV6Param -from .zone_setting_webp_param import ZoneSettingWebPParam as ZoneSettingWebPParam from .zone_setting_websockets import ZoneSettingWebsockets as ZoneSettingWebsockets from .font_setting_edit_params import FontSettingEditParams as FontSettingEditParams from .zone_setting_cache_level import ZoneSettingCacheLevel as ZoneSettingCacheLevel from .zone_setting_early_hints import ZoneSettingEarlyHints as ZoneSettingEarlyHints -from .zone_setting_http2_param import ZoneSettingHTTP2Param as ZoneSettingHTTP2Param -from .zone_setting_http3_param import ZoneSettingHTTP3Param as ZoneSettingHTTP3Param from .zone_setting_pseudo_ipv4 import ZoneSettingPseudoIPV4 as ZoneSettingPseudoIPV4 from .always_online_edit_params import AlwaysOnlineEditParams as AlwaysOnlineEditParams from .browser_check_edit_params import BrowserCheckEditParams as BrowserCheckEditParams from .challenge_ttl_edit_params import ChallengeTTLEditParams as ChallengeTTLEditParams from .rocket_loader_edit_params import RocketLoaderEditParams as RocketLoaderEditParams -from .zone_setting_brotli_param import ZoneSettingBrotliParam as ZoneSettingBrotliParam -from .zone_setting_minify_param import ZoneSettingMinifyParam as ZoneSettingMinifyParam -from .zone_setting_mirage_param import ZoneSettingMirageParam as ZoneSettingMirageParam from .zone_setting_polish_param import ZoneSettingPolishParam as ZoneSettingPolishParam from .image_resizing_edit_params import ImageResizingEditParams as ImageResizingEditParams from .ip_geolocation_edit_params import IPGeolocationEditParams as IPGeolocationEditParams @@ -64,9 +54,7 @@ from .zone_setting_always_online import ZoneSettingAlwaysOnline as ZoneSettingAlwaysOnline from .zone_setting_browser_check import ZoneSettingBrowserCheck as ZoneSettingBrowserCheck from .zone_setting_challenge_ttl import ZoneSettingChallengeTTL as ZoneSettingChallengeTTL -from .zone_setting_ciphers_param import ZoneSettingCiphersParam as ZoneSettingCiphersParam from .zone_setting_rocket_loader import ZoneSettingRocketLoader as ZoneSettingRocketLoader -from .zone_setting_tls_1_3_param import ZoneSettingTLS1_3Param as ZoneSettingTLS1_3Param from .min_tls_version_edit_params import MinTLSVersionEditParams as MinTLSVersionEditParams from .mobile_redirect_edit_params import MobileRedirectEditParams as MobileRedirectEditParams from .security_header_edit_params import SecurityHeaderEditParams as SecurityHeaderEditParams @@ -79,7 +67,6 @@ from .development_mode_edit_params import DevelopmentModeEditParams as DevelopmentModeEditParams from .orange_to_orange_edit_params import OrangeToOrangeEditParams as OrangeToOrangeEditParams from .prefetch_preload_edit_params import PrefetchPreloadEditParams as PrefetchPreloadEditParams -from .zone_setting_buffering_param import ZoneSettingBufferingParam as ZoneSettingBufferingParam from .zone_setting_min_tls_version import ZoneSettingMinTLSVersion as ZoneSettingMinTLSVersion from .zone_setting_mobile_redirect import ZoneSettingMobileRedirect as ZoneSettingMobileRedirect from .zone_setting_security_header import ZoneSettingSecurityHeader as ZoneSettingSecurityHeader @@ -92,65 +79,37 @@ from .zone_setting_development_mode import ZoneSettingDevelopmentMode as ZoneSettingDevelopmentMode from .zone_setting_orange_to_orange import ZoneSettingOrangeToOrange as ZoneSettingOrangeToOrange from .zone_setting_prefetch_preload import ZoneSettingPrefetchPreload as ZoneSettingPrefetchPreload -from .zone_setting_websockets_param import ZoneSettingWebsocketsParam as ZoneSettingWebsocketsParam from .hotlink_protection_edit_params import HotlinkProtectionEditParams as HotlinkProtectionEditParams from .proxy_read_timeout_edit_params import ProxyReadTimeoutEditParams as ProxyReadTimeoutEditParams from .response_buffering_edit_params import ResponseBufferingEditParams as ResponseBufferingEditParams from .zone_setting_browser_cache_ttl import ZoneSettingBrowserCacheTTL as ZoneSettingBrowserCacheTTL -from .zone_setting_cache_level_param import ZoneSettingCacheLevelParam as ZoneSettingCacheLevelParam -from .zone_setting_early_hints_param import ZoneSettingEarlyHintsParam as ZoneSettingEarlyHintsParam from .zone_setting_email_obfuscation import ZoneSettingEmailObfuscation as ZoneSettingEmailObfuscation from .zone_setting_h2_prioritization import ZoneSettingH2Prioritization as ZoneSettingH2Prioritization -from .zone_setting_pseudo_ipv4_param import ZoneSettingPseudoIPV4Param as ZoneSettingPseudoIPV4Param from .opportunistic_onion_edit_params import OpportunisticOnionEditParams as OpportunisticOnionEditParams from .server_side_exclude_edit_params import ServerSideExcludeEditParams as ServerSideExcludeEditParams from .zone_setting_hotlink_protection import ZoneSettingHotlinkProtection as ZoneSettingHotlinkProtection from .zone_setting_proxy_read_timeout import ZoneSettingProxyReadTimeout as ZoneSettingProxyReadTimeout -from .zone_setting_advanced_ddos_param import ZoneSettingAdvancedDDoSParam as ZoneSettingAdvancedDDoSParam -from .zone_setting_always_online_param import ZoneSettingAlwaysOnlineParam as ZoneSettingAlwaysOnlineParam -from .zone_setting_browser_check_param import ZoneSettingBrowserCheckParam as ZoneSettingBrowserCheckParam -from .zone_setting_challenge_ttl_param import ZoneSettingChallengeTTLParam as ZoneSettingChallengeTTLParam from .zone_setting_opportunistic_onion import ZoneSettingOpportunisticOnion as ZoneSettingOpportunisticOnion from .zone_setting_rocket_loader_param import ZoneSettingRocketLoaderParam as ZoneSettingRocketLoaderParam from .zone_setting_server_side_exclude import ZoneSettingServerSideExclude as ZoneSettingServerSideExclude from .true_client_ip_header_edit_params import TrueClientIPHeaderEditParams as TrueClientIPHeaderEditParams from .zone_setting_image_resizing_param import ZoneSettingImageResizingParam as ZoneSettingImageResizingParam -from .zone_setting_ip_geolocation_param import ZoneSettingIPGeolocationParam as ZoneSettingIPGeolocationParam -from .zone_setting_security_level_param import ZoneSettingSecurityLevelParam as ZoneSettingSecurityLevelParam -from .zone_setting_min_tls_version_param import ZoneSettingMinTLSVersionParam as ZoneSettingMinTLSVersionParam -from .zone_setting_mobile_redirect_param import ZoneSettingMobileRedirectParam as ZoneSettingMobileRedirectParam -from .zone_setting_security_header_param import ZoneSettingSecurityHeaderParam as ZoneSettingSecurityHeaderParam from .zone_setting_ssl_recommender_param import ZoneSettingSSLRecommenderParam as ZoneSettingSSLRecommenderParam -from .zone_setting_tls_client_auth_param import ZoneSettingTLSClientAuthParam as ZoneSettingTLSClientAuthParam from .zone_setting_true_client_ip_header import ZoneSettingTrueClientIPHeader as ZoneSettingTrueClientIPHeader from .automatic_https_rewrite_edit_params import AutomaticHTTPSRewriteEditParams as AutomaticHTTPSRewriteEditParams from .origin_max_http_version_edit_params import OriginMaxHTTPVersionEditParams as OriginMaxHTTPVersionEditParams -from .zone_setting_always_use_https_param import ZoneSettingAlwaysUseHTTPSParam as ZoneSettingAlwaysUseHTTPSParam -from .zone_setting_development_mode_param import ZoneSettingDevelopmentModeParam as ZoneSettingDevelopmentModeParam from .zone_setting_orange_to_orange_param import ZoneSettingOrangeToOrangeParam as ZoneSettingOrangeToOrangeParam -from .zone_setting_prefetch_preload_param import ZoneSettingPrefetchPreloadParam as ZoneSettingPrefetchPreloadParam from .opportunistic_encryption_edit_params import OpportunisticEncryptionEditParams as OpportunisticEncryptionEditParams from .origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse as OriginMaxHTTPVersionGetResponse -from .zone_setting_browser_cache_ttl_param import ZoneSettingBrowserCacheTTLParam as ZoneSettingBrowserCacheTTLParam -from .zone_setting_email_obfuscation_param import ZoneSettingEmailObfuscationParam as ZoneSettingEmailObfuscationParam from .zone_setting_h2_prioritization_param import ZoneSettingH2PrioritizationParam as ZoneSettingH2PrioritizationParam from .origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse as OriginMaxHTTPVersionEditResponse from .zone_setting_automatic_https_rewrites import ( ZoneSettingAutomaticHTTPSRewrites as ZoneSettingAutomaticHTTPSRewrites, ) -from .zone_setting_hotlink_protection_param import ( - ZoneSettingHotlinkProtectionParam as ZoneSettingHotlinkProtectionParam, -) from .zone_setting_opportunistic_encryption import ( ZoneSettingOpportunisticEncryption as ZoneSettingOpportunisticEncryption, ) from .zone_setting_proxy_read_timeout_param import ZoneSettingProxyReadTimeoutParam as ZoneSettingProxyReadTimeoutParam -from .zone_setting_opportunistic_onion_param import ( - ZoneSettingOpportunisticOnionParam as ZoneSettingOpportunisticOnionParam, -) -from .zone_setting_server_side_exclude_param import ( - ZoneSettingServerSideExcludeParam as ZoneSettingServerSideExcludeParam, -) from .origin_error_page_pass_thru_edit_params import ( OriginErrorPagePassThruEditParams as OriginErrorPagePassThruEditParams, ) @@ -163,27 +122,12 @@ from .zone_setting_sort_query_string_for_cache import ( ZoneSettingSortQueryStringForCache as ZoneSettingSortQueryStringForCache, ) -from .zone_setting_true_client_ip_header_param import ( - ZoneSettingTrueClientIPHeaderParam as ZoneSettingTrueClientIPHeaderParam, -) from .automatic_platform_optimization_edit_params import ( AutomaticPlatformOptimizationEditParams as AutomaticPlatformOptimizationEditParams, ) -from .zone_setting_automatic_https_rewrites_param import ( - ZoneSettingAutomaticHTTPSRewritesParam as ZoneSettingAutomaticHTTPSRewritesParam, -) -from .zone_setting_opportunistic_encryption_param import ( - ZoneSettingOpportunisticEncryptionParam as ZoneSettingOpportunisticEncryptionParam, -) from .zone_setting_automatic_platform_optimization import ( ZoneSettingAutomaticPlatformOptimization as ZoneSettingAutomaticPlatformOptimization, ) -from .zone_setting_origin_error_page_pass_thru_param import ( - ZoneSettingOriginErrorPagePassThruParam as ZoneSettingOriginErrorPagePassThruParam, -) -from .zone_setting_sort_query_string_for_cache_param import ( - ZoneSettingSortQueryStringForCacheParam as ZoneSettingSortQueryStringForCacheParam, -) from .zone_setting_automatic_platform_optimization_param import ( ZoneSettingAutomaticPlatformOptimizationParam as ZoneSettingAutomaticPlatformOptimizationParam, ) diff --git a/src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py b/src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py deleted file mode 100644 index 784c92adabd0..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSetting0rttParam"] - - -class ZoneSetting0rttParam(TypedDict, total=False): - id: Required[Literal["0rtt"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py deleted file mode 100644 index 508516ae76d3..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingAdvancedDDoSParam"] - - -class ZoneSettingAdvancedDDoSParam(TypedDict, total=False): - id: Required[Literal["advanced_ddos"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_always_online_param.py b/src/cloudflare/types/zones/settings/zone_setting_always_online_param.py deleted file mode 100644 index 3691306d0a2b..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_always_online_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingAlwaysOnlineParam"] - - -class ZoneSettingAlwaysOnlineParam(TypedDict, total=False): - id: Required[Literal["always_online"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py b/src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py deleted file mode 100644 index 899c460b9404..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingAlwaysUseHTTPSParam"] - - -class ZoneSettingAlwaysUseHTTPSParam(TypedDict, total=False): - id: Required[Literal["always_use_https"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py b/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py deleted file mode 100644 index dada4f537145..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingAutomaticHTTPSRewritesParam"] - - -class ZoneSettingAutomaticHTTPSRewritesParam(TypedDict, total=False): - id: Required[Literal["automatic_https_rewrites"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_brotli_param.py b/src/cloudflare/types/zones/settings/zone_setting_brotli_param.py deleted file mode 100644 index 51031e0d3f58..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_brotli_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingBrotliParam"] - - -class ZoneSettingBrotliParam(TypedDict, total=False): - id: Required[Literal["brotli"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py b/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py deleted file mode 100644 index e88cc4cc66ac..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py +++ /dev/null @@ -1,46 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingBrowserCacheTTLParam"] - - -class ZoneSettingBrowserCacheTTLParam(TypedDict, total=False): - id: Required[Literal["browser_cache_ttl"]] - """ID of the zone setting.""" - - value: Required[ - Literal[ - 0, - 30, - 60, - 120, - 300, - 1200, - 1800, - 3600, - 7200, - 10800, - 14400, - 18000, - 28800, - 43200, - 57600, - 72000, - 86400, - 172800, - 259200, - 345600, - 432000, - 691200, - 1382400, - 2073600, - 2678400, - 5356800, - 16070400, - 31536000, - ] - ] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py b/src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py deleted file mode 100644 index 5a6c5f3f2093..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingBrowserCheckParam"] - - -class ZoneSettingBrowserCheckParam(TypedDict, total=False): - id: Required[Literal["browser_check"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_buffering_param.py b/src/cloudflare/types/zones/settings/zone_setting_buffering_param.py deleted file mode 100644 index 17a385a19a49..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_buffering_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingBufferingParam"] - - -class ZoneSettingBufferingParam(TypedDict, total=False): - id: Required[Literal["response_buffering"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py b/src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py deleted file mode 100644 index 7261291c5cd5..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingCacheLevelParam"] - - -class ZoneSettingCacheLevelParam(TypedDict, total=False): - id: Required[Literal["cache_level"]] - """ID of the zone setting.""" - - value: Required[Literal["aggressive", "basic", "simplified"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py b/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py deleted file mode 100644 index 0c04152a21df..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingChallengeTTLParam"] - - -class ZoneSettingChallengeTTLParam(TypedDict, total=False): - id: Required[Literal["challenge_ttl"]] - """ID of the zone setting.""" - - value: Required[ - Literal[300, 900, 1800, 2700, 3600, 7200, 10800, 14400, 28800, 57600, 86400, 604800, 2592000, 31536000] - ] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py b/src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py deleted file mode 100644 index 4e2c4b1dc5c3..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingCiphersParam"] - - -class ZoneSettingCiphersParam(TypedDict, total=False): - id: Required[Literal["ciphers"]] - """ID of the zone setting.""" - - value: Required[List[str]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py b/src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py deleted file mode 100644 index d19a68448db3..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingDevelopmentModeParam"] - - -class ZoneSettingDevelopmentModeParam(TypedDict, total=False): - id: Required[Literal["development_mode"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py b/src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py deleted file mode 100644 index fef3800eda5a..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingEarlyHintsParam"] - - -class ZoneSettingEarlyHintsParam(TypedDict, total=False): - id: Required[Literal["early_hints"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py b/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py deleted file mode 100644 index e8a3899b8baa..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingEmailObfuscationParam"] - - -class ZoneSettingEmailObfuscationParam(TypedDict, total=False): - id: Required[Literal["email_obfuscation"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py b/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py deleted file mode 100644 index 72c5f4d95a3a..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingHotlinkProtectionParam"] - - -class ZoneSettingHotlinkProtectionParam(TypedDict, total=False): - id: Required[Literal["hotlink_protection"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_http2_param.py b/src/cloudflare/types/zones/settings/zone_setting_http2_param.py deleted file mode 100644 index d50fcd3b7692..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_http2_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingHTTP2Param"] - - -class ZoneSettingHTTP2Param(TypedDict, total=False): - id: Required[Literal["http2"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_http3_param.py b/src/cloudflare/types/zones/settings/zone_setting_http3_param.py deleted file mode 100644 index 04c78da68c7b..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_http3_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingHTTP3Param"] - - -class ZoneSettingHTTP3Param(TypedDict, total=False): - id: Required[Literal["http3"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py b/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py deleted file mode 100644 index 083c1db940e6..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingIPGeolocationParam"] - - -class ZoneSettingIPGeolocationParam(TypedDict, total=False): - id: Required[Literal["ip_geolocation"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py b/src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py deleted file mode 100644 index 4053b7bff06e..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingIPV6Param"] - - -class ZoneSettingIPV6Param(TypedDict, total=False): - id: Required[Literal["ipv6"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py b/src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py deleted file mode 100644 index e7cf1d38f71b..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingMinTLSVersionParam"] - - -class ZoneSettingMinTLSVersionParam(TypedDict, total=False): - id: Required[Literal["min_tls_version"]] - """ID of the zone setting.""" - - value: Required[Literal["1.0", "1.1", "1.2", "1.3"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_minify_param.py b/src/cloudflare/types/zones/settings/zone_setting_minify_param.py deleted file mode 100644 index f812a1d9ca49..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_minify_param.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingMinifyParam", "Value"] - - -class Value(TypedDict, total=False): - css: Literal["on", "off"] - """Automatically minify all CSS files for your website.""" - - html: Literal["on", "off"] - """Automatically minify all HTML files for your website.""" - - js: Literal["on", "off"] - """Automatically minify all JavaScript files for your website.""" - - -class ZoneSettingMinifyParam(TypedDict, total=False): - id: Required[Literal["minify"]] - """Zone setting identifier.""" - - value: Required[Value] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_mirage_param.py b/src/cloudflare/types/zones/settings/zone_setting_mirage_param.py deleted file mode 100644 index 6a35c1a65109..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_mirage_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingMirageParam"] - - -class ZoneSettingMirageParam(TypedDict, total=False): - id: Required[Literal["mirage"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py b/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py deleted file mode 100644 index dd412e92ad5e..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Optional -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingMobileRedirectParam", "Value"] - - -class Value(TypedDict, total=False): - mobile_subdomain: Optional[str] - """ - Which subdomain prefix you wish to redirect visitors on mobile devices to - (subdomain must already exist). - """ - - status: Literal["on", "off"] - """Whether or not mobile redirect is enabled.""" - - strip_uri: bool - """ - Whether to drop the current page path and redirect to the mobile subdomain URL - root, or keep the path and redirect to the same page on the mobile subdomain. - """ - - -class ZoneSettingMobileRedirectParam(TypedDict, total=False): - id: Required[Literal["mobile_redirect"]] - """Identifier of the zone setting.""" - - value: Required[Value] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py deleted file mode 100644 index 5d54e34433cd..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingOpportunisticEncryptionParam"] - - -class ZoneSettingOpportunisticEncryptionParam(TypedDict, total=False): - id: Required[Literal["opportunistic_encryption"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py deleted file mode 100644 index 4d20469de98d..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingOpportunisticOnionParam"] - - -class ZoneSettingOpportunisticOnionParam(TypedDict, total=False): - id: Required[Literal["opportunistic_onion"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py b/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py deleted file mode 100644 index b78f43e801ad..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingOriginErrorPagePassThruParam"] - - -class ZoneSettingOriginErrorPagePassThruParam(TypedDict, total=False): - id: Required[Literal["origin_error_page_pass_thru"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py b/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py deleted file mode 100644 index 4588c815a34b..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingPrefetchPreloadParam"] - - -class ZoneSettingPrefetchPreloadParam(TypedDict, total=False): - id: Required[Literal["prefetch_preload"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py b/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py deleted file mode 100644 index 947aa8bfa5dc..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingPseudoIPV4Param"] - - -class ZoneSettingPseudoIPV4Param(TypedDict, total=False): - id: Required[Literal["pseudo_ipv4"]] - """Value of the Pseudo IPv4 setting.""" - - value: Required[Literal["off", "add_header", "overwrite_header"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_security_header_param.py b/src/cloudflare/types/zones/settings/zone_setting_security_header_param.py deleted file mode 100644 index f3ae4d8ddfcc..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_security_header_param.py +++ /dev/null @@ -1,34 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingSecurityHeaderParam", "Value", "ValueStrictTransportSecurity"] - - -class ValueStrictTransportSecurity(TypedDict, total=False): - enabled: bool - """Whether or not strict transport security is enabled.""" - - include_subdomains: bool - """Include all subdomains for strict transport security.""" - - max_age: float - """Max age in seconds of the strict transport security.""" - - nosniff: bool - """Whether or not to include 'X-Content-Type-Options: nosniff' header.""" - - -class Value(TypedDict, total=False): - strict_transport_security: ValueStrictTransportSecurity - """Strict Transport Security.""" - - -class ZoneSettingSecurityHeaderParam(TypedDict, total=False): - id: Required[Literal["security_header"]] - """ID of the zone's security header.""" - - value: Required[Value] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_security_level_param.py b/src/cloudflare/types/zones/settings/zone_setting_security_level_param.py deleted file mode 100644 index fae5fca9c08b..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_security_level_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingSecurityLevelParam"] - - -class ZoneSettingSecurityLevelParam(TypedDict, total=False): - id: Required[Literal["security_level"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "essentially_off", "low", "medium", "high", "under_attack"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py b/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py deleted file mode 100644 index 6a95d138f5a5..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingServerSideExcludeParam"] - - -class ZoneSettingServerSideExcludeParam(TypedDict, total=False): - id: Required[Literal["server_side_exclude"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py b/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py deleted file mode 100644 index 212bdcdffb40..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingSortQueryStringForCacheParam"] - - -class ZoneSettingSortQueryStringForCacheParam(TypedDict, total=False): - id: Required[Literal["sort_query_string_for_cache"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_ssl_param.py b/src/cloudflare/types/zones/settings/zone_setting_ssl_param.py deleted file mode 100644 index 3737c7ee4c81..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_ssl_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingSSLParam"] - - -class ZoneSettingSSLParam(TypedDict, total=False): - id: Required[Literal["ssl"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "flexible", "full", "strict"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py b/src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py deleted file mode 100644 index d20c15d5bfb3..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingTLS1_3Param"] - - -class ZoneSettingTLS1_3Param(TypedDict, total=False): - id: Required[Literal["tls_1_3"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off", "zrt"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py b/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py deleted file mode 100644 index 289a202f08df..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingTLSClientAuthParam"] - - -class ZoneSettingTLSClientAuthParam(TypedDict, total=False): - id: Required[Literal["tls_client_auth"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py b/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py deleted file mode 100644 index ea4ebe080bfe..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingTrueClientIPHeaderParam"] - - -class ZoneSettingTrueClientIPHeaderParam(TypedDict, total=False): - id: Required[Literal["true_client_ip_header"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_waf_param.py b/src/cloudflare/types/zones/settings/zone_setting_waf_param.py deleted file mode 100644 index bbd479b146db..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_waf_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingWAFParam"] - - -class ZoneSettingWAFParam(TypedDict, total=False): - id: Required[Literal["waf"]] - """ID of the zone setting.""" - - value: Required[Literal["on", "off"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_webp_param.py b/src/cloudflare/types/zones/settings/zone_setting_webp_param.py deleted file mode 100644 index 45147aa2f270..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_webp_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingWebPParam"] - - -class ZoneSettingWebPParam(TypedDict, total=False): - id: Required[Literal["webp"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_websockets_param.py b/src/cloudflare/types/zones/settings/zone_setting_websockets_param.py deleted file mode 100644 index ab2fdbbc8ac0..000000000000 --- a/src/cloudflare/types/zones/settings/zone_setting_websockets_param.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["ZoneSettingWebsocketsParam"] - - -class ZoneSettingWebsocketsParam(TypedDict, total=False): - id: Required[Literal["websockets"]] - """ID of the zone setting.""" - - value: Required[Literal["off", "on"]] - """Current value of the zone setting.""" diff --git a/tests/api_resources/zones/test_settings.py b/tests/api_resources/zones/test_settings.py deleted file mode 100644 index 0b1bb59c37ee..000000000000 --- a/tests/api_resources/zones/test_settings.py +++ /dev/null @@ -1,302 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, Optional, cast - -import pytest - -from cloudflare import Cloudflare, AsyncCloudflare -from tests.utils import assert_matches_type -from cloudflare.types.zones import SettingGetResponse, SettingEditResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSettings: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - def test_method_edit(self, client: Cloudflare) -> None: - setting = client.zones.settings.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) - assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - def test_raw_response_edit(self, client: Cloudflare) -> None: - response = client.zones.settings.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - setting = response.parse() - assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - def test_streaming_response_edit(self, client: Cloudflare) -> None: - with client.zones.settings.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - setting = response.parse() - assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - def test_path_params_edit(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.zones.settings.with_raw_response.edit( - zone_id="", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) - - @pytest.mark.skip() - @parametrize - def test_method_get(self, client: Cloudflare) -> None: - setting = client.zones.settings.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_get(self, client: Cloudflare) -> None: - response = client.zones.settings.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - setting = response.parse() - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_get(self, client: Cloudflare) -> None: - with client.zones.settings.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - setting = response.parse() - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_get(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - client.zones.settings.with_raw_response.get( - zone_id="", - ) - - -class TestAsyncSettings: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - async def test_method_edit(self, async_client: AsyncCloudflare) -> None: - setting = await async_client.zones.settings.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) - assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.with_raw_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - setting = await response.parse() - assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.with_streaming_response.edit( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - setting = await response.parse() - assert_matches_type(Optional[SettingEditResponse], setting, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="oneOf doesnt match") - @parametrize - async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.zones.settings.with_raw_response.edit( - zone_id="", - items=[ - { - "id": "always_online", - "value": "on", - }, - { - "id": "browser_cache_ttl", - "value": 18000, - }, - { - "id": "ip_geolocation", - "value": "off", - }, - ], - ) - - @pytest.mark.skip() - @parametrize - async def test_method_get(self, async_client: AsyncCloudflare) -> None: - setting = await async_client.zones.settings.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: - response = await async_client.zones.settings.with_raw_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - setting = await response.parse() - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None: - async with async_client.zones.settings.with_streaming_response.get( - zone_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - setting = await response.parse() - assert_matches_type(Optional[SettingGetResponse], setting, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_get(self, async_client: AsyncCloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_id` but received ''"): - await async_client.zones.settings.with_raw_response.get( - zone_id="", - )