Skip to content

Commit 5dadedb

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#225)
1 parent e06ef4e commit 5dadedb

File tree

172 files changed

+3613
-3713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+3613
-3713
lines changed

api.md

+191-191
Large diffs are not rendered by default.

src/cloudflare/resources/zones/settings/__init__.py

+504-504
Large diffs are not rendered by default.

src/cloudflare/resources/zones/settings/advanced_ddos.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from ...._base_client import (
2020
make_request_options,
2121
)
22-
from ....types.zones.settings import ZoneSettingAdvancedDDoS
22+
from ....types.zones.settings import advanced_ddos
2323

2424
__all__ = ["AdvancedDDoS", "AsyncAdvancedDDoS"]
2525

@@ -43,7 +43,7 @@ def get(
4343
extra_query: Query | None = None,
4444
extra_body: Body | None = None,
4545
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
46-
) -> Optional[ZoneSettingAdvancedDDoS]:
46+
) -> Optional[advanced_ddos.AdvancedDDoS]:
4747
"""
4848
Advanced protection from Distributed Denial of Service (DDoS) attacks on your
4949
website. This is an uneditable value that is 'on' in the case of Business and
@@ -71,7 +71,7 @@ def get(
7171
timeout=timeout,
7272
post_parser=ResultWrapper._unwrapper,
7373
),
74-
cast_to=cast(Type[Optional[ZoneSettingAdvancedDDoS]], ResultWrapper[ZoneSettingAdvancedDDoS]),
74+
cast_to=cast(Type[Optional[advanced_ddos.AdvancedDDoS]], ResultWrapper[advanced_ddos.AdvancedDDoS]),
7575
)
7676

7777

@@ -94,7 +94,7 @@ async def get(
9494
extra_query: Query | None = None,
9595
extra_body: Body | None = None,
9696
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
97-
) -> Optional[ZoneSettingAdvancedDDoS]:
97+
) -> Optional[advanced_ddos.AdvancedDDoS]:
9898
"""
9999
Advanced protection from Distributed Denial of Service (DDoS) attacks on your
100100
website. This is an uneditable value that is 'on' in the case of Business and
@@ -122,7 +122,7 @@ async def get(
122122
timeout=timeout,
123123
post_parser=ResultWrapper._unwrapper,
124124
),
125-
cast_to=cast(Type[Optional[ZoneSettingAdvancedDDoS]], ResultWrapper[ZoneSettingAdvancedDDoS]),
125+
cast_to=cast(Type[Optional[advanced_ddos.AdvancedDDoS]], ResultWrapper[advanced_ddos.AdvancedDDoS]),
126126
)
127127

128128

src/cloudflare/resources/zones/settings/always_online.py

+28-28
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424
from ...._base_client import (
2525
make_request_options,
2626
)
27-
from ....types.zones.settings import ZoneSettingAlwaysOnline, always_online_edit_params
27+
from ....types.zones.settings import AlwaysOnline, always_online_edit_params
2828

29-
__all__ = ["AlwaysOnline", "AsyncAlwaysOnline"]
29+
__all__ = ["AlwaysOnlineResource", "AsyncAlwaysOnlineResource"]
3030

3131

32-
class AlwaysOnline(SyncAPIResource):
32+
class AlwaysOnlineResource(SyncAPIResource):
3333
@cached_property
34-
def with_raw_response(self) -> AlwaysOnlineWithRawResponse:
35-
return AlwaysOnlineWithRawResponse(self)
34+
def with_raw_response(self) -> AlwaysOnlineResourceWithRawResponse:
35+
return AlwaysOnlineResourceWithRawResponse(self)
3636

3737
@cached_property
38-
def with_streaming_response(self) -> AlwaysOnlineWithStreamingResponse:
39-
return AlwaysOnlineWithStreamingResponse(self)
38+
def with_streaming_response(self) -> AlwaysOnlineResourceWithStreamingResponse:
39+
return AlwaysOnlineResourceWithStreamingResponse(self)
4040

4141
def edit(
4242
self,
@@ -49,7 +49,7 @@ def edit(
4949
extra_query: Query | None = None,
5050
extra_body: Body | None = None,
5151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
52-
) -> Optional[ZoneSettingAlwaysOnline]:
52+
) -> Optional[AlwaysOnline]:
5353
"""
5454
When enabled, Cloudflare serves limited copies of web pages available from the
5555
[Internet Archive's Wayback Machine](https://archive.org/web/) if your server is
@@ -82,7 +82,7 @@ def edit(
8282
timeout=timeout,
8383
post_parser=ResultWrapper._unwrapper,
8484
),
85-
cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]),
85+
cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]),
8686
)
8787

8888
def get(
@@ -95,7 +95,7 @@ def get(
9595
extra_query: Query | None = None,
9696
extra_body: Body | None = None,
9797
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
98-
) -> Optional[ZoneSettingAlwaysOnline]:
98+
) -> Optional[AlwaysOnline]:
9999
"""
100100
When enabled, Cloudflare serves limited copies of web pages available from the
101101
[Internet Archive's Wayback Machine](https://archive.org/web/) if your server is
@@ -125,18 +125,18 @@ def get(
125125
timeout=timeout,
126126
post_parser=ResultWrapper._unwrapper,
127127
),
128-
cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]),
128+
cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]),
129129
)
130130

131131

132-
class AsyncAlwaysOnline(AsyncAPIResource):
132+
class AsyncAlwaysOnlineResource(AsyncAPIResource):
133133
@cached_property
134-
def with_raw_response(self) -> AsyncAlwaysOnlineWithRawResponse:
135-
return AsyncAlwaysOnlineWithRawResponse(self)
134+
def with_raw_response(self) -> AsyncAlwaysOnlineResourceWithRawResponse:
135+
return AsyncAlwaysOnlineResourceWithRawResponse(self)
136136

137137
@cached_property
138-
def with_streaming_response(self) -> AsyncAlwaysOnlineWithStreamingResponse:
139-
return AsyncAlwaysOnlineWithStreamingResponse(self)
138+
def with_streaming_response(self) -> AsyncAlwaysOnlineResourceWithStreamingResponse:
139+
return AsyncAlwaysOnlineResourceWithStreamingResponse(self)
140140

141141
async def edit(
142142
self,
@@ -149,7 +149,7 @@ async def edit(
149149
extra_query: Query | None = None,
150150
extra_body: Body | None = None,
151151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
152-
) -> Optional[ZoneSettingAlwaysOnline]:
152+
) -> Optional[AlwaysOnline]:
153153
"""
154154
When enabled, Cloudflare serves limited copies of web pages available from the
155155
[Internet Archive's Wayback Machine](https://archive.org/web/) if your server is
@@ -182,7 +182,7 @@ async def edit(
182182
timeout=timeout,
183183
post_parser=ResultWrapper._unwrapper,
184184
),
185-
cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]),
185+
cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]),
186186
)
187187

188188
async def get(
@@ -195,7 +195,7 @@ async def get(
195195
extra_query: Query | None = None,
196196
extra_body: Body | None = None,
197197
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
198-
) -> Optional[ZoneSettingAlwaysOnline]:
198+
) -> Optional[AlwaysOnline]:
199199
"""
200200
When enabled, Cloudflare serves limited copies of web pages available from the
201201
[Internet Archive's Wayback Machine](https://archive.org/web/) if your server is
@@ -225,12 +225,12 @@ async def get(
225225
timeout=timeout,
226226
post_parser=ResultWrapper._unwrapper,
227227
),
228-
cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]),
228+
cast_to=cast(Type[Optional[AlwaysOnline]], ResultWrapper[AlwaysOnline]),
229229
)
230230

231231

232-
class AlwaysOnlineWithRawResponse:
233-
def __init__(self, always_online: AlwaysOnline) -> None:
232+
class AlwaysOnlineResourceWithRawResponse:
233+
def __init__(self, always_online: AlwaysOnlineResource) -> None:
234234
self._always_online = always_online
235235

236236
self.edit = to_raw_response_wrapper(
@@ -241,8 +241,8 @@ def __init__(self, always_online: AlwaysOnline) -> None:
241241
)
242242

243243

244-
class AsyncAlwaysOnlineWithRawResponse:
245-
def __init__(self, always_online: AsyncAlwaysOnline) -> None:
244+
class AsyncAlwaysOnlineResourceWithRawResponse:
245+
def __init__(self, always_online: AsyncAlwaysOnlineResource) -> None:
246246
self._always_online = always_online
247247

248248
self.edit = async_to_raw_response_wrapper(
@@ -253,8 +253,8 @@ def __init__(self, always_online: AsyncAlwaysOnline) -> None:
253253
)
254254

255255

256-
class AlwaysOnlineWithStreamingResponse:
257-
def __init__(self, always_online: AlwaysOnline) -> None:
256+
class AlwaysOnlineResourceWithStreamingResponse:
257+
def __init__(self, always_online: AlwaysOnlineResource) -> None:
258258
self._always_online = always_online
259259

260260
self.edit = to_streamed_response_wrapper(
@@ -265,8 +265,8 @@ def __init__(self, always_online: AlwaysOnline) -> None:
265265
)
266266

267267

268-
class AsyncAlwaysOnlineWithStreamingResponse:
269-
def __init__(self, always_online: AsyncAlwaysOnline) -> None:
268+
class AsyncAlwaysOnlineResourceWithStreamingResponse:
269+
def __init__(self, always_online: AsyncAlwaysOnlineResource) -> None:
270270
self._always_online = always_online
271271

272272
self.edit = async_to_streamed_response_wrapper(

src/cloudflare/resources/zones/settings/always_use_https.py

+17-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from ...._base_client import (
2525
make_request_options,
2626
)
27-
from ....types.zones.settings import ZoneSettingAlwaysUseHTTPS, always_use_https_edit_params
27+
from ....types.zones.settings import always_use_https, always_use_https_edit_params
2828

2929
__all__ = ["AlwaysUseHTTPS", "AsyncAlwaysUseHTTPS"]
3030

@@ -49,7 +49,7 @@ def edit(
4949
extra_query: Query | None = None,
5050
extra_body: Body | None = None,
5151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
52-
) -> Optional[ZoneSettingAlwaysUseHTTPS]:
52+
) -> Optional[always_use_https.AlwaysUseHTTPS]:
5353
"""
5454
Reply to all requests for URLs that use "http" with a 301 redirect to the
5555
equivalent "https" URL. If you only want to redirect for a subset of requests,
@@ -80,7 +80,9 @@ def edit(
8080
timeout=timeout,
8181
post_parser=ResultWrapper._unwrapper,
8282
),
83-
cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]),
83+
cast_to=cast(
84+
Type[Optional[always_use_https.AlwaysUseHTTPS]], ResultWrapper[always_use_https.AlwaysUseHTTPS]
85+
),
8486
)
8587

8688
def get(
@@ -93,7 +95,7 @@ def get(
9395
extra_query: Query | None = None,
9496
extra_body: Body | None = None,
9597
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
96-
) -> Optional[ZoneSettingAlwaysUseHTTPS]:
98+
) -> Optional[always_use_https.AlwaysUseHTTPS]:
9799
"""
98100
Reply to all requests for URLs that use "http" with a 301 redirect to the
99101
equivalent "https" URL. If you only want to redirect for a subset of requests,
@@ -121,7 +123,9 @@ def get(
121123
timeout=timeout,
122124
post_parser=ResultWrapper._unwrapper,
123125
),
124-
cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]),
126+
cast_to=cast(
127+
Type[Optional[always_use_https.AlwaysUseHTTPS]], ResultWrapper[always_use_https.AlwaysUseHTTPS]
128+
),
125129
)
126130

127131

@@ -145,7 +149,7 @@ async def edit(
145149
extra_query: Query | None = None,
146150
extra_body: Body | None = None,
147151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
148-
) -> Optional[ZoneSettingAlwaysUseHTTPS]:
152+
) -> Optional[always_use_https.AlwaysUseHTTPS]:
149153
"""
150154
Reply to all requests for URLs that use "http" with a 301 redirect to the
151155
equivalent "https" URL. If you only want to redirect for a subset of requests,
@@ -176,7 +180,9 @@ async def edit(
176180
timeout=timeout,
177181
post_parser=ResultWrapper._unwrapper,
178182
),
179-
cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]),
183+
cast_to=cast(
184+
Type[Optional[always_use_https.AlwaysUseHTTPS]], ResultWrapper[always_use_https.AlwaysUseHTTPS]
185+
),
180186
)
181187

182188
async def get(
@@ -189,7 +195,7 @@ async def get(
189195
extra_query: Query | None = None,
190196
extra_body: Body | None = None,
191197
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
192-
) -> Optional[ZoneSettingAlwaysUseHTTPS]:
198+
) -> Optional[always_use_https.AlwaysUseHTTPS]:
193199
"""
194200
Reply to all requests for URLs that use "http" with a 301 redirect to the
195201
equivalent "https" URL. If you only want to redirect for a subset of requests,
@@ -217,7 +223,9 @@ async def get(
217223
timeout=timeout,
218224
post_parser=ResultWrapper._unwrapper,
219225
),
220-
cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]),
226+
cast_to=cast(
227+
Type[Optional[always_use_https.AlwaysUseHTTPS]], ResultWrapper[always_use_https.AlwaysUseHTTPS]
228+
),
221229
)
222230

223231

src/cloudflare/resources/zones/settings/automatic_https_rewrites.py

+13-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from ...._base_client import (
2525
make_request_options,
2626
)
27-
from ....types.zones.settings import ZoneSettingAutomaticHTTPSRewrites, automatic_https_rewrite_edit_params
27+
from ....types.zones.settings import automatic_https_rewrites, automatic_https_rewrite_edit_params
2828

2929
__all__ = ["AutomaticHTTPSRewrites", "AsyncAutomaticHTTPSRewrites"]
3030

@@ -49,7 +49,7 @@ def edit(
4949
extra_query: Query | None = None,
5050
extra_body: Body | None = None,
5151
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
52-
) -> Optional[ZoneSettingAutomaticHTTPSRewrites]:
52+
) -> Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]:
5353
"""
5454
Enable the Automatic HTTPS Rewrites feature for this zone.
5555
@@ -80,7 +80,8 @@ def edit(
8080
post_parser=ResultWrapper._unwrapper,
8181
),
8282
cast_to=cast(
83-
Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites]
83+
Type[Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]],
84+
ResultWrapper[automatic_https_rewrites.AutomaticHTTPSRewrites],
8485
),
8586
)
8687

@@ -94,7 +95,7 @@ def get(
9495
extra_query: Query | None = None,
9596
extra_body: Body | None = None,
9697
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
97-
) -> Optional[ZoneSettingAutomaticHTTPSRewrites]:
98+
) -> Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]:
9899
"""
99100
Enable the Automatic HTTPS Rewrites feature for this zone.
100101
@@ -121,7 +122,8 @@ def get(
121122
post_parser=ResultWrapper._unwrapper,
122123
),
123124
cast_to=cast(
124-
Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites]
125+
Type[Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]],
126+
ResultWrapper[automatic_https_rewrites.AutomaticHTTPSRewrites],
125127
),
126128
)
127129

@@ -146,7 +148,7 @@ async def edit(
146148
extra_query: Query | None = None,
147149
extra_body: Body | None = None,
148150
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
149-
) -> Optional[ZoneSettingAutomaticHTTPSRewrites]:
151+
) -> Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]:
150152
"""
151153
Enable the Automatic HTTPS Rewrites feature for this zone.
152154
@@ -179,7 +181,8 @@ async def edit(
179181
post_parser=ResultWrapper._unwrapper,
180182
),
181183
cast_to=cast(
182-
Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites]
184+
Type[Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]],
185+
ResultWrapper[automatic_https_rewrites.AutomaticHTTPSRewrites],
183186
),
184187
)
185188

@@ -193,7 +196,7 @@ async def get(
193196
extra_query: Query | None = None,
194197
extra_body: Body | None = None,
195198
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
196-
) -> Optional[ZoneSettingAutomaticHTTPSRewrites]:
199+
) -> Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]:
197200
"""
198201
Enable the Automatic HTTPS Rewrites feature for this zone.
199202
@@ -220,7 +223,8 @@ async def get(
220223
post_parser=ResultWrapper._unwrapper,
221224
),
222225
cast_to=cast(
223-
Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites]
226+
Type[Optional[automatic_https_rewrites.AutomaticHTTPSRewrites]],
227+
ResultWrapper[automatic_https_rewrites.AutomaticHTTPSRewrites],
224228
),
225229
)
226230

0 commit comments

Comments
 (0)