From 2ed1953f5b6c73448ecc43440597c96c224b5ee7 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 9 Apr 2024 11:17:43 +0000
Subject: [PATCH] feat(api): update via SDK Studio (#245)
---
api.md | 64 ++++++++--------
src/cloudflare/resources/alerting/policies.py | 10 +--
src/cloudflare/resources/filters.py | 38 +++++-----
src/cloudflare/resources/firewall/rules.py | 38 +++++-----
.../resources/firewall/waf/packages/rules.py | 14 ++--
.../magic_network_monitoring/rules/rules.py | 54 +++++++-------
src/cloudflare/resources/pcaps/pcaps.py | 14 ++--
src/cloudflare/resources/rum/rules.py | 18 ++---
.../resources/waiting_rooms/rules.py | 14 ++--
.../resources/zero_trust/gateway/rules.py | 38 +++++-----
src/cloudflare/types/__init__.py | 5 +-
src/cloudflare/types/alerting/__init__.py | 4 +-
src/cloudflare/types/alerting/policy.py | 4 +-
.../types/alerting/policy_create_params.py | 4 +-
.../alerting/{filter.py => policy_filter.py} | 4 +-
...filter_param.py => policy_filter_param.py} | 4 +-
src/cloudflare/types/alerting/policy_param.py | 4 +-
.../types/alerting/policy_update_params.py | 4 +-
.../types/filter_create_response.py | 4 +-
src/cloudflare/types/filter_param.py | 25 -------
src/cloudflare/types/firewall/__init__.py | 2 +-
.../firewall/{rule.py => firewall_rule.py} | 8 +-
.../types/firewall/rule_create_response.py | 4 +-
.../types/firewall/rule_edit_response.py | 4 +-
src/cloudflare/types/firewall/waf/__init__.py | 3 +-
src/cloudflare/types/firewall/waf/override.py | 4 +-
.../types/firewall/waf/packages/__init__.py | 2 +-
.../{rule.py => rule_list_response.py} | 6 +-
.../types/firewall/waf/rules_param.py | 10 ---
.../firewall/waf/{rules.py => waf_rule.py} | 4 +-
.../types/{filter.py => firewall_filter.py} | 4 +-
.../magic_network_monitoring/__init__.py | 2 +-
...le.py => magic_network_monitoring_rule.py} | 4 +-
src/cloudflare/types/pcap.py | 4 +-
src/cloudflare/types/pcap_create_params.py | 6 +-
src/cloudflare/types/pcap_create_response.py | 4 +-
src/cloudflare/types/pcap_filter.py | 24 ++++++
src/cloudflare/types/pcap_filter_param.py | 24 ++++++
src/cloudflare/types/pcap_get_response.py | 4 +-
src/cloudflare/types/pcap_list_response.py | 4 +-
src/cloudflare/types/rum/__init__.py | 2 +-
.../types/rum/rule_list_response.py | 4 +-
.../types/rum/{rule.py => rum_rule.py} | 4 +-
src/cloudflare/types/rum/site.py | 4 +-
.../types/waiting_rooms/__init__.py | 2 +-
.../waiting_rooms/rule_create_response.py | 4 +-
.../waiting_rooms/rule_delete_response.py | 4 +-
.../types/waiting_rooms/rule_edit_response.py | 4 +-
.../waiting_rooms/rule_update_response.py | 4 +-
.../{rule.py => waiting_room_rule.py} | 4 +-
.../types/zero_trust/gateway/__init__.py | 2 +-
.../gateway/{rule.py => gateway_rule.py} | 4 +-
tests/api_resources/firewall/test_rules.py | 62 ++++++++--------
.../firewall/waf/packages/test_rules.py | 21 +++---
.../magic_network_monitoring/test_rules.py | 74 +++++++++----------
tests/api_resources/rum/test_rules.py | 34 ++++-----
tests/api_resources/test_filters.py | 54 +++++++-------
.../api_resources/waiting_rooms/test_rules.py | 14 ++--
.../zero_trust/gateway/test_rules.py | 58 +++++++--------
59 files changed, 434 insertions(+), 416 deletions(-)
rename src/cloudflare/types/alerting/{filter.py => policy_filter.py} (98%)
rename src/cloudflare/types/alerting/{filter_param.py => policy_filter_param.py} (97%)
delete mode 100644 src/cloudflare/types/filter_param.py
rename src/cloudflare/types/firewall/{rule.py => firewall_rule.py} (88%)
rename src/cloudflare/types/firewall/waf/packages/{rule.py => rule_list_response.py} (95%)
delete mode 100644 src/cloudflare/types/firewall/waf/rules_param.py
rename src/cloudflare/types/firewall/waf/{rules.py => waf_rule.py} (58%)
rename src/cloudflare/types/{filter.py => firewall_filter.py} (92%)
rename src/cloudflare/types/magic_network_monitoring/{rule.py => magic_network_monitoring_rule.py} (94%)
create mode 100644 src/cloudflare/types/pcap_filter.py
create mode 100644 src/cloudflare/types/pcap_filter_param.py
rename src/cloudflare/types/rum/{rule.py => rum_rule.py} (93%)
rename src/cloudflare/types/waiting_rooms/{rule.py => waiting_room_rule.py} (92%)
rename src/cloudflare/types/zero_trust/gateway/{rule.py => gateway_rule.py} (97%)
diff --git a/api.md b/api.md
index 86d355085b2..68243408817 100644
--- a/api.md
+++ b/api.md
@@ -1722,16 +1722,16 @@ Methods:
Types:
```python
-from cloudflare.types import Filter, FilterCreateResponse
+from cloudflare.types import FirewallFilter, FilterCreateResponse
```
Methods:
- client.filters.create(zone_identifier, \*\*params) -> Optional
-- client.filters.update(id, \*, zone_identifier, \*\*params) -> Filter
-- client.filters.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[Filter]
-- client.filters.delete(id, \*, zone_identifier, \*\*params) -> Filter
-- client.filters.get(id, \*, zone_identifier) -> Filter
+- client.filters.update(id, \*, zone_identifier, \*\*params) -> FirewallFilter
+- client.filters.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallFilter]
+- client.filters.delete(id, \*, zone_identifier, \*\*params) -> FirewallFilter
+- client.filters.get(id, \*, zone_identifier) -> FirewallFilter
# Firewall
@@ -1764,8 +1764,8 @@ Types:
```python
from cloudflare.types.firewall import (
+ FirewallRule,
Products,
- Rule,
DeletedFilter,
RuleCreateResponse,
RuleEditResponse,
@@ -1775,11 +1775,11 @@ from cloudflare.types.firewall import (
Methods:
- client.firewall.rules.create(zone_identifier, \*\*params) -> Optional
-- client.firewall.rules.update(id, \*, zone_identifier, \*\*params) -> Rule
-- client.firewall.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[Rule]
-- client.firewall.rules.delete(id, \*, zone_identifier, \*\*params) -> Rule
+- client.firewall.rules.update(id, \*, zone_identifier, \*\*params) -> FirewallRule
+- client.firewall.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallRule]
+- client.firewall.rules.delete(id, \*, zone_identifier, \*\*params) -> FirewallRule
- client.firewall.rules.edit(id, \*, zone_identifier, \*\*params) -> Optional
-- client.firewall.rules.get(zone_identifier, \*, path_id, \*\*params) -> Rule
+- client.firewall.rules.get(zone_identifier, \*, path_id, \*\*params) -> FirewallRule
## AccessRules
@@ -1831,8 +1831,8 @@ Types:
from cloudflare.types.firewall.waf import (
Override,
RewriteAction,
- Rules,
URLs,
+ WAFRule,
OverrideDeleteResponse,
)
```
@@ -1879,15 +1879,15 @@ Types:
```python
from cloudflare.types.firewall.waf.packages import (
AllowedModesAnomaly,
- Rule,
UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5,
+ RuleListResponse,
RuleEditResponse,
)
```
Methods:
-- client.firewall.waf.packages.rules.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[Rule]
+- client.firewall.waf.packages.rules.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[RuleListResponse]
- client.firewall.waf.packages.rules.edit(rule_id, \*, zone_id, package_id, \*\*params) -> RuleEditResponse
- client.firewall.waf.packages.rules.get(rule_id, \*, zone_id, package_id) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
@@ -2419,8 +2419,8 @@ Types:
```python
from cloudflare.types.waiting_rooms import (
- Rule,
UnnamedSchemaRefF1c0ba8f44601f2db2e07b9397b6c430,
+ WaitingRoomRule,
RuleCreateResponse,
RuleUpdateResponse,
RuleDeleteResponse,
@@ -2432,7 +2432,7 @@ Methods:
- client.waiting_rooms.rules.create(waiting_room_id, \*, zone_id, \*\*params) -> Optional
- client.waiting_rooms.rules.update(waiting_room_id, \*, zone_id, \*\*params) -> Optional
-- client.waiting_rooms.rules.list(waiting_room_id, \*, zone_id) -> SyncSinglePage[Rule]
+- client.waiting_rooms.rules.list(waiting_room_id, \*, zone_id) -> SyncSinglePage[WaitingRoomRule]
- client.waiting_rooms.rules.delete(rule_id, \*, zone_id, waiting_room_id, \*\*params) -> Optional
- client.waiting_rooms.rules.edit(rule_id, \*, zone_id, waiting_room_id, \*\*params) -> Optional
@@ -3900,19 +3900,19 @@ Types:
```python
from cloudflare.types.magic_network_monitoring import (
- Rule,
+ MagicNetworkMonitoringRule,
UnnamedSchemaRef99ba74ba6027c3c87ca03d4e81cfc16d,
)
```
Methods:
-- client.magic_network_monitoring.rules.create(\*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.update(\*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.list(\*, account_id) -> SyncSinglePage[Optional]
-- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.edit(rule_id, \*, account_id, \*\*params) -> Optional
-- client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional
+- client.magic_network_monitoring.rules.create(\*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.update(\*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.list(\*, account_id) -> SyncSinglePage[Optional]
+- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.edit(rule_id, \*, account_id, \*\*params) -> Optional
+- client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional
### Advertisements
@@ -4038,7 +4038,7 @@ Methods:
Types:
```python
-from cloudflare.types import Filter, PCAP, PCAPCreateResponse, PCAPListResponse, PCAPGetResponse
+from cloudflare.types import PCAP, PCAPFilter, PCAPCreateResponse, PCAPListResponse, PCAPGetResponse
```
Methods:
@@ -4472,9 +4472,9 @@ Types:
```python
from cloudflare.types.alerting import (
- Filter,
Mechanism,
Policy,
+ PolicyFilter,
PolicyCreateResponse,
PolicyUpdateResponse,
PolicyDeleteResponse,
@@ -5717,7 +5717,7 @@ from cloudflare.types.zero_trust.gateway import (
DNSResolverSettingsV4,
DNSResolverSettingsV6,
GatewayFilter,
- Rule,
+ GatewayRule,
RuleSetting,
Schedule,
)
@@ -5725,11 +5725,11 @@ from cloudflare.types.zero_trust.gateway import (
Methods:
-- client.zero_trust.gateway.rules.create(\*, account_id, \*\*params) -> Rule
-- client.zero_trust.gateway.rules.update(rule_id, \*, account_id, \*\*params) -> Rule
-- client.zero_trust.gateway.rules.list(\*, account_id) -> SyncSinglePage[Rule]
+- client.zero_trust.gateway.rules.create(\*, account_id, \*\*params) -> GatewayRule
+- client.zero_trust.gateway.rules.update(rule_id, \*, account_id, \*\*params) -> GatewayRule
+- client.zero_trust.gateway.rules.list(\*, account_id) -> SyncSinglePage[GatewayRule]
- client.zero_trust.gateway.rules.delete(rule_id, \*, account_id, \*\*params) -> UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
-- client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> Rule
+- client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> GatewayRule
## Networks
@@ -5847,13 +5847,13 @@ Methods:
Types:
```python
-from cloudflare.types.rum import Rule, RuleListResponse, RuleDeleteResponse
+from cloudflare.types.rum import RUMRule, RuleListResponse, RuleDeleteResponse
```
Methods:
-- client.rum.rules.create(ruleset_id, \*, account_id, \*\*params) -> Optional
-- client.rum.rules.update(rule_id, \*, account_id, ruleset_id, \*\*params) -> Optional
+- client.rum.rules.create(ruleset_id, \*, account_id, \*\*params) -> Optional
+- client.rum.rules.update(rule_id, \*, account_id, ruleset_id, \*\*params) -> Optional
- client.rum.rules.list(ruleset_id, \*, account_id) -> Optional
- client.rum.rules.delete(rule_id, \*, account_id, ruleset_id) -> Optional
diff --git a/src/cloudflare/resources/alerting/policies.py b/src/cloudflare/resources/alerting/policies.py
index 438bc46d534..b2224d4621b 100644
--- a/src/cloudflare/resources/alerting/policies.py
+++ b/src/cloudflare/resources/alerting/policies.py
@@ -28,8 +28,8 @@
)
from ...types.alerting import (
Policy,
- FilterParam,
MechanismParam,
+ PolicyFilterParam,
PolicyCreateResponse,
PolicyDeleteResponse,
PolicyUpdateResponse,
@@ -114,7 +114,7 @@ def create(
mechanisms: MechanismParam,
name: str,
description: str | NotGiven = NOT_GIVEN,
- filters: FilterParam | NotGiven = NOT_GIVEN,
+ filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
# 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,
@@ -243,7 +243,7 @@ def update(
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
- filters: FilterParam | NotGiven = NOT_GIVEN,
+ filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
mechanisms: MechanismParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -517,7 +517,7 @@ async def create(
mechanisms: MechanismParam,
name: str,
description: str | NotGiven = NOT_GIVEN,
- filters: FilterParam | NotGiven = NOT_GIVEN,
+ filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
# 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,
@@ -646,7 +646,7 @@ async def update(
| NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
enabled: bool | NotGiven = NOT_GIVEN,
- filters: FilterParam | NotGiven = NOT_GIVEN,
+ filters: PolicyFilterParam | NotGiven = NOT_GIVEN,
mechanisms: MechanismParam | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/cloudflare/resources/filters.py b/src/cloudflare/resources/filters.py
index e812cef0970..4e6d7d706ce 100644
--- a/src/cloudflare/resources/filters.py
+++ b/src/cloudflare/resources/filters.py
@@ -7,7 +7,7 @@
import httpx
from ..types import (
- Filter,
+ FirewallFilter,
FilterCreateResponse,
filter_list_params,
filter_create_params,
@@ -99,7 +99,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Filter:
+ ) -> FirewallFilter:
"""
Updates an existing filter.
@@ -130,7 +130,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Filter], ResultWrapper[Filter]),
+ cast_to=cast(Type[FirewallFilter], ResultWrapper[FirewallFilter]),
)
def list(
@@ -150,7 +150,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncV4PagePaginationArray[Filter]:
+ ) -> SyncV4PagePaginationArray[FirewallFilter]:
"""Fetches filters in a zone.
You can filter the results using several optional
@@ -185,7 +185,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
return self._get_api_list(
f"/zones/{zone_identifier}/filters",
- page=SyncV4PagePaginationArray[Filter],
+ page=SyncV4PagePaginationArray[FirewallFilter],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -204,7 +204,7 @@ def list(
filter_list_params.FilterListParams,
),
),
- model=Filter,
+ model=FirewallFilter,
)
def delete(
@@ -219,7 +219,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Filter:
+ ) -> FirewallFilter:
"""
Deletes an existing filter.
@@ -250,7 +250,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Filter], ResultWrapper[Filter]),
+ cast_to=cast(Type[FirewallFilter], ResultWrapper[FirewallFilter]),
)
def get(
@@ -264,7 +264,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Filter:
+ ) -> FirewallFilter:
"""
Fetches the details of a filter.
@@ -294,7 +294,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Filter], ResultWrapper[Filter]),
+ cast_to=cast(Type[FirewallFilter], ResultWrapper[FirewallFilter]),
)
@@ -360,7 +360,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Filter:
+ ) -> FirewallFilter:
"""
Updates an existing filter.
@@ -391,7 +391,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Filter], ResultWrapper[Filter]),
+ cast_to=cast(Type[FirewallFilter], ResultWrapper[FirewallFilter]),
)
def list(
@@ -411,7 +411,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Filter, AsyncV4PagePaginationArray[Filter]]:
+ ) -> AsyncPaginator[FirewallFilter, AsyncV4PagePaginationArray[FirewallFilter]]:
"""Fetches filters in a zone.
You can filter the results using several optional
@@ -446,7 +446,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
return self._get_api_list(
f"/zones/{zone_identifier}/filters",
- page=AsyncV4PagePaginationArray[Filter],
+ page=AsyncV4PagePaginationArray[FirewallFilter],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -465,7 +465,7 @@ def list(
filter_list_params.FilterListParams,
),
),
- model=Filter,
+ model=FirewallFilter,
)
async def delete(
@@ -480,7 +480,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Filter:
+ ) -> FirewallFilter:
"""
Deletes an existing filter.
@@ -511,7 +511,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Filter], ResultWrapper[Filter]),
+ cast_to=cast(Type[FirewallFilter], ResultWrapper[FirewallFilter]),
)
async def get(
@@ -525,7 +525,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Filter:
+ ) -> FirewallFilter:
"""
Fetches the details of a filter.
@@ -555,7 +555,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Filter], ResultWrapper[Filter]),
+ cast_to=cast(Type[FirewallFilter], ResultWrapper[FirewallFilter]),
)
diff --git a/src/cloudflare/resources/firewall/rules.py b/src/cloudflare/resources/firewall/rules.py
index f03e62414c3..c03556929fb 100644
--- a/src/cloudflare/resources/firewall/rules.py
+++ b/src/cloudflare/resources/firewall/rules.py
@@ -26,7 +26,7 @@
make_request_options,
)
from ...types.firewall import (
- Rule,
+ FirewallRule,
RuleEditResponse,
RuleCreateResponse,
rule_get_params,
@@ -102,7 +102,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> FirewallRule:
"""
Updates an existing firewall rule.
@@ -133,7 +133,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
)
def list(
@@ -152,7 +152,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncV4PagePaginationArray[Rule]:
+ ) -> SyncV4PagePaginationArray[FirewallRule]:
"""Fetches firewall rules in a zone.
You can filter the results using several
@@ -185,7 +185,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
return self._get_api_list(
f"/zones/{zone_identifier}/firewall/rules",
- page=SyncV4PagePaginationArray[Rule],
+ page=SyncV4PagePaginationArray[FirewallRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -203,7 +203,7 @@ def list(
rule_list_params.RuleListParams,
),
),
- model=Rule,
+ model=FirewallRule,
)
def delete(
@@ -218,7 +218,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> FirewallRule:
"""
Deletes an existing firewall rule.
@@ -254,7 +254,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
)
def edit(
@@ -315,7 +315,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> FirewallRule:
"""
Fetches the details of a firewall rule.
@@ -348,7 +348,7 @@ def get(
query=maybe_transform({"id": query_id}, rule_get_params.RuleGetParams),
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
)
@@ -414,7 +414,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> FirewallRule:
"""
Updates an existing firewall rule.
@@ -445,7 +445,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
)
def list(
@@ -464,7 +464,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Rule, AsyncV4PagePaginationArray[Rule]]:
+ ) -> AsyncPaginator[FirewallRule, AsyncV4PagePaginationArray[FirewallRule]]:
"""Fetches firewall rules in a zone.
You can filter the results using several
@@ -497,7 +497,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
return self._get_api_list(
f"/zones/{zone_identifier}/firewall/rules",
- page=AsyncV4PagePaginationArray[Rule],
+ page=AsyncV4PagePaginationArray[FirewallRule],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -515,7 +515,7 @@ def list(
rule_list_params.RuleListParams,
),
),
- model=Rule,
+ model=FirewallRule,
)
async def delete(
@@ -530,7 +530,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> FirewallRule:
"""
Deletes an existing firewall rule.
@@ -566,7 +566,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
)
async def edit(
@@ -627,7 +627,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> FirewallRule:
"""
Fetches the details of a firewall rule.
@@ -660,7 +660,7 @@ async def get(
query=await async_maybe_transform({"id": query_id}, rule_get_params.RuleGetParams),
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
)
diff --git a/src/cloudflare/resources/firewall/waf/packages/rules.py b/src/cloudflare/resources/firewall/waf/packages/rules.py
index e0b4b4fb72d..d1a4f4f456f 100644
--- a/src/cloudflare/resources/firewall/waf/packages/rules.py
+++ b/src/cloudflare/resources/firewall/waf/packages/rules.py
@@ -27,7 +27,7 @@
make_request_options,
)
from .....types.shared import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
-from .....types.firewall.waf.packages import Rule, RuleEditResponse, rule_edit_params, rule_list_params
+from .....types.firewall.waf.packages import RuleEditResponse, RuleListResponse, rule_edit_params, rule_list_params
__all__ = ["Rules", "AsyncRules"]
@@ -61,7 +61,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncV4PagePaginationArray[Rule]:
+ ) -> SyncV4PagePaginationArray[RuleListResponse]:
"""
Fetches WAF rules in a WAF package.
@@ -106,7 +106,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `package_id` but received {package_id!r}")
return self._get_api_list(
f"/zones/{zone_id}/firewall/waf/packages/{package_id}/rules",
- page=SyncV4PagePaginationArray[Rule],
+ page=SyncV4PagePaginationArray[RuleListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -127,7 +127,7 @@ def list(
rule_list_params.RuleListParams,
),
),
- model=cast(Any, Rule), # Union types cannot be passed in as arguments in the type system
+ model=cast(Any, RuleListResponse), # Union types cannot be passed in as arguments in the type system
)
def edit(
@@ -280,7 +280,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Rule, AsyncV4PagePaginationArray[Rule]]:
+ ) -> AsyncPaginator[RuleListResponse, AsyncV4PagePaginationArray[RuleListResponse]]:
"""
Fetches WAF rules in a WAF package.
@@ -325,7 +325,7 @@ def list(
raise ValueError(f"Expected a non-empty value for `package_id` but received {package_id!r}")
return self._get_api_list(
f"/zones/{zone_id}/firewall/waf/packages/{package_id}/rules",
- page=AsyncV4PagePaginationArray[Rule],
+ page=AsyncV4PagePaginationArray[RuleListResponse],
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -346,7 +346,7 @@ def list(
rule_list_params.RuleListParams,
),
),
- model=cast(Any, Rule), # Union types cannot be passed in as arguments in the type system
+ model=cast(Any, RuleListResponse), # Union types cannot be passed in as arguments in the type system
)
async def edit(
diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
index eeb21a86e67..7759a7b2f19 100644
--- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
+++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py
@@ -34,7 +34,7 @@
make_request_options,
)
from ....types.magic_network_monitoring import (
- Rule,
+ MagicNetworkMonitoringRule,
rule_edit_params,
rule_create_params,
rule_delete_params,
@@ -68,7 +68,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""Create network monitoring rules for account.
Currently only supports creating a
@@ -95,7 +95,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
def update(
@@ -109,7 +109,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
Update network monitoring rules for account.
@@ -134,7 +134,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
def list(
@@ -147,7 +147,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[Optional[Rule]]:
+ ) -> SyncSinglePage[Optional[MagicNetworkMonitoringRule]]:
"""
Lists network monitoring rules for account.
@@ -164,11 +164,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/mnm/rules",
- page=SyncSinglePage[Optional[Rule]],
+ page=SyncSinglePage[Optional[MagicNetworkMonitoringRule]],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Rule,
+ model=MagicNetworkMonitoringRule,
)
def delete(
@@ -183,7 +183,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
Delete a network monitoring rule for account.
@@ -210,7 +210,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
def edit(
@@ -225,7 +225,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
Update a network monitoring rule for account.
@@ -252,7 +252,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
def get(
@@ -266,7 +266,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
List a single network monitoring rule for account.
@@ -292,7 +292,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
@@ -320,7 +320,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""Create network monitoring rules for account.
Currently only supports creating a
@@ -347,7 +347,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
async def update(
@@ -361,7 +361,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
Update network monitoring rules for account.
@@ -386,7 +386,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
def list(
@@ -399,7 +399,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Optional[Rule], AsyncSinglePage[Optional[Rule]]]:
+ ) -> AsyncPaginator[Optional[MagicNetworkMonitoringRule], AsyncSinglePage[Optional[MagicNetworkMonitoringRule]]]:
"""
Lists network monitoring rules for account.
@@ -416,11 +416,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/mnm/rules",
- page=AsyncSinglePage[Optional[Rule]],
+ page=AsyncSinglePage[Optional[MagicNetworkMonitoringRule]],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Rule,
+ model=MagicNetworkMonitoringRule,
)
async def delete(
@@ -435,7 +435,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
Delete a network monitoring rule for account.
@@ -462,7 +462,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
async def edit(
@@ -477,7 +477,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
Update a network monitoring rule for account.
@@ -504,7 +504,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
async def get(
@@ -518,7 +518,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[MagicNetworkMonitoringRule]:
"""
List a single network monitoring rule for account.
@@ -544,7 +544,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]),
)
diff --git a/src/cloudflare/resources/pcaps/pcaps.py b/src/cloudflare/resources/pcaps/pcaps.py
index 22bc54ce2e0..7a8afa6643a 100644
--- a/src/cloudflare/resources/pcaps/pcaps.py
+++ b/src/cloudflare/resources/pcaps/pcaps.py
@@ -8,7 +8,7 @@
import httpx
from ...types import (
- FilterParam,
+ PCAPFilterParam,
PCAPGetResponse,
PCAPListResponse,
PCAPCreateResponse,
@@ -80,7 +80,7 @@ def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: FilterParam | NotGiven = NOT_GIVEN,
+ filter_v1: PCAPFilterParam | NotGiven = NOT_GIVEN,
# 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,
@@ -126,7 +126,7 @@ def create(
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
- filter_v1: FilterParam | NotGiven = NOT_GIVEN,
+ filter_v1: PCAPFilterParam | NotGiven = NOT_GIVEN,
packet_limit: float | NotGiven = NOT_GIVEN,
# 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.
@@ -183,7 +183,7 @@ def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: FilterParam | NotGiven = NOT_GIVEN,
+ filter_v1: PCAPFilterParam | NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
byte_limit: float | NotGiven = NOT_GIVEN,
@@ -338,7 +338,7 @@ async def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: FilterParam | NotGiven = NOT_GIVEN,
+ filter_v1: PCAPFilterParam | NotGiven = NOT_GIVEN,
# 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,
@@ -384,7 +384,7 @@ async def create(
time_limit: float,
type: Literal["simple", "full"],
byte_limit: float | NotGiven = NOT_GIVEN,
- filter_v1: FilterParam | NotGiven = NOT_GIVEN,
+ filter_v1: PCAPFilterParam | NotGiven = NOT_GIVEN,
packet_limit: float | NotGiven = NOT_GIVEN,
# 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.
@@ -441,7 +441,7 @@ async def create(
system: Literal["magic-transit"],
time_limit: float,
type: Literal["simple", "full"],
- filter_v1: FilterParam | NotGiven = NOT_GIVEN,
+ filter_v1: PCAPFilterParam | NotGiven = NOT_GIVEN,
colo_name: str | NotGiven = NOT_GIVEN,
destination_conf: str | NotGiven = NOT_GIVEN,
byte_limit: float | NotGiven = NOT_GIVEN,
diff --git a/src/cloudflare/resources/rum/rules.py b/src/cloudflare/resources/rum/rules.py
index f64332ec07d..721e9ca2e49 100644
--- a/src/cloudflare/resources/rum/rules.py
+++ b/src/cloudflare/resources/rum/rules.py
@@ -20,7 +20,7 @@
async_to_streamed_response_wrapper,
)
from ..._wrappers import ResultWrapper
-from ...types.rum import Rule, RuleListResponse, RuleDeleteResponse, rule_create_params, rule_update_params
+from ...types.rum import RUMRule, RuleListResponse, RuleDeleteResponse, rule_create_params, rule_update_params
from ..._base_client import (
make_request_options,
)
@@ -52,7 +52,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[RUMRule]:
"""
Creates a new rule in a Web Analytics ruleset.
@@ -95,7 +95,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]),
)
def update(
@@ -114,7 +114,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[RUMRule]:
"""
Updates a rule in a Web Analytics ruleset.
@@ -161,7 +161,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]),
)
def list(
@@ -282,7 +282,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[RUMRule]:
"""
Creates a new rule in a Web Analytics ruleset.
@@ -325,7 +325,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]),
)
async def update(
@@ -344,7 +344,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[Rule]:
+ ) -> Optional[RUMRule]:
"""
Updates a rule in a Web Analytics ruleset.
@@ -391,7 +391,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[Rule]], ResultWrapper[Rule]),
+ cast_to=cast(Type[Optional[RUMRule]], ResultWrapper[RUMRule]),
)
async def list(
diff --git a/src/cloudflare/resources/waiting_rooms/rules.py b/src/cloudflare/resources/waiting_rooms/rules.py
index e1d562c4e72..2c1c4f3a540 100644
--- a/src/cloudflare/resources/waiting_rooms/rules.py
+++ b/src/cloudflare/resources/waiting_rooms/rules.py
@@ -27,7 +27,7 @@
make_request_options,
)
from ...types.waiting_rooms import (
- Rule,
+ WaitingRoomRule,
RuleEditResponse,
RuleCreateResponse,
RuleDeleteResponse,
@@ -172,7 +172,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[Rule]:
+ ) -> SyncSinglePage[WaitingRoomRule]:
"""
Lists rules for a waiting room.
@@ -193,11 +193,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}")
return self._get_api_list(
f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules",
- page=SyncSinglePage[Rule],
+ page=SyncSinglePage[WaitingRoomRule],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Rule,
+ model=WaitingRoomRule,
)
def delete(
@@ -453,7 +453,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Rule, AsyncSinglePage[Rule]]:
+ ) -> AsyncPaginator[WaitingRoomRule, AsyncSinglePage[WaitingRoomRule]]:
"""
Lists rules for a waiting room.
@@ -474,11 +474,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}")
return self._get_api_list(
f"/zones/{zone_id}/waiting_rooms/{waiting_room_id}/rules",
- page=AsyncSinglePage[Rule],
+ page=AsyncSinglePage[WaitingRoomRule],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Rule,
+ model=WaitingRoomRule,
)
async def delete(
diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py
index 438db292820..2101eba0a9b 100644
--- a/src/cloudflare/resources/zero_trust/gateway/rules.py
+++ b/src/cloudflare/resources/zero_trust/gateway/rules.py
@@ -28,7 +28,7 @@
)
from ....types.shared import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
from ....types.zero_trust.gateway import (
- Rule,
+ GatewayRule,
GatewayFilter,
ScheduleParam,
RuleSettingParam,
@@ -86,7 +86,7 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> GatewayRule:
"""
Creates a new Zero Trust Gateway rule.
@@ -153,7 +153,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[GatewayRule], ResultWrapper[GatewayRule]),
)
def update(
@@ -194,7 +194,7 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> GatewayRule:
"""
Updates a configured Zero Trust Gateway rule.
@@ -265,7 +265,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[GatewayRule], ResultWrapper[GatewayRule]),
)
def list(
@@ -278,7 +278,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> SyncSinglePage[Rule]:
+ ) -> SyncSinglePage[GatewayRule]:
"""
Fetches the Zero Trust Gateway rules for an account.
@@ -295,11 +295,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/gateway/rules",
- page=SyncSinglePage[Rule],
+ page=SyncSinglePage[GatewayRule],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Rule,
+ model=GatewayRule,
)
def delete(
@@ -362,7 +362,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> GatewayRule:
"""
Fetches a single Zero Trust Gateway rule.
@@ -390,7 +390,7 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[GatewayRule], ResultWrapper[GatewayRule]),
)
@@ -440,7 +440,7 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> GatewayRule:
"""
Creates a new Zero Trust Gateway rule.
@@ -507,7 +507,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[GatewayRule], ResultWrapper[GatewayRule]),
)
async def update(
@@ -548,7 +548,7 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> GatewayRule:
"""
Updates a configured Zero Trust Gateway rule.
@@ -619,7 +619,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[GatewayRule], ResultWrapper[GatewayRule]),
)
def list(
@@ -632,7 +632,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> AsyncPaginator[Rule, AsyncSinglePage[Rule]]:
+ ) -> AsyncPaginator[GatewayRule, AsyncSinglePage[GatewayRule]]:
"""
Fetches the Zero Trust Gateway rules for an account.
@@ -649,11 +649,11 @@ def list(
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
return self._get_api_list(
f"/accounts/{account_id}/gateway/rules",
- page=AsyncSinglePage[Rule],
+ page=AsyncSinglePage[GatewayRule],
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- model=Rule,
+ model=GatewayRule,
)
async def delete(
@@ -716,7 +716,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Rule:
+ ) -> GatewayRule:
"""
Fetches a single Zero Trust Gateway rule.
@@ -744,7 +744,7 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Rule], ResultWrapper[Rule]),
+ cast_to=cast(Type[GatewayRule], ResultWrapper[GatewayRule]),
)
diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py
index a0ff7c36e3b..59b8aa31094 100644
--- a/src/cloudflare/types/__init__.py
+++ b/src/cloudflare/types/__init__.py
@@ -15,7 +15,6 @@
from .video import Video as Video
from .action import Action as Action
from .dnssec import DNSSEC as DNSSEC
-from .filter import Filter as Filter
from .header import Header as Header
from .origin import Origin as Origin
from .shared import (
@@ -61,11 +60,11 @@
from .healthcheck import Healthcheck as Healthcheck
from .jdcloud_ips import JDCloudIPs as JDCloudIPs
from .origin_port import OriginPort as OriginPort
+from .pcap_filter import PCAPFilter as PCAPFilter
from .route_param import RouteParam as RouteParam
from .rules_param import RulesParam as RulesParam
from .check_region import CheckRegion as CheckRegion
from .execute_rule import ExecuteRule as ExecuteRule
-from .filter_param import FilterParam as FilterParam
from .header_param import HeaderParam as HeaderParam
from .health_check import HealthCheck as HealthCheck
from .origin_param import OriginParam as OriginParam
@@ -87,6 +86,7 @@
from .warp_connector import WARPConnector as WARPConnector
from .allowed_origins import AllowedOrigins as AllowedOrigins
from .custom_hostname import CustomHostname as CustomHostname
+from .firewall_filter import FirewallFilter as FirewallFilter
from .origin_steering import OriginSteering as OriginSteering
from .random_steering import RandomSteering as RandomSteering
from .service_binding import ServiceBinding as ServiceBinding
@@ -108,6 +108,7 @@
from .location_strategy import LocationStrategy as LocationStrategy
from .mtls_cert_binding import MTLSCERTBinding as MTLSCERTBinding
from .origin_port_param import OriginPortParam as OriginPortParam
+from .pcap_filter_param import PCAPFilterParam as PCAPFilterParam
from .pcap_get_response import PCAPGetResponse as PCAPGetResponse
from .tcp_configuration import TCPConfiguration as TCPConfiguration
from .cache_purge_params import CachePurgeParams as CachePurgeParams
diff --git a/src/cloudflare/types/alerting/__init__.py b/src/cloudflare/types/alerting/__init__.py
index ba45cbd1951..72f0b44455d 100644
--- a/src/cloudflare/types/alerting/__init__.py
+++ b/src/cloudflare/types/alerting/__init__.py
@@ -2,14 +2,14 @@
from __future__ import annotations
-from .filter import Filter as Filter
from .policy import Policy as Policy
from .history import History as History
from .mechanism import Mechanism as Mechanism
-from .filter_param import FilterParam as FilterParam
from .policy_param import PolicyParam as PolicyParam
+from .policy_filter import PolicyFilter as PolicyFilter
from .mechanism_param import MechanismParam as MechanismParam
from .history_list_params import HistoryListParams as HistoryListParams
+from .policy_filter_param import PolicyFilterParam as PolicyFilterParam
from .policy_create_params import PolicyCreateParams as PolicyCreateParams
from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams
from .policy_create_response import PolicyCreateResponse as PolicyCreateResponse
diff --git a/src/cloudflare/types/alerting/policy.py b/src/cloudflare/types/alerting/policy.py
index 3c760fb16cc..6fd5915e74e 100644
--- a/src/cloudflare/types/alerting/policy.py
+++ b/src/cloudflare/types/alerting/policy.py
@@ -4,9 +4,9 @@
from datetime import datetime
from typing_extensions import Literal
-from .filter import Filter
from ..._models import BaseModel
from .mechanism import Mechanism
+from .policy_filter import PolicyFilter
__all__ = ["Policy"]
@@ -88,7 +88,7 @@ class Policy(BaseModel):
enabled: Optional[bool] = None
"""Whether or not the Notification policy is enabled."""
- filters: Optional[Filter] = None
+ filters: Optional[PolicyFilter] = None
"""
Optional filters that allow you to be alerted only on a subset of events for
that alert type based on some criteria. This is only available for select alert
diff --git a/src/cloudflare/types/alerting/policy_create_params.py b/src/cloudflare/types/alerting/policy_create_params.py
index b4f04d5443a..6f366cbf980 100644
--- a/src/cloudflare/types/alerting/policy_create_params.py
+++ b/src/cloudflare/types/alerting/policy_create_params.py
@@ -4,8 +4,8 @@
from typing_extensions import Literal, Required, TypedDict
-from .filter_param import FilterParam
from .mechanism_param import MechanismParam
+from .policy_filter_param import PolicyFilterParam
__all__ = ["PolicyCreateParams"]
@@ -94,7 +94,7 @@ class PolicyCreateParams(TypedDict, total=False):
description: str
"""Optional description for the Notification policy."""
- filters: FilterParam
+ filters: PolicyFilterParam
"""
Optional filters that allow you to be alerted only on a subset of events for
that alert type based on some criteria. This is only available for select alert
diff --git a/src/cloudflare/types/alerting/filter.py b/src/cloudflare/types/alerting/policy_filter.py
similarity index 98%
rename from src/cloudflare/types/alerting/filter.py
rename to src/cloudflare/types/alerting/policy_filter.py
index 698d92331be..1206dbd5725 100644
--- a/src/cloudflare/types/alerting/filter.py
+++ b/src/cloudflare/types/alerting/policy_filter.py
@@ -5,10 +5,10 @@
from ..._models import BaseModel
-__all__ = ["Filter"]
+__all__ = ["PolicyFilter"]
-class Filter(BaseModel):
+class PolicyFilter(BaseModel):
actions: Optional[List[str]] = None
"""Usage depends on specific alert type"""
diff --git a/src/cloudflare/types/alerting/filter_param.py b/src/cloudflare/types/alerting/policy_filter_param.py
similarity index 97%
rename from src/cloudflare/types/alerting/filter_param.py
rename to src/cloudflare/types/alerting/policy_filter_param.py
index 12665020ea4..bf852b4099d 100644
--- a/src/cloudflare/types/alerting/filter_param.py
+++ b/src/cloudflare/types/alerting/policy_filter_param.py
@@ -5,10 +5,10 @@
from typing import List
from typing_extensions import Literal, TypedDict
-__all__ = ["FilterParam"]
+__all__ = ["PolicyFilterParam"]
-class FilterParam(TypedDict, total=False):
+class PolicyFilterParam(TypedDict, total=False):
actions: List[str]
"""Usage depends on specific alert type"""
diff --git a/src/cloudflare/types/alerting/policy_param.py b/src/cloudflare/types/alerting/policy_param.py
index 5a414759d04..fc24717f614 100644
--- a/src/cloudflare/types/alerting/policy_param.py
+++ b/src/cloudflare/types/alerting/policy_param.py
@@ -4,8 +4,8 @@
from typing_extensions import Literal, TypedDict
-from .filter_param import FilterParam
from .mechanism_param import MechanismParam
+from .policy_filter_param import PolicyFilterParam
__all__ = ["PolicyParam"]
@@ -80,7 +80,7 @@ class PolicyParam(TypedDict, total=False):
enabled: bool
"""Whether or not the Notification policy is enabled."""
- filters: FilterParam
+ filters: PolicyFilterParam
"""
Optional filters that allow you to be alerted only on a subset of events for
that alert type based on some criteria. This is only available for select alert
diff --git a/src/cloudflare/types/alerting/policy_update_params.py b/src/cloudflare/types/alerting/policy_update_params.py
index 7d1258c2bc5..ff4d371d9f3 100644
--- a/src/cloudflare/types/alerting/policy_update_params.py
+++ b/src/cloudflare/types/alerting/policy_update_params.py
@@ -4,8 +4,8 @@
from typing_extensions import Literal, Required, TypedDict
-from .filter_param import FilterParam
from .mechanism_param import MechanismParam
+from .policy_filter_param import PolicyFilterParam
__all__ = ["PolicyUpdateParams"]
@@ -83,7 +83,7 @@ class PolicyUpdateParams(TypedDict, total=False):
enabled: bool
"""Whether or not the Notification policy is enabled."""
- filters: FilterParam
+ filters: PolicyFilterParam
"""
Optional filters that allow you to be alerted only on a subset of events for
that alert type based on some criteria. This is only available for select alert
diff --git a/src/cloudflare/types/filter_create_response.py b/src/cloudflare/types/filter_create_response.py
index 19476b27c9b..410ac59aed1 100644
--- a/src/cloudflare/types/filter_create_response.py
+++ b/src/cloudflare/types/filter_create_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .filter import Filter
+from .firewall_filter import FirewallFilter
__all__ = ["FilterCreateResponse"]
-FilterCreateResponse = List[Filter]
+FilterCreateResponse = List[FirewallFilter]
diff --git a/src/cloudflare/types/filter_param.py b/src/cloudflare/types/filter_param.py
deleted file mode 100644
index 404a8bda3c9..00000000000
--- a/src/cloudflare/types/filter_param.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import TypedDict
-
-__all__ = ["FilterParam"]
-
-
-class FilterParam(TypedDict, total=False):
- description: str
- """An informative summary of the filter."""
-
- expression: str
- """The filter expression.
-
- For more information, refer to
- [Expressions](https://developers.cloudflare.com/ruleset-engine/rules-language/expressions/).
- """
-
- paused: bool
- """When true, indicates that the filter is currently paused."""
-
- ref: str
- """A short reference tag. Allows you to select related filters."""
diff --git a/src/cloudflare/types/firewall/__init__.py b/src/cloudflare/types/firewall/__init__.py
index 3d4a4996dc9..bf5c4b7af42 100644
--- a/src/cloudflare/types/firewall/__init__.py
+++ b/src/cloudflare/types/firewall/__init__.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from .rule import Rule as Rule
from .urls import URLs as URLs
from .lockdown import Lockdown as Lockdown
from .products import Products as Products
from .configuration import Configuration as Configuration
+from .firewall_rule import FirewallRule as FirewallRule
from .deleted_filter import DeletedFilter as DeletedFilter
from .rule_get_params import RuleGetParams as RuleGetParams
from .rule_edit_params import RuleEditParams as RuleEditParams
diff --git a/src/cloudflare/types/firewall/rule.py b/src/cloudflare/types/firewall/firewall_rule.py
similarity index 88%
rename from src/cloudflare/types/firewall/rule.py
rename to src/cloudflare/types/firewall/firewall_rule.py
index 0e1466dd9ac..1c963dbebd5 100644
--- a/src/cloudflare/types/firewall/rule.py
+++ b/src/cloudflare/types/firewall/firewall_rule.py
@@ -2,18 +2,18 @@
from typing import List, Union, Optional
-from . import filter
from ..action import Action
from .products import Products
from ..._models import BaseModel
from .deleted_filter import DeletedFilter
+from ..firewall_filter import FirewallFilter
-__all__ = ["Rule", "Filter"]
+__all__ = ["FirewallRule", "Filter"]
-Filter = Union[filter.Filter, DeletedFilter]
+Filter = Union[FirewallFilter, DeletedFilter]
-class Rule(BaseModel):
+class FirewallRule(BaseModel):
id: Optional[str] = None
"""The unique identifier of the firewall rule."""
diff --git a/src/cloudflare/types/firewall/rule_create_response.py b/src/cloudflare/types/firewall/rule_create_response.py
index 3d4d151f293..9e9e460a11f 100644
--- a/src/cloudflare/types/firewall/rule_create_response.py
+++ b/src/cloudflare/types/firewall/rule_create_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .rule import Rule
+from .firewall_rule import FirewallRule
__all__ = ["RuleCreateResponse"]
-RuleCreateResponse = List[Rule]
+RuleCreateResponse = List[FirewallRule]
diff --git a/src/cloudflare/types/firewall/rule_edit_response.py b/src/cloudflare/types/firewall/rule_edit_response.py
index 70ce8c60fcf..7c461c4190f 100644
--- a/src/cloudflare/types/firewall/rule_edit_response.py
+++ b/src/cloudflare/types/firewall/rule_edit_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .rule import Rule
+from .firewall_rule import FirewallRule
__all__ = ["RuleEditResponse"]
-RuleEditResponse = List[Rule]
+RuleEditResponse = List[FirewallRule]
diff --git a/src/cloudflare/types/firewall/waf/__init__.py b/src/cloudflare/types/firewall/waf/__init__.py
index 7f001fa49d4..af8641a58cd 100644
--- a/src/cloudflare/types/firewall/waf/__init__.py
+++ b/src/cloudflare/types/firewall/waf/__init__.py
@@ -3,9 +3,8 @@
from __future__ import annotations
from .urls import URLs as URLs
-from .rules import Rules as Rules
from .override import Override as Override
-from .rules_param import RulesParam as RulesParam
+from .waf_rule import WAFRule as WAFRule
from .rewrite_action import RewriteAction as RewriteAction
from .package_list_params import PackageListParams as PackageListParams
from .override_list_params import OverrideListParams as OverrideListParams
diff --git a/src/cloudflare/types/firewall/waf/override.py b/src/cloudflare/types/firewall/waf/override.py
index 07b4349d841..134d259f80b 100644
--- a/src/cloudflare/types/firewall/waf/override.py
+++ b/src/cloudflare/types/firewall/waf/override.py
@@ -3,7 +3,7 @@
from typing import Dict, List, Optional
from .urls import URLs
-from .rules import Rules
+from .waf_rule import WAFRule
from ...._models import BaseModel
from .rewrite_action import RewriteAction
@@ -42,7 +42,7 @@ class Override(BaseModel):
by the action configured in this object.
"""
- rules: Optional[Rules] = None
+ rules: Optional[WAFRule] = None
"""An object that allows you to override the action of specific WAF rules.
Each key of this object must be the ID of a WAF rule, and each value must be a
diff --git a/src/cloudflare/types/firewall/waf/packages/__init__.py b/src/cloudflare/types/firewall/waf/packages/__init__.py
index bcc16062cbc..2610fbd1ed9 100644
--- a/src/cloudflare/types/firewall/waf/packages/__init__.py
+++ b/src/cloudflare/types/firewall/waf/packages/__init__.py
@@ -2,13 +2,13 @@
from __future__ import annotations
-from .rule import Rule as Rule
from .group import Group as Group
from .rule_edit_params import RuleEditParams as RuleEditParams
from .rule_list_params import RuleListParams as RuleListParams
from .group_edit_params import GroupEditParams as GroupEditParams
from .group_list_params import GroupListParams as GroupListParams
from .rule_edit_response import RuleEditResponse as RuleEditResponse
+from .rule_list_response import RuleListResponse as RuleListResponse
from .allowed_modes_anomaly import AllowedModesAnomaly as AllowedModesAnomaly
from .unnamed_schema_ref_532d8b97684c9032dd36bae8acddebf5 import (
UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5 as UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5,
diff --git a/src/cloudflare/types/firewall/waf/packages/rule.py b/src/cloudflare/types/firewall/waf/packages/rule_list_response.py
similarity index 95%
rename from src/cloudflare/types/firewall/waf/packages/rule.py
rename to src/cloudflare/types/firewall/waf/packages/rule_list_response.py
index 055ec395b62..602e3769254 100644
--- a/src/cloudflare/types/firewall/waf/packages/rule.py
+++ b/src/cloudflare/types/firewall/waf/packages/rule_list_response.py
@@ -8,7 +8,7 @@
from .unnamed_schema_ref_532d8b97684c9032dd36bae8acddebf5 import UnnamedSchemaRef532d8b97684c9032dd36bae8acddebf5
__all__ = [
- "Rule",
+ "RuleListResponse",
"WAFManagedRulesAnomalyRule",
"WAFManagedRulesTraditionalDenyRule",
"WAFManagedRulesTraditionalAllowRule",
@@ -101,4 +101,6 @@ class WAFManagedRulesTraditionalAllowRule(BaseModel):
"""The order in which the individual WAF rule is executed within its rule group."""
-Rule = Union[WAFManagedRulesAnomalyRule, WAFManagedRulesTraditionalDenyRule, WAFManagedRulesTraditionalAllowRule]
+RuleListResponse = Union[
+ WAFManagedRulesAnomalyRule, WAFManagedRulesTraditionalDenyRule, WAFManagedRulesTraditionalAllowRule
+]
diff --git a/src/cloudflare/types/firewall/waf/rules_param.py b/src/cloudflare/types/firewall/waf/rules_param.py
deleted file mode 100644
index bc58e616739..00000000000
--- a/src/cloudflare/types/firewall/waf/rules_param.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Dict
-from typing_extensions import Literal
-
-__all__ = ["RulesParam"]
-
-RulesParam = Dict[str, Literal["challenge", "block", "simulate", "disable", "default"]]
diff --git a/src/cloudflare/types/firewall/waf/rules.py b/src/cloudflare/types/firewall/waf/waf_rule.py
similarity index 58%
rename from src/cloudflare/types/firewall/waf/rules.py
rename to src/cloudflare/types/firewall/waf/waf_rule.py
index 280b7e5402c..d6fea426df4 100644
--- a/src/cloudflare/types/firewall/waf/rules.py
+++ b/src/cloudflare/types/firewall/waf/waf_rule.py
@@ -3,6 +3,6 @@
from typing import Dict
from typing_extensions import Literal
-__all__ = ["Rules"]
+__all__ = ["WAFRule"]
-Rules = Dict[str, Literal["challenge", "block", "simulate", "disable", "default"]]
+WAFRule = Dict[str, Literal["challenge", "block", "simulate", "disable", "default"]]
diff --git a/src/cloudflare/types/filter.py b/src/cloudflare/types/firewall_filter.py
similarity index 92%
rename from src/cloudflare/types/filter.py
rename to src/cloudflare/types/firewall_filter.py
index c9c204d7ef2..5114c5f9346 100644
--- a/src/cloudflare/types/filter.py
+++ b/src/cloudflare/types/firewall_filter.py
@@ -4,10 +4,10 @@
from .._models import BaseModel
-__all__ = ["Filter"]
+__all__ = ["FirewallFilter"]
-class Filter(BaseModel):
+class FirewallFilter(BaseModel):
id: Optional[str] = None
"""The unique identifier of the filter."""
diff --git a/src/cloudflare/types/magic_network_monitoring/__init__.py b/src/cloudflare/types/magic_network_monitoring/__init__.py
index c9b9699bd17..91b7d5f38cc 100644
--- a/src/cloudflare/types/magic_network_monitoring/__init__.py
+++ b/src/cloudflare/types/magic_network_monitoring/__init__.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from .rule import Rule as Rule
from .configuration import Configuration as Configuration
from .rule_edit_params import RuleEditParams as RuleEditParams
from .config_edit_params import ConfigEditParams as ConfigEditParams
@@ -13,3 +12,4 @@
from .config_create_params import ConfigCreateParams as ConfigCreateParams
from .config_delete_params import ConfigDeleteParams as ConfigDeleteParams
from .config_update_params import ConfigUpdateParams as ConfigUpdateParams
+from .magic_network_monitoring_rule import MagicNetworkMonitoringRule as MagicNetworkMonitoringRule
diff --git a/src/cloudflare/types/magic_network_monitoring/rule.py b/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py
similarity index 94%
rename from src/cloudflare/types/magic_network_monitoring/rule.py
rename to src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py
index 088f05f2dd7..8421ef7df0d 100644
--- a/src/cloudflare/types/magic_network_monitoring/rule.py
+++ b/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py
@@ -4,10 +4,10 @@
from ..._models import BaseModel
-__all__ = ["Rule"]
+__all__ = ["MagicNetworkMonitoringRule"]
-class Rule(BaseModel):
+class MagicNetworkMonitoringRule(BaseModel):
automatic_advertisement: Optional[bool] = None
"""
Toggle on if you would like Cloudflare to automatically advertise the IP
diff --git a/src/cloudflare/types/pcap.py b/src/cloudflare/types/pcap.py
index 9ca480589fc..e7747ac6c7b 100644
--- a/src/cloudflare/types/pcap.py
+++ b/src/cloudflare/types/pcap.py
@@ -3,8 +3,8 @@
from typing import Optional
from typing_extensions import Literal
-from .filter import Filter
from .._models import BaseModel
+from .pcap_filter import PCAPFilter
__all__ = ["PCAP"]
@@ -13,7 +13,7 @@ class PCAP(BaseModel):
id: Optional[str] = None
"""The ID for the packet capture."""
- filter_v1: Optional[Filter] = None
+ filter_v1: Optional[PCAPFilter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
diff --git a/src/cloudflare/types/pcap_create_params.py b/src/cloudflare/types/pcap_create_params.py
index c5e8847a5e8..b7d82a16252 100644
--- a/src/cloudflare/types/pcap_create_params.py
+++ b/src/cloudflare/types/pcap_create_params.py
@@ -5,7 +5,7 @@
from typing import Union
from typing_extensions import Literal, Required, TypedDict
-from .filter_param import FilterParam
+from .pcap_filter_param import PCAPFilterParam
__all__ = ["PCAPCreateParams", "MagicVisibilityPCAPsRequestSimple", "MagicVisibilityPCAPsRequestFull"]
@@ -30,7 +30,7 @@ class MagicVisibilityPCAPsRequestSimple(TypedDict, total=False):
non-sampled packets.
"""
- filter_v1: FilterParam
+ filter_v1: PCAPFilterParam
"""The packet capture filter. When this field is empty, all packets are captured."""
@@ -67,7 +67,7 @@ class MagicVisibilityPCAPsRequestFull(TypedDict, total=False):
This field only applies to `full` packet captures.
"""
- filter_v1: FilterParam
+ filter_v1: PCAPFilterParam
"""The packet capture filter. When this field is empty, all packets are captured."""
packet_limit: float
diff --git a/src/cloudflare/types/pcap_create_response.py b/src/cloudflare/types/pcap_create_response.py
index d572d6dd09f..bc485c792af 100644
--- a/src/cloudflare/types/pcap_create_response.py
+++ b/src/cloudflare/types/pcap_create_response.py
@@ -4,8 +4,8 @@
from typing_extensions import Literal
from .pcap import PCAP
-from .filter import Filter
from .._models import BaseModel
+from .pcap_filter import PCAPFilter
__all__ = ["PCAPCreateResponse", "MagicVisibilityPCAPsResponseFull"]
@@ -36,7 +36,7 @@ class MagicVisibilityPCAPsResponseFull(BaseModel):
This field only applies to `full` packet captures.
"""
- filter_v1: Optional[Filter] = None
+ filter_v1: Optional[PCAPFilter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
diff --git a/src/cloudflare/types/pcap_filter.py b/src/cloudflare/types/pcap_filter.py
new file mode 100644
index 00000000000..a9b2089caaf
--- /dev/null
+++ b/src/cloudflare/types/pcap_filter.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .._models import BaseModel
+
+__all__ = ["PCAPFilter"]
+
+
+class PCAPFilter(BaseModel):
+ destination_address: Optional[str] = None
+ """The destination IP address of the packet."""
+
+ destination_port: Optional[float] = None
+ """The destination port of the packet."""
+
+ protocol: Optional[float] = None
+ """The protocol number of the packet."""
+
+ source_address: Optional[str] = None
+ """The source IP address of the packet."""
+
+ source_port: Optional[float] = None
+ """The source port of the packet."""
diff --git a/src/cloudflare/types/pcap_filter_param.py b/src/cloudflare/types/pcap_filter_param.py
new file mode 100644
index 00000000000..5808477bfc9
--- /dev/null
+++ b/src/cloudflare/types/pcap_filter_param.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["PCAPFilterParam"]
+
+
+class PCAPFilterParam(TypedDict, total=False):
+ destination_address: str
+ """The destination IP address of the packet."""
+
+ destination_port: float
+ """The destination port of the packet."""
+
+ protocol: float
+ """The protocol number of the packet."""
+
+ source_address: str
+ """The source IP address of the packet."""
+
+ source_port: float
+ """The source port of the packet."""
diff --git a/src/cloudflare/types/pcap_get_response.py b/src/cloudflare/types/pcap_get_response.py
index 0bd3141b7cf..90fc82c13c2 100644
--- a/src/cloudflare/types/pcap_get_response.py
+++ b/src/cloudflare/types/pcap_get_response.py
@@ -4,8 +4,8 @@
from typing_extensions import Literal
from .pcap import PCAP
-from .filter import Filter
from .._models import BaseModel
+from .pcap_filter import PCAPFilter
__all__ = ["PCAPGetResponse", "MagicVisibilityPCAPsResponseFull"]
@@ -36,7 +36,7 @@ class MagicVisibilityPCAPsResponseFull(BaseModel):
This field only applies to `full` packet captures.
"""
- filter_v1: Optional[Filter] = None
+ filter_v1: Optional[PCAPFilter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
diff --git a/src/cloudflare/types/pcap_list_response.py b/src/cloudflare/types/pcap_list_response.py
index 6ffa39f90f9..561390a79cc 100644
--- a/src/cloudflare/types/pcap_list_response.py
+++ b/src/cloudflare/types/pcap_list_response.py
@@ -4,8 +4,8 @@
from typing_extensions import Literal
from .pcap import PCAP
-from .filter import Filter
from .._models import BaseModel
+from .pcap_filter import PCAPFilter
__all__ = ["PCAPListResponse", "MagicVisibilityPCAPsResponseFull"]
@@ -36,7 +36,7 @@ class MagicVisibilityPCAPsResponseFull(BaseModel):
This field only applies to `full` packet captures.
"""
- filter_v1: Optional[Filter] = None
+ filter_v1: Optional[PCAPFilter] = None
"""The packet capture filter. When this field is empty, all packets are captured."""
status: Optional[
diff --git a/src/cloudflare/types/rum/__init__.py b/src/cloudflare/types/rum/__init__.py
index 2bbc22ab6a4..870d7373122 100644
--- a/src/cloudflare/types/rum/__init__.py
+++ b/src/cloudflare/types/rum/__init__.py
@@ -2,8 +2,8 @@
from __future__ import annotations
-from .rule import Rule as Rule
from .site import Site as Site
+from .rum_rule import RUMRule as RUMRule
from .rule_create_params import RuleCreateParams as RuleCreateParams
from .rule_list_response import RuleListResponse as RuleListResponse
from .rule_update_params import RuleUpdateParams as RuleUpdateParams
diff --git a/src/cloudflare/types/rum/rule_list_response.py b/src/cloudflare/types/rum/rule_list_response.py
index cc6140acc51..3d8f03f0d73 100644
--- a/src/cloudflare/types/rum/rule_list_response.py
+++ b/src/cloudflare/types/rum/rule_list_response.py
@@ -2,7 +2,7 @@
from typing import List, Optional
-from .rule import Rule
+from .rum_rule import RUMRule
from ..._models import BaseModel
__all__ = ["RuleListResponse", "Ruleset"]
@@ -22,7 +22,7 @@ class Ruleset(BaseModel):
class RuleListResponse(BaseModel):
- rules: Optional[List[Rule]] = None
+ rules: Optional[List[RUMRule]] = None
"""A list of rules."""
ruleset: Optional[Ruleset] = None
diff --git a/src/cloudflare/types/rum/rule.py b/src/cloudflare/types/rum/rum_rule.py
similarity index 93%
rename from src/cloudflare/types/rum/rule.py
rename to src/cloudflare/types/rum/rum_rule.py
index c6badaed59e..b6b43189c9f 100644
--- a/src/cloudflare/types/rum/rule.py
+++ b/src/cloudflare/types/rum/rum_rule.py
@@ -5,10 +5,10 @@
from ..._models import BaseModel
-__all__ = ["Rule"]
+__all__ = ["RUMRule"]
-class Rule(BaseModel):
+class RUMRule(BaseModel):
id: Optional[str] = None
"""The Web Analytics rule identifier."""
diff --git a/src/cloudflare/types/rum/site.py b/src/cloudflare/types/rum/site.py
index 84ccdae3e2b..504caf445d8 100644
--- a/src/cloudflare/types/rum/site.py
+++ b/src/cloudflare/types/rum/site.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from datetime import datetime
-from .rule import Rule
+from .rum_rule import RUMRule
from ..._models import BaseModel
__all__ = ["Site", "Ruleset"]
@@ -31,7 +31,7 @@ class Site(BaseModel):
created: Optional[datetime] = None
- rules: Optional[List[Rule]] = None
+ rules: Optional[List[RUMRule]] = None
"""A list of rules."""
ruleset: Optional[Ruleset] = None
diff --git a/src/cloudflare/types/waiting_rooms/__init__.py b/src/cloudflare/types/waiting_rooms/__init__.py
index aace334e939..08e31f76c0f 100644
--- a/src/cloudflare/types/waiting_rooms/__init__.py
+++ b/src/cloudflare/types/waiting_rooms/__init__.py
@@ -2,11 +2,11 @@
from __future__ import annotations
-from .rule import Rule as Rule
from .event import Event as Event
from .setting import Setting as Setting
from .rule_edit_params import RuleEditParams as RuleEditParams
from .event_edit_params import EventEditParams as EventEditParams
+from .waiting_room_rule import WaitingRoomRule as WaitingRoomRule
from .rule_create_params import RuleCreateParams as RuleCreateParams
from .rule_delete_params import RuleDeleteParams as RuleDeleteParams
from .rule_edit_response import RuleEditResponse as RuleEditResponse
diff --git a/src/cloudflare/types/waiting_rooms/rule_create_response.py b/src/cloudflare/types/waiting_rooms/rule_create_response.py
index 3d4d151f293..c9705035570 100644
--- a/src/cloudflare/types/waiting_rooms/rule_create_response.py
+++ b/src/cloudflare/types/waiting_rooms/rule_create_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .rule import Rule
+from .waiting_room_rule import WaitingRoomRule
__all__ = ["RuleCreateResponse"]
-RuleCreateResponse = List[Rule]
+RuleCreateResponse = List[WaitingRoomRule]
diff --git a/src/cloudflare/types/waiting_rooms/rule_delete_response.py b/src/cloudflare/types/waiting_rooms/rule_delete_response.py
index 2244b7808e6..0dbcc72e87f 100644
--- a/src/cloudflare/types/waiting_rooms/rule_delete_response.py
+++ b/src/cloudflare/types/waiting_rooms/rule_delete_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .rule import Rule
+from .waiting_room_rule import WaitingRoomRule
__all__ = ["RuleDeleteResponse"]
-RuleDeleteResponse = List[Rule]
+RuleDeleteResponse = List[WaitingRoomRule]
diff --git a/src/cloudflare/types/waiting_rooms/rule_edit_response.py b/src/cloudflare/types/waiting_rooms/rule_edit_response.py
index 70ce8c60fcf..0f5c77dfdbc 100644
--- a/src/cloudflare/types/waiting_rooms/rule_edit_response.py
+++ b/src/cloudflare/types/waiting_rooms/rule_edit_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .rule import Rule
+from .waiting_room_rule import WaitingRoomRule
__all__ = ["RuleEditResponse"]
-RuleEditResponse = List[Rule]
+RuleEditResponse = List[WaitingRoomRule]
diff --git a/src/cloudflare/types/waiting_rooms/rule_update_response.py b/src/cloudflare/types/waiting_rooms/rule_update_response.py
index 3c820175df4..775cd3292e4 100644
--- a/src/cloudflare/types/waiting_rooms/rule_update_response.py
+++ b/src/cloudflare/types/waiting_rooms/rule_update_response.py
@@ -2,8 +2,8 @@
from typing import List
-from .rule import Rule
+from .waiting_room_rule import WaitingRoomRule
__all__ = ["RuleUpdateResponse"]
-RuleUpdateResponse = List[Rule]
+RuleUpdateResponse = List[WaitingRoomRule]
diff --git a/src/cloudflare/types/waiting_rooms/rule.py b/src/cloudflare/types/waiting_rooms/waiting_room_rule.py
similarity index 92%
rename from src/cloudflare/types/waiting_rooms/rule.py
rename to src/cloudflare/types/waiting_rooms/waiting_room_rule.py
index a5690941585..1478deef005 100644
--- a/src/cloudflare/types/waiting_rooms/rule.py
+++ b/src/cloudflare/types/waiting_rooms/waiting_room_rule.py
@@ -6,10 +6,10 @@
from ..._models import BaseModel
-__all__ = ["Rule"]
+__all__ = ["WaitingRoomRule"]
-class Rule(BaseModel):
+class WaitingRoomRule(BaseModel):
id: Optional[str] = None
"""The ID of the rule."""
diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py
index 99388c4cccc..9799d01edf7 100644
--- a/src/cloudflare/types/zero_trust/gateway/__init__.py
+++ b/src/cloudflare/types/zero_trust/gateway/__init__.py
@@ -2,7 +2,6 @@
from __future__ import annotations
-from .rule import Rule as Rule
from .lists import Lists as Lists
from .app_type import AppType as AppType
from .category import Category as Category
@@ -10,6 +9,7 @@
from .schedule import Schedule as Schedule
from .gateway_ips import GatewayIPs as GatewayIPs
from .lists_param import ListsParam as ListsParam
+from .gateway_rule import GatewayRule as GatewayRule
from .rule_setting import RuleSetting as RuleSetting
from .tls_settings import TLSSettings as TLSSettings
from .fips_settings import FipsSettings as FipsSettings
diff --git a/src/cloudflare/types/zero_trust/gateway/rule.py b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py
similarity index 97%
rename from src/cloudflare/types/zero_trust/gateway/rule.py
rename to src/cloudflare/types/zero_trust/gateway/gateway_rule.py
index 370988f14f5..d0db3cbe8e9 100644
--- a/src/cloudflare/types/zero_trust/gateway/rule.py
+++ b/src/cloudflare/types/zero_trust/gateway/gateway_rule.py
@@ -9,10 +9,10 @@
from .rule_setting import RuleSetting
from .gateway_filter import GatewayFilter
-__all__ = ["Rule"]
+__all__ = ["GatewayRule"]
-class Rule(BaseModel):
+class GatewayRule(BaseModel):
id: Optional[str] = None
"""The API resource UUID."""
diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py
index a57f861521b..5ac53c629f5 100644
--- a/tests/api_resources/firewall/test_rules.py
+++ b/tests/api_resources/firewall/test_rules.py
@@ -11,7 +11,7 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.firewall import (
- Rule,
+ FirewallRule,
RuleEditResponse,
RuleCreateResponse,
)
@@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -90,7 +90,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -104,7 +104,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -131,7 +131,7 @@ def test_method_list(self, client: Cloudflare) -> None:
rule = client.firewall.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -145,7 +145,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
paused=False,
per_page=5,
)
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -157,7 +157,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -169,7 +169,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -188,7 +188,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
"372e67954025e0ba6aaa6d586b9e0b60",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -198,7 +198,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
delete_filter_if_unused=True,
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -211,7 +211,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -224,7 +224,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -307,7 +307,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
path_id="372e67954025e0ba6aaa6d586b9e0b60",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -317,7 +317,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
path_id="372e67954025e0ba6aaa6d586b9e0b60",
query_id="372e67954025e0ba6aaa6d586b9e0b60",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -330,7 +330,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -343,7 +343,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -421,7 +421,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -435,7 +435,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -449,7 +449,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -476,7 +476,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.firewall.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -490,7 +490,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
paused=False,
per_page=5,
)
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -502,7 +502,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -514,7 +514,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -533,7 +533,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
"372e67954025e0ba6aaa6d586b9e0b60",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -543,7 +543,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
delete_filter_if_unused=True,
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -556,7 +556,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -569,7 +569,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -652,7 +652,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
path_id="372e67954025e0ba6aaa6d586b9e0b60",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -662,7 +662,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
path_id="372e67954025e0ba6aaa6d586b9e0b60",
query_id="372e67954025e0ba6aaa6d586b9e0b60",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -675,7 +675,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -688,7 +688,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(FirewallRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/firewall/waf/packages/test_rules.py b/tests/api_resources/firewall/waf/packages/test_rules.py
index 1443b99a897..a480bf32926 100644
--- a/tests/api_resources/firewall/waf/packages/test_rules.py
+++ b/tests/api_resources/firewall/waf/packages/test_rules.py
@@ -11,7 +11,10 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
from cloudflare.types.shared import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
-from cloudflare.types.firewall.waf.packages import Rule, RuleEditResponse
+from cloudflare.types.firewall.waf.packages import (
+ RuleEditResponse,
+ RuleListResponse,
+)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -26,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None:
"a25a9a7e9c00afc1fb2e0245519d725b",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -44,7 +47,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
per_page=5,
priority="string",
)
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -57,7 +60,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -70,7 +73,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -239,7 +242,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
"a25a9a7e9c00afc1fb2e0245519d725b",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -257,7 +260,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
per_page=5,
priority="string",
)
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -270,7 +273,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -283,7 +286,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[Rule], rule, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py
index 05abf88db38..2d5ba503284 100644
--- a/tests/api_resources/magic_network_monitoring/test_rules.py
+++ b/tests/api_resources/magic_network_monitoring/test_rules.py
@@ -11,7 +11,7 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
from cloudflare.types.magic_network_monitoring import (
- Rule,
+ MagicNetworkMonitoringRule,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -27,7 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -40,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -53,7 +53,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -73,7 +73,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -86,7 +86,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -99,7 +99,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -118,7 +118,7 @@ def test_method_list(self, client: Cloudflare) -> None:
rule = client.magic_network_monitoring.rules.list(
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(SyncSinglePage[Optional[Rule]], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -130,7 +130,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Optional[Rule]], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -142,7 +142,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Optional[Rule]], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -162,7 +162,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -176,7 +176,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -190,7 +190,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -219,7 +219,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -233,7 +233,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -247,7 +247,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -275,7 +275,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -288,7 +288,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -301,7 +301,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -331,7 +331,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -344,7 +344,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -357,7 +357,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -377,7 +377,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -390,7 +390,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -403,7 +403,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -422,7 +422,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.magic_network_monitoring.rules.list(
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(AsyncSinglePage[Optional[Rule]], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -434,7 +434,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Optional[Rule]], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -446,7 +446,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Optional[Rule]], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -466,7 +466,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -480,7 +480,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -494,7 +494,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -523,7 +523,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
account_id="6f91088a406011ed95aed352566e8d4c",
body={},
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -537,7 +537,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -551,7 +551,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -579,7 +579,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"2890e6fa406311ed9b5a23f70f6fb8cf",
account_id="6f91088a406011ed95aed352566e8d4c",
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -592,7 +592,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -605,7 +605,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/rum/test_rules.py b/tests/api_resources/rum/test_rules.py
index 260912c362c..0250949fba5 100644
--- a/tests/api_resources/rum/test_rules.py
+++ b/tests/api_resources/rum/test_rules.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.rum import Rule, RuleListResponse, RuleDeleteResponse
+from cloudflare.types.rum import RUMRule, RuleListResponse, RuleDeleteResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -24,7 +24,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -37,7 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
is_paused=False,
paths=["*"],
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -63,7 +63,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -90,7 +90,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -104,7 +104,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
is_paused=False,
paths=["*"],
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -118,7 +118,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -132,7 +132,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -287,7 +287,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -300,7 +300,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
is_paused=False,
paths=["*"],
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -313,7 +313,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -326,7 +326,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -353,7 +353,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
ruleset_id="f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -367,7 +367,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
is_paused=False,
paths=["*"],
)
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -381,7 +381,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -395,7 +395,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Optional[Rule], rule, path=["response"])
+ assert_matches_type(Optional[RUMRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py
index 59d77155cba..f2a01000797 100644
--- a/tests/api_resources/test_filters.py
+++ b/tests/api_resources/test_filters.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types import (
- Filter,
+ FirewallFilter,
FilterCreateResponse,
)
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
@@ -75,7 +75,7 @@ def test_method_update(self, client: Cloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -103,7 +103,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -130,7 +130,7 @@ def test_method_list(self, client: Cloudflare) -> None:
filter = client.filters.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -145,7 +145,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
per_page=5,
ref="FIL-100",
)
- assert_matches_type(SyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -157,7 +157,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -169,7 +169,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(SyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -189,7 +189,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -203,7 +203,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -217,7 +217,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -245,7 +245,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"372e67954025e0ba6aaa6d586b9e0b61",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -258,7 +258,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -271,7 +271,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -348,7 +348,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -362,7 +362,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -376,7 +376,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -403,7 +403,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
filter = await async_client.filters.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -418,7 +418,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
per_page=5,
ref="FIL-100",
)
- assert_matches_type(AsyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -430,7 +430,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -442,7 +442,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(AsyncV4PagePaginationArray[Filter], filter, path=["response"])
+ assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -462,7 +462,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
body={},
)
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -476,7 +476,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -490,7 +490,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -518,7 +518,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"372e67954025e0ba6aaa6d586b9e0b61",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -531,7 +531,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -544,7 +544,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
filter = await response.parse()
- assert_matches_type(Filter, filter, path=["response"])
+ assert_matches_type(FirewallFilter, filter, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py
index bed2f89e607..72a6abdb2e7 100644
--- a/tests/api_resources/waiting_rooms/test_rules.py
+++ b/tests/api_resources/waiting_rooms/test_rules.py
@@ -11,7 +11,7 @@
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
from cloudflare.types.waiting_rooms import (
- Rule,
+ WaitingRoomRule,
RuleEditResponse,
RuleCreateResponse,
RuleDeleteResponse,
@@ -228,7 +228,7 @@ def test_method_list(self, client: Cloudflare) -> None:
"699d98642c564d2e855e9661899b7252",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(SyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -241,7 +241,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -254,7 +254,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[WaitingRoomRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -642,7 +642,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
"699d98642c564d2e855e9661899b7252",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(AsyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -655,7 +655,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -668,7 +668,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[WaitingRoomRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py
index 022d3c5740e..c94520397d3 100644
--- a/tests/api_resources/zero_trust/gateway/test_rules.py
+++ b/tests/api_resources/zero_trust/gateway/test_rules.py
@@ -12,7 +12,7 @@
from cloudflare.pagination import SyncSinglePage, AsyncSinglePage
from cloudflare.types.shared import UnnamedSchemaRef9444735ca60712dbcf8afd832eb5716a
from cloudflare.types.zero_trust.gateway import (
- Rule,
+ GatewayRule,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None:
action="allow",
name="block bad websites",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -142,7 +142,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
},
traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10',
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -156,7 +156,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -170,7 +170,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -193,7 +193,7 @@ def test_method_update(self, client: Cloudflare) -> None:
action="allow",
name="block bad websites",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -307,7 +307,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
},
traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10',
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -322,7 +322,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -337,7 +337,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -366,7 +366,7 @@ def test_method_list(self, client: Cloudflare) -> None:
rule = client.zero_trust.gateway.rules.list(
account_id="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(SyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[GatewayRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -378,7 +378,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[GatewayRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -390,7 +390,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(SyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(SyncSinglePage[GatewayRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -466,7 +466,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
account_id="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -479,7 +479,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -492,7 +492,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -523,7 +523,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
action="allow",
name="block bad websites",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -636,7 +636,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
},
traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10',
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -650,7 +650,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -664,7 +664,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -687,7 +687,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
action="allow",
name="block bad websites",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -801,7 +801,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
},
traffic='http.request.uri matches ".*a/partial/uri.*" and http.request.host in $01302951-49f9-47c9-a400-0297e60b6a10',
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -816,7 +816,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -831,7 +831,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -860,7 +860,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
rule = await async_client.zero_trust.gateway.rules.list(
account_id="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(AsyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[GatewayRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -872,7 +872,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[GatewayRule], rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -884,7 +884,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(AsyncSinglePage[Rule], rule, path=["response"])
+ assert_matches_type(AsyncSinglePage[GatewayRule], rule, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -960,7 +960,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
account_id="699d98642c564d2e855e9661899b7252",
)
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -973,7 +973,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -986,7 +986,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rule = await response.parse()
- assert_matches_type(Rule, rule, path=["response"])
+ assert_matches_type(GatewayRule, rule, path=["response"])
assert cast(Any, response.is_closed) is True