Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #186

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,12 +422,12 @@ Methods:
- <code title="patch /zones/{zone_id}/settings/0rtt">client.zones.settings.zero_rtt.<a href="./src/cloudflare/resources/zones/settings/zero_rtt.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/zones/settings/zero_rtt_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/zones/settings/zone_setting_0rtt.py">Optional</a></code>
- <code title="get /zones/{zone_id}/settings/0rtt">client.zones.settings.zero_rtt.<a href="./src/cloudflare/resources/zones/settings/zero_rtt.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/zones/settings/zone_setting_0rtt.py">Optional</a></code>

### AdvancedDDOS
### AdvancedDDoS

Types:

```python
from cloudflare.types.zones.settings import ZoneSettingAdvancedDDOS
from cloudflare.types.zones.settings import ZoneSettingAdvancedDDoS
```

Methods:
Expand Down
24 changes: 12 additions & 12 deletions src/cloudflare/resources/zones/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@
AsyncPseudoIPV4WithStreamingResponse,
)
from .advanced_ddos import (
AdvancedDDOS,
AsyncAdvancedDDOS,
AdvancedDDOSWithRawResponse,
AsyncAdvancedDDOSWithRawResponse,
AdvancedDDOSWithStreamingResponse,
AsyncAdvancedDDOSWithStreamingResponse,
AdvancedDDoS,
AsyncAdvancedDDoS,
AdvancedDDoSWithRawResponse,
AsyncAdvancedDDoSWithRawResponse,
AdvancedDDoSWithStreamingResponse,
AsyncAdvancedDDoSWithStreamingResponse,
)
from .always_online import (
AlwaysOnline,
Expand Down Expand Up @@ -424,12 +424,12 @@
"AsyncZeroRTTWithRawResponse",
"ZeroRTTWithStreamingResponse",
"AsyncZeroRTTWithStreamingResponse",
"AdvancedDDOS",
"AsyncAdvancedDDOS",
"AdvancedDDOSWithRawResponse",
"AsyncAdvancedDDOSWithRawResponse",
"AdvancedDDOSWithStreamingResponse",
"AsyncAdvancedDDOSWithStreamingResponse",
"AdvancedDDoS",
"AsyncAdvancedDDoS",
"AdvancedDDoSWithRawResponse",
"AsyncAdvancedDDoSWithRawResponse",
"AdvancedDDoSWithStreamingResponse",
"AsyncAdvancedDDoSWithStreamingResponse",
"AlwaysOnline",
"AsyncAlwaysOnline",
"AlwaysOnlineWithRawResponse",
Expand Down
48 changes: 24 additions & 24 deletions src/cloudflare/resources/zones/settings/advanced_ddos.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
from ...._base_client import (
make_request_options,
)
from ....types.zones.settings import ZoneSettingAdvancedDDOS
from ....types.zones.settings import ZoneSettingAdvancedDDoS

__all__ = ["AdvancedDDOS", "AsyncAdvancedDDOS"]
__all__ = ["AdvancedDDoS", "AsyncAdvancedDDoS"]


class AdvancedDDOS(SyncAPIResource):
class AdvancedDDoS(SyncAPIResource):
@cached_property
def with_raw_response(self) -> AdvancedDDOSWithRawResponse:
return AdvancedDDOSWithRawResponse(self)
def with_raw_response(self) -> AdvancedDDoSWithRawResponse:
return AdvancedDDoSWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AdvancedDDOSWithStreamingResponse:
return AdvancedDDOSWithStreamingResponse(self)
def with_streaming_response(self) -> AdvancedDDoSWithStreamingResponse:
return AdvancedDDoSWithStreamingResponse(self)

def get(
self,
Expand All @@ -43,7 +43,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[ZoneSettingAdvancedDDOS]:
) -> Optional[ZoneSettingAdvancedDDoS]:
"""
Advanced protection from Distributed Denial of Service (DDoS) attacks on your
website. This is an uneditable value that is 'on' in the case of Business and
Expand Down Expand Up @@ -71,18 +71,18 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[ZoneSettingAdvancedDDOS]], ResultWrapper[ZoneSettingAdvancedDDOS]),
cast_to=cast(Type[Optional[ZoneSettingAdvancedDDoS]], ResultWrapper[ZoneSettingAdvancedDDoS]),
)


class AsyncAdvancedDDOS(AsyncAPIResource):
class AsyncAdvancedDDoS(AsyncAPIResource):
@cached_property
def with_raw_response(self) -> AsyncAdvancedDDOSWithRawResponse:
return AsyncAdvancedDDOSWithRawResponse(self)
def with_raw_response(self) -> AsyncAdvancedDDoSWithRawResponse:
return AsyncAdvancedDDoSWithRawResponse(self)

@cached_property
def with_streaming_response(self) -> AsyncAdvancedDDOSWithStreamingResponse:
return AsyncAdvancedDDOSWithStreamingResponse(self)
def with_streaming_response(self) -> AsyncAdvancedDDoSWithStreamingResponse:
return AsyncAdvancedDDoSWithStreamingResponse(self)

async def get(
self,
Expand All @@ -94,7 +94,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> Optional[ZoneSettingAdvancedDDOS]:
) -> Optional[ZoneSettingAdvancedDDoS]:
"""
Advanced protection from Distributed Denial of Service (DDoS) attacks on your
website. This is an uneditable value that is 'on' in the case of Business and
Expand Down Expand Up @@ -122,39 +122,39 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[Optional[ZoneSettingAdvancedDDOS]], ResultWrapper[ZoneSettingAdvancedDDOS]),
cast_to=cast(Type[Optional[ZoneSettingAdvancedDDoS]], ResultWrapper[ZoneSettingAdvancedDDoS]),
)


class AdvancedDDOSWithRawResponse:
def __init__(self, advanced_ddos: AdvancedDDOS) -> None:
class AdvancedDDoSWithRawResponse:
def __init__(self, advanced_ddos: AdvancedDDoS) -> None:
self._advanced_ddos = advanced_ddos

self.get = to_raw_response_wrapper(
advanced_ddos.get,
)


class AsyncAdvancedDDOSWithRawResponse:
def __init__(self, advanced_ddos: AsyncAdvancedDDOS) -> None:
class AsyncAdvancedDDoSWithRawResponse:
def __init__(self, advanced_ddos: AsyncAdvancedDDoS) -> None:
self._advanced_ddos = advanced_ddos

self.get = async_to_raw_response_wrapper(
advanced_ddos.get,
)


class AdvancedDDOSWithStreamingResponse:
def __init__(self, advanced_ddos: AdvancedDDOS) -> None:
class AdvancedDDoSWithStreamingResponse:
def __init__(self, advanced_ddos: AdvancedDDoS) -> None:
self._advanced_ddos = advanced_ddos

self.get = to_streamed_response_wrapper(
advanced_ddos.get,
)


class AsyncAdvancedDDOSWithStreamingResponse:
def __init__(self, advanced_ddos: AsyncAdvancedDDOS) -> None:
class AsyncAdvancedDDoSWithStreamingResponse:
def __init__(self, advanced_ddos: AsyncAdvancedDDoS) -> None:
self._advanced_ddos = advanced_ddos

self.get = async_to_streamed_response_wrapper(
Expand Down
36 changes: 18 additions & 18 deletions src/cloudflare/resources/zones/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@
)
from ...._wrappers import ResultWrapper
from .advanced_ddos import (
AdvancedDDOS,
AsyncAdvancedDDOS,
AdvancedDDOSWithRawResponse,
AsyncAdvancedDDOSWithRawResponse,
AdvancedDDOSWithStreamingResponse,
AsyncAdvancedDDOSWithStreamingResponse,
AdvancedDDoS,
AsyncAdvancedDDoS,
AdvancedDDoSWithRawResponse,
AsyncAdvancedDDoSWithRawResponse,
AdvancedDDoSWithStreamingResponse,
AsyncAdvancedDDoSWithStreamingResponse,
)
from .always_online import (
AlwaysOnline,
Expand Down Expand Up @@ -442,8 +442,8 @@ def zero_rtt(self) -> ZeroRTT:
return ZeroRTT(self._client)

@cached_property
def advanced_ddos(self) -> AdvancedDDOS:
return AdvancedDDOS(self._client)
def advanced_ddos(self) -> AdvancedDDoS:
return AdvancedDDoS(self._client)

@cached_property
def always_online(self) -> AlwaysOnline:
Expand Down Expand Up @@ -738,8 +738,8 @@ def zero_rtt(self) -> AsyncZeroRTT:
return AsyncZeroRTT(self._client)

@cached_property
def advanced_ddos(self) -> AsyncAdvancedDDOS:
return AsyncAdvancedDDOS(self._client)
def advanced_ddos(self) -> AsyncAdvancedDDoS:
return AsyncAdvancedDDoS(self._client)

@cached_property
def always_online(self) -> AsyncAlwaysOnline:
Expand Down Expand Up @@ -1044,8 +1044,8 @@ def zero_rtt(self) -> ZeroRTTWithRawResponse:
return ZeroRTTWithRawResponse(self._settings.zero_rtt)

@cached_property
def advanced_ddos(self) -> AdvancedDDOSWithRawResponse:
return AdvancedDDOSWithRawResponse(self._settings.advanced_ddos)
def advanced_ddos(self) -> AdvancedDDoSWithRawResponse:
return AdvancedDDoSWithRawResponse(self._settings.advanced_ddos)

@cached_property
def always_online(self) -> AlwaysOnlineWithRawResponse:
Expand Down Expand Up @@ -1260,8 +1260,8 @@ def zero_rtt(self) -> AsyncZeroRTTWithRawResponse:
return AsyncZeroRTTWithRawResponse(self._settings.zero_rtt)

@cached_property
def advanced_ddos(self) -> AsyncAdvancedDDOSWithRawResponse:
return AsyncAdvancedDDOSWithRawResponse(self._settings.advanced_ddos)
def advanced_ddos(self) -> AsyncAdvancedDDoSWithRawResponse:
return AsyncAdvancedDDoSWithRawResponse(self._settings.advanced_ddos)

@cached_property
def always_online(self) -> AsyncAlwaysOnlineWithRawResponse:
Expand Down Expand Up @@ -1476,8 +1476,8 @@ def zero_rtt(self) -> ZeroRTTWithStreamingResponse:
return ZeroRTTWithStreamingResponse(self._settings.zero_rtt)

@cached_property
def advanced_ddos(self) -> AdvancedDDOSWithStreamingResponse:
return AdvancedDDOSWithStreamingResponse(self._settings.advanced_ddos)
def advanced_ddos(self) -> AdvancedDDoSWithStreamingResponse:
return AdvancedDDoSWithStreamingResponse(self._settings.advanced_ddos)

@cached_property
def always_online(self) -> AlwaysOnlineWithStreamingResponse:
Expand Down Expand Up @@ -1692,8 +1692,8 @@ def zero_rtt(self) -> AsyncZeroRTTWithStreamingResponse:
return AsyncZeroRTTWithStreamingResponse(self._settings.zero_rtt)

@cached_property
def advanced_ddos(self) -> AsyncAdvancedDDOSWithStreamingResponse:
return AsyncAdvancedDDOSWithStreamingResponse(self._settings.advanced_ddos)
def advanced_ddos(self) -> AsyncAdvancedDDoSWithStreamingResponse:
return AsyncAdvancedDDoSWithStreamingResponse(self._settings.advanced_ddos)

@cached_property
def always_online(self) -> AsyncAlwaysOnlineWithStreamingResponse:
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/zones/setting_edit_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ZoneSettingEarlyHintsParam,
ZoneSettingPseudoIPV4Param,
ZoneSettingWebsocketsParam,
ZoneSettingAdvancedDDOSParam,
ZoneSettingAdvancedDDoSParam,
ZoneSettingAlwaysOnlineParam,
ZoneSettingBrowserCheckParam,
ZoneSettingChallengeTTLParam,
Expand Down Expand Up @@ -151,7 +151,7 @@ class ItemZonesTLS1_2Only(TypedDict, total=False):

Item = Union[
ZoneSetting0rttParam,
ZoneSettingAdvancedDDOSParam,
ZoneSettingAdvancedDDoSParam,
ZoneSettingAlwaysOnlineParam,
ZoneSettingAlwaysUseHTTPSParam,
ZoneSettingAutomaticHTTPSRewritesParam,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/zones/setting_edit_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
ZoneSettingEarlyHints,
ZoneSettingPseudoIPV4,
ZoneSettingWebsockets,
ZoneSettingAdvancedDDOS,
ZoneSettingAdvancedDDoS,
ZoneSettingAlwaysOnline,
ZoneSettingBrowserCheck,
ZoneSettingChallengeTTL,
Expand Down Expand Up @@ -195,7 +195,7 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel):

SettingEditResponseItem = Union[
ZoneSetting0rtt,
ZoneSettingAdvancedDDOS,
ZoneSettingAdvancedDDoS,
ZoneSettingAlwaysOnline,
ZoneSettingAlwaysUseHTTPS,
ZoneSettingAutomaticHTTPSRewrites,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/zones/setting_get_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
ZoneSettingEarlyHints,
ZoneSettingPseudoIPV4,
ZoneSettingWebsockets,
ZoneSettingAdvancedDDOS,
ZoneSettingAdvancedDDoS,
ZoneSettingAlwaysOnline,
ZoneSettingBrowserCheck,
ZoneSettingChallengeTTL,
Expand Down Expand Up @@ -195,7 +195,7 @@ class SettingGetResponseItemZonesTLS1_2Only(BaseModel):

SettingGetResponseItem = Union[
ZoneSetting0rtt,
ZoneSettingAdvancedDDOS,
ZoneSettingAdvancedDDoS,
ZoneSettingAlwaysOnline,
ZoneSettingAlwaysUseHTTPS,
ZoneSettingAutomaticHTTPSRewrites,
Expand Down
4 changes: 2 additions & 2 deletions src/cloudflare/types/zones/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
from .image_resizing_edit_params import ImageResizingEditParams as ImageResizingEditParams
from .ip_geolocation_edit_params import IPGeolocationEditParams as IPGeolocationEditParams
from .security_level_edit_params import SecurityLevelEditParams as SecurityLevelEditParams
from .zone_setting_advanced_ddos import ZoneSettingAdvancedDDOS as ZoneSettingAdvancedDDOS
from .zone_setting_advanced_ddos import ZoneSettingAdvancedDDoS as ZoneSettingAdvancedDDoS
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
Expand Down Expand Up @@ -106,7 +106,7 @@
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_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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

from ...._models import BaseModel

__all__ = ["ZoneSettingAdvancedDDOS"]
__all__ = ["ZoneSettingAdvancedDDoS"]


class ZoneSettingAdvancedDDOS(BaseModel):
class ZoneSettingAdvancedDDoS(BaseModel):
id: Literal["advanced_ddos"]
"""ID of the zone setting."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

from typing_extensions import Literal, Required, TypedDict

__all__ = ["ZoneSettingAdvancedDDOSParam"]
__all__ = ["ZoneSettingAdvancedDDoSParam"]


class ZoneSettingAdvancedDDOSParam(TypedDict, total=False):
class ZoneSettingAdvancedDDoSParam(TypedDict, total=False):
id: Required[Literal["advanced_ddos"]]
"""ID of the zone setting."""

Expand Down
Loading