From e5d88458c90569e470a0acd531493aa8da85fe28 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Fri, 22 Mar 2024 05:08:36 +0000
Subject: [PATCH] feat(api): update via SDK Studio (#169)
---
api.md | 264 +++++------
src/cloudflare/_client.py | 32 +-
src/cloudflare/resources/__init__.py | 56 +--
src/cloudflare/resources/alerting/__init__.py | 68 ++-
src/cloudflare/resources/alerting/alerting.py | 136 +++++-
.../resources/alerting/available_alerts.py | 168 +++++++
.../{v3 => }/destinations/__init__.py | 0
.../{v3 => }/destinations/destinations.py | 4 +-
.../{v3 => }/destinations/eligible.py | 14 +-
.../{v3 => }/destinations/pagerduty.py | 14 +-
.../{v3 => }/destinations/webhooks.py | 16 +-
.../alerting/{v3/histories.py => history.py} | 70 +--
.../resources/alerting/{v3 => }/policies.py | 16 +-
.../resources/alerting/v3/__init__.py | 61 ---
src/cloudflare/resources/alerting/v3/v3.py | 265 -----------
.../resources/email_routing/__init__.py | 54 ++-
.../email_routing/{routing => }/addresses.py | 18 +-
.../email_routing/{routing => }/dns.py | 14 +-
.../resources/email_routing/email_routing.py | 400 +++++++++++++++-
.../email_routing/routing/__init__.py | 61 ---
.../email_routing/routing/routing.py | 441 ------------------
.../{routing => }/rules/__init__.py | 0
.../{routing => }/rules/catch_alls.py | 16 +-
.../{routing => }/rules/rules.py | 18 +-
src/cloudflare/resources/logs/__init__.py | 24 +-
src/cloudflare/resources/logs/logs.py | 36 +-
src/cloudflare/resources/logs/rayid.py | 56 +--
.../resources/magic_transit/sites/__init__.py | 48 +-
.../resources/magic_transit/sites/lans.py | 104 ++---
.../resources/magic_transit/sites/sites.py | 72 +--
.../resources/magic_transit/sites/wans.py | 104 ++---
src/cloudflare/resources/pcaps/__init__.py | 52 +--
.../pcaps/{downloads.py => download.py} | 54 +--
.../pcaps/{ownerships.py => ownership.py} | 78 ++--
src/cloudflare/resources/pcaps/pcaps.py | 78 ++--
.../{available_plans.py => plans.py} | 72 +--
...{available_rate_plans.py => rate_plans.py} | 64 +--
.../resources/rulesets/versions/__init__.py | 26 +-
.../versions/{by_tags.py => by_tag.py} | 54 +--
.../resources/rulesets/versions/versions.py | 38 +-
src/cloudflare/resources/rum/__init__.py | 26 +-
src/cloudflare/resources/rum/rum.py | 38 +-
.../rum/{site_infos.py => site_info.py} | 86 ++--
src/cloudflare/resources/stream/__init__.py | 134 +++---
.../resources/stream/{clips.py => clip.py} | 54 +--
.../resources/stream/{copies.py => copy.py} | 54 +--
.../{direct_uploads.py => direct_upload.py} | 54 +--
.../resources/stream/{embeds.py => embed.py} | 54 +--
src/cloudflare/resources/stream/stream.py | 196 ++++----
.../resources/stream/{tokens.py => token.py} | 54 +--
.../dispatch/namespaces/scripts/__init__.py | 28 ++
.../scripts/{content => }/bindings.py | 12 +-
.../{content/scripts.py => content.py} | 88 ++--
.../namespaces/scripts/content/__init__.py | 61 ---
.../namespaces/scripts/content/content.py | 144 ------
.../dispatch/namespaces/scripts/scripts.py | 65 ++-
.../scripts/{content => }/settings.py | 16 +-
.../resources/zero_trust/devices/__init__.py | 56 +--
.../resources/zero_trust/devices/devices.py | 80 ++--
.../devices/{revokes.py => revoke.py} | 54 +--
.../devices/{unrevokes.py => unrevoke.py} | 54 +--
.../resources/zones/settings/__init__.py | 24 +-
.../resources/zones/settings/settings.py | 36 +-
.../resources/zones/settings/webp.py | 60 +--
src/cloudflare/types/__init__.py | 7 +-
src/cloudflare/types/alerting/__init__.py | 11 +-
.../types/alerting/{v3 => }/aaa_history.py | 2 +-
.../types/alerting/{v3 => }/aaa_policies.py | 2 +-
...se.py => available_alert_list_response.py} | 4 +-
.../{v3 => }/destinations/__init__.py | 0
.../{v3 => }/destinations/aaa_pagerduty.py | 2 +-
.../{v3 => }/destinations/aaa_webhooks.py | 2 +-
.../destinations/eligible_get_response.py | 0
.../destinations/pagerduty_create_response.py | 2 +-
.../destinations/pagerduty_delete_response.py | 0
.../destinations/pagerduty_get_response.py | 0
.../destinations/pagerduty_link_response.py | 2 +-
.../destinations/webhook_create_params.py | 0
.../destinations/webhook_create_response.py | 2 +-
.../destinations/webhook_delete_response.py | 0
.../destinations/webhook_list_response.py | 0
.../destinations/webhook_update_params.py | 0
.../destinations/webhook_update_response.py | 2 +-
.../alerting/{v3 => }/history_list_params.py | 2 +-
.../alerting/{v3 => }/policy_create_params.py | 0
.../{v3 => }/policy_create_response.py | 2 +-
.../{v3 => }/policy_delete_response.py | 0
.../alerting/{v3 => }/policy_list_response.py | 0
.../alerting/{v3 => }/policy_update_params.py | 0
.../{v3 => }/policy_update_response.py | 2 +-
src/cloudflare/types/alerting/v3/__init__.py | 13 -
.../types/email_routing/__init__.py | 19 +-
.../{routing => }/address_create_params.py | 0
.../{routing => }/address_create_response.py | 2 +-
.../{routing => }/address_delete_response.py | 2 +-
.../{routing => }/address_get_response.py | 2 +-
.../{routing => }/address_list_params.py | 0
.../{routing => }/address_list_response.py | 2 +-
.../{routing => }/dns_get_response.py | 0
.../{routing => }/email_dns_record.py | 2 +-
.../types/email_routing/routing/__init__.py | 20 -
.../{routing => }/rule_create_params.py | 0
.../{routing => }/rule_create_response.py | 2 +-
.../{routing => }/rule_delete_response.py | 2 +-
.../{routing => }/rule_get_response.py | 2 +-
.../{routing => }/rule_list_params.py | 0
.../{routing => }/rule_list_response.py | 2 +-
.../{routing => }/rule_update_params.py | 0
.../{routing => }/rule_update_response.py | 2 +-
.../{routing => }/rules/__init__.py | 0
.../rules/catch_all_update_params.py | 0
.../rules/email_catch_all_rule.py | 2 +-
...e.py => email_routing_disable_response.py} | 6 +-
...se.py => email_routing_enable_response.py} | 6 +-
...ponse.py => email_routing_get_response.py} | 6 +-
src/cloudflare/types/logs/__init__.py | 4 +-
src/cloudflare/types/logs/rayid_get_params.py | 4 +-
.../types/logs/rayid_get_response.py | 4 +-
.../types/magic_transit/sites/__init__.py | 28 +-
.../magic_transit/sites/acl_create_params.py | 10 +-
.../sites/acl_create_response.py | 10 +-
.../sites/acl_delete_response.py | 10 +-
.../magic_transit/sites/acl_get_response.py | 10 +-
.../magic_transit/sites/acl_list_response.py | 10 +-
.../magic_transit/sites/acl_update_params.py | 10 +-
.../sites/acl_update_response.py | 10 +-
.../magic_transit/sites/lan_create_params.py | 46 +-
.../sites/lan_create_response.py | 46 +-
.../sites/lan_delete_response.py | 46 +-
.../magic_transit/sites/lan_get_response.py | 46 +-
.../magic_transit/sites/lan_list_response.py | 46 +-
.../magic_transit/sites/lan_update_params.py | 46 +-
.../sites/lan_update_response.py | 46 +-
.../magic_transit/sites/wan_create_params.py | 12 +-
.../sites/wan_create_response.py | 12 +-
.../sites/wan_delete_response.py | 12 +-
.../magic_transit/sites/wan_get_response.py | 12 +-
.../magic_transit/sites/wan_list_response.py | 12 +-
.../magic_transit/sites/wan_update_params.py | 12 +-
.../sites/wan_update_response.py | 12 +-
...list_response.py => plan_list_response.py} | 4 +-
..._response.py => rate_plan_get_response.py} | 14 +-
.../dispatch/namespaces/scripts/__init__.py | 6 +
.../{content => }/binding_get_response.py | 2 +-
.../namespaces/scripts/content/__init__.py | 9 -
...ate_params.py => content_update_params.py} | 8 +-
.../{content => }/setting_edit_params.py | 0
.../{content => }/setting_edit_response.py | 2 +-
.../{content => }/setting_get_response.py | 2 +-
.../access/logs/access_access_requests.py | 4 +-
.../types/zones/setting_edit_params.py | 4 +-
.../types/zones/setting_edit_response.py | 4 +-
.../types/zones/setting_get_response.py | 4 +-
.../types/zones/settings/__init__.py | 6 +-
.../types/zones/settings/webp_edit_params.py | 4 +-
.../types/zones/settings/zones_webp.py | 4 +-
.../types/zones/settings/zones_webp_param.py | 4 +-
.../alerting/{v3 => destinations}/__init__.py | 0
.../{v3 => }/destinations/test_eligible.py | 18 +-
.../{v3 => }/destinations/test_pagerduty.py | 70 +--
.../{v3 => }/destinations/test_webhooks.py | 102 ++--
.../{test_v3.py => test_available_alerts.py} | 42 +-
.../{v3/test_histories.py => test_history.py} | 26 +-
.../alerting/{v3 => }/test_policies.py | 102 ++--
.../email_routing/routing/__init__.py | 1 -
.../email_routing/routing/rules/__init__.py | 1 -
.../rules}/__init__.py | 0
.../{routing => }/rules/test_catch_alls.py | 38 +-
.../{routing => }/test_addresses.py | 78 ++--
.../email_routing/{routing => }/test_dns.py | 18 +-
.../email_routing/{routing => }/test_rules.py | 106 ++---
tests/api_resources/logs/test_rayid.py | 22 +-
.../magic_transit/sites/test_lans.py | 82 ++--
.../magic_transit/sites/test_wans.py | 82 ++--
.../{test_downloads.py => test_download.py} | 24 +-
.../{test_ownerships.py => test_ownership.py} | 72 +--
.../{test_by_tags.py => test_by_tag.py} | 32 +-
.../{test_site_infos.py => test_site_info.py} | 108 ++---
.../stream/{test_clips.py => test_clip.py} | 24 +-
.../stream/{test_copies.py => test_copy.py} | 24 +-
...irect_uploads.py => test_direct_upload.py} | 24 +-
.../stream/{test_embeds.py => test_embed.py} | 24 +-
.../stream/{test_tokens.py => test_token.py} | 28 +-
.../test_routing.py => test_email_routing.py} | 114 ++---
...{test_available_plans.py => test_plans.py} | 82 ++--
...lable_rate_plans.py => test_rate_plans.py} | 42 +-
.../namespaces/scripts/content/__init__.py | 1 -
.../scripts/{content => }/test_bindings.py | 34 +-
.../test_scripts.py => test_content.py} | 180 ++++---
.../scripts/{content => }/test_settings.py | 266 +++++------
.../{test_revokes.py => test_revoke.py} | 16 +-
.../{test_unrevokes.py => test_unrevoke.py} | 16 +-
.../api_resources/zones/settings/test_webp.py | 30 +-
193 files changed, 3535 insertions(+), 3821 deletions(-)
create mode 100644 src/cloudflare/resources/alerting/available_alerts.py
rename src/cloudflare/resources/alerting/{v3 => }/destinations/__init__.py (100%)
rename src/cloudflare/resources/alerting/{v3 => }/destinations/destinations.py (97%)
rename src/cloudflare/resources/alerting/{v3 => }/destinations/eligible.py (94%)
rename src/cloudflare/resources/alerting/{v3 => }/destinations/pagerduty.py (98%)
rename src/cloudflare/resources/alerting/{v3 => }/destinations/webhooks.py (98%)
rename src/cloudflare/resources/alerting/{v3/histories.py => history.py} (78%)
rename src/cloudflare/resources/alerting/{v3 => }/policies.py (99%)
delete mode 100644 src/cloudflare/resources/alerting/v3/__init__.py
delete mode 100644 src/cloudflare/resources/alerting/v3/v3.py
rename src/cloudflare/resources/email_routing/{routing => }/addresses.py (97%)
rename src/cloudflare/resources/email_routing/{routing => }/dns.py (93%)
delete mode 100644 src/cloudflare/resources/email_routing/routing/__init__.py
delete mode 100644 src/cloudflare/resources/email_routing/routing/routing.py
rename src/cloudflare/resources/email_routing/{routing => }/rules/__init__.py (100%)
rename src/cloudflare/resources/email_routing/{routing => }/rules/catch_alls.py (96%)
rename src/cloudflare/resources/email_routing/{routing => }/rules/rules.py (98%)
rename src/cloudflare/resources/pcaps/{downloads.py => download.py} (78%)
rename src/cloudflare/resources/pcaps/{ownerships.py => ownership.py} (90%)
rename src/cloudflare/resources/{available_plans.py => plans.py} (79%)
rename src/cloudflare/resources/{available_rate_plans.py => rate_plans.py} (65%)
rename src/cloudflare/resources/rulesets/versions/{by_tags.py => by_tag.py} (82%)
rename src/cloudflare/resources/rum/{site_infos.py => site_info.py} (92%)
rename src/cloudflare/resources/stream/{clips.py => clip.py} (89%)
rename src/cloudflare/resources/stream/{copies.py => copy.py} (89%)
rename src/cloudflare/resources/stream/{direct_uploads.py => direct_upload.py} (87%)
rename src/cloudflare/resources/stream/{embeds.py => embed.py} (79%)
rename src/cloudflare/resources/stream/{tokens.py => token.py} (88%)
rename src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/{content => }/bindings.py (94%)
rename src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/{content/scripts.py => content.py} (85%)
delete mode 100644 src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
delete mode 100644 src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/content.py
rename src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/{content => }/settings.py (96%)
rename src/cloudflare/resources/zero_trust/devices/{revokes.py => revoke.py} (79%)
rename src/cloudflare/resources/zero_trust/devices/{unrevokes.py => unrevoke.py} (78%)
rename src/cloudflare/types/alerting/{v3 => }/aaa_history.py (97%)
rename src/cloudflare/types/alerting/{v3 => }/aaa_policies.py (99%)
rename src/cloudflare/types/alerting/{v3_list_response.py => available_alert_list_response.py} (52%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/__init__.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/aaa_pagerduty.py (89%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/aaa_webhooks.py (97%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/eligible_get_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/pagerduty_create_response.py (88%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/pagerduty_delete_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/pagerduty_get_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/pagerduty_link_response.py (87%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/webhook_create_params.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/webhook_create_response.py (87%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/webhook_delete_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/webhook_list_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/webhook_update_params.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/destinations/webhook_update_response.py (87%)
rename src/cloudflare/types/alerting/{v3 => }/history_list_params.py (96%)
rename src/cloudflare/types/alerting/{v3 => }/policy_create_params.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/policy_create_response.py (87%)
rename src/cloudflare/types/alerting/{v3 => }/policy_delete_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/policy_list_response.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/policy_update_params.py (100%)
rename src/cloudflare/types/alerting/{v3 => }/policy_update_response.py (87%)
delete mode 100644 src/cloudflare/types/alerting/v3/__init__.py
rename src/cloudflare/types/email_routing/{routing => }/address_create_params.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/address_create_response.py (96%)
rename src/cloudflare/types/email_routing/{routing => }/address_delete_response.py (96%)
rename src/cloudflare/types/email_routing/{routing => }/address_get_response.py (96%)
rename src/cloudflare/types/email_routing/{routing => }/address_list_params.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/address_list_response.py (96%)
rename src/cloudflare/types/email_routing/{routing => }/dns_get_response.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/email_dns_record.py (97%)
delete mode 100644 src/cloudflare/types/email_routing/routing/__init__.py
rename src/cloudflare/types/email_routing/{routing => }/rule_create_params.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/rule_create_response.py (97%)
rename src/cloudflare/types/email_routing/{routing => }/rule_delete_response.py (97%)
rename src/cloudflare/types/email_routing/{routing => }/rule_get_response.py (97%)
rename src/cloudflare/types/email_routing/{routing => }/rule_list_params.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/rule_list_response.py (97%)
rename src/cloudflare/types/email_routing/{routing => }/rule_update_params.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/rule_update_response.py (97%)
rename src/cloudflare/types/email_routing/{routing => }/rules/__init__.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/rules/catch_all_update_params.py (100%)
rename src/cloudflare/types/email_routing/{routing => }/rules/email_catch_all_rule.py (96%)
rename src/cloudflare/types/{email_routing/routing_get_response.py => email_routing_disable_response.py} (90%)
rename src/cloudflare/types/{email_routing/routing_enable_response.py => email_routing_enable_response.py} (90%)
rename src/cloudflare/types/{email_routing/routing_disable_response.py => email_routing_get_response.py} (90%)
rename src/cloudflare/types/{available_plan_list_response.py => plan_list_response.py} (64%)
rename src/cloudflare/types/{available_rate_plan_get_response.py => rate_plan_get_response.py} (71%)
rename src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/{content => }/binding_get_response.py (99%)
delete mode 100644 src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
rename src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/{content/script_update_params.py => content_update_params.py} (89%)
rename src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/{content => }/setting_edit_params.py (100%)
rename src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/{content => }/setting_edit_response.py (99%)
rename src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/{content => }/setting_get_response.py (99%)
rename tests/api_resources/alerting/{v3 => destinations}/__init__.py (100%)
rename tests/api_resources/alerting/{v3 => }/destinations/test_eligible.py (83%)
rename tests/api_resources/alerting/{v3 => }/destinations/test_pagerduty.py (82%)
rename tests/api_resources/alerting/{v3 => }/destinations/test_webhooks.py (83%)
rename tests/api_resources/alerting/{test_v3.py => test_available_alerts.py} (64%)
rename tests/api_resources/alerting/{v3/test_histories.py => test_history.py} (85%)
rename tests/api_resources/alerting/{v3 => }/test_policies.py (90%)
delete mode 100644 tests/api_resources/email_routing/routing/__init__.py
delete mode 100644 tests/api_resources/email_routing/routing/rules/__init__.py
rename tests/api_resources/{alerting/v3/destinations => email_routing/rules}/__init__.py (100%)
rename tests/api_resources/email_routing/{routing => }/rules/test_catch_alls.py (86%)
rename tests/api_resources/email_routing/{routing => }/test_addresses.py (83%)
rename tests/api_resources/email_routing/{routing => }/test_dns.py (84%)
rename tests/api_resources/email_routing/{routing => }/test_rules.py (93%)
rename tests/api_resources/pcaps/{test_downloads.py => test_download.py} (90%)
rename tests/api_resources/pcaps/{test_ownerships.py => test_ownership.py} (86%)
rename tests/api_resources/rulesets/versions/{test_by_tags.py => test_by_tag.py} (85%)
rename tests/api_resources/rum/{test_site_infos.py => test_site_info.py} (85%)
rename tests/api_resources/stream/{test_clips.py => test_clip.py} (90%)
rename tests/api_resources/stream/{test_copies.py => test_copy.py} (88%)
rename tests/api_resources/stream/{test_direct_uploads.py => test_direct_upload.py} (87%)
rename tests/api_resources/stream/{test_embeds.py => test_embed.py} (86%)
rename tests/api_resources/stream/{test_tokens.py => test_token.py} (93%)
rename tests/api_resources/{email_routing/test_routing.py => test_email_routing.py} (64%)
rename tests/api_resources/{test_available_plans.py => test_plans.py} (67%)
rename tests/api_resources/{test_available_rate_plans.py => test_rate_plans.py} (64%)
delete mode 100644 tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
rename tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/{content => }/test_bindings.py (86%)
rename tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/{content/test_scripts.py => test_content.py} (70%)
rename tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/{content => }/test_settings.py (83%)
rename tests/api_resources/zero_trust/devices/{test_revokes.py => test_revoke.py} (89%)
rename tests/api_resources/zero_trust/devices/{test_unrevokes.py => test_unrevoke.py} (91%)
diff --git a/api.md b/api.md
index 56900d5be7e..df8a1c480cf 100644
--- a/api.md
+++ b/api.md
@@ -1039,12 +1039,12 @@ Methods:
- client.zones.settings.waf.edit(\*, zone_id, \*\*params) -> Optional
- client.zones.settings.waf.get(\*, zone_id) -> Optional
-### Webp
+### WebP
Types:
```python
-from cloudflare.types.zones.settings import ZonesWebp
+from cloudflare.types.zones.settings import ZonesWebP
```
Methods:
@@ -1514,30 +1514,30 @@ Methods:
- client.argo.tiered_caching.edit(\*, zone_id, \*\*params) -> TieredCachingEditResponse
- client.argo.tiered_caching.get(\*, zone_id) -> TieredCachingGetResponse
-# AvailablePlans
+# Plans
Types:
```python
-from cloudflare.types import BillSubsAPIAvailableRatePlan, AvailablePlanListResponse
+from cloudflare.types import BillSubsAPIAvailableRatePlan, PlanListResponse
```
Methods:
-- client.available_plans.list(zone_identifier) -> Optional
-- client.available_plans.get(plan_identifier, \*, zone_identifier) -> BillSubsAPIAvailableRatePlan
+- client.plans.list(zone_identifier) -> Optional
+- client.plans.get(plan_identifier, \*, zone_identifier) -> BillSubsAPIAvailableRatePlan
-# AvailableRatePlans
+# RatePlans
Types:
```python
-from cloudflare.types import BillSubsRatePlan, AvailableRatePlanGetResponse
+from cloudflare.types import BillSubsRatePlan, RatePlanGetResponse
```
Methods:
-- client.available_rate_plans.get(zone_identifier) -> Optional
+- client.rate_plans.get(zone_identifier) -> Optional
# CertificateAuthorities
@@ -1767,43 +1767,41 @@ Methods:
# EmailRouting
-## Routing
-
Types:
```python
-from cloudflare.types.email_routing import (
+from cloudflare.types import (
EmailSettings,
- RoutingDisableResponse,
- RoutingEnableResponse,
- RoutingGetResponse,
+ EmailRoutingDisableResponse,
+ EmailRoutingEnableResponse,
+ EmailRoutingGetResponse,
)
```
Methods:
-- client.email_routing.routing.disable(zone_identifier) -> RoutingDisableResponse
-- client.email_routing.routing.enable(zone_identifier) -> RoutingEnableResponse
-- client.email_routing.routing.get(zone_identifier) -> RoutingGetResponse
+- client.email_routing.disable(zone_identifier) -> EmailRoutingDisableResponse
+- client.email_routing.enable(zone_identifier) -> EmailRoutingEnableResponse
+- client.email_routing.get(zone_identifier) -> EmailRoutingGetResponse
-### DNS
+## DNS
Types:
```python
-from cloudflare.types.email_routing.routing import EmailDNSRecord, DNSGetResponse
+from cloudflare.types.email_routing import EmailDNSRecord, DNSGetResponse
```
Methods:
-- client.email_routing.routing.dns.get(zone_identifier) -> Optional
+- client.email_routing.dns.get(zone_identifier) -> Optional
-### Rules
+## Rules
Types:
```python
-from cloudflare.types.email_routing.routing import (
+from cloudflare.types.email_routing import (
EmailRules,
RuleCreateResponse,
RuleUpdateResponse,
@@ -1815,31 +1813,31 @@ from cloudflare.types.email_routing.routing import (
Methods:
-- client.email_routing.routing.rules.create(zone_identifier, \*\*params) -> RuleCreateResponse
-- client.email_routing.routing.rules.update(rule_identifier, \*, zone_identifier, \*\*params) -> RuleUpdateResponse
-- client.email_routing.routing.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[RuleListResponse]
-- client.email_routing.routing.rules.delete(rule_identifier, \*, zone_identifier) -> RuleDeleteResponse
-- client.email_routing.routing.rules.get(rule_identifier, \*, zone_identifier) -> RuleGetResponse
+- client.email_routing.rules.create(zone_identifier, \*\*params) -> RuleCreateResponse
+- client.email_routing.rules.update(rule_identifier, \*, zone_identifier, \*\*params) -> RuleUpdateResponse
+- client.email_routing.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[RuleListResponse]
+- client.email_routing.rules.delete(rule_identifier, \*, zone_identifier) -> RuleDeleteResponse
+- client.email_routing.rules.get(rule_identifier, \*, zone_identifier) -> RuleGetResponse
-#### CatchAlls
+### CatchAlls
Types:
```python
-from cloudflare.types.email_routing.routing.rules import EmailCatchAllRule
+from cloudflare.types.email_routing.rules import EmailCatchAllRule
```
Methods:
-- client.email_routing.routing.rules.catch_alls.update(zone_identifier, \*\*params) -> EmailCatchAllRule
-- client.email_routing.routing.rules.catch_alls.get(zone_identifier) -> EmailCatchAllRule
+- client.email_routing.rules.catch_alls.update(zone_identifier, \*\*params) -> EmailCatchAllRule
+- client.email_routing.rules.catch_alls.get(zone_identifier) -> EmailCatchAllRule
-### Addresses
+## Addresses
Types:
```python
-from cloudflare.types.email_routing.routing import (
+from cloudflare.types.email_routing import (
EmailAddresses,
AddressCreateResponse,
AddressListResponse,
@@ -1850,10 +1848,10 @@ from cloudflare.types.email_routing.routing import (
Methods:
-- client.email_routing.routing.addresses.create(account_identifier, \*\*params) -> AddressCreateResponse
-- client.email_routing.routing.addresses.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[AddressListResponse]
-- client.email_routing.routing.addresses.delete(destination_address_identifier, \*, account_identifier) -> AddressDeleteResponse
-- client.email_routing.routing.addresses.get(destination_address_identifier, \*, account_identifier) -> AddressGetResponse
+- client.email_routing.addresses.create(account_identifier, \*\*params) -> AddressCreateResponse
+- client.email_routing.addresses.list(account_identifier, \*\*params) -> SyncV4PagePaginationArray[AddressListResponse]
+- client.email_routing.addresses.delete(destination_address_identifier, \*, account_identifier) -> AddressDeleteResponse
+- client.email_routing.addresses.get(destination_address_identifier, \*, account_identifier) -> AddressGetResponse
# Filters
@@ -2192,17 +2190,17 @@ Methods:
- client.logs.control.cmb.config.delete(\*, account_id) -> Optional
- client.logs.control.cmb.config.get(\*, account_id) -> Optional
-## Rayid
+## RayID
Types:
```python
-from cloudflare.types.logs import RayidGetResponse
+from cloudflare.types.logs import RayIDGetResponse
```
Methods:
-- client.logs.rayid.get(ray_identifier, \*, zone_identifier, \*\*params) -> RayidGetResponse
+- client.logs.rayid.get(ray_identifier, \*, zone_identifier, \*\*params) -> RayIDGetResponse
## Received
@@ -3140,11 +3138,11 @@ Methods:
- client.rulesets.versions.delete(ruleset_version, \*, ruleset_id, account_id, zone_id) -> None
- client.rulesets.versions.get(ruleset_version, \*, ruleset_id, account_id, zone_id) -> RulesetsRulesetResponse
-### ByTags
+### ByTag
Methods:
-- client.rulesets.versions.by_tags.get(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> RulesetsRulesetResponse
+- client.rulesets.versions.by_tag.get(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> RulesetsRulesetResponse
# URLNormalization
@@ -3897,49 +3895,49 @@ Methods:
- client.magic_transit.sites.acls.delete(acl_identifier, \*, account_id, site_id) -> ACLDeleteResponse
- client.magic_transit.sites.acls.get(acl_identifier, \*, account_id, site_id) -> ACLGetResponse
-### Lans
+### LANs
Types:
```python
from cloudflare.types.magic_transit.sites import (
- LanCreateResponse,
- LanUpdateResponse,
- LanListResponse,
- LanDeleteResponse,
- LanGetResponse,
+ LANCreateResponse,
+ LANUpdateResponse,
+ LANListResponse,
+ LANDeleteResponse,
+ LANGetResponse,
)
```
Methods:
-- client.magic_transit.sites.lans.create(site_id, \*, account_id, \*\*params) -> LanCreateResponse
-- client.magic_transit.sites.lans.update(lan_id, \*, account_id, site_id, \*\*params) -> LanUpdateResponse
-- client.magic_transit.sites.lans.list(site_id, \*, account_id) -> LanListResponse
-- client.magic_transit.sites.lans.delete(lan_id, \*, account_id, site_id) -> LanDeleteResponse
-- client.magic_transit.sites.lans.get(lan_id, \*, account_id, site_id) -> LanGetResponse
+- client.magic_transit.sites.lans.create(site_id, \*, account_id, \*\*params) -> LANCreateResponse
+- client.magic_transit.sites.lans.update(lan_id, \*, account_id, site_id, \*\*params) -> LANUpdateResponse
+- client.magic_transit.sites.lans.list(site_id, \*, account_id) -> LANListResponse
+- client.magic_transit.sites.lans.delete(lan_id, \*, account_id, site_id) -> LANDeleteResponse
+- client.magic_transit.sites.lans.get(lan_id, \*, account_id, site_id) -> LANGetResponse
-### Wans
+### WANs
Types:
```python
from cloudflare.types.magic_transit.sites import (
- WanCreateResponse,
- WanUpdateResponse,
- WanListResponse,
- WanDeleteResponse,
- WanGetResponse,
+ WANCreateResponse,
+ WANUpdateResponse,
+ WANListResponse,
+ WANDeleteResponse,
+ WANGetResponse,
)
```
Methods:
-- client.magic_transit.sites.wans.create(site_id, \*, account_id, \*\*params) -> WanCreateResponse
-- client.magic_transit.sites.wans.update(wan_id, \*, account_id, site_id, \*\*params) -> WanUpdateResponse
-- client.magic_transit.sites.wans.list(site_id, \*, account_id) -> WanListResponse
-- client.magic_transit.sites.wans.delete(wan_id, \*, account_id, site_id) -> WanDeleteResponse
-- client.magic_transit.sites.wans.get(wan_id, \*, account_id, site_id) -> WanGetResponse
+- client.magic_transit.sites.wans.create(site_id, \*, account_id, \*\*params) -> WANCreateResponse
+- client.magic_transit.sites.wans.update(wan_id, \*, account_id, site_id, \*\*params) -> WANUpdateResponse
+- client.magic_transit.sites.wans.list(site_id, \*, account_id) -> WANListResponse
+- client.magic_transit.sites.wans.delete(wan_id, \*, account_id, site_id) -> WANDeleteResponse
+- client.magic_transit.sites.wans.get(wan_id, \*, account_id, site_id) -> WANGetResponse
# MagicNetworkMonitoring
@@ -4122,7 +4120,7 @@ Methods:
- client.pcaps.list(\*, account_id) -> Optional
- client.pcaps.get(pcap_id, \*, account_id) -> PCAPGetResponse
-## Ownerships
+## Ownership
Types:
@@ -4132,16 +4130,16 @@ from cloudflare.types.pcaps import MagicVisibilityPCAPsOwnership, OwnershipGetRe
Methods:
-- client.pcaps.ownerships.create(\*, account_id, \*\*params) -> MagicVisibilityPCAPsOwnership
-- client.pcaps.ownerships.delete(ownership_id, \*, account_id) -> None
-- client.pcaps.ownerships.get(\*, account_id) -> Optional
-- client.pcaps.ownerships.validate(\*, account_id, \*\*params) -> MagicVisibilityPCAPsOwnership
+- client.pcaps.ownership.create(\*, account_id, \*\*params) -> MagicVisibilityPCAPsOwnership
+- client.pcaps.ownership.delete(ownership_id, \*, account_id) -> None
+- client.pcaps.ownership.get(\*, account_id) -> Optional
+- client.pcaps.ownership.validate(\*, account_id, \*\*params) -> MagicVisibilityPCAPsOwnership
-## Downloads
+## Download
Methods:
-- client.pcaps.downloads.get(pcap_id, \*, account_id) -> BinaryAPIResponse
+- client.pcaps.download.get(pcap_id, \*, account_id) -> BinaryAPIResponse
# Registrar
@@ -4291,7 +4289,7 @@ Methods:
- client.stream.videos.storage_usage(\*, account_id, \*\*params) -> VideoStorageUsageResponse
-## Clips
+## Clip
Types:
@@ -4301,15 +4299,15 @@ from cloudflare.types.stream import StreamClipping
Methods:
-- client.stream.clips.create(\*, account_id, \*\*params) -> StreamClipping
+- client.stream.clip.create(\*, account_id, \*\*params) -> StreamClipping
-## Copies
+## Copy
Methods:
-- client.stream.copies.create(\*, account_id, \*\*params) -> StreamVideos
+- client.stream.copy.create(\*, account_id, \*\*params) -> StreamVideos
-## DirectUploads
+## DirectUpload
Types:
@@ -4319,7 +4317,7 @@ from cloudflare.types.stream import DirectUploadCreateResponse
Methods:
-- client.stream.direct_uploads.create(\*, account_id, \*\*params) -> DirectUploadCreateResponse
+- client.stream.direct_upload.create(\*, account_id, \*\*params) -> DirectUploadCreateResponse
## Keys
@@ -4438,7 +4436,7 @@ Methods:
- client.stream.downloads.delete(identifier, \*, account_id) -> DownloadDeleteResponse
- client.stream.downloads.get(identifier, \*, account_id) -> DownloadGetResponse
-## Embeds
+## Embed
Types:
@@ -4448,9 +4446,9 @@ from cloudflare.types.stream import EmbedGetResponse
Methods:
-- client.stream.embeds.get(identifier, \*, account_id) -> object
+- client.stream.embed.get(identifier, \*, account_id) -> object
-## Tokens
+## Token
Types:
@@ -4460,42 +4458,42 @@ from cloudflare.types.stream import TokenCreateResponse
Methods:
-- client.stream.tokens.create(identifier, \*, account_id, \*\*params) -> TokenCreateResponse
+- client.stream.token.create(identifier, \*, account_id, \*\*params) -> TokenCreateResponse
# Alerting
-## V3
+## AvailableAlerts
Types:
```python
-from cloudflare.types.alerting import V3ListResponse
+from cloudflare.types.alerting import AvailableAlertListResponse
```
Methods:
-- client.alerting.v3.list(\*, account_id) -> Optional
+- client.alerting.available_alerts.list(\*, account_id) -> Optional
-### Destinations
+## Destinations
-#### Eligible
+### Eligible
Types:
```python
-from cloudflare.types.alerting.v3.destinations import EligibleGetResponse
+from cloudflare.types.alerting.destinations import EligibleGetResponse
```
Methods:
-- client.alerting.v3.destinations.eligible.get(\*, account_id) -> Optional
+- client.alerting.destinations.eligible.get(\*, account_id) -> Optional
-#### Pagerduty
+### Pagerduty
Types:
```python
-from cloudflare.types.alerting.v3.destinations import (
+from cloudflare.types.alerting.destinations import (
AaaPagerduty,
PagerdutyCreateResponse,
PagerdutyDeleteResponse,
@@ -4506,17 +4504,17 @@ from cloudflare.types.alerting.v3.destinations import (
Methods:
-- client.alerting.v3.destinations.pagerduty.create(\*, account_id) -> PagerdutyCreateResponse
-- client.alerting.v3.destinations.pagerduty.delete(\*, account_id) -> Optional
-- client.alerting.v3.destinations.pagerduty.get(\*, account_id) -> Optional
-- client.alerting.v3.destinations.pagerduty.link(token_id, \*, account_id) -> PagerdutyLinkResponse
+- client.alerting.destinations.pagerduty.create(\*, account_id) -> PagerdutyCreateResponse
+- client.alerting.destinations.pagerduty.delete(\*, account_id) -> Optional
+- client.alerting.destinations.pagerduty.get(\*, account_id) -> Optional
+- client.alerting.destinations.pagerduty.link(token_id, \*, account_id) -> PagerdutyLinkResponse
-#### Webhooks
+### Webhooks
Types:
```python
-from cloudflare.types.alerting.v3.destinations import (
+from cloudflare.types.alerting.destinations import (
AaaWebhooks,
WebhookCreateResponse,
WebhookUpdateResponse,
@@ -4527,30 +4525,30 @@ from cloudflare.types.alerting.v3.destinations import (
Methods:
-- client.alerting.v3.destinations.webhooks.create(\*, account_id, \*\*params) -> WebhookCreateResponse
-- client.alerting.v3.destinations.webhooks.update(webhook_id, \*, account_id, \*\*params) -> WebhookUpdateResponse
-- client.alerting.v3.destinations.webhooks.list(\*, account_id) -> Optional
-- client.alerting.v3.destinations.webhooks.delete(webhook_id, \*, account_id) -> Optional
-- client.alerting.v3.destinations.webhooks.get(webhook_id, \*, account_id) -> AaaWebhooks
+- client.alerting.destinations.webhooks.create(\*, account_id, \*\*params) -> WebhookCreateResponse
+- client.alerting.destinations.webhooks.update(webhook_id, \*, account_id, \*\*params) -> WebhookUpdateResponse
+- client.alerting.destinations.webhooks.list(\*, account_id) -> Optional
+- client.alerting.destinations.webhooks.delete(webhook_id, \*, account_id) -> Optional
+- client.alerting.destinations.webhooks.get(webhook_id, \*, account_id) -> AaaWebhooks
-### Histories
+## History
Types:
```python
-from cloudflare.types.alerting.v3 import AaaHistory
+from cloudflare.types.alerting import AaaHistory
```
Methods:
-- client.alerting.v3.histories.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[AaaHistory]
+- client.alerting.history.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[AaaHistory]
-### Policies
+## Policies
Types:
```python
-from cloudflare.types.alerting.v3 import (
+from cloudflare.types.alerting import (
AaaPolicies,
PolicyCreateResponse,
PolicyUpdateResponse,
@@ -4561,11 +4559,11 @@ from cloudflare.types.alerting.v3 import (
Methods:
-- client.alerting.v3.policies.create(\*, account_id, \*\*params) -> PolicyCreateResponse
-- client.alerting.v3.policies.update(policy_id, \*, account_id, \*\*params) -> PolicyUpdateResponse
-- client.alerting.v3.policies.list(\*, account_id) -> Optional
-- client.alerting.v3.policies.delete(policy_id, \*, account_id) -> Optional
-- client.alerting.v3.policies.get(policy_id, \*, account_id) -> AaaPolicies
+- client.alerting.policies.create(\*, account_id, \*\*params) -> PolicyCreateResponse
+- client.alerting.policies.update(policy_id, \*, account_id, \*\*params) -> PolicyUpdateResponse
+- client.alerting.policies.list(\*, account_id) -> Optional
+- client.alerting.policies.delete(policy_id, \*, account_id) -> Optional
+- client.alerting.policies.get(policy_id, \*, account_id) -> AaaPolicies
# D1
@@ -4686,19 +4684,17 @@ Methods:
##### Content
-###### Scripts
-
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> WorkersScript
-- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.get(script_name, \*, account_id, dispatch_namespace) -> BinaryAPIResponse
+- client.workers_for_platforms.dispatch.namespaces.scripts.content.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> WorkersScript
+- client.workers_for_platforms.dispatch.namespaces.scripts.content.get(script_name, \*, account_id, dispatch_namespace) -> BinaryAPIResponse
-###### Settings
+##### Settings
Types:
```python
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content import (
+from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import (
SettingEditResponse,
SettingGetResponse,
)
@@ -4706,22 +4702,20 @@ from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.edit(script_name, \*, account_id, dispatch_namespace, \*\*params) -> SettingEditResponse
-- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.get(script_name, \*, account_id, dispatch_namespace) -> SettingGetResponse
+- client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(script_name, \*, account_id, dispatch_namespace, \*\*params) -> SettingEditResponse
+- client.workers_for_platforms.dispatch.namespaces.scripts.settings.get(script_name, \*, account_id, dispatch_namespace) -> SettingGetResponse
-###### Bindings
+##### Bindings
Types:
```python
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content import (
- BindingGetResponse,
-)
+from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse
```
Methods:
-- client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.get(script_name, \*, account_id, dispatch_namespace) -> BindingGetResponse
+- client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(script_name, \*, account_id, dispatch_namespace) -> BindingGetResponse
# ZeroTrust
@@ -4907,7 +4901,7 @@ Methods:
- client.zero_trust.devices.posture.integrations.edit(integration_id, \*, account_id, \*\*params) -> Optional
- client.zero_trust.devices.posture.integrations.get(integration_id, \*, account_id) -> Optional
-### Revokes
+### Revoke
Types:
@@ -4917,7 +4911,7 @@ from cloudflare.types.zero_trust.devices import RevokeCreateResponse
Methods:
-- client.zero_trust.devices.revokes.create(\*, account_id, \*\*params) -> Optional
+- client.zero_trust.devices.revoke.create(\*, account_id, \*\*params) -> Optional
### Settings
@@ -4932,7 +4926,7 @@ Methods:
- client.zero_trust.devices.settings.update(\*, account_id, \*\*params) -> Optional
- client.zero_trust.devices.settings.list(\*, account_id) -> Optional
-### Unrevokes
+### Unrevoke
Types:
@@ -4942,7 +4936,7 @@ from cloudflare.types.zero_trust.devices import UnrevokeCreateResponse
Methods:
-- client.zero_trust.devices.unrevokes.create(\*, account_id, \*\*params) -> Optional
+- client.zero_trust.devices.unrevoke.create(\*, account_id, \*\*params) -> Optional
### OverrideCodes
@@ -5886,7 +5880,7 @@ Methods:
# RUM
-## SiteInfos
+## SiteInfo
Types:
@@ -5896,11 +5890,11 @@ from cloudflare.types.rum import RUMSite, SiteInfoDeleteResponse
Methods:
-- client.rum.site_infos.create(\*, account_id, \*\*params) -> Optional
-- client.rum.site_infos.update(site_id, \*, account_id, \*\*params) -> Optional
-- client.rum.site_infos.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[RUMSite]
-- client.rum.site_infos.delete(site_id, \*, account_id) -> Optional
-- client.rum.site_infos.get(site_id, \*, account_id) -> Optional
+- client.rum.site_info.create(\*, account_id, \*\*params) -> Optional
+- client.rum.site_info.update(site_id, \*, account_id, \*\*params) -> Optional
+- client.rum.site_info.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[RUMSite]
+- client.rum.site_info.delete(site_id, \*, account_id) -> Optional
+- client.rum.site_info.get(site_id, \*, account_id) -> Optional
## Rules
diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py
index 970437dd25b..34eb39d0832 100644
--- a/src/cloudflare/_client.py
+++ b/src/cloudflare/_client.py
@@ -59,8 +59,8 @@ class Cloudflare(SyncAPIClient):
subscriptions: resources.Subscriptions
acm: resources.ACM
argo: resources.Argo
- available_plans: resources.AvailablePlans
- available_rate_plans: resources.AvailableRatePlans
+ plans: resources.Plans
+ rate_plans: resources.RatePlans
certificate_authorities: resources.CertificateAuthorities
client_certificates: resources.ClientCertificates
custom_certificates: resources.CustomCertificates
@@ -212,8 +212,8 @@ def __init__(
self.subscriptions = resources.Subscriptions(self)
self.acm = resources.ACM(self)
self.argo = resources.Argo(self)
- self.available_plans = resources.AvailablePlans(self)
- self.available_rate_plans = resources.AvailableRatePlans(self)
+ self.plans = resources.Plans(self)
+ self.rate_plans = resources.RatePlans(self)
self.certificate_authorities = resources.CertificateAuthorities(self)
self.client_certificates = resources.ClientCertificates(self)
self.custom_certificates = resources.CustomCertificates(self)
@@ -470,8 +470,8 @@ class AsyncCloudflare(AsyncAPIClient):
subscriptions: resources.AsyncSubscriptions
acm: resources.AsyncACM
argo: resources.AsyncArgo
- available_plans: resources.AsyncAvailablePlans
- available_rate_plans: resources.AsyncAvailableRatePlans
+ plans: resources.AsyncPlans
+ rate_plans: resources.AsyncRatePlans
certificate_authorities: resources.AsyncCertificateAuthorities
client_certificates: resources.AsyncClientCertificates
custom_certificates: resources.AsyncCustomCertificates
@@ -623,8 +623,8 @@ def __init__(
self.subscriptions = resources.AsyncSubscriptions(self)
self.acm = resources.AsyncACM(self)
self.argo = resources.AsyncArgo(self)
- self.available_plans = resources.AsyncAvailablePlans(self)
- self.available_rate_plans = resources.AsyncAvailableRatePlans(self)
+ self.plans = resources.AsyncPlans(self)
+ self.rate_plans = resources.AsyncRatePlans(self)
self.certificate_authorities = resources.AsyncCertificateAuthorities(self)
self.client_certificates = resources.AsyncClientCertificates(self)
self.custom_certificates = resources.AsyncCustomCertificates(self)
@@ -882,8 +882,8 @@ def __init__(self, client: Cloudflare) -> None:
self.subscriptions = resources.SubscriptionsWithRawResponse(client.subscriptions)
self.acm = resources.ACMWithRawResponse(client.acm)
self.argo = resources.ArgoWithRawResponse(client.argo)
- self.available_plans = resources.AvailablePlansWithRawResponse(client.available_plans)
- self.available_rate_plans = resources.AvailableRatePlansWithRawResponse(client.available_rate_plans)
+ self.plans = resources.PlansWithRawResponse(client.plans)
+ self.rate_plans = resources.RatePlansWithRawResponse(client.rate_plans)
self.certificate_authorities = resources.CertificateAuthoritiesWithRawResponse(client.certificate_authorities)
self.client_certificates = resources.ClientCertificatesWithRawResponse(client.client_certificates)
self.custom_certificates = resources.CustomCertificatesWithRawResponse(client.custom_certificates)
@@ -968,8 +968,8 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.subscriptions = resources.AsyncSubscriptionsWithRawResponse(client.subscriptions)
self.acm = resources.AsyncACMWithRawResponse(client.acm)
self.argo = resources.AsyncArgoWithRawResponse(client.argo)
- self.available_plans = resources.AsyncAvailablePlansWithRawResponse(client.available_plans)
- self.available_rate_plans = resources.AsyncAvailableRatePlansWithRawResponse(client.available_rate_plans)
+ self.plans = resources.AsyncPlansWithRawResponse(client.plans)
+ self.rate_plans = resources.AsyncRatePlansWithRawResponse(client.rate_plans)
self.certificate_authorities = resources.AsyncCertificateAuthoritiesWithRawResponse(
client.certificate_authorities
)
@@ -1058,8 +1058,8 @@ def __init__(self, client: Cloudflare) -> None:
self.subscriptions = resources.SubscriptionsWithStreamingResponse(client.subscriptions)
self.acm = resources.ACMWithStreamingResponse(client.acm)
self.argo = resources.ArgoWithStreamingResponse(client.argo)
- self.available_plans = resources.AvailablePlansWithStreamingResponse(client.available_plans)
- self.available_rate_plans = resources.AvailableRatePlansWithStreamingResponse(client.available_rate_plans)
+ self.plans = resources.PlansWithStreamingResponse(client.plans)
+ self.rate_plans = resources.RatePlansWithStreamingResponse(client.rate_plans)
self.certificate_authorities = resources.CertificateAuthoritiesWithStreamingResponse(
client.certificate_authorities
)
@@ -1150,8 +1150,8 @@ def __init__(self, client: AsyncCloudflare) -> None:
self.subscriptions = resources.AsyncSubscriptionsWithStreamingResponse(client.subscriptions)
self.acm = resources.AsyncACMWithStreamingResponse(client.acm)
self.argo = resources.AsyncArgoWithStreamingResponse(client.argo)
- self.available_plans = resources.AsyncAvailablePlansWithStreamingResponse(client.available_plans)
- self.available_rate_plans = resources.AsyncAvailableRatePlansWithStreamingResponse(client.available_rate_plans)
+ self.plans = resources.AsyncPlansWithStreamingResponse(client.plans)
+ self.rate_plans = resources.AsyncRatePlansWithStreamingResponse(client.rate_plans)
self.certificate_authorities = resources.AsyncCertificateAuthoritiesWithStreamingResponse(
client.certificate_authorities
)
diff --git a/src/cloudflare/resources/__init__.py b/src/cloudflare/resources/__init__.py
index 2c1ab6cf2c3..13721178d1d 100644
--- a/src/cloudflare/resources/__init__.py
+++ b/src/cloudflare/resources/__init__.py
@@ -136,6 +136,14 @@
PCAPsWithStreamingResponse,
AsyncPCAPsWithStreamingResponse,
)
+from .plans import (
+ Plans,
+ AsyncPlans,
+ PlansWithRawResponse,
+ AsyncPlansWithRawResponse,
+ PlansWithStreamingResponse,
+ AsyncPlansWithStreamingResponse,
+)
from .radar import (
Radar,
AsyncRadar,
@@ -352,6 +360,14 @@
HyperdriveWithStreamingResponse,
AsyncHyperdriveWithStreamingResponse,
)
+from .rate_plans import (
+ RatePlans,
+ AsyncRatePlans,
+ RatePlansWithRawResponse,
+ AsyncRatePlansWithRawResponse,
+ RatePlansWithStreamingResponse,
+ AsyncRatePlansWithStreamingResponse,
+)
from .zero_trust import (
ZeroTrust,
AsyncZeroTrust,
@@ -488,14 +504,6 @@
WARPConnectorWithStreamingResponse,
AsyncWARPConnectorWithStreamingResponse,
)
-from .available_plans import (
- AvailablePlans,
- AsyncAvailablePlans,
- AvailablePlansWithRawResponse,
- AsyncAvailablePlansWithRawResponse,
- AvailablePlansWithStreamingResponse,
- AsyncAvailablePlansWithStreamingResponse,
-)
from .durable_objects import (
DurableObjects,
AsyncDurableObjects,
@@ -576,14 +584,6 @@
CustomCertificatesWithStreamingResponse,
AsyncCustomCertificatesWithStreamingResponse,
)
-from .available_rate_plans import (
- AvailableRatePlans,
- AsyncAvailableRatePlans,
- AvailableRatePlansWithRawResponse,
- AsyncAvailableRatePlansWithRawResponse,
- AvailableRatePlansWithStreamingResponse,
- AsyncAvailableRatePlansWithStreamingResponse,
-)
from .keyless_certificates import (
KeylessCertificates,
AsyncKeylessCertificates,
@@ -714,18 +714,18 @@
"AsyncArgoWithRawResponse",
"ArgoWithStreamingResponse",
"AsyncArgoWithStreamingResponse",
- "AvailablePlans",
- "AsyncAvailablePlans",
- "AvailablePlansWithRawResponse",
- "AsyncAvailablePlansWithRawResponse",
- "AvailablePlansWithStreamingResponse",
- "AsyncAvailablePlansWithStreamingResponse",
- "AvailableRatePlans",
- "AsyncAvailableRatePlans",
- "AvailableRatePlansWithRawResponse",
- "AsyncAvailableRatePlansWithRawResponse",
- "AvailableRatePlansWithStreamingResponse",
- "AsyncAvailableRatePlansWithStreamingResponse",
+ "Plans",
+ "AsyncPlans",
+ "PlansWithRawResponse",
+ "AsyncPlansWithRawResponse",
+ "PlansWithStreamingResponse",
+ "AsyncPlansWithStreamingResponse",
+ "RatePlans",
+ "AsyncRatePlans",
+ "RatePlansWithRawResponse",
+ "AsyncRatePlansWithRawResponse",
+ "RatePlansWithStreamingResponse",
+ "AsyncRatePlansWithStreamingResponse",
"CertificateAuthorities",
"AsyncCertificateAuthorities",
"CertificateAuthoritiesWithRawResponse",
diff --git a/src/cloudflare/resources/alerting/__init__.py b/src/cloudflare/resources/alerting/__init__.py
index b152c5c7e15..055626c3866 100644
--- a/src/cloudflare/resources/alerting/__init__.py
+++ b/src/cloudflare/resources/alerting/__init__.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .v3 import (
- V3,
- AsyncV3,
- V3WithRawResponse,
- AsyncV3WithRawResponse,
- V3WithStreamingResponse,
- AsyncV3WithStreamingResponse,
+from .history import (
+ History,
+ AsyncHistory,
+ HistoryWithRawResponse,
+ AsyncHistoryWithRawResponse,
+ HistoryWithStreamingResponse,
+ AsyncHistoryWithStreamingResponse,
)
from .alerting import (
Alerting,
@@ -16,14 +16,56 @@
AlertingWithStreamingResponse,
AsyncAlertingWithStreamingResponse,
)
+from .policies import (
+ Policies,
+ AsyncPolicies,
+ PoliciesWithRawResponse,
+ AsyncPoliciesWithRawResponse,
+ PoliciesWithStreamingResponse,
+ AsyncPoliciesWithStreamingResponse,
+)
+from .destinations import (
+ Destinations,
+ AsyncDestinations,
+ DestinationsWithRawResponse,
+ AsyncDestinationsWithRawResponse,
+ DestinationsWithStreamingResponse,
+ AsyncDestinationsWithStreamingResponse,
+)
+from .available_alerts import (
+ AvailableAlerts,
+ AsyncAvailableAlerts,
+ AvailableAlertsWithRawResponse,
+ AsyncAvailableAlertsWithRawResponse,
+ AvailableAlertsWithStreamingResponse,
+ AsyncAvailableAlertsWithStreamingResponse,
+)
__all__ = [
- "V3",
- "AsyncV3",
- "V3WithRawResponse",
- "AsyncV3WithRawResponse",
- "V3WithStreamingResponse",
- "AsyncV3WithStreamingResponse",
+ "AvailableAlerts",
+ "AsyncAvailableAlerts",
+ "AvailableAlertsWithRawResponse",
+ "AsyncAvailableAlertsWithRawResponse",
+ "AvailableAlertsWithStreamingResponse",
+ "AsyncAvailableAlertsWithStreamingResponse",
+ "Destinations",
+ "AsyncDestinations",
+ "DestinationsWithRawResponse",
+ "AsyncDestinationsWithRawResponse",
+ "DestinationsWithStreamingResponse",
+ "AsyncDestinationsWithStreamingResponse",
+ "History",
+ "AsyncHistory",
+ "HistoryWithRawResponse",
+ "AsyncHistoryWithRawResponse",
+ "HistoryWithStreamingResponse",
+ "AsyncHistoryWithStreamingResponse",
+ "Policies",
+ "AsyncPolicies",
+ "PoliciesWithRawResponse",
+ "AsyncPoliciesWithRawResponse",
+ "PoliciesWithStreamingResponse",
+ "AsyncPoliciesWithStreamingResponse",
"Alerting",
"AsyncAlerting",
"AlertingWithRawResponse",
diff --git a/src/cloudflare/resources/alerting/alerting.py b/src/cloudflare/resources/alerting/alerting.py
index 7ce83e37a7d..24e7cc35418 100644
--- a/src/cloudflare/resources/alerting/alerting.py
+++ b/src/cloudflare/resources/alerting/alerting.py
@@ -2,25 +2,61 @@
from __future__ import annotations
-from .v3 import (
- V3,
- AsyncV3,
- V3WithRawResponse,
- AsyncV3WithRawResponse,
- V3WithStreamingResponse,
- AsyncV3WithStreamingResponse,
+from .history import (
+ History,
+ AsyncHistory,
+ HistoryWithRawResponse,
+ AsyncHistoryWithRawResponse,
+ HistoryWithStreamingResponse,
+ AsyncHistoryWithStreamingResponse,
+)
+from .policies import (
+ Policies,
+ AsyncPolicies,
+ PoliciesWithRawResponse,
+ AsyncPoliciesWithRawResponse,
+ PoliciesWithStreamingResponse,
+ AsyncPoliciesWithStreamingResponse,
)
-from .v3.v3 import V3, AsyncV3
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
+from .destinations import (
+ Destinations,
+ AsyncDestinations,
+ DestinationsWithRawResponse,
+ AsyncDestinationsWithRawResponse,
+ DestinationsWithStreamingResponse,
+ AsyncDestinationsWithStreamingResponse,
+)
+from .available_alerts import (
+ AvailableAlerts,
+ AsyncAvailableAlerts,
+ AvailableAlertsWithRawResponse,
+ AsyncAvailableAlertsWithRawResponse,
+ AvailableAlertsWithStreamingResponse,
+ AsyncAvailableAlertsWithStreamingResponse,
+)
+from .destinations.destinations import Destinations, AsyncDestinations
__all__ = ["Alerting", "AsyncAlerting"]
class Alerting(SyncAPIResource):
@cached_property
- def v3(self) -> V3:
- return V3(self._client)
+ def available_alerts(self) -> AvailableAlerts:
+ return AvailableAlerts(self._client)
+
+ @cached_property
+ def destinations(self) -> Destinations:
+ return Destinations(self._client)
+
+ @cached_property
+ def history(self) -> History:
+ return History(self._client)
+
+ @cached_property
+ def policies(self) -> Policies:
+ return Policies(self._client)
@cached_property
def with_raw_response(self) -> AlertingWithRawResponse:
@@ -33,8 +69,20 @@ def with_streaming_response(self) -> AlertingWithStreamingResponse:
class AsyncAlerting(AsyncAPIResource):
@cached_property
- def v3(self) -> AsyncV3:
- return AsyncV3(self._client)
+ def available_alerts(self) -> AsyncAvailableAlerts:
+ return AsyncAvailableAlerts(self._client)
+
+ @cached_property
+ def destinations(self) -> AsyncDestinations:
+ return AsyncDestinations(self._client)
+
+ @cached_property
+ def history(self) -> AsyncHistory:
+ return AsyncHistory(self._client)
+
+ @cached_property
+ def policies(self) -> AsyncPolicies:
+ return AsyncPolicies(self._client)
@cached_property
def with_raw_response(self) -> AsyncAlertingWithRawResponse:
@@ -50,8 +98,20 @@ def __init__(self, alerting: Alerting) -> None:
self._alerting = alerting
@cached_property
- def v3(self) -> V3WithRawResponse:
- return V3WithRawResponse(self._alerting.v3)
+ def available_alerts(self) -> AvailableAlertsWithRawResponse:
+ return AvailableAlertsWithRawResponse(self._alerting.available_alerts)
+
+ @cached_property
+ def destinations(self) -> DestinationsWithRawResponse:
+ return DestinationsWithRawResponse(self._alerting.destinations)
+
+ @cached_property
+ def history(self) -> HistoryWithRawResponse:
+ return HistoryWithRawResponse(self._alerting.history)
+
+ @cached_property
+ def policies(self) -> PoliciesWithRawResponse:
+ return PoliciesWithRawResponse(self._alerting.policies)
class AsyncAlertingWithRawResponse:
@@ -59,8 +119,20 @@ def __init__(self, alerting: AsyncAlerting) -> None:
self._alerting = alerting
@cached_property
- def v3(self) -> AsyncV3WithRawResponse:
- return AsyncV3WithRawResponse(self._alerting.v3)
+ def available_alerts(self) -> AsyncAvailableAlertsWithRawResponse:
+ return AsyncAvailableAlertsWithRawResponse(self._alerting.available_alerts)
+
+ @cached_property
+ def destinations(self) -> AsyncDestinationsWithRawResponse:
+ return AsyncDestinationsWithRawResponse(self._alerting.destinations)
+
+ @cached_property
+ def history(self) -> AsyncHistoryWithRawResponse:
+ return AsyncHistoryWithRawResponse(self._alerting.history)
+
+ @cached_property
+ def policies(self) -> AsyncPoliciesWithRawResponse:
+ return AsyncPoliciesWithRawResponse(self._alerting.policies)
class AlertingWithStreamingResponse:
@@ -68,8 +140,20 @@ def __init__(self, alerting: Alerting) -> None:
self._alerting = alerting
@cached_property
- def v3(self) -> V3WithStreamingResponse:
- return V3WithStreamingResponse(self._alerting.v3)
+ def available_alerts(self) -> AvailableAlertsWithStreamingResponse:
+ return AvailableAlertsWithStreamingResponse(self._alerting.available_alerts)
+
+ @cached_property
+ def destinations(self) -> DestinationsWithStreamingResponse:
+ return DestinationsWithStreamingResponse(self._alerting.destinations)
+
+ @cached_property
+ def history(self) -> HistoryWithStreamingResponse:
+ return HistoryWithStreamingResponse(self._alerting.history)
+
+ @cached_property
+ def policies(self) -> PoliciesWithStreamingResponse:
+ return PoliciesWithStreamingResponse(self._alerting.policies)
class AsyncAlertingWithStreamingResponse:
@@ -77,5 +161,17 @@ def __init__(self, alerting: AsyncAlerting) -> None:
self._alerting = alerting
@cached_property
- def v3(self) -> AsyncV3WithStreamingResponse:
- return AsyncV3WithStreamingResponse(self._alerting.v3)
+ def available_alerts(self) -> AsyncAvailableAlertsWithStreamingResponse:
+ return AsyncAvailableAlertsWithStreamingResponse(self._alerting.available_alerts)
+
+ @cached_property
+ def destinations(self) -> AsyncDestinationsWithStreamingResponse:
+ return AsyncDestinationsWithStreamingResponse(self._alerting.destinations)
+
+ @cached_property
+ def history(self) -> AsyncHistoryWithStreamingResponse:
+ return AsyncHistoryWithStreamingResponse(self._alerting.history)
+
+ @cached_property
+ def policies(self) -> AsyncPoliciesWithStreamingResponse:
+ return AsyncPoliciesWithStreamingResponse(self._alerting.policies)
diff --git a/src/cloudflare/resources/alerting/available_alerts.py b/src/cloudflare/resources/alerting/available_alerts.py
new file mode 100644
index 00000000000..660b0e2fb6f
--- /dev/null
+++ b/src/cloudflare/resources/alerting/available_alerts.py
@@ -0,0 +1,168 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Any, Optional, cast
+
+import httpx
+
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._wrappers import ResultWrapper
+from ..._base_client import (
+ make_request_options,
+)
+from ...types.alerting import AvailableAlertListResponse
+
+__all__ = ["AvailableAlerts", "AsyncAvailableAlerts"]
+
+
+class AvailableAlerts(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AvailableAlertsWithRawResponse:
+ return AvailableAlertsWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AvailableAlertsWithStreamingResponse:
+ return AvailableAlertsWithStreamingResponse(self)
+
+ def list(
+ self,
+ *,
+ account_id: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> Optional[AvailableAlertListResponse]:
+ """
+ Gets a list of all alert types for which an account is eligible.
+
+ Args:
+ account_id: The account id
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ return cast(
+ Optional[AvailableAlertListResponse],
+ self._get(
+ f"/accounts/{account_id}/alerting/v3/available_alerts",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[AvailableAlertListResponse]
+ ), # Union types cannot be passed in as arguments in the type system
+ ),
+ )
+
+
+class AsyncAvailableAlerts(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncAvailableAlertsWithRawResponse:
+ return AsyncAvailableAlertsWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncAvailableAlertsWithStreamingResponse:
+ return AsyncAvailableAlertsWithStreamingResponse(self)
+
+ async def list(
+ self,
+ *,
+ account_id: str,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> Optional[AvailableAlertListResponse]:
+ """
+ Gets a list of all alert types for which an account is eligible.
+
+ Args:
+ account_id: The account id
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not account_id:
+ raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
+ return cast(
+ Optional[AvailableAlertListResponse],
+ await self._get(
+ f"/accounts/{account_id}/alerting/v3/available_alerts",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(
+ Any, ResultWrapper[AvailableAlertListResponse]
+ ), # Union types cannot be passed in as arguments in the type system
+ ),
+ )
+
+
+class AvailableAlertsWithRawResponse:
+ def __init__(self, available_alerts: AvailableAlerts) -> None:
+ self._available_alerts = available_alerts
+
+ self.list = to_raw_response_wrapper(
+ available_alerts.list,
+ )
+
+
+class AsyncAvailableAlertsWithRawResponse:
+ def __init__(self, available_alerts: AsyncAvailableAlerts) -> None:
+ self._available_alerts = available_alerts
+
+ self.list = async_to_raw_response_wrapper(
+ available_alerts.list,
+ )
+
+
+class AvailableAlertsWithStreamingResponse:
+ def __init__(self, available_alerts: AvailableAlerts) -> None:
+ self._available_alerts = available_alerts
+
+ self.list = to_streamed_response_wrapper(
+ available_alerts.list,
+ )
+
+
+class AsyncAvailableAlertsWithStreamingResponse:
+ def __init__(self, available_alerts: AsyncAvailableAlerts) -> None:
+ self._available_alerts = available_alerts
+
+ self.list = async_to_streamed_response_wrapper(
+ available_alerts.list,
+ )
diff --git a/src/cloudflare/resources/alerting/v3/destinations/__init__.py b/src/cloudflare/resources/alerting/destinations/__init__.py
similarity index 100%
rename from src/cloudflare/resources/alerting/v3/destinations/__init__.py
rename to src/cloudflare/resources/alerting/destinations/__init__.py
diff --git a/src/cloudflare/resources/alerting/v3/destinations/destinations.py b/src/cloudflare/resources/alerting/destinations/destinations.py
similarity index 97%
rename from src/cloudflare/resources/alerting/v3/destinations/destinations.py
rename to src/cloudflare/resources/alerting/destinations/destinations.py
index 6178c0c3551..35d6a951687 100644
--- a/src/cloudflare/resources/alerting/v3/destinations/destinations.py
+++ b/src/cloudflare/resources/alerting/destinations/destinations.py
@@ -26,8 +26,8 @@
PagerdutyWithStreamingResponse,
AsyncPagerdutyWithStreamingResponse,
)
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
__all__ = ["Destinations", "AsyncDestinations"]
diff --git a/src/cloudflare/resources/alerting/v3/destinations/eligible.py b/src/cloudflare/resources/alerting/destinations/eligible.py
similarity index 94%
rename from src/cloudflare/resources/alerting/v3/destinations/eligible.py
rename to src/cloudflare/resources/alerting/destinations/eligible.py
index 17071078054..6beb3e9bbe1 100644
--- a/src/cloudflare/resources/alerting/v3/destinations/eligible.py
+++ b/src/cloudflare/resources/alerting/destinations/eligible.py
@@ -6,20 +6,20 @@
import httpx
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
-from ....._response import (
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....._wrappers import ResultWrapper
-from ....._base_client import (
+from ...._wrappers import ResultWrapper
+from ...._base_client import (
make_request_options,
)
-from .....types.alerting.v3.destinations import EligibleGetResponse
+from ....types.alerting.destinations import EligibleGetResponse
__all__ = ["Eligible", "AsyncEligible"]
diff --git a/src/cloudflare/resources/alerting/v3/destinations/pagerduty.py b/src/cloudflare/resources/alerting/destinations/pagerduty.py
similarity index 98%
rename from src/cloudflare/resources/alerting/v3/destinations/pagerduty.py
rename to src/cloudflare/resources/alerting/destinations/pagerduty.py
index 9e5859a860e..d92b8bf9a8d 100644
--- a/src/cloudflare/resources/alerting/v3/destinations/pagerduty.py
+++ b/src/cloudflare/resources/alerting/destinations/pagerduty.py
@@ -6,20 +6,20 @@
import httpx
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
-from ....._response import (
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....._wrappers import ResultWrapper
-from ....._base_client import (
+from ...._wrappers import ResultWrapper
+from ...._base_client import (
make_request_options,
)
-from .....types.alerting.v3.destinations import (
+from ....types.alerting.destinations import (
PagerdutyGetResponse,
PagerdutyLinkResponse,
PagerdutyCreateResponse,
diff --git a/src/cloudflare/resources/alerting/v3/destinations/webhooks.py b/src/cloudflare/resources/alerting/destinations/webhooks.py
similarity index 98%
rename from src/cloudflare/resources/alerting/v3/destinations/webhooks.py
rename to src/cloudflare/resources/alerting/destinations/webhooks.py
index a8b642ece80..3d187f66856 100644
--- a/src/cloudflare/resources/alerting/v3/destinations/webhooks.py
+++ b/src/cloudflare/resources/alerting/destinations/webhooks.py
@@ -6,24 +6,24 @@
import httpx
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ....._utils import (
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._utils import (
maybe_transform,
async_maybe_transform,
)
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
-from ....._response import (
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....._wrappers import ResultWrapper
-from ....._base_client import (
+from ...._wrappers import ResultWrapper
+from ...._base_client import (
make_request_options,
)
-from .....types.alerting.v3.destinations import (
+from ....types.alerting.destinations import (
AaaWebhooks,
WebhookListResponse,
WebhookCreateResponse,
diff --git a/src/cloudflare/resources/alerting/v3/histories.py b/src/cloudflare/resources/alerting/history.py
similarity index 78%
rename from src/cloudflare/resources/alerting/v3/histories.py
rename to src/cloudflare/resources/alerting/history.py
index a64f928cedc..9ca93d35575 100644
--- a/src/cloudflare/resources/alerting/v3/histories.py
+++ b/src/cloudflare/resources/alerting/history.py
@@ -7,34 +7,34 @@
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import maybe_transform
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from ...._base_client import (
+from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
+from ..._base_client import (
AsyncPaginator,
make_request_options,
)
-from ....types.alerting.v3 import AaaHistory, history_list_params
+from ...types.alerting import AaaHistory, history_list_params
-__all__ = ["Histories", "AsyncHistories"]
+__all__ = ["History", "AsyncHistory"]
-class Histories(SyncAPIResource):
+class History(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> HistoriesWithRawResponse:
- return HistoriesWithRawResponse(self)
+ def with_raw_response(self) -> HistoryWithRawResponse:
+ return HistoryWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> HistoriesWithStreamingResponse:
- return HistoriesWithStreamingResponse(self)
+ def with_streaming_response(self) -> HistoryWithStreamingResponse:
+ return HistoryWithStreamingResponse(self)
def list(
self,
@@ -102,14 +102,14 @@ def list(
)
-class AsyncHistories(AsyncAPIResource):
+class AsyncHistory(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncHistoriesWithRawResponse:
- return AsyncHistoriesWithRawResponse(self)
+ def with_raw_response(self) -> AsyncHistoryWithRawResponse:
+ return AsyncHistoryWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncHistoriesWithStreamingResponse:
- return AsyncHistoriesWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncHistoryWithStreamingResponse:
+ return AsyncHistoryWithStreamingResponse(self)
def list(
self,
@@ -177,37 +177,37 @@ def list(
)
-class HistoriesWithRawResponse:
- def __init__(self, histories: Histories) -> None:
- self._histories = histories
+class HistoryWithRawResponse:
+ def __init__(self, history: History) -> None:
+ self._history = history
self.list = to_raw_response_wrapper(
- histories.list,
+ history.list,
)
-class AsyncHistoriesWithRawResponse:
- def __init__(self, histories: AsyncHistories) -> None:
- self._histories = histories
+class AsyncHistoryWithRawResponse:
+ def __init__(self, history: AsyncHistory) -> None:
+ self._history = history
self.list = async_to_raw_response_wrapper(
- histories.list,
+ history.list,
)
-class HistoriesWithStreamingResponse:
- def __init__(self, histories: Histories) -> None:
- self._histories = histories
+class HistoryWithStreamingResponse:
+ def __init__(self, history: History) -> None:
+ self._history = history
self.list = to_streamed_response_wrapper(
- histories.list,
+ history.list,
)
-class AsyncHistoriesWithStreamingResponse:
- def __init__(self, histories: AsyncHistories) -> None:
- self._histories = histories
+class AsyncHistoryWithStreamingResponse:
+ def __init__(self, history: AsyncHistory) -> None:
+ self._history = history
self.list = async_to_streamed_response_wrapper(
- histories.list,
+ history.list,
)
diff --git a/src/cloudflare/resources/alerting/v3/policies.py b/src/cloudflare/resources/alerting/policies.py
similarity index 99%
rename from src/cloudflare/resources/alerting/v3/policies.py
rename to src/cloudflare/resources/alerting/policies.py
index 14be55177c8..2c6b735855c 100644
--- a/src/cloudflare/resources/alerting/v3/policies.py
+++ b/src/cloudflare/resources/alerting/policies.py
@@ -7,24 +7,24 @@
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import (
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import (
maybe_transform,
async_maybe_transform,
)
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ...._wrappers import ResultWrapper
-from ...._base_client import (
+from ..._wrappers import ResultWrapper
+from ..._base_client import (
make_request_options,
)
-from ....types.alerting.v3 import (
+from ...types.alerting import (
AaaPolicies,
PolicyListResponse,
PolicyCreateResponse,
diff --git a/src/cloudflare/resources/alerting/v3/__init__.py b/src/cloudflare/resources/alerting/v3/__init__.py
deleted file mode 100644
index 428c241c46a..00000000000
--- a/src/cloudflare/resources/alerting/v3/__init__.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .v3 import (
- V3,
- AsyncV3,
- V3WithRawResponse,
- AsyncV3WithRawResponse,
- V3WithStreamingResponse,
- AsyncV3WithStreamingResponse,
-)
-from .policies import (
- Policies,
- AsyncPolicies,
- PoliciesWithRawResponse,
- AsyncPoliciesWithRawResponse,
- PoliciesWithStreamingResponse,
- AsyncPoliciesWithStreamingResponse,
-)
-from .histories import (
- Histories,
- AsyncHistories,
- HistoriesWithRawResponse,
- AsyncHistoriesWithRawResponse,
- HistoriesWithStreamingResponse,
- AsyncHistoriesWithStreamingResponse,
-)
-from .destinations import (
- Destinations,
- AsyncDestinations,
- DestinationsWithRawResponse,
- AsyncDestinationsWithRawResponse,
- DestinationsWithStreamingResponse,
- AsyncDestinationsWithStreamingResponse,
-)
-
-__all__ = [
- "Destinations",
- "AsyncDestinations",
- "DestinationsWithRawResponse",
- "AsyncDestinationsWithRawResponse",
- "DestinationsWithStreamingResponse",
- "AsyncDestinationsWithStreamingResponse",
- "Histories",
- "AsyncHistories",
- "HistoriesWithRawResponse",
- "AsyncHistoriesWithRawResponse",
- "HistoriesWithStreamingResponse",
- "AsyncHistoriesWithStreamingResponse",
- "Policies",
- "AsyncPolicies",
- "PoliciesWithRawResponse",
- "AsyncPoliciesWithRawResponse",
- "PoliciesWithStreamingResponse",
- "AsyncPoliciesWithStreamingResponse",
- "V3",
- "AsyncV3",
- "V3WithRawResponse",
- "AsyncV3WithRawResponse",
- "V3WithStreamingResponse",
- "AsyncV3WithStreamingResponse",
-]
diff --git a/src/cloudflare/resources/alerting/v3/v3.py b/src/cloudflare/resources/alerting/v3/v3.py
deleted file mode 100644
index 3419b7082d6..00000000000
--- a/src/cloudflare/resources/alerting/v3/v3.py
+++ /dev/null
@@ -1,265 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Any, Optional, cast
-
-import httpx
-
-from .policies import (
- Policies,
- AsyncPolicies,
- PoliciesWithRawResponse,
- AsyncPoliciesWithRawResponse,
- PoliciesWithStreamingResponse,
- AsyncPoliciesWithStreamingResponse,
-)
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from .histories import (
- Histories,
- AsyncHistories,
- HistoriesWithRawResponse,
- AsyncHistoriesWithRawResponse,
- HistoriesWithStreamingResponse,
- AsyncHistoriesWithStreamingResponse,
-)
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ...._wrappers import ResultWrapper
-from .destinations import (
- Destinations,
- AsyncDestinations,
- DestinationsWithRawResponse,
- AsyncDestinationsWithRawResponse,
- DestinationsWithStreamingResponse,
- AsyncDestinationsWithStreamingResponse,
-)
-from ...._base_client import (
- make_request_options,
-)
-from ....types.alerting import V3ListResponse
-from .destinations.destinations import Destinations, AsyncDestinations
-
-__all__ = ["V3", "AsyncV3"]
-
-
-class V3(SyncAPIResource):
- @cached_property
- def destinations(self) -> Destinations:
- return Destinations(self._client)
-
- @cached_property
- def histories(self) -> Histories:
- return Histories(self._client)
-
- @cached_property
- def policies(self) -> Policies:
- return Policies(self._client)
-
- @cached_property
- def with_raw_response(self) -> V3WithRawResponse:
- return V3WithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> V3WithStreamingResponse:
- return V3WithStreamingResponse(self)
-
- def list(
- self,
- *,
- account_id: str,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[V3ListResponse]:
- """
- Gets a list of all alert types for which an account is eligible.
-
- Args:
- account_id: The account id
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not account_id:
- raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- Optional[V3ListResponse],
- self._get(
- f"/accounts/{account_id}/alerting/v3/available_alerts",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[V3ListResponse]
- ), # Union types cannot be passed in as arguments in the type system
- ),
- )
-
-
-class AsyncV3(AsyncAPIResource):
- @cached_property
- def destinations(self) -> AsyncDestinations:
- return AsyncDestinations(self._client)
-
- @cached_property
- def histories(self) -> AsyncHistories:
- return AsyncHistories(self._client)
-
- @cached_property
- def policies(self) -> AsyncPolicies:
- return AsyncPolicies(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncV3WithRawResponse:
- return AsyncV3WithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncV3WithStreamingResponse:
- return AsyncV3WithStreamingResponse(self)
-
- async def list(
- self,
- *,
- account_id: str,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[V3ListResponse]:
- """
- Gets a list of all alert types for which an account is eligible.
-
- Args:
- account_id: The account id
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not account_id:
- raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
- return cast(
- Optional[V3ListResponse],
- await self._get(
- f"/accounts/{account_id}/alerting/v3/available_alerts",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(
- Any, ResultWrapper[V3ListResponse]
- ), # Union types cannot be passed in as arguments in the type system
- ),
- )
-
-
-class V3WithRawResponse:
- def __init__(self, v3: V3) -> None:
- self._v3 = v3
-
- self.list = to_raw_response_wrapper(
- v3.list,
- )
-
- @cached_property
- def destinations(self) -> DestinationsWithRawResponse:
- return DestinationsWithRawResponse(self._v3.destinations)
-
- @cached_property
- def histories(self) -> HistoriesWithRawResponse:
- return HistoriesWithRawResponse(self._v3.histories)
-
- @cached_property
- def policies(self) -> PoliciesWithRawResponse:
- return PoliciesWithRawResponse(self._v3.policies)
-
-
-class AsyncV3WithRawResponse:
- def __init__(self, v3: AsyncV3) -> None:
- self._v3 = v3
-
- self.list = async_to_raw_response_wrapper(
- v3.list,
- )
-
- @cached_property
- def destinations(self) -> AsyncDestinationsWithRawResponse:
- return AsyncDestinationsWithRawResponse(self._v3.destinations)
-
- @cached_property
- def histories(self) -> AsyncHistoriesWithRawResponse:
- return AsyncHistoriesWithRawResponse(self._v3.histories)
-
- @cached_property
- def policies(self) -> AsyncPoliciesWithRawResponse:
- return AsyncPoliciesWithRawResponse(self._v3.policies)
-
-
-class V3WithStreamingResponse:
- def __init__(self, v3: V3) -> None:
- self._v3 = v3
-
- self.list = to_streamed_response_wrapper(
- v3.list,
- )
-
- @cached_property
- def destinations(self) -> DestinationsWithStreamingResponse:
- return DestinationsWithStreamingResponse(self._v3.destinations)
-
- @cached_property
- def histories(self) -> HistoriesWithStreamingResponse:
- return HistoriesWithStreamingResponse(self._v3.histories)
-
- @cached_property
- def policies(self) -> PoliciesWithStreamingResponse:
- return PoliciesWithStreamingResponse(self._v3.policies)
-
-
-class AsyncV3WithStreamingResponse:
- def __init__(self, v3: AsyncV3) -> None:
- self._v3 = v3
-
- self.list = async_to_streamed_response_wrapper(
- v3.list,
- )
-
- @cached_property
- def destinations(self) -> AsyncDestinationsWithStreamingResponse:
- return AsyncDestinationsWithStreamingResponse(self._v3.destinations)
-
- @cached_property
- def histories(self) -> AsyncHistoriesWithStreamingResponse:
- return AsyncHistoriesWithStreamingResponse(self._v3.histories)
-
- @cached_property
- def policies(self) -> AsyncPoliciesWithStreamingResponse:
- return AsyncPoliciesWithStreamingResponse(self._v3.policies)
diff --git a/src/cloudflare/resources/email_routing/__init__.py b/src/cloudflare/resources/email_routing/__init__.py
index 3f1a806efdb..b7bd0fb42fa 100644
--- a/src/cloudflare/resources/email_routing/__init__.py
+++ b/src/cloudflare/resources/email_routing/__init__.py
@@ -1,12 +1,28 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .routing import (
- Routing,
- AsyncRouting,
- RoutingWithRawResponse,
- AsyncRoutingWithRawResponse,
- RoutingWithStreamingResponse,
- AsyncRoutingWithStreamingResponse,
+from .dns import (
+ DNS,
+ AsyncDNS,
+ DNSWithRawResponse,
+ AsyncDNSWithRawResponse,
+ DNSWithStreamingResponse,
+ AsyncDNSWithStreamingResponse,
+)
+from .rules import (
+ Rules,
+ AsyncRules,
+ RulesWithRawResponse,
+ AsyncRulesWithRawResponse,
+ RulesWithStreamingResponse,
+ AsyncRulesWithStreamingResponse,
+)
+from .addresses import (
+ Addresses,
+ AsyncAddresses,
+ AddressesWithRawResponse,
+ AsyncAddressesWithRawResponse,
+ AddressesWithStreamingResponse,
+ AsyncAddressesWithStreamingResponse,
)
from .email_routing import (
EmailRouting,
@@ -18,12 +34,24 @@
)
__all__ = [
- "Routing",
- "AsyncRouting",
- "RoutingWithRawResponse",
- "AsyncRoutingWithRawResponse",
- "RoutingWithStreamingResponse",
- "AsyncRoutingWithStreamingResponse",
+ "DNS",
+ "AsyncDNS",
+ "DNSWithRawResponse",
+ "AsyncDNSWithRawResponse",
+ "DNSWithStreamingResponse",
+ "AsyncDNSWithStreamingResponse",
+ "Rules",
+ "AsyncRules",
+ "RulesWithRawResponse",
+ "AsyncRulesWithRawResponse",
+ "RulesWithStreamingResponse",
+ "AsyncRulesWithStreamingResponse",
+ "Addresses",
+ "AsyncAddresses",
+ "AddressesWithRawResponse",
+ "AsyncAddressesWithRawResponse",
+ "AddressesWithStreamingResponse",
+ "AsyncAddressesWithStreamingResponse",
"EmailRouting",
"AsyncEmailRouting",
"EmailRoutingWithRawResponse",
diff --git a/src/cloudflare/resources/email_routing/routing/addresses.py b/src/cloudflare/resources/email_routing/addresses.py
similarity index 97%
rename from src/cloudflare/resources/email_routing/routing/addresses.py
rename to src/cloudflare/resources/email_routing/addresses.py
index efc70d652b1..b810ed54eaf 100644
--- a/src/cloudflare/resources/email_routing/routing/addresses.py
+++ b/src/cloudflare/resources/email_routing/addresses.py
@@ -7,26 +7,26 @@
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._utils import (
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._utils import (
maybe_transform,
async_maybe_transform,
)
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ...._wrappers import ResultWrapper
-from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from ...._base_client import (
+from ..._wrappers import ResultWrapper
+from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
+from ..._base_client import (
AsyncPaginator,
make_request_options,
)
-from ....types.email_routing.routing import (
+from ...types.email_routing import (
AddressGetResponse,
AddressListResponse,
AddressCreateResponse,
diff --git a/src/cloudflare/resources/email_routing/routing/dns.py b/src/cloudflare/resources/email_routing/dns.py
similarity index 93%
rename from src/cloudflare/resources/email_routing/routing/dns.py
rename to src/cloudflare/resources/email_routing/dns.py
index e846a5f7ea8..0ee6ff2fb7b 100644
--- a/src/cloudflare/resources/email_routing/routing/dns.py
+++ b/src/cloudflare/resources/email_routing/dns.py
@@ -6,20 +6,20 @@
import httpx
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ...._compat import cached_property
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ...._wrappers import ResultWrapper
-from ...._base_client import (
+from ..._wrappers import ResultWrapper
+from ..._base_client import (
make_request_options,
)
-from ....types.email_routing.routing import DNSGetResponse
+from ...types.email_routing import DNSGetResponse
__all__ = ["DNS", "AsyncDNS"]
diff --git a/src/cloudflare/resources/email_routing/email_routing.py b/src/cloudflare/resources/email_routing/email_routing.py
index 6f62379cd7a..c4c10871fcb 100644
--- a/src/cloudflare/resources/email_routing/email_routing.py
+++ b/src/cloudflare/resources/email_routing/email_routing.py
@@ -2,25 +2,65 @@
from __future__ import annotations
-from .routing import (
- Routing,
- AsyncRouting,
- RoutingWithRawResponse,
- AsyncRoutingWithRawResponse,
- RoutingWithStreamingResponse,
- AsyncRoutingWithStreamingResponse,
+from typing import Type, cast
+
+import httpx
+
+from .dns import (
+ DNS,
+ AsyncDNS,
+ DNSWithRawResponse,
+ AsyncDNSWithRawResponse,
+ DNSWithStreamingResponse,
+ AsyncDNSWithStreamingResponse,
+)
+from .rules import (
+ Rules,
+ AsyncRules,
+ RulesWithRawResponse,
+ AsyncRulesWithRawResponse,
+ RulesWithStreamingResponse,
+ AsyncRulesWithStreamingResponse,
)
+from ...types import EmailRoutingGetResponse, EmailRoutingEnableResponse, EmailRoutingDisableResponse
+from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ..._compat import cached_property
+from .addresses import (
+ Addresses,
+ AsyncAddresses,
+ AddressesWithRawResponse,
+ AsyncAddressesWithRawResponse,
+ AddressesWithStreamingResponse,
+ AsyncAddressesWithStreamingResponse,
+)
from ..._resource import SyncAPIResource, AsyncAPIResource
-from .routing.routing import Routing, AsyncRouting
+from ..._response import (
+ to_raw_response_wrapper,
+ to_streamed_response_wrapper,
+ async_to_raw_response_wrapper,
+ async_to_streamed_response_wrapper,
+)
+from ..._wrappers import ResultWrapper
+from .rules.rules import Rules, AsyncRules
+from ..._base_client import (
+ make_request_options,
+)
__all__ = ["EmailRouting", "AsyncEmailRouting"]
class EmailRouting(SyncAPIResource):
@cached_property
- def routing(self) -> Routing:
- return Routing(self._client)
+ def dns(self) -> DNS:
+ return DNS(self._client)
+
+ @cached_property
+ def rules(self) -> Rules:
+ return Rules(self._client)
+
+ @cached_property
+ def addresses(self) -> Addresses:
+ return Addresses(self._client)
@cached_property
def with_raw_response(self) -> EmailRoutingWithRawResponse:
@@ -30,11 +70,139 @@ def with_raw_response(self) -> EmailRoutingWithRawResponse:
def with_streaming_response(self) -> EmailRoutingWithStreamingResponse:
return EmailRoutingWithStreamingResponse(self)
+ def disable(
+ self,
+ zone_identifier: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> EmailRoutingDisableResponse:
+ """Disable your Email Routing zone.
+
+ Also removes additional MX records previously
+ required for Email Routing to work.
+
+ Args:
+ zone_identifier: Identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not zone_identifier:
+ raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
+ return self._post(
+ f"/zones/{zone_identifier}/email/routing/disable",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(Type[EmailRoutingDisableResponse], ResultWrapper[EmailRoutingDisableResponse]),
+ )
+
+ def enable(
+ self,
+ zone_identifier: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> EmailRoutingEnableResponse:
+ """Enable you Email Routing zone.
+
+ Add and lock the necessary MX and SPF records.
+
+ Args:
+ zone_identifier: Identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not zone_identifier:
+ raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
+ return self._post(
+ f"/zones/{zone_identifier}/email/routing/enable",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(Type[EmailRoutingEnableResponse], ResultWrapper[EmailRoutingEnableResponse]),
+ )
+
+ def get(
+ self,
+ zone_identifier: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> EmailRoutingGetResponse:
+ """
+ Get information about the settings for your Email Routing zone.
+
+ Args:
+ zone_identifier: Identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not zone_identifier:
+ raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
+ return self._get(
+ f"/zones/{zone_identifier}/email/routing",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(Type[EmailRoutingGetResponse], ResultWrapper[EmailRoutingGetResponse]),
+ )
+
class AsyncEmailRouting(AsyncAPIResource):
@cached_property
- def routing(self) -> AsyncRouting:
- return AsyncRouting(self._client)
+ def dns(self) -> AsyncDNS:
+ return AsyncDNS(self._client)
+
+ @cached_property
+ def rules(self) -> AsyncRules:
+ return AsyncRules(self._client)
+
+ @cached_property
+ def addresses(self) -> AsyncAddresses:
+ return AsyncAddresses(self._client)
@cached_property
def with_raw_response(self) -> AsyncEmailRoutingWithRawResponse:
@@ -44,38 +212,230 @@ def with_raw_response(self) -> AsyncEmailRoutingWithRawResponse:
def with_streaming_response(self) -> AsyncEmailRoutingWithStreamingResponse:
return AsyncEmailRoutingWithStreamingResponse(self)
+ async def disable(
+ self,
+ zone_identifier: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> EmailRoutingDisableResponse:
+ """Disable your Email Routing zone.
+
+ Also removes additional MX records previously
+ required for Email Routing to work.
+
+ Args:
+ zone_identifier: Identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not zone_identifier:
+ raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
+ return await self._post(
+ f"/zones/{zone_identifier}/email/routing/disable",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(Type[EmailRoutingDisableResponse], ResultWrapper[EmailRoutingDisableResponse]),
+ )
+
+ async def enable(
+ self,
+ zone_identifier: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> EmailRoutingEnableResponse:
+ """Enable you Email Routing zone.
+
+ Add and lock the necessary MX and SPF records.
+
+ Args:
+ zone_identifier: Identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not zone_identifier:
+ raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
+ return await self._post(
+ f"/zones/{zone_identifier}/email/routing/enable",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(Type[EmailRoutingEnableResponse], ResultWrapper[EmailRoutingEnableResponse]),
+ )
+
+ async def get(
+ self,
+ zone_identifier: str,
+ *,
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
+ # The extra values given here take precedence over values defined on the client or passed to this method.
+ extra_headers: Headers | None = None,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> EmailRoutingGetResponse:
+ """
+ Get information about the settings for your Email Routing zone.
+
+ Args:
+ zone_identifier: Identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if not zone_identifier:
+ raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
+ return await self._get(
+ f"/zones/{zone_identifier}/email/routing",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ post_parser=ResultWrapper._unwrapper,
+ ),
+ cast_to=cast(Type[EmailRoutingGetResponse], ResultWrapper[EmailRoutingGetResponse]),
+ )
+
class EmailRoutingWithRawResponse:
def __init__(self, email_routing: EmailRouting) -> None:
self._email_routing = email_routing
+ self.disable = to_raw_response_wrapper(
+ email_routing.disable,
+ )
+ self.enable = to_raw_response_wrapper(
+ email_routing.enable,
+ )
+ self.get = to_raw_response_wrapper(
+ email_routing.get,
+ )
+
@cached_property
- def routing(self) -> RoutingWithRawResponse:
- return RoutingWithRawResponse(self._email_routing.routing)
+ def dns(self) -> DNSWithRawResponse:
+ return DNSWithRawResponse(self._email_routing.dns)
+
+ @cached_property
+ def rules(self) -> RulesWithRawResponse:
+ return RulesWithRawResponse(self._email_routing.rules)
+
+ @cached_property
+ def addresses(self) -> AddressesWithRawResponse:
+ return AddressesWithRawResponse(self._email_routing.addresses)
class AsyncEmailRoutingWithRawResponse:
def __init__(self, email_routing: AsyncEmailRouting) -> None:
self._email_routing = email_routing
+ self.disable = async_to_raw_response_wrapper(
+ email_routing.disable,
+ )
+ self.enable = async_to_raw_response_wrapper(
+ email_routing.enable,
+ )
+ self.get = async_to_raw_response_wrapper(
+ email_routing.get,
+ )
+
@cached_property
- def routing(self) -> AsyncRoutingWithRawResponse:
- return AsyncRoutingWithRawResponse(self._email_routing.routing)
+ def dns(self) -> AsyncDNSWithRawResponse:
+ return AsyncDNSWithRawResponse(self._email_routing.dns)
+
+ @cached_property
+ def rules(self) -> AsyncRulesWithRawResponse:
+ return AsyncRulesWithRawResponse(self._email_routing.rules)
+
+ @cached_property
+ def addresses(self) -> AsyncAddressesWithRawResponse:
+ return AsyncAddressesWithRawResponse(self._email_routing.addresses)
class EmailRoutingWithStreamingResponse:
def __init__(self, email_routing: EmailRouting) -> None:
self._email_routing = email_routing
+ self.disable = to_streamed_response_wrapper(
+ email_routing.disable,
+ )
+ self.enable = to_streamed_response_wrapper(
+ email_routing.enable,
+ )
+ self.get = to_streamed_response_wrapper(
+ email_routing.get,
+ )
+
@cached_property
- def routing(self) -> RoutingWithStreamingResponse:
- return RoutingWithStreamingResponse(self._email_routing.routing)
+ def dns(self) -> DNSWithStreamingResponse:
+ return DNSWithStreamingResponse(self._email_routing.dns)
+
+ @cached_property
+ def rules(self) -> RulesWithStreamingResponse:
+ return RulesWithStreamingResponse(self._email_routing.rules)
+
+ @cached_property
+ def addresses(self) -> AddressesWithStreamingResponse:
+ return AddressesWithStreamingResponse(self._email_routing.addresses)
class AsyncEmailRoutingWithStreamingResponse:
def __init__(self, email_routing: AsyncEmailRouting) -> None:
self._email_routing = email_routing
+ self.disable = async_to_streamed_response_wrapper(
+ email_routing.disable,
+ )
+ self.enable = async_to_streamed_response_wrapper(
+ email_routing.enable,
+ )
+ self.get = async_to_streamed_response_wrapper(
+ email_routing.get,
+ )
+
+ @cached_property
+ def dns(self) -> AsyncDNSWithStreamingResponse:
+ return AsyncDNSWithStreamingResponse(self._email_routing.dns)
+
+ @cached_property
+ def rules(self) -> AsyncRulesWithStreamingResponse:
+ return AsyncRulesWithStreamingResponse(self._email_routing.rules)
+
@cached_property
- def routing(self) -> AsyncRoutingWithStreamingResponse:
- return AsyncRoutingWithStreamingResponse(self._email_routing.routing)
+ def addresses(self) -> AsyncAddressesWithStreamingResponse:
+ return AsyncAddressesWithStreamingResponse(self._email_routing.addresses)
diff --git a/src/cloudflare/resources/email_routing/routing/__init__.py b/src/cloudflare/resources/email_routing/routing/__init__.py
deleted file mode 100644
index 357281aad1f..00000000000
--- a/src/cloudflare/resources/email_routing/routing/__init__.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .dns import (
- DNS,
- AsyncDNS,
- DNSWithRawResponse,
- AsyncDNSWithRawResponse,
- DNSWithStreamingResponse,
- AsyncDNSWithStreamingResponse,
-)
-from .rules import (
- Rules,
- AsyncRules,
- RulesWithRawResponse,
- AsyncRulesWithRawResponse,
- RulesWithStreamingResponse,
- AsyncRulesWithStreamingResponse,
-)
-from .routing import (
- Routing,
- AsyncRouting,
- RoutingWithRawResponse,
- AsyncRoutingWithRawResponse,
- RoutingWithStreamingResponse,
- AsyncRoutingWithStreamingResponse,
-)
-from .addresses import (
- Addresses,
- AsyncAddresses,
- AddressesWithRawResponse,
- AsyncAddressesWithRawResponse,
- AddressesWithStreamingResponse,
- AsyncAddressesWithStreamingResponse,
-)
-
-__all__ = [
- "DNS",
- "AsyncDNS",
- "DNSWithRawResponse",
- "AsyncDNSWithRawResponse",
- "DNSWithStreamingResponse",
- "AsyncDNSWithStreamingResponse",
- "Rules",
- "AsyncRules",
- "RulesWithRawResponse",
- "AsyncRulesWithRawResponse",
- "RulesWithStreamingResponse",
- "AsyncRulesWithStreamingResponse",
- "Addresses",
- "AsyncAddresses",
- "AddressesWithRawResponse",
- "AsyncAddressesWithRawResponse",
- "AddressesWithStreamingResponse",
- "AsyncAddressesWithStreamingResponse",
- "Routing",
- "AsyncRouting",
- "RoutingWithRawResponse",
- "AsyncRoutingWithRawResponse",
- "RoutingWithStreamingResponse",
- "AsyncRoutingWithStreamingResponse",
-]
diff --git a/src/cloudflare/resources/email_routing/routing/routing.py b/src/cloudflare/resources/email_routing/routing/routing.py
deleted file mode 100644
index fefef4331d3..00000000000
--- a/src/cloudflare/resources/email_routing/routing/routing.py
+++ /dev/null
@@ -1,441 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Type, cast
-
-import httpx
-
-from .dns import (
- DNS,
- AsyncDNS,
- DNSWithRawResponse,
- AsyncDNSWithRawResponse,
- DNSWithStreamingResponse,
- AsyncDNSWithStreamingResponse,
-)
-from .rules import (
- Rules,
- AsyncRules,
- RulesWithRawResponse,
- AsyncRulesWithRawResponse,
- RulesWithStreamingResponse,
- AsyncRulesWithStreamingResponse,
-)
-from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from .addresses import (
- Addresses,
- AsyncAddresses,
- AddressesWithRawResponse,
- AsyncAddressesWithRawResponse,
- AddressesWithStreamingResponse,
- AsyncAddressesWithStreamingResponse,
-)
-from ...._compat import cached_property
-from .rules.rules import Rules, AsyncRules
-from ...._resource import SyncAPIResource, AsyncAPIResource
-from ...._response import (
- to_raw_response_wrapper,
- to_streamed_response_wrapper,
- async_to_raw_response_wrapper,
- async_to_streamed_response_wrapper,
-)
-from ...._wrappers import ResultWrapper
-from ...._base_client import (
- make_request_options,
-)
-from ....types.email_routing import RoutingGetResponse, RoutingEnableResponse, RoutingDisableResponse
-
-__all__ = ["Routing", "AsyncRouting"]
-
-
-class Routing(SyncAPIResource):
- @cached_property
- def dns(self) -> DNS:
- return DNS(self._client)
-
- @cached_property
- def rules(self) -> Rules:
- return Rules(self._client)
-
- @cached_property
- def addresses(self) -> Addresses:
- return Addresses(self._client)
-
- @cached_property
- def with_raw_response(self) -> RoutingWithRawResponse:
- return RoutingWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> RoutingWithStreamingResponse:
- return RoutingWithStreamingResponse(self)
-
- def disable(
- self,
- zone_identifier: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RoutingDisableResponse:
- """Disable your Email Routing zone.
-
- Also removes additional MX records previously
- required for Email Routing to work.
-
- Args:
- zone_identifier: Identifier
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not zone_identifier:
- raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
- return self._post(
- f"/zones/{zone_identifier}/email/routing/disable",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(Type[RoutingDisableResponse], ResultWrapper[RoutingDisableResponse]),
- )
-
- def enable(
- self,
- zone_identifier: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RoutingEnableResponse:
- """Enable you Email Routing zone.
-
- Add and lock the necessary MX and SPF records.
-
- Args:
- zone_identifier: Identifier
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not zone_identifier:
- raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
- return self._post(
- f"/zones/{zone_identifier}/email/routing/enable",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(Type[RoutingEnableResponse], ResultWrapper[RoutingEnableResponse]),
- )
-
- def get(
- self,
- zone_identifier: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RoutingGetResponse:
- """
- Get information about the settings for your Email Routing zone.
-
- Args:
- zone_identifier: Identifier
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not zone_identifier:
- raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
- return self._get(
- f"/zones/{zone_identifier}/email/routing",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(Type[RoutingGetResponse], ResultWrapper[RoutingGetResponse]),
- )
-
-
-class AsyncRouting(AsyncAPIResource):
- @cached_property
- def dns(self) -> AsyncDNS:
- return AsyncDNS(self._client)
-
- @cached_property
- def rules(self) -> AsyncRules:
- return AsyncRules(self._client)
-
- @cached_property
- def addresses(self) -> AsyncAddresses:
- return AsyncAddresses(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncRoutingWithRawResponse:
- return AsyncRoutingWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncRoutingWithStreamingResponse:
- return AsyncRoutingWithStreamingResponse(self)
-
- async def disable(
- self,
- zone_identifier: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RoutingDisableResponse:
- """Disable your Email Routing zone.
-
- Also removes additional MX records previously
- required for Email Routing to work.
-
- Args:
- zone_identifier: Identifier
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not zone_identifier:
- raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
- return await self._post(
- f"/zones/{zone_identifier}/email/routing/disable",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(Type[RoutingDisableResponse], ResultWrapper[RoutingDisableResponse]),
- )
-
- async def enable(
- self,
- zone_identifier: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RoutingEnableResponse:
- """Enable you Email Routing zone.
-
- Add and lock the necessary MX and SPF records.
-
- Args:
- zone_identifier: Identifier
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not zone_identifier:
- raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
- return await self._post(
- f"/zones/{zone_identifier}/email/routing/enable",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(Type[RoutingEnableResponse], ResultWrapper[RoutingEnableResponse]),
- )
-
- async def get(
- self,
- zone_identifier: str,
- *,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RoutingGetResponse:
- """
- Get information about the settings for your Email Routing zone.
-
- Args:
- zone_identifier: Identifier
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
- """
- if not zone_identifier:
- raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}")
- return await self._get(
- f"/zones/{zone_identifier}/email/routing",
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- post_parser=ResultWrapper._unwrapper,
- ),
- cast_to=cast(Type[RoutingGetResponse], ResultWrapper[RoutingGetResponse]),
- )
-
-
-class RoutingWithRawResponse:
- def __init__(self, routing: Routing) -> None:
- self._routing = routing
-
- self.disable = to_raw_response_wrapper(
- routing.disable,
- )
- self.enable = to_raw_response_wrapper(
- routing.enable,
- )
- self.get = to_raw_response_wrapper(
- routing.get,
- )
-
- @cached_property
- def dns(self) -> DNSWithRawResponse:
- return DNSWithRawResponse(self._routing.dns)
-
- @cached_property
- def rules(self) -> RulesWithRawResponse:
- return RulesWithRawResponse(self._routing.rules)
-
- @cached_property
- def addresses(self) -> AddressesWithRawResponse:
- return AddressesWithRawResponse(self._routing.addresses)
-
-
-class AsyncRoutingWithRawResponse:
- def __init__(self, routing: AsyncRouting) -> None:
- self._routing = routing
-
- self.disable = async_to_raw_response_wrapper(
- routing.disable,
- )
- self.enable = async_to_raw_response_wrapper(
- routing.enable,
- )
- self.get = async_to_raw_response_wrapper(
- routing.get,
- )
-
- @cached_property
- def dns(self) -> AsyncDNSWithRawResponse:
- return AsyncDNSWithRawResponse(self._routing.dns)
-
- @cached_property
- def rules(self) -> AsyncRulesWithRawResponse:
- return AsyncRulesWithRawResponse(self._routing.rules)
-
- @cached_property
- def addresses(self) -> AsyncAddressesWithRawResponse:
- return AsyncAddressesWithRawResponse(self._routing.addresses)
-
-
-class RoutingWithStreamingResponse:
- def __init__(self, routing: Routing) -> None:
- self._routing = routing
-
- self.disable = to_streamed_response_wrapper(
- routing.disable,
- )
- self.enable = to_streamed_response_wrapper(
- routing.enable,
- )
- self.get = to_streamed_response_wrapper(
- routing.get,
- )
-
- @cached_property
- def dns(self) -> DNSWithStreamingResponse:
- return DNSWithStreamingResponse(self._routing.dns)
-
- @cached_property
- def rules(self) -> RulesWithStreamingResponse:
- return RulesWithStreamingResponse(self._routing.rules)
-
- @cached_property
- def addresses(self) -> AddressesWithStreamingResponse:
- return AddressesWithStreamingResponse(self._routing.addresses)
-
-
-class AsyncRoutingWithStreamingResponse:
- def __init__(self, routing: AsyncRouting) -> None:
- self._routing = routing
-
- self.disable = async_to_streamed_response_wrapper(
- routing.disable,
- )
- self.enable = async_to_streamed_response_wrapper(
- routing.enable,
- )
- self.get = async_to_streamed_response_wrapper(
- routing.get,
- )
-
- @cached_property
- def dns(self) -> AsyncDNSWithStreamingResponse:
- return AsyncDNSWithStreamingResponse(self._routing.dns)
-
- @cached_property
- def rules(self) -> AsyncRulesWithStreamingResponse:
- return AsyncRulesWithStreamingResponse(self._routing.rules)
-
- @cached_property
- def addresses(self) -> AsyncAddressesWithStreamingResponse:
- return AsyncAddressesWithStreamingResponse(self._routing.addresses)
diff --git a/src/cloudflare/resources/email_routing/routing/rules/__init__.py b/src/cloudflare/resources/email_routing/rules/__init__.py
similarity index 100%
rename from src/cloudflare/resources/email_routing/routing/rules/__init__.py
rename to src/cloudflare/resources/email_routing/rules/__init__.py
diff --git a/src/cloudflare/resources/email_routing/routing/rules/catch_alls.py b/src/cloudflare/resources/email_routing/rules/catch_alls.py
similarity index 96%
rename from src/cloudflare/resources/email_routing/routing/rules/catch_alls.py
rename to src/cloudflare/resources/email_routing/rules/catch_alls.py
index e326c32884c..be5a264dab1 100644
--- a/src/cloudflare/resources/email_routing/routing/rules/catch_alls.py
+++ b/src/cloudflare/resources/email_routing/rules/catch_alls.py
@@ -7,24 +7,24 @@
import httpx
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ....._utils import (
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._utils import (
maybe_transform,
async_maybe_transform,
)
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
-from ....._response import (
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....._wrappers import ResultWrapper
-from ....._base_client import (
+from ...._wrappers import ResultWrapper
+from ...._base_client import (
make_request_options,
)
-from .....types.email_routing.routing.rules import EmailCatchAllRule, catch_all_update_params
+from ....types.email_routing.rules import EmailCatchAllRule, catch_all_update_params
__all__ = ["CatchAlls", "AsyncCatchAlls"]
diff --git a/src/cloudflare/resources/email_routing/routing/rules/rules.py b/src/cloudflare/resources/email_routing/rules/rules.py
similarity index 98%
rename from src/cloudflare/resources/email_routing/routing/rules/rules.py
rename to src/cloudflare/resources/email_routing/rules/rules.py
index 6a6b5fe30e3..3ebf372ee59 100644
--- a/src/cloudflare/resources/email_routing/routing/rules/rules.py
+++ b/src/cloudflare/resources/email_routing/rules/rules.py
@@ -7,11 +7,12 @@
import httpx
-from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ....._utils import (
+from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ...._utils import (
maybe_transform,
async_maybe_transform,
)
+from ...._compat import cached_property
from .catch_alls import (
CatchAlls,
AsyncCatchAlls,
@@ -20,21 +21,20 @@
CatchAllsWithStreamingResponse,
AsyncCatchAllsWithStreamingResponse,
)
-from ....._compat import cached_property
-from ....._resource import SyncAPIResource, AsyncAPIResource
-from ....._response import (
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ....._wrappers import ResultWrapper
-from .....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from ....._base_client import (
+from ...._wrappers import ResultWrapper
+from ....pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
+from ...._base_client import (
AsyncPaginator,
make_request_options,
)
-from .....types.email_routing.routing import (
+from ....types.email_routing import (
RuleGetResponse,
RuleListResponse,
RuleCreateResponse,
diff --git a/src/cloudflare/resources/logs/__init__.py b/src/cloudflare/resources/logs/__init__.py
index 3c3cc702560..5a22fc8aeed 100644
--- a/src/cloudflare/resources/logs/__init__.py
+++ b/src/cloudflare/resources/logs/__init__.py
@@ -9,12 +9,12 @@
AsyncLogsWithStreamingResponse,
)
from .rayid import (
- Rayid,
- AsyncRayid,
- RayidWithRawResponse,
- AsyncRayidWithRawResponse,
- RayidWithStreamingResponse,
- AsyncRayidWithStreamingResponse,
+ RayID,
+ AsyncRayID,
+ RayIDWithRawResponse,
+ AsyncRayIDWithRawResponse,
+ RayIDWithStreamingResponse,
+ AsyncRayIDWithStreamingResponse,
)
from .control import (
Control,
@@ -40,12 +40,12 @@
"AsyncControlWithRawResponse",
"ControlWithStreamingResponse",
"AsyncControlWithStreamingResponse",
- "Rayid",
- "AsyncRayid",
- "RayidWithRawResponse",
- "AsyncRayidWithRawResponse",
- "RayidWithStreamingResponse",
- "AsyncRayidWithStreamingResponse",
+ "RayID",
+ "AsyncRayID",
+ "RayIDWithRawResponse",
+ "AsyncRayIDWithRawResponse",
+ "RayIDWithStreamingResponse",
+ "AsyncRayIDWithStreamingResponse",
"Received",
"AsyncReceived",
"ReceivedWithRawResponse",
diff --git a/src/cloudflare/resources/logs/logs.py b/src/cloudflare/resources/logs/logs.py
index 2ef08f57f1d..32db7078099 100644
--- a/src/cloudflare/resources/logs/logs.py
+++ b/src/cloudflare/resources/logs/logs.py
@@ -3,12 +3,12 @@
from __future__ import annotations
from .rayid import (
- Rayid,
- AsyncRayid,
- RayidWithRawResponse,
- AsyncRayidWithRawResponse,
- RayidWithStreamingResponse,
- AsyncRayidWithStreamingResponse,
+ RayID,
+ AsyncRayID,
+ RayIDWithRawResponse,
+ AsyncRayIDWithRawResponse,
+ RayIDWithStreamingResponse,
+ AsyncRayIDWithStreamingResponse,
)
from .control import (
Control,
@@ -40,8 +40,8 @@ def control(self) -> Control:
return Control(self._client)
@cached_property
- def rayid(self) -> Rayid:
- return Rayid(self._client)
+ def rayid(self) -> RayID:
+ return RayID(self._client)
@cached_property
def received(self) -> Received:
@@ -62,8 +62,8 @@ def control(self) -> AsyncControl:
return AsyncControl(self._client)
@cached_property
- def rayid(self) -> AsyncRayid:
- return AsyncRayid(self._client)
+ def rayid(self) -> AsyncRayID:
+ return AsyncRayID(self._client)
@cached_property
def received(self) -> AsyncReceived:
@@ -87,8 +87,8 @@ def control(self) -> ControlWithRawResponse:
return ControlWithRawResponse(self._logs.control)
@cached_property
- def rayid(self) -> RayidWithRawResponse:
- return RayidWithRawResponse(self._logs.rayid)
+ def rayid(self) -> RayIDWithRawResponse:
+ return RayIDWithRawResponse(self._logs.rayid)
@cached_property
def received(self) -> ReceivedWithRawResponse:
@@ -104,8 +104,8 @@ def control(self) -> AsyncControlWithRawResponse:
return AsyncControlWithRawResponse(self._logs.control)
@cached_property
- def rayid(self) -> AsyncRayidWithRawResponse:
- return AsyncRayidWithRawResponse(self._logs.rayid)
+ def rayid(self) -> AsyncRayIDWithRawResponse:
+ return AsyncRayIDWithRawResponse(self._logs.rayid)
@cached_property
def received(self) -> AsyncReceivedWithRawResponse:
@@ -121,8 +121,8 @@ def control(self) -> ControlWithStreamingResponse:
return ControlWithStreamingResponse(self._logs.control)
@cached_property
- def rayid(self) -> RayidWithStreamingResponse:
- return RayidWithStreamingResponse(self._logs.rayid)
+ def rayid(self) -> RayIDWithStreamingResponse:
+ return RayIDWithStreamingResponse(self._logs.rayid)
@cached_property
def received(self) -> ReceivedWithStreamingResponse:
@@ -138,8 +138,8 @@ def control(self) -> AsyncControlWithStreamingResponse:
return AsyncControlWithStreamingResponse(self._logs.control)
@cached_property
- def rayid(self) -> AsyncRayidWithStreamingResponse:
- return AsyncRayidWithStreamingResponse(self._logs.rayid)
+ def rayid(self) -> AsyncRayIDWithStreamingResponse:
+ return AsyncRayIDWithStreamingResponse(self._logs.rayid)
@cached_property
def received(self) -> AsyncReceivedWithStreamingResponse:
diff --git a/src/cloudflare/resources/logs/rayid.py b/src/cloudflare/resources/logs/rayid.py
index 37f0bd07fc8..7b21e5fb1bc 100644
--- a/src/cloudflare/resources/logs/rayid.py
+++ b/src/cloudflare/resources/logs/rayid.py
@@ -20,22 +20,22 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ...types.logs import RayidGetResponse, rayid_get_params
+from ...types.logs import RayIDGetResponse, rayid_get_params
from ..._base_client import (
make_request_options,
)
-__all__ = ["Rayid", "AsyncRayid"]
+__all__ = ["RayID", "AsyncRayID"]
-class Rayid(SyncAPIResource):
+class RayID(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> RayidWithRawResponse:
- return RayidWithRawResponse(self)
+ def with_raw_response(self) -> RayIDWithRawResponse:
+ return RayIDWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> RayidWithStreamingResponse:
- return RayidWithStreamingResponse(self)
+ def with_streaming_response(self) -> RayIDWithStreamingResponse:
+ return RayIDWithStreamingResponse(self)
def get(
self,
@@ -50,7 +50,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RayidGetResponse:
+ ) -> RayIDGetResponse:
"""The `/rayids` api route allows lookups by specific rayid.
The rayids route will
@@ -92,7 +92,7 @@ def get(
if not ray_identifier:
raise ValueError(f"Expected a non-empty value for `ray_identifier` but received {ray_identifier!r}")
return cast(
- RayidGetResponse,
+ RayIDGetResponse,
self._get(
f"/zones/{zone_identifier}/logs/rayids/{ray_identifier}",
options=make_request_options(
@@ -105,22 +105,22 @@ def get(
"fields": fields,
"timestamps": timestamps,
},
- rayid_get_params.RayidGetParams,
+ rayid_get_params.RayIDGetParams,
),
),
- cast_to=cast(Any, RayidGetResponse), # Union types cannot be passed in as arguments in the type system
+ cast_to=cast(Any, RayIDGetResponse), # Union types cannot be passed in as arguments in the type system
),
)
-class AsyncRayid(AsyncAPIResource):
+class AsyncRayID(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncRayidWithRawResponse:
- return AsyncRayidWithRawResponse(self)
+ def with_raw_response(self) -> AsyncRayIDWithRawResponse:
+ return AsyncRayIDWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncRayidWithStreamingResponse:
- return AsyncRayidWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncRayIDWithStreamingResponse:
+ return AsyncRayIDWithStreamingResponse(self)
async def get(
self,
@@ -135,7 +135,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> RayidGetResponse:
+ ) -> RayIDGetResponse:
"""The `/rayids` api route allows lookups by specific rayid.
The rayids route will
@@ -177,7 +177,7 @@ async def get(
if not ray_identifier:
raise ValueError(f"Expected a non-empty value for `ray_identifier` but received {ray_identifier!r}")
return cast(
- RayidGetResponse,
+ RayIDGetResponse,
await self._get(
f"/zones/{zone_identifier}/logs/rayids/{ray_identifier}",
options=make_request_options(
@@ -190,16 +190,16 @@ async def get(
"fields": fields,
"timestamps": timestamps,
},
- rayid_get_params.RayidGetParams,
+ rayid_get_params.RayIDGetParams,
),
),
- cast_to=cast(Any, RayidGetResponse), # Union types cannot be passed in as arguments in the type system
+ cast_to=cast(Any, RayIDGetResponse), # Union types cannot be passed in as arguments in the type system
),
)
-class RayidWithRawResponse:
- def __init__(self, rayid: Rayid) -> None:
+class RayIDWithRawResponse:
+ def __init__(self, rayid: RayID) -> None:
self._rayid = rayid
self.get = to_raw_response_wrapper(
@@ -207,8 +207,8 @@ def __init__(self, rayid: Rayid) -> None:
)
-class AsyncRayidWithRawResponse:
- def __init__(self, rayid: AsyncRayid) -> None:
+class AsyncRayIDWithRawResponse:
+ def __init__(self, rayid: AsyncRayID) -> None:
self._rayid = rayid
self.get = async_to_raw_response_wrapper(
@@ -216,8 +216,8 @@ def __init__(self, rayid: AsyncRayid) -> None:
)
-class RayidWithStreamingResponse:
- def __init__(self, rayid: Rayid) -> None:
+class RayIDWithStreamingResponse:
+ def __init__(self, rayid: RayID) -> None:
self._rayid = rayid
self.get = to_streamed_response_wrapper(
@@ -225,8 +225,8 @@ def __init__(self, rayid: Rayid) -> None:
)
-class AsyncRayidWithStreamingResponse:
- def __init__(self, rayid: AsyncRayid) -> None:
+class AsyncRayIDWithStreamingResponse:
+ def __init__(self, rayid: AsyncRayID) -> None:
self._rayid = rayid
self.get = async_to_streamed_response_wrapper(
diff --git a/src/cloudflare/resources/magic_transit/sites/__init__.py b/src/cloudflare/resources/magic_transit/sites/__init__.py
index 6f7321db90f..87b77022b76 100644
--- a/src/cloudflare/resources/magic_transit/sites/__init__.py
+++ b/src/cloudflare/resources/magic_transit/sites/__init__.py
@@ -9,20 +9,20 @@
AsyncACLsWithStreamingResponse,
)
from .lans import (
- Lans,
- AsyncLans,
- LansWithRawResponse,
- AsyncLansWithRawResponse,
- LansWithStreamingResponse,
- AsyncLansWithStreamingResponse,
+ LANs,
+ AsyncLANs,
+ LANsWithRawResponse,
+ AsyncLANsWithRawResponse,
+ LANsWithStreamingResponse,
+ AsyncLANsWithStreamingResponse,
)
from .wans import (
- Wans,
- AsyncWans,
- WansWithRawResponse,
- AsyncWansWithRawResponse,
- WansWithStreamingResponse,
- AsyncWansWithStreamingResponse,
+ WANs,
+ AsyncWANs,
+ WANsWithRawResponse,
+ AsyncWANsWithRawResponse,
+ WANsWithStreamingResponse,
+ AsyncWANsWithStreamingResponse,
)
from .sites import (
Sites,
@@ -40,18 +40,18 @@
"AsyncACLsWithRawResponse",
"ACLsWithStreamingResponse",
"AsyncACLsWithStreamingResponse",
- "Lans",
- "AsyncLans",
- "LansWithRawResponse",
- "AsyncLansWithRawResponse",
- "LansWithStreamingResponse",
- "AsyncLansWithStreamingResponse",
- "Wans",
- "AsyncWans",
- "WansWithRawResponse",
- "AsyncWansWithRawResponse",
- "WansWithStreamingResponse",
- "AsyncWansWithStreamingResponse",
+ "LANs",
+ "AsyncLANs",
+ "LANsWithRawResponse",
+ "AsyncLANsWithRawResponse",
+ "LANsWithStreamingResponse",
+ "AsyncLANsWithStreamingResponse",
+ "WANs",
+ "AsyncWANs",
+ "WANsWithRawResponse",
+ "AsyncWANsWithRawResponse",
+ "WANsWithStreamingResponse",
+ "AsyncWANsWithStreamingResponse",
"Sites",
"AsyncSites",
"SitesWithRawResponse",
diff --git a/src/cloudflare/resources/magic_transit/sites/lans.py b/src/cloudflare/resources/magic_transit/sites/lans.py
index d4e8334ed9c..a3c299944c7 100644
--- a/src/cloudflare/resources/magic_transit/sites/lans.py
+++ b/src/cloudflare/resources/magic_transit/sites/lans.py
@@ -24,40 +24,40 @@
make_request_options,
)
from ....types.magic_transit.sites import (
- LanGetResponse,
- LanListResponse,
- LanCreateResponse,
- LanDeleteResponse,
- LanUpdateResponse,
+ LANGetResponse,
+ LANListResponse,
+ LANCreateResponse,
+ LANDeleteResponse,
+ LANUpdateResponse,
lan_create_params,
lan_update_params,
)
-__all__ = ["Lans", "AsyncLans"]
+__all__ = ["LANs", "AsyncLANs"]
-class Lans(SyncAPIResource):
+class LANs(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> LansWithRawResponse:
- return LansWithRawResponse(self)
+ def with_raw_response(self) -> LANsWithRawResponse:
+ return LANsWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> LansWithStreamingResponse:
- return LansWithStreamingResponse(self)
+ def with_streaming_response(self) -> LANsWithStreamingResponse:
+ return LANsWithStreamingResponse(self)
def create(
self,
site_id: str,
*,
account_id: str,
- lan: lan_create_params.Lan | NotGiven = NOT_GIVEN,
+ lan: lan_create_params.LAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanCreateResponse:
+ ) -> LANCreateResponse:
"""Creates a new LAN.
If the site is in high availability mode, static_addressing
@@ -82,7 +82,7 @@ def create(
raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}")
return self._post(
f"/accounts/{account_id}/magic/sites/{site_id}/lans",
- body=maybe_transform({"lan": lan}, lan_create_params.LanCreateParams),
+ body=maybe_transform({"lan": lan}, lan_create_params.LANCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -90,7 +90,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanCreateResponse], ResultWrapper[LanCreateResponse]),
+ cast_to=cast(Type[LANCreateResponse], ResultWrapper[LANCreateResponse]),
)
def update(
@@ -99,14 +99,14 @@ def update(
*,
account_id: str,
site_id: str,
- lan: lan_update_params.Lan | NotGiven = NOT_GIVEN,
+ lan: lan_update_params.LAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanUpdateResponse:
+ ) -> LANUpdateResponse:
"""
Update a specific LAN.
@@ -133,7 +133,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `lan_id` but received {lan_id!r}")
return self._put(
f"/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}",
- body=maybe_transform({"lan": lan}, lan_update_params.LanUpdateParams),
+ body=maybe_transform({"lan": lan}, lan_update_params.LANUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -141,7 +141,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanUpdateResponse], ResultWrapper[LanUpdateResponse]),
+ cast_to=cast(Type[LANUpdateResponse], ResultWrapper[LANUpdateResponse]),
)
def list(
@@ -155,7 +155,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanListResponse:
+ ) -> LANListResponse:
"""
Lists LANs associated with an account and site.
@@ -185,7 +185,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanListResponse], ResultWrapper[LanListResponse]),
+ cast_to=cast(Type[LANListResponse], ResultWrapper[LANListResponse]),
)
def delete(
@@ -200,7 +200,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanDeleteResponse:
+ ) -> LANDeleteResponse:
"""
Remove a specific LAN.
@@ -234,7 +234,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanDeleteResponse], ResultWrapper[LanDeleteResponse]),
+ cast_to=cast(Type[LANDeleteResponse], ResultWrapper[LANDeleteResponse]),
)
def get(
@@ -249,7 +249,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanGetResponse:
+ ) -> LANGetResponse:
"""
Get a specific LAN.
@@ -283,32 +283,32 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanGetResponse], ResultWrapper[LanGetResponse]),
+ cast_to=cast(Type[LANGetResponse], ResultWrapper[LANGetResponse]),
)
-class AsyncLans(AsyncAPIResource):
+class AsyncLANs(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncLansWithRawResponse:
- return AsyncLansWithRawResponse(self)
+ def with_raw_response(self) -> AsyncLANsWithRawResponse:
+ return AsyncLANsWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncLansWithStreamingResponse:
- return AsyncLansWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncLANsWithStreamingResponse:
+ return AsyncLANsWithStreamingResponse(self)
async def create(
self,
site_id: str,
*,
account_id: str,
- lan: lan_create_params.Lan | NotGiven = NOT_GIVEN,
+ lan: lan_create_params.LAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanCreateResponse:
+ ) -> LANCreateResponse:
"""Creates a new LAN.
If the site is in high availability mode, static_addressing
@@ -333,7 +333,7 @@ async def create(
raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}")
return await self._post(
f"/accounts/{account_id}/magic/sites/{site_id}/lans",
- body=await async_maybe_transform({"lan": lan}, lan_create_params.LanCreateParams),
+ body=await async_maybe_transform({"lan": lan}, lan_create_params.LANCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -341,7 +341,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanCreateResponse], ResultWrapper[LanCreateResponse]),
+ cast_to=cast(Type[LANCreateResponse], ResultWrapper[LANCreateResponse]),
)
async def update(
@@ -350,14 +350,14 @@ async def update(
*,
account_id: str,
site_id: str,
- lan: lan_update_params.Lan | NotGiven = NOT_GIVEN,
+ lan: lan_update_params.LAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanUpdateResponse:
+ ) -> LANUpdateResponse:
"""
Update a specific LAN.
@@ -384,7 +384,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `lan_id` but received {lan_id!r}")
return await self._put(
f"/accounts/{account_id}/magic/sites/{site_id}/lans/{lan_id}",
- body=await async_maybe_transform({"lan": lan}, lan_update_params.LanUpdateParams),
+ body=await async_maybe_transform({"lan": lan}, lan_update_params.LANUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -392,7 +392,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanUpdateResponse], ResultWrapper[LanUpdateResponse]),
+ cast_to=cast(Type[LANUpdateResponse], ResultWrapper[LANUpdateResponse]),
)
async def list(
@@ -406,7 +406,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanListResponse:
+ ) -> LANListResponse:
"""
Lists LANs associated with an account and site.
@@ -436,7 +436,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanListResponse], ResultWrapper[LanListResponse]),
+ cast_to=cast(Type[LANListResponse], ResultWrapper[LANListResponse]),
)
async def delete(
@@ -451,7 +451,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanDeleteResponse:
+ ) -> LANDeleteResponse:
"""
Remove a specific LAN.
@@ -485,7 +485,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanDeleteResponse], ResultWrapper[LanDeleteResponse]),
+ cast_to=cast(Type[LANDeleteResponse], ResultWrapper[LANDeleteResponse]),
)
async def get(
@@ -500,7 +500,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> LanGetResponse:
+ ) -> LANGetResponse:
"""
Get a specific LAN.
@@ -534,12 +534,12 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[LanGetResponse], ResultWrapper[LanGetResponse]),
+ cast_to=cast(Type[LANGetResponse], ResultWrapper[LANGetResponse]),
)
-class LansWithRawResponse:
- def __init__(self, lans: Lans) -> None:
+class LANsWithRawResponse:
+ def __init__(self, lans: LANs) -> None:
self._lans = lans
self.create = to_raw_response_wrapper(
@@ -559,8 +559,8 @@ def __init__(self, lans: Lans) -> None:
)
-class AsyncLansWithRawResponse:
- def __init__(self, lans: AsyncLans) -> None:
+class AsyncLANsWithRawResponse:
+ def __init__(self, lans: AsyncLANs) -> None:
self._lans = lans
self.create = async_to_raw_response_wrapper(
@@ -580,8 +580,8 @@ def __init__(self, lans: AsyncLans) -> None:
)
-class LansWithStreamingResponse:
- def __init__(self, lans: Lans) -> None:
+class LANsWithStreamingResponse:
+ def __init__(self, lans: LANs) -> None:
self._lans = lans
self.create = to_streamed_response_wrapper(
@@ -601,8 +601,8 @@ def __init__(self, lans: Lans) -> None:
)
-class AsyncLansWithStreamingResponse:
- def __init__(self, lans: AsyncLans) -> None:
+class AsyncLANsWithStreamingResponse:
+ def __init__(self, lans: AsyncLANs) -> None:
self._lans = lans
self.create = async_to_streamed_response_wrapper(
diff --git a/src/cloudflare/resources/magic_transit/sites/sites.py b/src/cloudflare/resources/magic_transit/sites/sites.py
index b0c7ccef6a3..dd936c7b8da 100644
--- a/src/cloudflare/resources/magic_transit/sites/sites.py
+++ b/src/cloudflare/resources/magic_transit/sites/sites.py
@@ -15,20 +15,20 @@
AsyncACLsWithStreamingResponse,
)
from .lans import (
- Lans,
- AsyncLans,
- LansWithRawResponse,
- AsyncLansWithRawResponse,
- LansWithStreamingResponse,
- AsyncLansWithStreamingResponse,
+ LANs,
+ AsyncLANs,
+ LANsWithRawResponse,
+ AsyncLANsWithRawResponse,
+ LANsWithStreamingResponse,
+ AsyncLANsWithStreamingResponse,
)
from .wans import (
- Wans,
- AsyncWans,
- WansWithRawResponse,
- AsyncWansWithRawResponse,
- WansWithStreamingResponse,
- AsyncWansWithStreamingResponse,
+ WANs,
+ AsyncWANs,
+ WANsWithRawResponse,
+ AsyncWANsWithRawResponse,
+ WANsWithStreamingResponse,
+ AsyncWANsWithStreamingResponse,
)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from ...._utils import (
@@ -66,12 +66,12 @@ def acls(self) -> ACLs:
return ACLs(self._client)
@cached_property
- def lans(self) -> Lans:
- return Lans(self._client)
+ def lans(self) -> LANs:
+ return LANs(self._client)
@cached_property
- def wans(self) -> Wans:
- return Wans(self._client)
+ def wans(self) -> WANs:
+ return WANs(self._client)
@cached_property
def with_raw_response(self) -> SitesWithRawResponse:
@@ -305,12 +305,12 @@ def acls(self) -> AsyncACLs:
return AsyncACLs(self._client)
@cached_property
- def lans(self) -> AsyncLans:
- return AsyncLans(self._client)
+ def lans(self) -> AsyncLANs:
+ return AsyncLANs(self._client)
@cached_property
- def wans(self) -> AsyncWans:
- return AsyncWans(self._client)
+ def wans(self) -> AsyncWANs:
+ return AsyncWANs(self._client)
@cached_property
def with_raw_response(self) -> AsyncSitesWithRawResponse:
@@ -563,12 +563,12 @@ def acls(self) -> ACLsWithRawResponse:
return ACLsWithRawResponse(self._sites.acls)
@cached_property
- def lans(self) -> LansWithRawResponse:
- return LansWithRawResponse(self._sites.lans)
+ def lans(self) -> LANsWithRawResponse:
+ return LANsWithRawResponse(self._sites.lans)
@cached_property
- def wans(self) -> WansWithRawResponse:
- return WansWithRawResponse(self._sites.wans)
+ def wans(self) -> WANsWithRawResponse:
+ return WANsWithRawResponse(self._sites.wans)
class AsyncSitesWithRawResponse:
@@ -596,12 +596,12 @@ def acls(self) -> AsyncACLsWithRawResponse:
return AsyncACLsWithRawResponse(self._sites.acls)
@cached_property
- def lans(self) -> AsyncLansWithRawResponse:
- return AsyncLansWithRawResponse(self._sites.lans)
+ def lans(self) -> AsyncLANsWithRawResponse:
+ return AsyncLANsWithRawResponse(self._sites.lans)
@cached_property
- def wans(self) -> AsyncWansWithRawResponse:
- return AsyncWansWithRawResponse(self._sites.wans)
+ def wans(self) -> AsyncWANsWithRawResponse:
+ return AsyncWANsWithRawResponse(self._sites.wans)
class SitesWithStreamingResponse:
@@ -629,12 +629,12 @@ def acls(self) -> ACLsWithStreamingResponse:
return ACLsWithStreamingResponse(self._sites.acls)
@cached_property
- def lans(self) -> LansWithStreamingResponse:
- return LansWithStreamingResponse(self._sites.lans)
+ def lans(self) -> LANsWithStreamingResponse:
+ return LANsWithStreamingResponse(self._sites.lans)
@cached_property
- def wans(self) -> WansWithStreamingResponse:
- return WansWithStreamingResponse(self._sites.wans)
+ def wans(self) -> WANsWithStreamingResponse:
+ return WANsWithStreamingResponse(self._sites.wans)
class AsyncSitesWithStreamingResponse:
@@ -662,9 +662,9 @@ def acls(self) -> AsyncACLsWithStreamingResponse:
return AsyncACLsWithStreamingResponse(self._sites.acls)
@cached_property
- def lans(self) -> AsyncLansWithStreamingResponse:
- return AsyncLansWithStreamingResponse(self._sites.lans)
+ def lans(self) -> AsyncLANsWithStreamingResponse:
+ return AsyncLANsWithStreamingResponse(self._sites.lans)
@cached_property
- def wans(self) -> AsyncWansWithStreamingResponse:
- return AsyncWansWithStreamingResponse(self._sites.wans)
+ def wans(self) -> AsyncWANsWithStreamingResponse:
+ return AsyncWANsWithStreamingResponse(self._sites.wans)
diff --git a/src/cloudflare/resources/magic_transit/sites/wans.py b/src/cloudflare/resources/magic_transit/sites/wans.py
index f79dcfa6a72..9d0906a390e 100644
--- a/src/cloudflare/resources/magic_transit/sites/wans.py
+++ b/src/cloudflare/resources/magic_transit/sites/wans.py
@@ -24,40 +24,40 @@
make_request_options,
)
from ....types.magic_transit.sites import (
- WanGetResponse,
- WanListResponse,
- WanCreateResponse,
- WanDeleteResponse,
- WanUpdateResponse,
+ WANGetResponse,
+ WANListResponse,
+ WANCreateResponse,
+ WANDeleteResponse,
+ WANUpdateResponse,
wan_create_params,
wan_update_params,
)
-__all__ = ["Wans", "AsyncWans"]
+__all__ = ["WANs", "AsyncWANs"]
-class Wans(SyncAPIResource):
+class WANs(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> WansWithRawResponse:
- return WansWithRawResponse(self)
+ def with_raw_response(self) -> WANsWithRawResponse:
+ return WANsWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> WansWithStreamingResponse:
- return WansWithStreamingResponse(self)
+ def with_streaming_response(self) -> WANsWithStreamingResponse:
+ return WANsWithStreamingResponse(self)
def create(
self,
site_id: str,
*,
account_id: str,
- wan: wan_create_params.Wan | NotGiven = NOT_GIVEN,
+ wan: wan_create_params.WAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanCreateResponse:
+ ) -> WANCreateResponse:
"""
Creates a new WAN.
@@ -80,7 +80,7 @@ def create(
raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}")
return self._post(
f"/accounts/{account_id}/magic/sites/{site_id}/wans",
- body=maybe_transform({"wan": wan}, wan_create_params.WanCreateParams),
+ body=maybe_transform({"wan": wan}, wan_create_params.WANCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -88,7 +88,7 @@ def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanCreateResponse], ResultWrapper[WanCreateResponse]),
+ cast_to=cast(Type[WANCreateResponse], ResultWrapper[WANCreateResponse]),
)
def update(
@@ -97,14 +97,14 @@ def update(
*,
account_id: str,
site_id: str,
- wan: wan_update_params.Wan | NotGiven = NOT_GIVEN,
+ wan: wan_update_params.WAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanUpdateResponse:
+ ) -> WANUpdateResponse:
"""
Update a specific WAN.
@@ -131,7 +131,7 @@ def update(
raise ValueError(f"Expected a non-empty value for `wan_id` but received {wan_id!r}")
return self._put(
f"/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}",
- body=maybe_transform({"wan": wan}, wan_update_params.WanUpdateParams),
+ body=maybe_transform({"wan": wan}, wan_update_params.WANUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -139,7 +139,7 @@ def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanUpdateResponse], ResultWrapper[WanUpdateResponse]),
+ cast_to=cast(Type[WANUpdateResponse], ResultWrapper[WANUpdateResponse]),
)
def list(
@@ -153,7 +153,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanListResponse:
+ ) -> WANListResponse:
"""
Lists WANs associated with an account and site.
@@ -183,7 +183,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanListResponse], ResultWrapper[WanListResponse]),
+ cast_to=cast(Type[WANListResponse], ResultWrapper[WANListResponse]),
)
def delete(
@@ -198,7 +198,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanDeleteResponse:
+ ) -> WANDeleteResponse:
"""
Remove a specific WAN.
@@ -232,7 +232,7 @@ def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanDeleteResponse], ResultWrapper[WanDeleteResponse]),
+ cast_to=cast(Type[WANDeleteResponse], ResultWrapper[WANDeleteResponse]),
)
def get(
@@ -247,7 +247,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanGetResponse:
+ ) -> WANGetResponse:
"""
Get a specific WAN.
@@ -281,32 +281,32 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanGetResponse], ResultWrapper[WanGetResponse]),
+ cast_to=cast(Type[WANGetResponse], ResultWrapper[WANGetResponse]),
)
-class AsyncWans(AsyncAPIResource):
+class AsyncWANs(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncWansWithRawResponse:
- return AsyncWansWithRawResponse(self)
+ def with_raw_response(self) -> AsyncWANsWithRawResponse:
+ return AsyncWANsWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncWansWithStreamingResponse:
- return AsyncWansWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncWANsWithStreamingResponse:
+ return AsyncWANsWithStreamingResponse(self)
async def create(
self,
site_id: str,
*,
account_id: str,
- wan: wan_create_params.Wan | NotGiven = NOT_GIVEN,
+ wan: wan_create_params.WAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanCreateResponse:
+ ) -> WANCreateResponse:
"""
Creates a new WAN.
@@ -329,7 +329,7 @@ async def create(
raise ValueError(f"Expected a non-empty value for `site_id` but received {site_id!r}")
return await self._post(
f"/accounts/{account_id}/magic/sites/{site_id}/wans",
- body=await async_maybe_transform({"wan": wan}, wan_create_params.WanCreateParams),
+ body=await async_maybe_transform({"wan": wan}, wan_create_params.WANCreateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -337,7 +337,7 @@ async def create(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanCreateResponse], ResultWrapper[WanCreateResponse]),
+ cast_to=cast(Type[WANCreateResponse], ResultWrapper[WANCreateResponse]),
)
async def update(
@@ -346,14 +346,14 @@ async def update(
*,
account_id: str,
site_id: str,
- wan: wan_update_params.Wan | NotGiven = NOT_GIVEN,
+ wan: wan_update_params.WAN | 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanUpdateResponse:
+ ) -> WANUpdateResponse:
"""
Update a specific WAN.
@@ -380,7 +380,7 @@ async def update(
raise ValueError(f"Expected a non-empty value for `wan_id` but received {wan_id!r}")
return await self._put(
f"/accounts/{account_id}/magic/sites/{site_id}/wans/{wan_id}",
- body=await async_maybe_transform({"wan": wan}, wan_update_params.WanUpdateParams),
+ body=await async_maybe_transform({"wan": wan}, wan_update_params.WANUpdateParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -388,7 +388,7 @@ async def update(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanUpdateResponse], ResultWrapper[WanUpdateResponse]),
+ cast_to=cast(Type[WANUpdateResponse], ResultWrapper[WANUpdateResponse]),
)
async def list(
@@ -402,7 +402,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanListResponse:
+ ) -> WANListResponse:
"""
Lists WANs associated with an account and site.
@@ -432,7 +432,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanListResponse], ResultWrapper[WanListResponse]),
+ cast_to=cast(Type[WANListResponse], ResultWrapper[WANListResponse]),
)
async def delete(
@@ -447,7 +447,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanDeleteResponse:
+ ) -> WANDeleteResponse:
"""
Remove a specific WAN.
@@ -481,7 +481,7 @@ async def delete(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanDeleteResponse], ResultWrapper[WanDeleteResponse]),
+ cast_to=cast(Type[WANDeleteResponse], ResultWrapper[WANDeleteResponse]),
)
async def get(
@@ -496,7 +496,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> WanGetResponse:
+ ) -> WANGetResponse:
"""
Get a specific WAN.
@@ -530,12 +530,12 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[WanGetResponse], ResultWrapper[WanGetResponse]),
+ cast_to=cast(Type[WANGetResponse], ResultWrapper[WANGetResponse]),
)
-class WansWithRawResponse:
- def __init__(self, wans: Wans) -> None:
+class WANsWithRawResponse:
+ def __init__(self, wans: WANs) -> None:
self._wans = wans
self.create = to_raw_response_wrapper(
@@ -555,8 +555,8 @@ def __init__(self, wans: Wans) -> None:
)
-class AsyncWansWithRawResponse:
- def __init__(self, wans: AsyncWans) -> None:
+class AsyncWANsWithRawResponse:
+ def __init__(self, wans: AsyncWANs) -> None:
self._wans = wans
self.create = async_to_raw_response_wrapper(
@@ -576,8 +576,8 @@ def __init__(self, wans: AsyncWans) -> None:
)
-class WansWithStreamingResponse:
- def __init__(self, wans: Wans) -> None:
+class WANsWithStreamingResponse:
+ def __init__(self, wans: WANs) -> None:
self._wans = wans
self.create = to_streamed_response_wrapper(
@@ -597,8 +597,8 @@ def __init__(self, wans: Wans) -> None:
)
-class AsyncWansWithStreamingResponse:
- def __init__(self, wans: AsyncWans) -> None:
+class AsyncWANsWithStreamingResponse:
+ def __init__(self, wans: AsyncWANs) -> None:
self._wans = wans
self.create = async_to_streamed_response_wrapper(
diff --git a/src/cloudflare/resources/pcaps/__init__.py b/src/cloudflare/resources/pcaps/__init__.py
index eb7bed7247a..a49b718eb5e 100644
--- a/src/cloudflare/resources/pcaps/__init__.py
+++ b/src/cloudflare/resources/pcaps/__init__.py
@@ -8,36 +8,36 @@
PCAPsWithStreamingResponse,
AsyncPCAPsWithStreamingResponse,
)
-from .downloads import (
- Downloads,
- AsyncDownloads,
- DownloadsWithRawResponse,
- AsyncDownloadsWithRawResponse,
- DownloadsWithStreamingResponse,
- AsyncDownloadsWithStreamingResponse,
+from .download import (
+ Download,
+ AsyncDownload,
+ DownloadWithRawResponse,
+ AsyncDownloadWithRawResponse,
+ DownloadWithStreamingResponse,
+ AsyncDownloadWithStreamingResponse,
)
-from .ownerships import (
- Ownerships,
- AsyncOwnerships,
- OwnershipsWithRawResponse,
- AsyncOwnershipsWithRawResponse,
- OwnershipsWithStreamingResponse,
- AsyncOwnershipsWithStreamingResponse,
+from .ownership import (
+ Ownership,
+ AsyncOwnership,
+ OwnershipWithRawResponse,
+ AsyncOwnershipWithRawResponse,
+ OwnershipWithStreamingResponse,
+ AsyncOwnershipWithStreamingResponse,
)
__all__ = [
- "Ownerships",
- "AsyncOwnerships",
- "OwnershipsWithRawResponse",
- "AsyncOwnershipsWithRawResponse",
- "OwnershipsWithStreamingResponse",
- "AsyncOwnershipsWithStreamingResponse",
- "Downloads",
- "AsyncDownloads",
- "DownloadsWithRawResponse",
- "AsyncDownloadsWithRawResponse",
- "DownloadsWithStreamingResponse",
- "AsyncDownloadsWithStreamingResponse",
+ "Ownership",
+ "AsyncOwnership",
+ "OwnershipWithRawResponse",
+ "AsyncOwnershipWithRawResponse",
+ "OwnershipWithStreamingResponse",
+ "AsyncOwnershipWithStreamingResponse",
+ "Download",
+ "AsyncDownload",
+ "DownloadWithRawResponse",
+ "AsyncDownloadWithRawResponse",
+ "DownloadWithStreamingResponse",
+ "AsyncDownloadWithStreamingResponse",
"PCAPs",
"AsyncPCAPs",
"PCAPsWithRawResponse",
diff --git a/src/cloudflare/resources/pcaps/downloads.py b/src/cloudflare/resources/pcaps/download.py
similarity index 78%
rename from src/cloudflare/resources/pcaps/downloads.py
rename to src/cloudflare/resources/pcaps/download.py
index 54318a6c726..997eb11fa32 100644
--- a/src/cloudflare/resources/pcaps/downloads.py
+++ b/src/cloudflare/resources/pcaps/download.py
@@ -21,17 +21,17 @@
make_request_options,
)
-__all__ = ["Downloads", "AsyncDownloads"]
+__all__ = ["Download", "AsyncDownload"]
-class Downloads(SyncAPIResource):
+class Download(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> DownloadsWithRawResponse:
- return DownloadsWithRawResponse(self)
+ def with_raw_response(self) -> DownloadWithRawResponse:
+ return DownloadWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> DownloadsWithStreamingResponse:
- return DownloadsWithStreamingResponse(self)
+ def with_streaming_response(self) -> DownloadWithStreamingResponse:
+ return DownloadWithStreamingResponse(self)
def get(
self,
@@ -76,14 +76,14 @@ def get(
)
-class AsyncDownloads(AsyncAPIResource):
+class AsyncDownload(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncDownloadsWithRawResponse:
- return AsyncDownloadsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncDownloadWithRawResponse:
+ return AsyncDownloadWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncDownloadsWithStreamingResponse:
- return AsyncDownloadsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncDownloadWithStreamingResponse:
+ return AsyncDownloadWithStreamingResponse(self)
async def get(
self,
@@ -128,41 +128,41 @@ async def get(
)
-class DownloadsWithRawResponse:
- def __init__(self, downloads: Downloads) -> None:
- self._downloads = downloads
+class DownloadWithRawResponse:
+ def __init__(self, download: Download) -> None:
+ self._download = download
self.get = to_custom_raw_response_wrapper(
- downloads.get,
+ download.get,
BinaryAPIResponse,
)
-class AsyncDownloadsWithRawResponse:
- def __init__(self, downloads: AsyncDownloads) -> None:
- self._downloads = downloads
+class AsyncDownloadWithRawResponse:
+ def __init__(self, download: AsyncDownload) -> None:
+ self._download = download
self.get = async_to_custom_raw_response_wrapper(
- downloads.get,
+ download.get,
AsyncBinaryAPIResponse,
)
-class DownloadsWithStreamingResponse:
- def __init__(self, downloads: Downloads) -> None:
- self._downloads = downloads
+class DownloadWithStreamingResponse:
+ def __init__(self, download: Download) -> None:
+ self._download = download
self.get = to_custom_streamed_response_wrapper(
- downloads.get,
+ download.get,
StreamedBinaryAPIResponse,
)
-class AsyncDownloadsWithStreamingResponse:
- def __init__(self, downloads: AsyncDownloads) -> None:
- self._downloads = downloads
+class AsyncDownloadWithStreamingResponse:
+ def __init__(self, download: AsyncDownload) -> None:
+ self._download = download
self.get = async_to_custom_streamed_response_wrapper(
- downloads.get,
+ download.get,
AsyncStreamedBinaryAPIResponse,
)
diff --git a/src/cloudflare/resources/pcaps/ownerships.py b/src/cloudflare/resources/pcaps/ownership.py
similarity index 90%
rename from src/cloudflare/resources/pcaps/ownerships.py
rename to src/cloudflare/resources/pcaps/ownership.py
index c44f57a40a6..ece8b105f61 100644
--- a/src/cloudflare/resources/pcaps/ownerships.py
+++ b/src/cloudflare/resources/pcaps/ownership.py
@@ -30,17 +30,17 @@
make_request_options,
)
-__all__ = ["Ownerships", "AsyncOwnerships"]
+__all__ = ["Ownership", "AsyncOwnership"]
-class Ownerships(SyncAPIResource):
+class Ownership(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> OwnershipsWithRawResponse:
- return OwnershipsWithRawResponse(self)
+ def with_raw_response(self) -> OwnershipWithRawResponse:
+ return OwnershipWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> OwnershipsWithStreamingResponse:
- return OwnershipsWithStreamingResponse(self)
+ def with_streaming_response(self) -> OwnershipWithStreamingResponse:
+ return OwnershipWithStreamingResponse(self)
def create(
self,
@@ -218,14 +218,14 @@ def validate(
)
-class AsyncOwnerships(AsyncAPIResource):
+class AsyncOwnership(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncOwnershipsWithRawResponse:
- return AsyncOwnershipsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncOwnershipWithRawResponse:
+ return AsyncOwnershipWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncOwnershipsWithStreamingResponse:
- return AsyncOwnershipsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncOwnershipWithStreamingResponse:
+ return AsyncOwnershipWithStreamingResponse(self)
async def create(
self,
@@ -405,73 +405,73 @@ async def validate(
)
-class OwnershipsWithRawResponse:
- def __init__(self, ownerships: Ownerships) -> None:
- self._ownerships = ownerships
+class OwnershipWithRawResponse:
+ def __init__(self, ownership: Ownership) -> None:
+ self._ownership = ownership
self.create = to_raw_response_wrapper(
- ownerships.create,
+ ownership.create,
)
self.delete = to_raw_response_wrapper(
- ownerships.delete,
+ ownership.delete,
)
self.get = to_raw_response_wrapper(
- ownerships.get,
+ ownership.get,
)
self.validate = to_raw_response_wrapper(
- ownerships.validate,
+ ownership.validate,
)
-class AsyncOwnershipsWithRawResponse:
- def __init__(self, ownerships: AsyncOwnerships) -> None:
- self._ownerships = ownerships
+class AsyncOwnershipWithRawResponse:
+ def __init__(self, ownership: AsyncOwnership) -> None:
+ self._ownership = ownership
self.create = async_to_raw_response_wrapper(
- ownerships.create,
+ ownership.create,
)
self.delete = async_to_raw_response_wrapper(
- ownerships.delete,
+ ownership.delete,
)
self.get = async_to_raw_response_wrapper(
- ownerships.get,
+ ownership.get,
)
self.validate = async_to_raw_response_wrapper(
- ownerships.validate,
+ ownership.validate,
)
-class OwnershipsWithStreamingResponse:
- def __init__(self, ownerships: Ownerships) -> None:
- self._ownerships = ownerships
+class OwnershipWithStreamingResponse:
+ def __init__(self, ownership: Ownership) -> None:
+ self._ownership = ownership
self.create = to_streamed_response_wrapper(
- ownerships.create,
+ ownership.create,
)
self.delete = to_streamed_response_wrapper(
- ownerships.delete,
+ ownership.delete,
)
self.get = to_streamed_response_wrapper(
- ownerships.get,
+ ownership.get,
)
self.validate = to_streamed_response_wrapper(
- ownerships.validate,
+ ownership.validate,
)
-class AsyncOwnershipsWithStreamingResponse:
- def __init__(self, ownerships: AsyncOwnerships) -> None:
- self._ownerships = ownerships
+class AsyncOwnershipWithStreamingResponse:
+ def __init__(self, ownership: AsyncOwnership) -> None:
+ self._ownership = ownership
self.create = async_to_streamed_response_wrapper(
- ownerships.create,
+ ownership.create,
)
self.delete = async_to_streamed_response_wrapper(
- ownerships.delete,
+ ownership.delete,
)
self.get = async_to_streamed_response_wrapper(
- ownerships.get,
+ ownership.get,
)
self.validate = async_to_streamed_response_wrapper(
- ownerships.validate,
+ ownership.validate,
)
diff --git a/src/cloudflare/resources/pcaps/pcaps.py b/src/cloudflare/resources/pcaps/pcaps.py
index f3f74aabbec..5bacf266dc8 100644
--- a/src/cloudflare/resources/pcaps/pcaps.py
+++ b/src/cloudflare/resources/pcaps/pcaps.py
@@ -14,22 +14,22 @@
maybe_transform,
async_maybe_transform,
)
-from ..._compat import cached_property
-from .downloads import (
- Downloads,
- AsyncDownloads,
- DownloadsWithRawResponse,
- AsyncDownloadsWithRawResponse,
- DownloadsWithStreamingResponse,
- AsyncDownloadsWithStreamingResponse,
+from .download import (
+ Download,
+ AsyncDownload,
+ DownloadWithRawResponse,
+ AsyncDownloadWithRawResponse,
+ DownloadWithStreamingResponse,
+ AsyncDownloadWithStreamingResponse,
)
-from .ownerships import (
- Ownerships,
- AsyncOwnerships,
- OwnershipsWithRawResponse,
- AsyncOwnershipsWithRawResponse,
- OwnershipsWithStreamingResponse,
- AsyncOwnershipsWithStreamingResponse,
+from ..._compat import cached_property
+from .ownership import (
+ Ownership,
+ AsyncOwnership,
+ OwnershipWithRawResponse,
+ AsyncOwnershipWithRawResponse,
+ OwnershipWithStreamingResponse,
+ AsyncOwnershipWithStreamingResponse,
)
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
@@ -48,12 +48,12 @@
class PCAPs(SyncAPIResource):
@cached_property
- def ownerships(self) -> Ownerships:
- return Ownerships(self._client)
+ def ownership(self) -> Ownership:
+ return Ownership(self._client)
@cached_property
- def downloads(self) -> Downloads:
- return Downloads(self._client)
+ def download(self) -> Download:
+ return Download(self._client)
@cached_property
def with_raw_response(self) -> PCAPsWithRawResponse:
@@ -309,12 +309,12 @@ def get(
class AsyncPCAPs(AsyncAPIResource):
@cached_property
- def ownerships(self) -> AsyncOwnerships:
- return AsyncOwnerships(self._client)
+ def ownership(self) -> AsyncOwnership:
+ return AsyncOwnership(self._client)
@cached_property
- def downloads(self) -> AsyncDownloads:
- return AsyncDownloads(self._client)
+ def download(self) -> AsyncDownload:
+ return AsyncDownload(self._client)
@cached_property
def with_raw_response(self) -> AsyncPCAPsWithRawResponse:
@@ -583,12 +583,12 @@ def __init__(self, pcaps: PCAPs) -> None:
)
@cached_property
- def ownerships(self) -> OwnershipsWithRawResponse:
- return OwnershipsWithRawResponse(self._pcaps.ownerships)
+ def ownership(self) -> OwnershipWithRawResponse:
+ return OwnershipWithRawResponse(self._pcaps.ownership)
@cached_property
- def downloads(self) -> DownloadsWithRawResponse:
- return DownloadsWithRawResponse(self._pcaps.downloads)
+ def download(self) -> DownloadWithRawResponse:
+ return DownloadWithRawResponse(self._pcaps.download)
class AsyncPCAPsWithRawResponse:
@@ -606,12 +606,12 @@ def __init__(self, pcaps: AsyncPCAPs) -> None:
)
@cached_property
- def ownerships(self) -> AsyncOwnershipsWithRawResponse:
- return AsyncOwnershipsWithRawResponse(self._pcaps.ownerships)
+ def ownership(self) -> AsyncOwnershipWithRawResponse:
+ return AsyncOwnershipWithRawResponse(self._pcaps.ownership)
@cached_property
- def downloads(self) -> AsyncDownloadsWithRawResponse:
- return AsyncDownloadsWithRawResponse(self._pcaps.downloads)
+ def download(self) -> AsyncDownloadWithRawResponse:
+ return AsyncDownloadWithRawResponse(self._pcaps.download)
class PCAPsWithStreamingResponse:
@@ -629,12 +629,12 @@ def __init__(self, pcaps: PCAPs) -> None:
)
@cached_property
- def ownerships(self) -> OwnershipsWithStreamingResponse:
- return OwnershipsWithStreamingResponse(self._pcaps.ownerships)
+ def ownership(self) -> OwnershipWithStreamingResponse:
+ return OwnershipWithStreamingResponse(self._pcaps.ownership)
@cached_property
- def downloads(self) -> DownloadsWithStreamingResponse:
- return DownloadsWithStreamingResponse(self._pcaps.downloads)
+ def download(self) -> DownloadWithStreamingResponse:
+ return DownloadWithStreamingResponse(self._pcaps.download)
class AsyncPCAPsWithStreamingResponse:
@@ -652,9 +652,9 @@ def __init__(self, pcaps: AsyncPCAPs) -> None:
)
@cached_property
- def ownerships(self) -> AsyncOwnershipsWithStreamingResponse:
- return AsyncOwnershipsWithStreamingResponse(self._pcaps.ownerships)
+ def ownership(self) -> AsyncOwnershipWithStreamingResponse:
+ return AsyncOwnershipWithStreamingResponse(self._pcaps.ownership)
@cached_property
- def downloads(self) -> AsyncDownloadsWithStreamingResponse:
- return AsyncDownloadsWithStreamingResponse(self._pcaps.downloads)
+ def download(self) -> AsyncDownloadWithStreamingResponse:
+ return AsyncDownloadWithStreamingResponse(self._pcaps.download)
diff --git a/src/cloudflare/resources/available_plans.py b/src/cloudflare/resources/plans.py
similarity index 79%
rename from src/cloudflare/resources/available_plans.py
rename to src/cloudflare/resources/plans.py
index 5af4a8864ab..d29e72ed769 100644
--- a/src/cloudflare/resources/available_plans.py
+++ b/src/cloudflare/resources/plans.py
@@ -6,7 +6,7 @@
import httpx
-from ..types import AvailablePlanListResponse, BillSubsAPIAvailableRatePlan
+from ..types import PlanListResponse, BillSubsAPIAvailableRatePlan
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@@ -21,17 +21,17 @@
make_request_options,
)
-__all__ = ["AvailablePlans", "AsyncAvailablePlans"]
+__all__ = ["Plans", "AsyncPlans"]
-class AvailablePlans(SyncAPIResource):
+class Plans(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> AvailablePlansWithRawResponse:
- return AvailablePlansWithRawResponse(self)
+ def with_raw_response(self) -> PlansWithRawResponse:
+ return PlansWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AvailablePlansWithStreamingResponse:
- return AvailablePlansWithStreamingResponse(self)
+ def with_streaming_response(self) -> PlansWithStreamingResponse:
+ return PlansWithStreamingResponse(self)
def list(
self,
@@ -43,7 +43,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[AvailablePlanListResponse]:
+ ) -> Optional[PlanListResponse]:
"""
Lists available plans the zone can subscribe to.
@@ -69,7 +69,7 @@ def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[AvailablePlanListResponse]], ResultWrapper[AvailablePlanListResponse]),
+ cast_to=cast(Type[Optional[PlanListResponse]], ResultWrapper[PlanListResponse]),
)
def get(
@@ -117,14 +117,14 @@ def get(
)
-class AsyncAvailablePlans(AsyncAPIResource):
+class AsyncPlans(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncAvailablePlansWithRawResponse:
- return AsyncAvailablePlansWithRawResponse(self)
+ def with_raw_response(self) -> AsyncPlansWithRawResponse:
+ return AsyncPlansWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncAvailablePlansWithStreamingResponse:
- return AsyncAvailablePlansWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncPlansWithStreamingResponse:
+ return AsyncPlansWithStreamingResponse(self)
async def list(
self,
@@ -136,7 +136,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[AvailablePlanListResponse]:
+ ) -> Optional[PlanListResponse]:
"""
Lists available plans the zone can subscribe to.
@@ -162,7 +162,7 @@ async def list(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[AvailablePlanListResponse]], ResultWrapper[AvailablePlanListResponse]),
+ cast_to=cast(Type[Optional[PlanListResponse]], ResultWrapper[PlanListResponse]),
)
async def get(
@@ -210,49 +210,49 @@ async def get(
)
-class AvailablePlansWithRawResponse:
- def __init__(self, available_plans: AvailablePlans) -> None:
- self._available_plans = available_plans
+class PlansWithRawResponse:
+ def __init__(self, plans: Plans) -> None:
+ self._plans = plans
self.list = to_raw_response_wrapper(
- available_plans.list,
+ plans.list,
)
self.get = to_raw_response_wrapper(
- available_plans.get,
+ plans.get,
)
-class AsyncAvailablePlansWithRawResponse:
- def __init__(self, available_plans: AsyncAvailablePlans) -> None:
- self._available_plans = available_plans
+class AsyncPlansWithRawResponse:
+ def __init__(self, plans: AsyncPlans) -> None:
+ self._plans = plans
self.list = async_to_raw_response_wrapper(
- available_plans.list,
+ plans.list,
)
self.get = async_to_raw_response_wrapper(
- available_plans.get,
+ plans.get,
)
-class AvailablePlansWithStreamingResponse:
- def __init__(self, available_plans: AvailablePlans) -> None:
- self._available_plans = available_plans
+class PlansWithStreamingResponse:
+ def __init__(self, plans: Plans) -> None:
+ self._plans = plans
self.list = to_streamed_response_wrapper(
- available_plans.list,
+ plans.list,
)
self.get = to_streamed_response_wrapper(
- available_plans.get,
+ plans.get,
)
-class AsyncAvailablePlansWithStreamingResponse:
- def __init__(self, available_plans: AsyncAvailablePlans) -> None:
- self._available_plans = available_plans
+class AsyncPlansWithStreamingResponse:
+ def __init__(self, plans: AsyncPlans) -> None:
+ self._plans = plans
self.list = async_to_streamed_response_wrapper(
- available_plans.list,
+ plans.list,
)
self.get = async_to_streamed_response_wrapper(
- available_plans.get,
+ plans.get,
)
diff --git a/src/cloudflare/resources/available_rate_plans.py b/src/cloudflare/resources/rate_plans.py
similarity index 65%
rename from src/cloudflare/resources/available_rate_plans.py
rename to src/cloudflare/resources/rate_plans.py
index 2a3f54c8428..c6e967ff8f5 100644
--- a/src/cloudflare/resources/available_rate_plans.py
+++ b/src/cloudflare/resources/rate_plans.py
@@ -6,7 +6,7 @@
import httpx
-from ..types import AvailableRatePlanGetResponse
+from ..types import RatePlanGetResponse
from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .._compat import cached_property
from .._resource import SyncAPIResource, AsyncAPIResource
@@ -21,17 +21,17 @@
make_request_options,
)
-__all__ = ["AvailableRatePlans", "AsyncAvailableRatePlans"]
+__all__ = ["RatePlans", "AsyncRatePlans"]
-class AvailableRatePlans(SyncAPIResource):
+class RatePlans(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> AvailableRatePlansWithRawResponse:
- return AvailableRatePlansWithRawResponse(self)
+ def with_raw_response(self) -> RatePlansWithRawResponse:
+ return RatePlansWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AvailableRatePlansWithStreamingResponse:
- return AvailableRatePlansWithStreamingResponse(self)
+ def with_streaming_response(self) -> RatePlansWithStreamingResponse:
+ return RatePlansWithStreamingResponse(self)
def get(
self,
@@ -43,7 +43,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[AvailableRatePlanGetResponse]:
+ ) -> Optional[RatePlanGetResponse]:
"""
Lists all rate plans the zone can subscribe to.
@@ -69,18 +69,18 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[AvailableRatePlanGetResponse]], ResultWrapper[AvailableRatePlanGetResponse]),
+ cast_to=cast(Type[Optional[RatePlanGetResponse]], ResultWrapper[RatePlanGetResponse]),
)
-class AsyncAvailableRatePlans(AsyncAPIResource):
+class AsyncRatePlans(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncAvailableRatePlansWithRawResponse:
- return AsyncAvailableRatePlansWithRawResponse(self)
+ def with_raw_response(self) -> AsyncRatePlansWithRawResponse:
+ return AsyncRatePlansWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncAvailableRatePlansWithStreamingResponse:
- return AsyncAvailableRatePlansWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncRatePlansWithStreamingResponse:
+ return AsyncRatePlansWithStreamingResponse(self)
async def get(
self,
@@ -92,7 +92,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[AvailableRatePlanGetResponse]:
+ ) -> Optional[RatePlanGetResponse]:
"""
Lists all rate plans the zone can subscribe to.
@@ -118,41 +118,41 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[AvailableRatePlanGetResponse]], ResultWrapper[AvailableRatePlanGetResponse]),
+ cast_to=cast(Type[Optional[RatePlanGetResponse]], ResultWrapper[RatePlanGetResponse]),
)
-class AvailableRatePlansWithRawResponse:
- def __init__(self, available_rate_plans: AvailableRatePlans) -> None:
- self._available_rate_plans = available_rate_plans
+class RatePlansWithRawResponse:
+ def __init__(self, rate_plans: RatePlans) -> None:
+ self._rate_plans = rate_plans
self.get = to_raw_response_wrapper(
- available_rate_plans.get,
+ rate_plans.get,
)
-class AsyncAvailableRatePlansWithRawResponse:
- def __init__(self, available_rate_plans: AsyncAvailableRatePlans) -> None:
- self._available_rate_plans = available_rate_plans
+class AsyncRatePlansWithRawResponse:
+ def __init__(self, rate_plans: AsyncRatePlans) -> None:
+ self._rate_plans = rate_plans
self.get = async_to_raw_response_wrapper(
- available_rate_plans.get,
+ rate_plans.get,
)
-class AvailableRatePlansWithStreamingResponse:
- def __init__(self, available_rate_plans: AvailableRatePlans) -> None:
- self._available_rate_plans = available_rate_plans
+class RatePlansWithStreamingResponse:
+ def __init__(self, rate_plans: RatePlans) -> None:
+ self._rate_plans = rate_plans
self.get = to_streamed_response_wrapper(
- available_rate_plans.get,
+ rate_plans.get,
)
-class AsyncAvailableRatePlansWithStreamingResponse:
- def __init__(self, available_rate_plans: AsyncAvailableRatePlans) -> None:
- self._available_rate_plans = available_rate_plans
+class AsyncRatePlansWithStreamingResponse:
+ def __init__(self, rate_plans: AsyncRatePlans) -> None:
+ self._rate_plans = rate_plans
self.get = async_to_streamed_response_wrapper(
- available_rate_plans.get,
+ rate_plans.get,
)
diff --git a/src/cloudflare/resources/rulesets/versions/__init__.py b/src/cloudflare/resources/rulesets/versions/__init__.py
index 57cdd381225..41727f2773b 100644
--- a/src/cloudflare/resources/rulesets/versions/__init__.py
+++ b/src/cloudflare/resources/rulesets/versions/__init__.py
@@ -1,12 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from .by_tags import (
- ByTags,
- AsyncByTags,
- ByTagsWithRawResponse,
- AsyncByTagsWithRawResponse,
- ByTagsWithStreamingResponse,
- AsyncByTagsWithStreamingResponse,
+from .by_tag import (
+ ByTag,
+ AsyncByTag,
+ ByTagWithRawResponse,
+ AsyncByTagWithRawResponse,
+ ByTagWithStreamingResponse,
+ AsyncByTagWithStreamingResponse,
)
from .versions import (
Versions,
@@ -18,12 +18,12 @@
)
__all__ = [
- "ByTags",
- "AsyncByTags",
- "ByTagsWithRawResponse",
- "AsyncByTagsWithRawResponse",
- "ByTagsWithStreamingResponse",
- "AsyncByTagsWithStreamingResponse",
+ "ByTag",
+ "AsyncByTag",
+ "ByTagWithRawResponse",
+ "AsyncByTagWithRawResponse",
+ "ByTagWithStreamingResponse",
+ "AsyncByTagWithStreamingResponse",
"Versions",
"AsyncVersions",
"VersionsWithRawResponse",
diff --git a/src/cloudflare/resources/rulesets/versions/by_tags.py b/src/cloudflare/resources/rulesets/versions/by_tag.py
similarity index 82%
rename from src/cloudflare/resources/rulesets/versions/by_tags.py
rename to src/cloudflare/resources/rulesets/versions/by_tag.py
index 6a0c4d25abc..298651cddab 100644
--- a/src/cloudflare/resources/rulesets/versions/by_tags.py
+++ b/src/cloudflare/resources/rulesets/versions/by_tag.py
@@ -21,17 +21,17 @@
make_request_options,
)
-__all__ = ["ByTags", "AsyncByTags"]
+__all__ = ["ByTag", "AsyncByTag"]
-class ByTags(SyncAPIResource):
+class ByTag(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> ByTagsWithRawResponse:
- return ByTagsWithRawResponse(self)
+ def with_raw_response(self) -> ByTagWithRawResponse:
+ return ByTagWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> ByTagsWithStreamingResponse:
- return ByTagsWithStreamingResponse(self)
+ def with_streaming_response(self) -> ByTagWithStreamingResponse:
+ return ByTagWithStreamingResponse(self)
def get(
self,
@@ -88,14 +88,14 @@ def get(
)
-class AsyncByTags(AsyncAPIResource):
+class AsyncByTag(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncByTagsWithRawResponse:
- return AsyncByTagsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncByTagWithRawResponse:
+ return AsyncByTagWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncByTagsWithStreamingResponse:
- return AsyncByTagsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncByTagWithStreamingResponse:
+ return AsyncByTagWithStreamingResponse(self)
async def get(
self,
@@ -152,37 +152,37 @@ async def get(
)
-class ByTagsWithRawResponse:
- def __init__(self, by_tags: ByTags) -> None:
- self._by_tags = by_tags
+class ByTagWithRawResponse:
+ def __init__(self, by_tag: ByTag) -> None:
+ self._by_tag = by_tag
self.get = to_raw_response_wrapper(
- by_tags.get,
+ by_tag.get,
)
-class AsyncByTagsWithRawResponse:
- def __init__(self, by_tags: AsyncByTags) -> None:
- self._by_tags = by_tags
+class AsyncByTagWithRawResponse:
+ def __init__(self, by_tag: AsyncByTag) -> None:
+ self._by_tag = by_tag
self.get = async_to_raw_response_wrapper(
- by_tags.get,
+ by_tag.get,
)
-class ByTagsWithStreamingResponse:
- def __init__(self, by_tags: ByTags) -> None:
- self._by_tags = by_tags
+class ByTagWithStreamingResponse:
+ def __init__(self, by_tag: ByTag) -> None:
+ self._by_tag = by_tag
self.get = to_streamed_response_wrapper(
- by_tags.get,
+ by_tag.get,
)
-class AsyncByTagsWithStreamingResponse:
- def __init__(self, by_tags: AsyncByTags) -> None:
- self._by_tags = by_tags
+class AsyncByTagWithStreamingResponse:
+ def __init__(self, by_tag: AsyncByTag) -> None:
+ self._by_tag = by_tag
self.get = async_to_streamed_response_wrapper(
- by_tags.get,
+ by_tag.get,
)
diff --git a/src/cloudflare/resources/rulesets/versions/versions.py b/src/cloudflare/resources/rulesets/versions/versions.py
index f1422a57770..170c31aff2e 100644
--- a/src/cloudflare/resources/rulesets/versions/versions.py
+++ b/src/cloudflare/resources/rulesets/versions/versions.py
@@ -6,13 +6,13 @@
import httpx
-from .by_tags import (
- ByTags,
- AsyncByTags,
- ByTagsWithRawResponse,
- AsyncByTagsWithRawResponse,
- ByTagsWithStreamingResponse,
- AsyncByTagsWithStreamingResponse,
+from .by_tag import (
+ ByTag,
+ AsyncByTag,
+ ByTagWithRawResponse,
+ AsyncByTagWithRawResponse,
+ ByTagWithStreamingResponse,
+ AsyncByTagWithStreamingResponse,
)
from ....types import RulesetsRulesetResponse, RulesetsRulesetsResponse
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
@@ -34,8 +34,8 @@
class Versions(SyncAPIResource):
@cached_property
- def by_tags(self) -> ByTags:
- return ByTags(self._client)
+ def by_tag(self) -> ByTag:
+ return ByTag(self._client)
@cached_property
def with_raw_response(self) -> VersionsWithRawResponse:
@@ -235,8 +235,8 @@ def get(
class AsyncVersions(AsyncAPIResource):
@cached_property
- def by_tags(self) -> AsyncByTags:
- return AsyncByTags(self._client)
+ def by_tag(self) -> AsyncByTag:
+ return AsyncByTag(self._client)
@cached_property
def with_raw_response(self) -> AsyncVersionsWithRawResponse:
@@ -449,8 +449,8 @@ def __init__(self, versions: Versions) -> None:
)
@cached_property
- def by_tags(self) -> ByTagsWithRawResponse:
- return ByTagsWithRawResponse(self._versions.by_tags)
+ def by_tag(self) -> ByTagWithRawResponse:
+ return ByTagWithRawResponse(self._versions.by_tag)
class AsyncVersionsWithRawResponse:
@@ -468,8 +468,8 @@ def __init__(self, versions: AsyncVersions) -> None:
)
@cached_property
- def by_tags(self) -> AsyncByTagsWithRawResponse:
- return AsyncByTagsWithRawResponse(self._versions.by_tags)
+ def by_tag(self) -> AsyncByTagWithRawResponse:
+ return AsyncByTagWithRawResponse(self._versions.by_tag)
class VersionsWithStreamingResponse:
@@ -487,8 +487,8 @@ def __init__(self, versions: Versions) -> None:
)
@cached_property
- def by_tags(self) -> ByTagsWithStreamingResponse:
- return ByTagsWithStreamingResponse(self._versions.by_tags)
+ def by_tag(self) -> ByTagWithStreamingResponse:
+ return ByTagWithStreamingResponse(self._versions.by_tag)
class AsyncVersionsWithStreamingResponse:
@@ -506,5 +506,5 @@ def __init__(self, versions: AsyncVersions) -> None:
)
@cached_property
- def by_tags(self) -> AsyncByTagsWithStreamingResponse:
- return AsyncByTagsWithStreamingResponse(self._versions.by_tags)
+ def by_tag(self) -> AsyncByTagWithStreamingResponse:
+ return AsyncByTagWithStreamingResponse(self._versions.by_tag)
diff --git a/src/cloudflare/resources/rum/__init__.py b/src/cloudflare/resources/rum/__init__.py
index e181360d2bc..1d5f28e9846 100644
--- a/src/cloudflare/resources/rum/__init__.py
+++ b/src/cloudflare/resources/rum/__init__.py
@@ -16,22 +16,22 @@
RulesWithStreamingResponse,
AsyncRulesWithStreamingResponse,
)
-from .site_infos import (
- SiteInfos,
- AsyncSiteInfos,
- SiteInfosWithRawResponse,
- AsyncSiteInfosWithRawResponse,
- SiteInfosWithStreamingResponse,
- AsyncSiteInfosWithStreamingResponse,
+from .site_info import (
+ SiteInfo,
+ AsyncSiteInfo,
+ SiteInfoWithRawResponse,
+ AsyncSiteInfoWithRawResponse,
+ SiteInfoWithStreamingResponse,
+ AsyncSiteInfoWithStreamingResponse,
)
__all__ = [
- "SiteInfos",
- "AsyncSiteInfos",
- "SiteInfosWithRawResponse",
- "AsyncSiteInfosWithRawResponse",
- "SiteInfosWithStreamingResponse",
- "AsyncSiteInfosWithStreamingResponse",
+ "SiteInfo",
+ "AsyncSiteInfo",
+ "SiteInfoWithRawResponse",
+ "AsyncSiteInfoWithRawResponse",
+ "SiteInfoWithStreamingResponse",
+ "AsyncSiteInfoWithStreamingResponse",
"Rules",
"AsyncRules",
"RulesWithRawResponse",
diff --git a/src/cloudflare/resources/rum/rum.py b/src/cloudflare/resources/rum/rum.py
index b4178bea467..50eb544b0c9 100644
--- a/src/cloudflare/resources/rum/rum.py
+++ b/src/cloudflare/resources/rum/rum.py
@@ -11,13 +11,13 @@
AsyncRulesWithStreamingResponse,
)
from ..._compat import cached_property
-from .site_infos import (
- SiteInfos,
- AsyncSiteInfos,
- SiteInfosWithRawResponse,
- AsyncSiteInfosWithRawResponse,
- SiteInfosWithStreamingResponse,
- AsyncSiteInfosWithStreamingResponse,
+from .site_info import (
+ SiteInfo,
+ AsyncSiteInfo,
+ SiteInfoWithRawResponse,
+ AsyncSiteInfoWithRawResponse,
+ SiteInfoWithStreamingResponse,
+ AsyncSiteInfoWithStreamingResponse,
)
from ..._resource import SyncAPIResource, AsyncAPIResource
@@ -26,8 +26,8 @@
class RUM(SyncAPIResource):
@cached_property
- def site_infos(self) -> SiteInfos:
- return SiteInfos(self._client)
+ def site_info(self) -> SiteInfo:
+ return SiteInfo(self._client)
@cached_property
def rules(self) -> Rules:
@@ -44,8 +44,8 @@ def with_streaming_response(self) -> RUMWithStreamingResponse:
class AsyncRUM(AsyncAPIResource):
@cached_property
- def site_infos(self) -> AsyncSiteInfos:
- return AsyncSiteInfos(self._client)
+ def site_info(self) -> AsyncSiteInfo:
+ return AsyncSiteInfo(self._client)
@cached_property
def rules(self) -> AsyncRules:
@@ -65,8 +65,8 @@ def __init__(self, rum: RUM) -> None:
self._rum = rum
@cached_property
- def site_infos(self) -> SiteInfosWithRawResponse:
- return SiteInfosWithRawResponse(self._rum.site_infos)
+ def site_info(self) -> SiteInfoWithRawResponse:
+ return SiteInfoWithRawResponse(self._rum.site_info)
@cached_property
def rules(self) -> RulesWithRawResponse:
@@ -78,8 +78,8 @@ def __init__(self, rum: AsyncRUM) -> None:
self._rum = rum
@cached_property
- def site_infos(self) -> AsyncSiteInfosWithRawResponse:
- return AsyncSiteInfosWithRawResponse(self._rum.site_infos)
+ def site_info(self) -> AsyncSiteInfoWithRawResponse:
+ return AsyncSiteInfoWithRawResponse(self._rum.site_info)
@cached_property
def rules(self) -> AsyncRulesWithRawResponse:
@@ -91,8 +91,8 @@ def __init__(self, rum: RUM) -> None:
self._rum = rum
@cached_property
- def site_infos(self) -> SiteInfosWithStreamingResponse:
- return SiteInfosWithStreamingResponse(self._rum.site_infos)
+ def site_info(self) -> SiteInfoWithStreamingResponse:
+ return SiteInfoWithStreamingResponse(self._rum.site_info)
@cached_property
def rules(self) -> RulesWithStreamingResponse:
@@ -104,8 +104,8 @@ def __init__(self, rum: AsyncRUM) -> None:
self._rum = rum
@cached_property
- def site_infos(self) -> AsyncSiteInfosWithStreamingResponse:
- return AsyncSiteInfosWithStreamingResponse(self._rum.site_infos)
+ def site_info(self) -> AsyncSiteInfoWithStreamingResponse:
+ return AsyncSiteInfoWithStreamingResponse(self._rum.site_info)
@cached_property
def rules(self) -> AsyncRulesWithStreamingResponse:
diff --git a/src/cloudflare/resources/rum/site_infos.py b/src/cloudflare/resources/rum/site_info.py
similarity index 92%
rename from src/cloudflare/resources/rum/site_infos.py
rename to src/cloudflare/resources/rum/site_info.py
index a66804b0c01..9ecca8d2f44 100644
--- a/src/cloudflare/resources/rum/site_infos.py
+++ b/src/cloudflare/resources/rum/site_info.py
@@ -34,17 +34,17 @@
make_request_options,
)
-__all__ = ["SiteInfos", "AsyncSiteInfos"]
+__all__ = ["SiteInfo", "AsyncSiteInfo"]
-class SiteInfos(SyncAPIResource):
+class SiteInfo(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> SiteInfosWithRawResponse:
- return SiteInfosWithRawResponse(self)
+ def with_raw_response(self) -> SiteInfoWithRawResponse:
+ return SiteInfoWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> SiteInfosWithStreamingResponse:
- return SiteInfosWithStreamingResponse(self)
+ def with_streaming_response(self) -> SiteInfoWithStreamingResponse:
+ return SiteInfoWithStreamingResponse(self)
def create(
self,
@@ -310,14 +310,14 @@ def get(
)
-class AsyncSiteInfos(AsyncAPIResource):
+class AsyncSiteInfo(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncSiteInfosWithRawResponse:
- return AsyncSiteInfosWithRawResponse(self)
+ def with_raw_response(self) -> AsyncSiteInfoWithRawResponse:
+ return AsyncSiteInfoWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncSiteInfosWithStreamingResponse:
- return AsyncSiteInfosWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncSiteInfoWithStreamingResponse:
+ return AsyncSiteInfoWithStreamingResponse(self)
async def create(
self,
@@ -583,85 +583,85 @@ async def get(
)
-class SiteInfosWithRawResponse:
- def __init__(self, site_infos: SiteInfos) -> None:
- self._site_infos = site_infos
+class SiteInfoWithRawResponse:
+ def __init__(self, site_info: SiteInfo) -> None:
+ self._site_info = site_info
self.create = to_raw_response_wrapper(
- site_infos.create,
+ site_info.create,
)
self.update = to_raw_response_wrapper(
- site_infos.update,
+ site_info.update,
)
self.list = to_raw_response_wrapper(
- site_infos.list,
+ site_info.list,
)
self.delete = to_raw_response_wrapper(
- site_infos.delete,
+ site_info.delete,
)
self.get = to_raw_response_wrapper(
- site_infos.get,
+ site_info.get,
)
-class AsyncSiteInfosWithRawResponse:
- def __init__(self, site_infos: AsyncSiteInfos) -> None:
- self._site_infos = site_infos
+class AsyncSiteInfoWithRawResponse:
+ def __init__(self, site_info: AsyncSiteInfo) -> None:
+ self._site_info = site_info
self.create = async_to_raw_response_wrapper(
- site_infos.create,
+ site_info.create,
)
self.update = async_to_raw_response_wrapper(
- site_infos.update,
+ site_info.update,
)
self.list = async_to_raw_response_wrapper(
- site_infos.list,
+ site_info.list,
)
self.delete = async_to_raw_response_wrapper(
- site_infos.delete,
+ site_info.delete,
)
self.get = async_to_raw_response_wrapper(
- site_infos.get,
+ site_info.get,
)
-class SiteInfosWithStreamingResponse:
- def __init__(self, site_infos: SiteInfos) -> None:
- self._site_infos = site_infos
+class SiteInfoWithStreamingResponse:
+ def __init__(self, site_info: SiteInfo) -> None:
+ self._site_info = site_info
self.create = to_streamed_response_wrapper(
- site_infos.create,
+ site_info.create,
)
self.update = to_streamed_response_wrapper(
- site_infos.update,
+ site_info.update,
)
self.list = to_streamed_response_wrapper(
- site_infos.list,
+ site_info.list,
)
self.delete = to_streamed_response_wrapper(
- site_infos.delete,
+ site_info.delete,
)
self.get = to_streamed_response_wrapper(
- site_infos.get,
+ site_info.get,
)
-class AsyncSiteInfosWithStreamingResponse:
- def __init__(self, site_infos: AsyncSiteInfos) -> None:
- self._site_infos = site_infos
+class AsyncSiteInfoWithStreamingResponse:
+ def __init__(self, site_info: AsyncSiteInfo) -> None:
+ self._site_info = site_info
self.create = async_to_streamed_response_wrapper(
- site_infos.create,
+ site_info.create,
)
self.update = async_to_streamed_response_wrapper(
- site_infos.update,
+ site_info.update,
)
self.list = async_to_streamed_response_wrapper(
- site_infos.list,
+ site_info.list,
)
self.delete = async_to_streamed_response_wrapper(
- site_infos.delete,
+ site_info.delete,
)
self.get = async_to_streamed_response_wrapper(
- site_infos.get,
+ site_info.get,
)
diff --git a/src/cloudflare/resources/stream/__init__.py b/src/cloudflare/resources/stream/__init__.py
index 100627567c1..a3182ce1427 100644
--- a/src/cloudflare/resources/stream/__init__.py
+++ b/src/cloudflare/resources/stream/__init__.py
@@ -1,5 +1,21 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .clip import (
+ Clip,
+ AsyncClip,
+ ClipWithRawResponse,
+ AsyncClipWithRawResponse,
+ ClipWithStreamingResponse,
+ AsyncClipWithStreamingResponse,
+)
+from .copy import (
+ Copy,
+ AsyncCopy,
+ CopyWithRawResponse,
+ AsyncCopyWithRawResponse,
+ CopyWithStreamingResponse,
+ AsyncCopyWithStreamingResponse,
+)
from .keys import (
Keys,
AsyncKeys,
@@ -8,29 +24,21 @@
KeysWithStreamingResponse,
AsyncKeysWithStreamingResponse,
)
-from .clips import (
- Clips,
- AsyncClips,
- ClipsWithRawResponse,
- AsyncClipsWithRawResponse,
- ClipsWithStreamingResponse,
- AsyncClipsWithStreamingResponse,
+from .embed import (
+ Embed,
+ AsyncEmbed,
+ EmbedWithRawResponse,
+ AsyncEmbedWithRawResponse,
+ EmbedWithStreamingResponse,
+ AsyncEmbedWithStreamingResponse,
)
-from .copies import (
- Copies,
- AsyncCopies,
- CopiesWithRawResponse,
- AsyncCopiesWithRawResponse,
- CopiesWithStreamingResponse,
- AsyncCopiesWithStreamingResponse,
-)
-from .embeds import (
- Embeds,
- AsyncEmbeds,
- EmbedsWithRawResponse,
- AsyncEmbedsWithRawResponse,
- EmbedsWithStreamingResponse,
- AsyncEmbedsWithStreamingResponse,
+from .token import (
+ Token,
+ AsyncToken,
+ TokenWithRawResponse,
+ AsyncTokenWithRawResponse,
+ TokenWithStreamingResponse,
+ AsyncTokenWithStreamingResponse,
)
from .stream import (
Stream,
@@ -40,14 +48,6 @@
StreamWithStreamingResponse,
AsyncStreamWithStreamingResponse,
)
-from .tokens import (
- Tokens,
- AsyncTokens,
- TokensWithRawResponse,
- AsyncTokensWithRawResponse,
- TokensWithStreamingResponse,
- AsyncTokensWithStreamingResponse,
-)
from .videos import (
Videos,
AsyncVideos,
@@ -104,13 +104,13 @@
AudioTracksWithStreamingResponse,
AsyncAudioTracksWithStreamingResponse,
)
-from .direct_uploads import (
- DirectUploads,
- AsyncDirectUploads,
- DirectUploadsWithRawResponse,
- AsyncDirectUploadsWithRawResponse,
- DirectUploadsWithStreamingResponse,
- AsyncDirectUploadsWithStreamingResponse,
+from .direct_upload import (
+ DirectUpload,
+ AsyncDirectUpload,
+ DirectUploadWithRawResponse,
+ AsyncDirectUploadWithRawResponse,
+ DirectUploadWithStreamingResponse,
+ AsyncDirectUploadWithStreamingResponse,
)
__all__ = [
@@ -126,24 +126,24 @@
"AsyncVideosWithRawResponse",
"VideosWithStreamingResponse",
"AsyncVideosWithStreamingResponse",
- "Clips",
- "AsyncClips",
- "ClipsWithRawResponse",
- "AsyncClipsWithRawResponse",
- "ClipsWithStreamingResponse",
- "AsyncClipsWithStreamingResponse",
- "Copies",
- "AsyncCopies",
- "CopiesWithRawResponse",
- "AsyncCopiesWithRawResponse",
- "CopiesWithStreamingResponse",
- "AsyncCopiesWithStreamingResponse",
- "DirectUploads",
- "AsyncDirectUploads",
- "DirectUploadsWithRawResponse",
- "AsyncDirectUploadsWithRawResponse",
- "DirectUploadsWithStreamingResponse",
- "AsyncDirectUploadsWithStreamingResponse",
+ "Clip",
+ "AsyncClip",
+ "ClipWithRawResponse",
+ "AsyncClipWithRawResponse",
+ "ClipWithStreamingResponse",
+ "AsyncClipWithStreamingResponse",
+ "Copy",
+ "AsyncCopy",
+ "CopyWithRawResponse",
+ "AsyncCopyWithRawResponse",
+ "CopyWithStreamingResponse",
+ "AsyncCopyWithStreamingResponse",
+ "DirectUpload",
+ "AsyncDirectUpload",
+ "DirectUploadWithRawResponse",
+ "AsyncDirectUploadWithRawResponse",
+ "DirectUploadWithStreamingResponse",
+ "AsyncDirectUploadWithStreamingResponse",
"Keys",
"AsyncKeys",
"KeysWithRawResponse",
@@ -180,18 +180,18 @@
"AsyncDownloadsWithRawResponse",
"DownloadsWithStreamingResponse",
"AsyncDownloadsWithStreamingResponse",
- "Embeds",
- "AsyncEmbeds",
- "EmbedsWithRawResponse",
- "AsyncEmbedsWithRawResponse",
- "EmbedsWithStreamingResponse",
- "AsyncEmbedsWithStreamingResponse",
- "Tokens",
- "AsyncTokens",
- "TokensWithRawResponse",
- "AsyncTokensWithRawResponse",
- "TokensWithStreamingResponse",
- "AsyncTokensWithStreamingResponse",
+ "Embed",
+ "AsyncEmbed",
+ "EmbedWithRawResponse",
+ "AsyncEmbedWithRawResponse",
+ "EmbedWithStreamingResponse",
+ "AsyncEmbedWithStreamingResponse",
+ "Token",
+ "AsyncToken",
+ "TokenWithRawResponse",
+ "AsyncTokenWithRawResponse",
+ "TokenWithStreamingResponse",
+ "AsyncTokenWithStreamingResponse",
"Stream",
"AsyncStream",
"StreamWithRawResponse",
diff --git a/src/cloudflare/resources/stream/clips.py b/src/cloudflare/resources/stream/clip.py
similarity index 89%
rename from src/cloudflare/resources/stream/clips.py
rename to src/cloudflare/resources/stream/clip.py
index ad001971058..25449822e06 100644
--- a/src/cloudflare/resources/stream/clips.py
+++ b/src/cloudflare/resources/stream/clip.py
@@ -25,17 +25,17 @@
)
from ...types.stream import StreamClipping, clip_create_params
-__all__ = ["Clips", "AsyncClips"]
+__all__ = ["Clip", "AsyncClip"]
-class Clips(SyncAPIResource):
+class Clip(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> ClipsWithRawResponse:
- return ClipsWithRawResponse(self)
+ def with_raw_response(self) -> ClipWithRawResponse:
+ return ClipWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> ClipsWithStreamingResponse:
- return ClipsWithStreamingResponse(self)
+ def with_streaming_response(self) -> ClipWithStreamingResponse:
+ return ClipWithStreamingResponse(self)
def create(
self,
@@ -125,14 +125,14 @@ def create(
)
-class AsyncClips(AsyncAPIResource):
+class AsyncClip(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncClipsWithRawResponse:
- return AsyncClipsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncClipWithRawResponse:
+ return AsyncClipWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncClipsWithStreamingResponse:
- return AsyncClipsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncClipWithStreamingResponse:
+ return AsyncClipWithStreamingResponse(self)
async def create(
self,
@@ -222,37 +222,37 @@ async def create(
)
-class ClipsWithRawResponse:
- def __init__(self, clips: Clips) -> None:
- self._clips = clips
+class ClipWithRawResponse:
+ def __init__(self, clip: Clip) -> None:
+ self._clip = clip
self.create = to_raw_response_wrapper(
- clips.create,
+ clip.create,
)
-class AsyncClipsWithRawResponse:
- def __init__(self, clips: AsyncClips) -> None:
- self._clips = clips
+class AsyncClipWithRawResponse:
+ def __init__(self, clip: AsyncClip) -> None:
+ self._clip = clip
self.create = async_to_raw_response_wrapper(
- clips.create,
+ clip.create,
)
-class ClipsWithStreamingResponse:
- def __init__(self, clips: Clips) -> None:
- self._clips = clips
+class ClipWithStreamingResponse:
+ def __init__(self, clip: Clip) -> None:
+ self._clip = clip
self.create = to_streamed_response_wrapper(
- clips.create,
+ clip.create,
)
-class AsyncClipsWithStreamingResponse:
- def __init__(self, clips: AsyncClips) -> None:
- self._clips = clips
+class AsyncClipWithStreamingResponse:
+ def __init__(self, clip: AsyncClip) -> None:
+ self._clip = clip
self.create = async_to_streamed_response_wrapper(
- clips.create,
+ clip.create,
)
diff --git a/src/cloudflare/resources/stream/copies.py b/src/cloudflare/resources/stream/copy.py
similarity index 89%
rename from src/cloudflare/resources/stream/copies.py
rename to src/cloudflare/resources/stream/copy.py
index fdaa926ce13..753e294a268 100644
--- a/src/cloudflare/resources/stream/copies.py
+++ b/src/cloudflare/resources/stream/copy.py
@@ -27,17 +27,17 @@
)
from ...types.stream import copy_create_params
-__all__ = ["Copies", "AsyncCopies"]
+__all__ = ["Copy", "AsyncCopy"]
-class Copies(SyncAPIResource):
+class Copy(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> CopiesWithRawResponse:
- return CopiesWithRawResponse(self)
+ def with_raw_response(self) -> CopyWithRawResponse:
+ return CopyWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> CopiesWithStreamingResponse:
- return CopiesWithStreamingResponse(self)
+ def with_streaming_response(self) -> CopyWithStreamingResponse:
+ return CopyWithStreamingResponse(self)
def create(
self,
@@ -125,14 +125,14 @@ def create(
)
-class AsyncCopies(AsyncAPIResource):
+class AsyncCopy(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncCopiesWithRawResponse:
- return AsyncCopiesWithRawResponse(self)
+ def with_raw_response(self) -> AsyncCopyWithRawResponse:
+ return AsyncCopyWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncCopiesWithStreamingResponse:
- return AsyncCopiesWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncCopyWithStreamingResponse:
+ return AsyncCopyWithStreamingResponse(self)
async def create(
self,
@@ -220,37 +220,37 @@ async def create(
)
-class CopiesWithRawResponse:
- def __init__(self, copies: Copies) -> None:
- self._copies = copies
+class CopyWithRawResponse:
+ def __init__(self, copy: Copy) -> None:
+ self._copy = copy
self.create = to_raw_response_wrapper(
- copies.create,
+ copy.create,
)
-class AsyncCopiesWithRawResponse:
- def __init__(self, copies: AsyncCopies) -> None:
- self._copies = copies
+class AsyncCopyWithRawResponse:
+ def __init__(self, copy: AsyncCopy) -> None:
+ self._copy = copy
self.create = async_to_raw_response_wrapper(
- copies.create,
+ copy.create,
)
-class CopiesWithStreamingResponse:
- def __init__(self, copies: Copies) -> None:
- self._copies = copies
+class CopyWithStreamingResponse:
+ def __init__(self, copy: Copy) -> None:
+ self._copy = copy
self.create = to_streamed_response_wrapper(
- copies.create,
+ copy.create,
)
-class AsyncCopiesWithStreamingResponse:
- def __init__(self, copies: AsyncCopies) -> None:
- self._copies = copies
+class AsyncCopyWithStreamingResponse:
+ def __init__(self, copy: AsyncCopy) -> None:
+ self._copy = copy
self.create = async_to_streamed_response_wrapper(
- copies.create,
+ copy.create,
)
diff --git a/src/cloudflare/resources/stream/direct_uploads.py b/src/cloudflare/resources/stream/direct_upload.py
similarity index 87%
rename from src/cloudflare/resources/stream/direct_uploads.py
rename to src/cloudflare/resources/stream/direct_upload.py
index 3772b53f35f..bc679e10de6 100644
--- a/src/cloudflare/resources/stream/direct_uploads.py
+++ b/src/cloudflare/resources/stream/direct_upload.py
@@ -26,17 +26,17 @@
)
from ...types.stream import DirectUploadCreateResponse, direct_upload_create_params
-__all__ = ["DirectUploads", "AsyncDirectUploads"]
+__all__ = ["DirectUpload", "AsyncDirectUpload"]
-class DirectUploads(SyncAPIResource):
+class DirectUpload(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> DirectUploadsWithRawResponse:
- return DirectUploadsWithRawResponse(self)
+ def with_raw_response(self) -> DirectUploadWithRawResponse:
+ return DirectUploadWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> DirectUploadsWithStreamingResponse:
- return DirectUploadsWithStreamingResponse(self)
+ def with_streaming_response(self) -> DirectUploadWithStreamingResponse:
+ return DirectUploadWithStreamingResponse(self)
def create(
self,
@@ -129,14 +129,14 @@ def create(
)
-class AsyncDirectUploads(AsyncAPIResource):
+class AsyncDirectUpload(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncDirectUploadsWithRawResponse:
- return AsyncDirectUploadsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncDirectUploadWithRawResponse:
+ return AsyncDirectUploadWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncDirectUploadsWithStreamingResponse:
- return AsyncDirectUploadsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncDirectUploadWithStreamingResponse:
+ return AsyncDirectUploadWithStreamingResponse(self)
async def create(
self,
@@ -229,37 +229,37 @@ async def create(
)
-class DirectUploadsWithRawResponse:
- def __init__(self, direct_uploads: DirectUploads) -> None:
- self._direct_uploads = direct_uploads
+class DirectUploadWithRawResponse:
+ def __init__(self, direct_upload: DirectUpload) -> None:
+ self._direct_upload = direct_upload
self.create = to_raw_response_wrapper(
- direct_uploads.create,
+ direct_upload.create,
)
-class AsyncDirectUploadsWithRawResponse:
- def __init__(self, direct_uploads: AsyncDirectUploads) -> None:
- self._direct_uploads = direct_uploads
+class AsyncDirectUploadWithRawResponse:
+ def __init__(self, direct_upload: AsyncDirectUpload) -> None:
+ self._direct_upload = direct_upload
self.create = async_to_raw_response_wrapper(
- direct_uploads.create,
+ direct_upload.create,
)
-class DirectUploadsWithStreamingResponse:
- def __init__(self, direct_uploads: DirectUploads) -> None:
- self._direct_uploads = direct_uploads
+class DirectUploadWithStreamingResponse:
+ def __init__(self, direct_upload: DirectUpload) -> None:
+ self._direct_upload = direct_upload
self.create = to_streamed_response_wrapper(
- direct_uploads.create,
+ direct_upload.create,
)
-class AsyncDirectUploadsWithStreamingResponse:
- def __init__(self, direct_uploads: AsyncDirectUploads) -> None:
- self._direct_uploads = direct_uploads
+class AsyncDirectUploadWithStreamingResponse:
+ def __init__(self, direct_upload: AsyncDirectUpload) -> None:
+ self._direct_upload = direct_upload
self.create = async_to_streamed_response_wrapper(
- direct_uploads.create,
+ direct_upload.create,
)
diff --git a/src/cloudflare/resources/stream/embeds.py b/src/cloudflare/resources/stream/embed.py
similarity index 79%
rename from src/cloudflare/resources/stream/embeds.py
rename to src/cloudflare/resources/stream/embed.py
index b0ea30f1828..0c3e4274d76 100644
--- a/src/cloudflare/resources/stream/embeds.py
+++ b/src/cloudflare/resources/stream/embed.py
@@ -17,17 +17,17 @@
make_request_options,
)
-__all__ = ["Embeds", "AsyncEmbeds"]
+__all__ = ["Embed", "AsyncEmbed"]
-class Embeds(SyncAPIResource):
+class Embed(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> EmbedsWithRawResponse:
- return EmbedsWithRawResponse(self)
+ def with_raw_response(self) -> EmbedWithRawResponse:
+ return EmbedWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> EmbedsWithStreamingResponse:
- return EmbedsWithStreamingResponse(self)
+ def with_streaming_response(self) -> EmbedWithStreamingResponse:
+ return EmbedWithStreamingResponse(self)
def get(
self,
@@ -72,14 +72,14 @@ def get(
)
-class AsyncEmbeds(AsyncAPIResource):
+class AsyncEmbed(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncEmbedsWithRawResponse:
- return AsyncEmbedsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncEmbedWithRawResponse:
+ return AsyncEmbedWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncEmbedsWithStreamingResponse:
- return AsyncEmbedsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncEmbedWithStreamingResponse:
+ return AsyncEmbedWithStreamingResponse(self)
async def get(
self,
@@ -124,37 +124,37 @@ async def get(
)
-class EmbedsWithRawResponse:
- def __init__(self, embeds: Embeds) -> None:
- self._embeds = embeds
+class EmbedWithRawResponse:
+ def __init__(self, embed: Embed) -> None:
+ self._embed = embed
self.get = to_raw_response_wrapper(
- embeds.get,
+ embed.get,
)
-class AsyncEmbedsWithRawResponse:
- def __init__(self, embeds: AsyncEmbeds) -> None:
- self._embeds = embeds
+class AsyncEmbedWithRawResponse:
+ def __init__(self, embed: AsyncEmbed) -> None:
+ self._embed = embed
self.get = async_to_raw_response_wrapper(
- embeds.get,
+ embed.get,
)
-class EmbedsWithStreamingResponse:
- def __init__(self, embeds: Embeds) -> None:
- self._embeds = embeds
+class EmbedWithStreamingResponse:
+ def __init__(self, embed: Embed) -> None:
+ self._embed = embed
self.get = to_streamed_response_wrapper(
- embeds.get,
+ embed.get,
)
-class AsyncEmbedsWithStreamingResponse:
- def __init__(self, embeds: AsyncEmbeds) -> None:
- self._embeds = embeds
+class AsyncEmbedWithStreamingResponse:
+ def __init__(self, embed: AsyncEmbed) -> None:
+ self._embed = embed
self.get = async_to_streamed_response_wrapper(
- embeds.get,
+ embed.get,
)
diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py
index dce9644f134..a29b5cb7b15 100644
--- a/src/cloudflare/resources/stream/stream.py
+++ b/src/cloudflare/resources/stream/stream.py
@@ -8,6 +8,22 @@
import httpx
+from .clip import (
+ Clip,
+ AsyncClip,
+ ClipWithRawResponse,
+ AsyncClipWithRawResponse,
+ ClipWithStreamingResponse,
+ AsyncClipWithStreamingResponse,
+)
+from .copy import (
+ Copy,
+ AsyncCopy,
+ CopyWithRawResponse,
+ AsyncCopyWithRawResponse,
+ CopyWithStreamingResponse,
+ AsyncCopyWithStreamingResponse,
+)
from .keys import (
Keys,
AsyncKeys,
@@ -16,37 +32,21 @@
KeysWithStreamingResponse,
AsyncKeysWithStreamingResponse,
)
-from .clips import (
- Clips,
- AsyncClips,
- ClipsWithRawResponse,
- AsyncClipsWithRawResponse,
- ClipsWithStreamingResponse,
- AsyncClipsWithStreamingResponse,
-)
-from .copies import (
- Copies,
- AsyncCopies,
- CopiesWithRawResponse,
- AsyncCopiesWithRawResponse,
- CopiesWithStreamingResponse,
- AsyncCopiesWithStreamingResponse,
+from .embed import (
+ Embed,
+ AsyncEmbed,
+ EmbedWithRawResponse,
+ AsyncEmbedWithRawResponse,
+ EmbedWithStreamingResponse,
+ AsyncEmbedWithStreamingResponse,
)
-from .embeds import (
- Embeds,
- AsyncEmbeds,
- EmbedsWithRawResponse,
- AsyncEmbedsWithRawResponse,
- EmbedsWithStreamingResponse,
- AsyncEmbedsWithStreamingResponse,
-)
-from .tokens import (
- Tokens,
- AsyncTokens,
- TokensWithRawResponse,
- AsyncTokensWithRawResponse,
- TokensWithStreamingResponse,
- AsyncTokensWithStreamingResponse,
+from .token import (
+ Token,
+ AsyncToken,
+ TokenWithRawResponse,
+ AsyncTokenWithRawResponse,
+ TokenWithStreamingResponse,
+ AsyncTokenWithStreamingResponse,
)
from .videos import (
Videos,
@@ -119,17 +119,17 @@
AudioTracksWithStreamingResponse,
AsyncAudioTracksWithStreamingResponse,
)
+from .direct_upload import (
+ DirectUpload,
+ AsyncDirectUpload,
+ DirectUploadWithRawResponse,
+ AsyncDirectUploadWithRawResponse,
+ DirectUploadWithStreamingResponse,
+ AsyncDirectUploadWithStreamingResponse,
+)
from ..._base_client import (
make_request_options,
)
-from .direct_uploads import (
- DirectUploads,
- AsyncDirectUploads,
- DirectUploadsWithRawResponse,
- AsyncDirectUploadsWithRawResponse,
- DirectUploadsWithStreamingResponse,
- AsyncDirectUploadsWithStreamingResponse,
-)
from .live_inputs.live_inputs import LiveInputs, AsyncLiveInputs
__all__ = ["Stream", "AsyncStream"]
@@ -145,16 +145,16 @@ def videos(self) -> Videos:
return Videos(self._client)
@cached_property
- def clips(self) -> Clips:
- return Clips(self._client)
+ def clip(self) -> Clip:
+ return Clip(self._client)
@cached_property
- def copies(self) -> Copies:
- return Copies(self._client)
+ def copy(self) -> Copy:
+ return Copy(self._client)
@cached_property
- def direct_uploads(self) -> DirectUploads:
- return DirectUploads(self._client)
+ def direct_upload(self) -> DirectUpload:
+ return DirectUpload(self._client)
@cached_property
def keys(self) -> Keys:
@@ -181,12 +181,12 @@ def downloads(self) -> Downloads:
return Downloads(self._client)
@cached_property
- def embeds(self) -> Embeds:
- return Embeds(self._client)
+ def embed(self) -> Embed:
+ return Embed(self._client)
@cached_property
- def tokens(self) -> Tokens:
- return Tokens(self._client)
+ def token(self) -> Token:
+ return Token(self._client)
@cached_property
def with_raw_response(self) -> StreamWithRawResponse:
@@ -413,16 +413,16 @@ def videos(self) -> AsyncVideos:
return AsyncVideos(self._client)
@cached_property
- def clips(self) -> AsyncClips:
- return AsyncClips(self._client)
+ def clip(self) -> AsyncClip:
+ return AsyncClip(self._client)
@cached_property
- def copies(self) -> AsyncCopies:
- return AsyncCopies(self._client)
+ def copy(self) -> AsyncCopy:
+ return AsyncCopy(self._client)
@cached_property
- def direct_uploads(self) -> AsyncDirectUploads:
- return AsyncDirectUploads(self._client)
+ def direct_upload(self) -> AsyncDirectUpload:
+ return AsyncDirectUpload(self._client)
@cached_property
def keys(self) -> AsyncKeys:
@@ -449,12 +449,12 @@ def downloads(self) -> AsyncDownloads:
return AsyncDownloads(self._client)
@cached_property
- def embeds(self) -> AsyncEmbeds:
- return AsyncEmbeds(self._client)
+ def embed(self) -> AsyncEmbed:
+ return AsyncEmbed(self._client)
@cached_property
- def tokens(self) -> AsyncTokens:
- return AsyncTokens(self._client)
+ def token(self) -> AsyncToken:
+ return AsyncToken(self._client)
@cached_property
def with_raw_response(self) -> AsyncStreamWithRawResponse:
@@ -697,16 +697,16 @@ def videos(self) -> VideosWithRawResponse:
return VideosWithRawResponse(self._stream.videos)
@cached_property
- def clips(self) -> ClipsWithRawResponse:
- return ClipsWithRawResponse(self._stream.clips)
+ def clip(self) -> ClipWithRawResponse:
+ return ClipWithRawResponse(self._stream.clip)
@cached_property
- def copies(self) -> CopiesWithRawResponse:
- return CopiesWithRawResponse(self._stream.copies)
+ def copy(self) -> CopyWithRawResponse:
+ return CopyWithRawResponse(self._stream.copy)
@cached_property
- def direct_uploads(self) -> DirectUploadsWithRawResponse:
- return DirectUploadsWithRawResponse(self._stream.direct_uploads)
+ def direct_upload(self) -> DirectUploadWithRawResponse:
+ return DirectUploadWithRawResponse(self._stream.direct_upload)
@cached_property
def keys(self) -> KeysWithRawResponse:
@@ -733,12 +733,12 @@ def downloads(self) -> DownloadsWithRawResponse:
return DownloadsWithRawResponse(self._stream.downloads)
@cached_property
- def embeds(self) -> EmbedsWithRawResponse:
- return EmbedsWithRawResponse(self._stream.embeds)
+ def embed(self) -> EmbedWithRawResponse:
+ return EmbedWithRawResponse(self._stream.embed)
@cached_property
- def tokens(self) -> TokensWithRawResponse:
- return TokensWithRawResponse(self._stream.tokens)
+ def token(self) -> TokenWithRawResponse:
+ return TokenWithRawResponse(self._stream.token)
class AsyncStreamWithRawResponse:
@@ -767,16 +767,16 @@ def videos(self) -> AsyncVideosWithRawResponse:
return AsyncVideosWithRawResponse(self._stream.videos)
@cached_property
- def clips(self) -> AsyncClipsWithRawResponse:
- return AsyncClipsWithRawResponse(self._stream.clips)
+ def clip(self) -> AsyncClipWithRawResponse:
+ return AsyncClipWithRawResponse(self._stream.clip)
@cached_property
- def copies(self) -> AsyncCopiesWithRawResponse:
- return AsyncCopiesWithRawResponse(self._stream.copies)
+ def copy(self) -> AsyncCopyWithRawResponse:
+ return AsyncCopyWithRawResponse(self._stream.copy)
@cached_property
- def direct_uploads(self) -> AsyncDirectUploadsWithRawResponse:
- return AsyncDirectUploadsWithRawResponse(self._stream.direct_uploads)
+ def direct_upload(self) -> AsyncDirectUploadWithRawResponse:
+ return AsyncDirectUploadWithRawResponse(self._stream.direct_upload)
@cached_property
def keys(self) -> AsyncKeysWithRawResponse:
@@ -803,12 +803,12 @@ def downloads(self) -> AsyncDownloadsWithRawResponse:
return AsyncDownloadsWithRawResponse(self._stream.downloads)
@cached_property
- def embeds(self) -> AsyncEmbedsWithRawResponse:
- return AsyncEmbedsWithRawResponse(self._stream.embeds)
+ def embed(self) -> AsyncEmbedWithRawResponse:
+ return AsyncEmbedWithRawResponse(self._stream.embed)
@cached_property
- def tokens(self) -> AsyncTokensWithRawResponse:
- return AsyncTokensWithRawResponse(self._stream.tokens)
+ def token(self) -> AsyncTokenWithRawResponse:
+ return AsyncTokenWithRawResponse(self._stream.token)
class StreamWithStreamingResponse:
@@ -837,16 +837,16 @@ def videos(self) -> VideosWithStreamingResponse:
return VideosWithStreamingResponse(self._stream.videos)
@cached_property
- def clips(self) -> ClipsWithStreamingResponse:
- return ClipsWithStreamingResponse(self._stream.clips)
+ def clip(self) -> ClipWithStreamingResponse:
+ return ClipWithStreamingResponse(self._stream.clip)
@cached_property
- def copies(self) -> CopiesWithStreamingResponse:
- return CopiesWithStreamingResponse(self._stream.copies)
+ def copy(self) -> CopyWithStreamingResponse:
+ return CopyWithStreamingResponse(self._stream.copy)
@cached_property
- def direct_uploads(self) -> DirectUploadsWithStreamingResponse:
- return DirectUploadsWithStreamingResponse(self._stream.direct_uploads)
+ def direct_upload(self) -> DirectUploadWithStreamingResponse:
+ return DirectUploadWithStreamingResponse(self._stream.direct_upload)
@cached_property
def keys(self) -> KeysWithStreamingResponse:
@@ -873,12 +873,12 @@ def downloads(self) -> DownloadsWithStreamingResponse:
return DownloadsWithStreamingResponse(self._stream.downloads)
@cached_property
- def embeds(self) -> EmbedsWithStreamingResponse:
- return EmbedsWithStreamingResponse(self._stream.embeds)
+ def embed(self) -> EmbedWithStreamingResponse:
+ return EmbedWithStreamingResponse(self._stream.embed)
@cached_property
- def tokens(self) -> TokensWithStreamingResponse:
- return TokensWithStreamingResponse(self._stream.tokens)
+ def token(self) -> TokenWithStreamingResponse:
+ return TokenWithStreamingResponse(self._stream.token)
class AsyncStreamWithStreamingResponse:
@@ -907,16 +907,16 @@ def videos(self) -> AsyncVideosWithStreamingResponse:
return AsyncVideosWithStreamingResponse(self._stream.videos)
@cached_property
- def clips(self) -> AsyncClipsWithStreamingResponse:
- return AsyncClipsWithStreamingResponse(self._stream.clips)
+ def clip(self) -> AsyncClipWithStreamingResponse:
+ return AsyncClipWithStreamingResponse(self._stream.clip)
@cached_property
- def copies(self) -> AsyncCopiesWithStreamingResponse:
- return AsyncCopiesWithStreamingResponse(self._stream.copies)
+ def copy(self) -> AsyncCopyWithStreamingResponse:
+ return AsyncCopyWithStreamingResponse(self._stream.copy)
@cached_property
- def direct_uploads(self) -> AsyncDirectUploadsWithStreamingResponse:
- return AsyncDirectUploadsWithStreamingResponse(self._stream.direct_uploads)
+ def direct_upload(self) -> AsyncDirectUploadWithStreamingResponse:
+ return AsyncDirectUploadWithStreamingResponse(self._stream.direct_upload)
@cached_property
def keys(self) -> AsyncKeysWithStreamingResponse:
@@ -943,9 +943,9 @@ def downloads(self) -> AsyncDownloadsWithStreamingResponse:
return AsyncDownloadsWithStreamingResponse(self._stream.downloads)
@cached_property
- def embeds(self) -> AsyncEmbedsWithStreamingResponse:
- return AsyncEmbedsWithStreamingResponse(self._stream.embeds)
+ def embed(self) -> AsyncEmbedWithStreamingResponse:
+ return AsyncEmbedWithStreamingResponse(self._stream.embed)
@cached_property
- def tokens(self) -> AsyncTokensWithStreamingResponse:
- return AsyncTokensWithStreamingResponse(self._stream.tokens)
+ def token(self) -> AsyncTokenWithStreamingResponse:
+ return AsyncTokenWithStreamingResponse(self._stream.token)
diff --git a/src/cloudflare/resources/stream/tokens.py b/src/cloudflare/resources/stream/token.py
similarity index 88%
rename from src/cloudflare/resources/stream/tokens.py
rename to src/cloudflare/resources/stream/token.py
index 6daf300446a..a2904a823b7 100644
--- a/src/cloudflare/resources/stream/tokens.py
+++ b/src/cloudflare/resources/stream/token.py
@@ -25,17 +25,17 @@
)
from ...types.stream import TokenCreateResponse, token_create_params
-__all__ = ["Tokens", "AsyncTokens"]
+__all__ = ["Token", "AsyncToken"]
-class Tokens(SyncAPIResource):
+class Token(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> TokensWithRawResponse:
- return TokensWithRawResponse(self)
+ def with_raw_response(self) -> TokenWithRawResponse:
+ return TokenWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> TokensWithStreamingResponse:
- return TokensWithStreamingResponse(self)
+ def with_streaming_response(self) -> TokenWithStreamingResponse:
+ return TokenWithStreamingResponse(self)
def create(
self,
@@ -122,14 +122,14 @@ def create(
)
-class AsyncTokens(AsyncAPIResource):
+class AsyncToken(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncTokensWithRawResponse:
- return AsyncTokensWithRawResponse(self)
+ def with_raw_response(self) -> AsyncTokenWithRawResponse:
+ return AsyncTokenWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncTokensWithStreamingResponse:
- return AsyncTokensWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncTokenWithStreamingResponse:
+ return AsyncTokenWithStreamingResponse(self)
async def create(
self,
@@ -216,37 +216,37 @@ async def create(
)
-class TokensWithRawResponse:
- def __init__(self, tokens: Tokens) -> None:
- self._tokens = tokens
+class TokenWithRawResponse:
+ def __init__(self, token: Token) -> None:
+ self._token = token
self.create = to_raw_response_wrapper(
- tokens.create,
+ token.create,
)
-class AsyncTokensWithRawResponse:
- def __init__(self, tokens: AsyncTokens) -> None:
- self._tokens = tokens
+class AsyncTokenWithRawResponse:
+ def __init__(self, token: AsyncToken) -> None:
+ self._token = token
self.create = async_to_raw_response_wrapper(
- tokens.create,
+ token.create,
)
-class TokensWithStreamingResponse:
- def __init__(self, tokens: Tokens) -> None:
- self._tokens = tokens
+class TokenWithStreamingResponse:
+ def __init__(self, token: Token) -> None:
+ self._token = token
self.create = to_streamed_response_wrapper(
- tokens.create,
+ token.create,
)
-class AsyncTokensWithStreamingResponse:
- def __init__(self, tokens: AsyncTokens) -> None:
- self._tokens = tokens
+class AsyncTokenWithStreamingResponse:
+ def __init__(self, token: AsyncToken) -> None:
+ self._token = token
self.create = async_to_streamed_response_wrapper(
- tokens.create,
+ token.create,
)
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/__init__.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
index 12f55fd8f15..0b995bdf832 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
@@ -16,6 +16,22 @@
ScriptsWithStreamingResponse,
AsyncScriptsWithStreamingResponse,
)
+from .bindings import (
+ Bindings,
+ AsyncBindings,
+ BindingsWithRawResponse,
+ AsyncBindingsWithRawResponse,
+ BindingsWithStreamingResponse,
+ AsyncBindingsWithStreamingResponse,
+)
+from .settings import (
+ Settings,
+ AsyncSettings,
+ SettingsWithRawResponse,
+ AsyncSettingsWithRawResponse,
+ SettingsWithStreamingResponse,
+ AsyncSettingsWithStreamingResponse,
+)
__all__ = [
"Content",
@@ -24,6 +40,18 @@
"AsyncContentWithRawResponse",
"ContentWithStreamingResponse",
"AsyncContentWithStreamingResponse",
+ "Settings",
+ "AsyncSettings",
+ "SettingsWithRawResponse",
+ "AsyncSettingsWithRawResponse",
+ "SettingsWithStreamingResponse",
+ "AsyncSettingsWithStreamingResponse",
+ "Bindings",
+ "AsyncBindings",
+ "BindingsWithRawResponse",
+ "AsyncBindingsWithRawResponse",
+ "BindingsWithStreamingResponse",
+ "AsyncBindingsWithStreamingResponse",
"Scripts",
"AsyncScripts",
"ScriptsWithRawResponse",
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/bindings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py
similarity index 94%
rename from src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/bindings.py
rename to src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py
index ec2ea90a3b0..02756b35d56 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/bindings.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/bindings.py
@@ -6,19 +6,19 @@
import httpx
-from ......._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ......._compat import cached_property
-from ......._resource import SyncAPIResource, AsyncAPIResource
-from ......._response import (
+from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ......_compat import cached_property
+from ......_resource import SyncAPIResource, AsyncAPIResource
+from ......_response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ......._base_client import (
+from ......_base_client import (
make_request_options,
)
-from .......types.workers_for_platforms.dispatch.namespaces.scripts.content import BindingGetResponse
+from ......types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse
__all__ = ["Bindings", "AsyncBindings"]
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
similarity index 85%
rename from src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py
rename to src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
index edc9f4bc914..f7ecc203ed3 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/scripts.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content.py
@@ -6,16 +6,16 @@
import httpx
-from ......._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
-from ......._utils import (
+from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
+from ......_utils import (
extract_files,
maybe_transform,
deepcopy_minimal,
async_maybe_transform,
)
-from ......._compat import cached_property
-from ......._resource import SyncAPIResource, AsyncAPIResource
-from ......._response import (
+from ......_compat import cached_property
+from ......_resource import SyncAPIResource, AsyncAPIResource
+from ......_response import (
BinaryAPIResponse,
AsyncBinaryAPIResponse,
StreamedBinaryAPIResponse,
@@ -29,24 +29,24 @@
async_to_custom_raw_response_wrapper,
async_to_custom_streamed_response_wrapper,
)
-from ......._wrappers import ResultWrapper
-from ......._base_client import (
+from ......_wrappers import ResultWrapper
+from ......_base_client import (
make_request_options,
)
-from .......types.workers import WorkersScript
-from .......types.workers_for_platforms.dispatch.namespaces.scripts.content import script_update_params
+from ......types.workers import WorkersScript
+from ......types.workers_for_platforms.dispatch.namespaces.scripts import content_update_params
-__all__ = ["Scripts", "AsyncScripts"]
+__all__ = ["Content", "AsyncContent"]
-class Scripts(SyncAPIResource):
+class Content(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> ScriptsWithRawResponse:
- return ScriptsWithRawResponse(self)
+ def with_raw_response(self) -> ContentWithRawResponse:
+ return ContentWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> ScriptsWithStreamingResponse:
- return ScriptsWithStreamingResponse(self)
+ def with_streaming_response(self) -> ContentWithStreamingResponse:
+ return ContentWithStreamingResponse(self)
def update(
self,
@@ -55,7 +55,7 @@ def update(
account_id: str,
dispatch_namespace: str,
any_part_name: List[FileTypes] | NotGiven = NOT_GIVEN,
- metadata: script_update_params.Metadata | NotGiven = NOT_GIVEN,
+ metadata: content_update_params.Metadata | 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,
@@ -109,7 +109,7 @@ def update(
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return self._put(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content",
- body=maybe_transform(body, script_update_params.ScriptUpdateParams),
+ body=maybe_transform(body, content_update_params.ContentUpdateParams),
files=files,
options=make_request_options(
extra_headers=extra_headers,
@@ -169,14 +169,14 @@ def get(
)
-class AsyncScripts(AsyncAPIResource):
+class AsyncContent(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncScriptsWithRawResponse:
- return AsyncScriptsWithRawResponse(self)
+ def with_raw_response(self) -> AsyncContentWithRawResponse:
+ return AsyncContentWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncScriptsWithStreamingResponse:
- return AsyncScriptsWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncContentWithStreamingResponse:
+ return AsyncContentWithStreamingResponse(self)
async def update(
self,
@@ -185,7 +185,7 @@ async def update(
account_id: str,
dispatch_namespace: str,
any_part_name: List[FileTypes] | NotGiven = NOT_GIVEN,
- metadata: script_update_params.Metadata | NotGiven = NOT_GIVEN,
+ metadata: content_update_params.Metadata | 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,
@@ -239,7 +239,7 @@ async def update(
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
return await self._put(
f"/accounts/{account_id}/workers/dispatch/namespaces/{dispatch_namespace}/scripts/{script_name}/content",
- body=await async_maybe_transform(body, script_update_params.ScriptUpdateParams),
+ body=await async_maybe_transform(body, content_update_params.ContentUpdateParams),
files=files,
options=make_request_options(
extra_headers=extra_headers,
@@ -299,53 +299,53 @@ async def get(
)
-class ScriptsWithRawResponse:
- def __init__(self, scripts: Scripts) -> None:
- self._scripts = scripts
+class ContentWithRawResponse:
+ def __init__(self, content: Content) -> None:
+ self._content = content
self.update = to_raw_response_wrapper(
- scripts.update,
+ content.update,
)
self.get = to_custom_raw_response_wrapper(
- scripts.get,
+ content.get,
BinaryAPIResponse,
)
-class AsyncScriptsWithRawResponse:
- def __init__(self, scripts: AsyncScripts) -> None:
- self._scripts = scripts
+class AsyncContentWithRawResponse:
+ def __init__(self, content: AsyncContent) -> None:
+ self._content = content
self.update = async_to_raw_response_wrapper(
- scripts.update,
+ content.update,
)
self.get = async_to_custom_raw_response_wrapper(
- scripts.get,
+ content.get,
AsyncBinaryAPIResponse,
)
-class ScriptsWithStreamingResponse:
- def __init__(self, scripts: Scripts) -> None:
- self._scripts = scripts
+class ContentWithStreamingResponse:
+ def __init__(self, content: Content) -> None:
+ self._content = content
self.update = to_streamed_response_wrapper(
- scripts.update,
+ content.update,
)
self.get = to_custom_streamed_response_wrapper(
- scripts.get,
+ content.get,
StreamedBinaryAPIResponse,
)
-class AsyncScriptsWithStreamingResponse:
- def __init__(self, scripts: AsyncScripts) -> None:
- self._scripts = scripts
+class AsyncContentWithStreamingResponse:
+ def __init__(self, content: AsyncContent) -> None:
+ self._content = content
self.update = async_to_streamed_response_wrapper(
- scripts.update,
+ content.update,
)
self.get = async_to_custom_streamed_response_wrapper(
- scripts.get,
+ content.get,
AsyncStreamedBinaryAPIResponse,
)
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
deleted file mode 100644
index 74e934adc5e..00000000000
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .content import (
- Content,
- AsyncContent,
- ContentWithRawResponse,
- AsyncContentWithRawResponse,
- ContentWithStreamingResponse,
- AsyncContentWithStreamingResponse,
-)
-from .scripts import (
- Scripts,
- AsyncScripts,
- ScriptsWithRawResponse,
- AsyncScriptsWithRawResponse,
- ScriptsWithStreamingResponse,
- AsyncScriptsWithStreamingResponse,
-)
-from .bindings import (
- Bindings,
- AsyncBindings,
- BindingsWithRawResponse,
- AsyncBindingsWithRawResponse,
- BindingsWithStreamingResponse,
- AsyncBindingsWithStreamingResponse,
-)
-from .settings import (
- Settings,
- AsyncSettings,
- SettingsWithRawResponse,
- AsyncSettingsWithRawResponse,
- SettingsWithStreamingResponse,
- AsyncSettingsWithStreamingResponse,
-)
-
-__all__ = [
- "Scripts",
- "AsyncScripts",
- "ScriptsWithRawResponse",
- "AsyncScriptsWithRawResponse",
- "ScriptsWithStreamingResponse",
- "AsyncScriptsWithStreamingResponse",
- "Settings",
- "AsyncSettings",
- "SettingsWithRawResponse",
- "AsyncSettingsWithRawResponse",
- "SettingsWithStreamingResponse",
- "AsyncSettingsWithStreamingResponse",
- "Bindings",
- "AsyncBindings",
- "BindingsWithRawResponse",
- "AsyncBindingsWithRawResponse",
- "BindingsWithStreamingResponse",
- "AsyncBindingsWithStreamingResponse",
- "Content",
- "AsyncContent",
- "ContentWithRawResponse",
- "AsyncContentWithRawResponse",
- "ContentWithStreamingResponse",
- "AsyncContentWithStreamingResponse",
-]
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/content.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/content.py
deleted file mode 100644
index a5100163d13..00000000000
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/content.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .scripts import (
- Scripts,
- AsyncScripts,
- ScriptsWithRawResponse,
- AsyncScriptsWithRawResponse,
- ScriptsWithStreamingResponse,
- AsyncScriptsWithStreamingResponse,
-)
-from .bindings import (
- Bindings,
- AsyncBindings,
- BindingsWithRawResponse,
- AsyncBindingsWithRawResponse,
- BindingsWithStreamingResponse,
- AsyncBindingsWithStreamingResponse,
-)
-from .settings import (
- Settings,
- AsyncSettings,
- SettingsWithRawResponse,
- AsyncSettingsWithRawResponse,
- SettingsWithStreamingResponse,
- AsyncSettingsWithStreamingResponse,
-)
-from ......._compat import cached_property
-from ......._resource import SyncAPIResource, AsyncAPIResource
-
-__all__ = ["Content", "AsyncContent"]
-
-
-class Content(SyncAPIResource):
- @cached_property
- def scripts(self) -> Scripts:
- return Scripts(self._client)
-
- @cached_property
- def settings(self) -> Settings:
- return Settings(self._client)
-
- @cached_property
- def bindings(self) -> Bindings:
- return Bindings(self._client)
-
- @cached_property
- def with_raw_response(self) -> ContentWithRawResponse:
- return ContentWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> ContentWithStreamingResponse:
- return ContentWithStreamingResponse(self)
-
-
-class AsyncContent(AsyncAPIResource):
- @cached_property
- def scripts(self) -> AsyncScripts:
- return AsyncScripts(self._client)
-
- @cached_property
- def settings(self) -> AsyncSettings:
- return AsyncSettings(self._client)
-
- @cached_property
- def bindings(self) -> AsyncBindings:
- return AsyncBindings(self._client)
-
- @cached_property
- def with_raw_response(self) -> AsyncContentWithRawResponse:
- return AsyncContentWithRawResponse(self)
-
- @cached_property
- def with_streaming_response(self) -> AsyncContentWithStreamingResponse:
- return AsyncContentWithStreamingResponse(self)
-
-
-class ContentWithRawResponse:
- def __init__(self, content: Content) -> None:
- self._content = content
-
- @cached_property
- def scripts(self) -> ScriptsWithRawResponse:
- return ScriptsWithRawResponse(self._content.scripts)
-
- @cached_property
- def settings(self) -> SettingsWithRawResponse:
- return SettingsWithRawResponse(self._content.settings)
-
- @cached_property
- def bindings(self) -> BindingsWithRawResponse:
- return BindingsWithRawResponse(self._content.bindings)
-
-
-class AsyncContentWithRawResponse:
- def __init__(self, content: AsyncContent) -> None:
- self._content = content
-
- @cached_property
- def scripts(self) -> AsyncScriptsWithRawResponse:
- return AsyncScriptsWithRawResponse(self._content.scripts)
-
- @cached_property
- def settings(self) -> AsyncSettingsWithRawResponse:
- return AsyncSettingsWithRawResponse(self._content.settings)
-
- @cached_property
- def bindings(self) -> AsyncBindingsWithRawResponse:
- return AsyncBindingsWithRawResponse(self._content.bindings)
-
-
-class ContentWithStreamingResponse:
- def __init__(self, content: Content) -> None:
- self._content = content
-
- @cached_property
- def scripts(self) -> ScriptsWithStreamingResponse:
- return ScriptsWithStreamingResponse(self._content.scripts)
-
- @cached_property
- def settings(self) -> SettingsWithStreamingResponse:
- return SettingsWithStreamingResponse(self._content.settings)
-
- @cached_property
- def bindings(self) -> BindingsWithStreamingResponse:
- return BindingsWithStreamingResponse(self._content.bindings)
-
-
-class AsyncContentWithStreamingResponse:
- def __init__(self, content: AsyncContent) -> None:
- self._content = content
-
- @cached_property
- def scripts(self) -> AsyncScriptsWithStreamingResponse:
- return AsyncScriptsWithStreamingResponse(self._content.scripts)
-
- @cached_property
- def settings(self) -> AsyncSettingsWithStreamingResponse:
- return AsyncSettingsWithStreamingResponse(self._content.settings)
-
- @cached_property
- def bindings(self) -> AsyncBindingsWithStreamingResponse:
- return AsyncBindingsWithStreamingResponse(self._content.bindings)
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
index 90ccb7cb50b..085440bfc01 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/scripts.py
@@ -14,6 +14,22 @@
ContentWithStreamingResponse,
AsyncContentWithStreamingResponse,
)
+from .bindings import (
+ Bindings,
+ AsyncBindings,
+ BindingsWithRawResponse,
+ AsyncBindingsWithRawResponse,
+ BindingsWithStreamingResponse,
+ AsyncBindingsWithStreamingResponse,
+)
+from .settings import (
+ Settings,
+ AsyncSettings,
+ SettingsWithRawResponse,
+ AsyncSettingsWithRawResponse,
+ SettingsWithStreamingResponse,
+ AsyncSettingsWithStreamingResponse,
+)
from ......_types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven, FileTypes
from ......_utils import (
required_args,
@@ -29,7 +45,6 @@
async_to_streamed_response_wrapper,
)
from ......_wrappers import ResultWrapper
-from .content.content import Content, AsyncContent
from ......_base_client import (
make_request_options,
)
@@ -48,6 +63,14 @@ class Scripts(SyncAPIResource):
def content(self) -> Content:
return Content(self._client)
+ @cached_property
+ def settings(self) -> Settings:
+ return Settings(self._client)
+
+ @cached_property
+ def bindings(self) -> Bindings:
+ return Bindings(self._client)
+
@cached_property
def with_raw_response(self) -> ScriptsWithRawResponse:
return ScriptsWithRawResponse(self)
@@ -291,6 +314,14 @@ class AsyncScripts(AsyncAPIResource):
def content(self) -> AsyncContent:
return AsyncContent(self._client)
+ @cached_property
+ def settings(self) -> AsyncSettings:
+ return AsyncSettings(self._client)
+
+ @cached_property
+ def bindings(self) -> AsyncBindings:
+ return AsyncBindings(self._client)
+
@cached_property
def with_raw_response(self) -> AsyncScriptsWithRawResponse:
return AsyncScriptsWithRawResponse(self)
@@ -547,6 +578,14 @@ def __init__(self, scripts: Scripts) -> None:
def content(self) -> ContentWithRawResponse:
return ContentWithRawResponse(self._scripts.content)
+ @cached_property
+ def settings(self) -> SettingsWithRawResponse:
+ return SettingsWithRawResponse(self._scripts.settings)
+
+ @cached_property
+ def bindings(self) -> BindingsWithRawResponse:
+ return BindingsWithRawResponse(self._scripts.bindings)
+
class AsyncScriptsWithRawResponse:
def __init__(self, scripts: AsyncScripts) -> None:
@@ -566,6 +605,14 @@ def __init__(self, scripts: AsyncScripts) -> None:
def content(self) -> AsyncContentWithRawResponse:
return AsyncContentWithRawResponse(self._scripts.content)
+ @cached_property
+ def settings(self) -> AsyncSettingsWithRawResponse:
+ return AsyncSettingsWithRawResponse(self._scripts.settings)
+
+ @cached_property
+ def bindings(self) -> AsyncBindingsWithRawResponse:
+ return AsyncBindingsWithRawResponse(self._scripts.bindings)
+
class ScriptsWithStreamingResponse:
def __init__(self, scripts: Scripts) -> None:
@@ -585,6 +632,14 @@ def __init__(self, scripts: Scripts) -> None:
def content(self) -> ContentWithStreamingResponse:
return ContentWithStreamingResponse(self._scripts.content)
+ @cached_property
+ def settings(self) -> SettingsWithStreamingResponse:
+ return SettingsWithStreamingResponse(self._scripts.settings)
+
+ @cached_property
+ def bindings(self) -> BindingsWithStreamingResponse:
+ return BindingsWithStreamingResponse(self._scripts.bindings)
+
class AsyncScriptsWithStreamingResponse:
def __init__(self, scripts: AsyncScripts) -> None:
@@ -603,3 +658,11 @@ def __init__(self, scripts: AsyncScripts) -> None:
@cached_property
def content(self) -> AsyncContentWithStreamingResponse:
return AsyncContentWithStreamingResponse(self._scripts.content)
+
+ @cached_property
+ def settings(self) -> AsyncSettingsWithStreamingResponse:
+ return AsyncSettingsWithStreamingResponse(self._scripts.settings)
+
+ @cached_property
+ def bindings(self) -> AsyncBindingsWithStreamingResponse:
+ return AsyncBindingsWithStreamingResponse(self._scripts.bindings)
diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/settings.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py
similarity index 96%
rename from src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/settings.py
rename to src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py
index 0cd0ada041e..a7f47326564 100644
--- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/content/settings.py
+++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/scripts/settings.py
@@ -7,24 +7,24 @@
import httpx
-from ......._types import NOT_GIVEN, Body, Query, Headers, NotGiven
-from ......._utils import (
+from ......_types import NOT_GIVEN, Body, Query, Headers, NotGiven
+from ......_utils import (
maybe_transform,
async_maybe_transform,
)
-from ......._compat import cached_property
-from ......._resource import SyncAPIResource, AsyncAPIResource
-from ......._response import (
+from ......_compat import cached_property
+from ......_resource import SyncAPIResource, AsyncAPIResource
+from ......_response import (
to_raw_response_wrapper,
to_streamed_response_wrapper,
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
-from ......._wrappers import ResultWrapper
-from ......._base_client import (
+from ......_wrappers import ResultWrapper
+from ......_base_client import (
make_request_options,
)
-from .......types.workers_for_platforms.dispatch.namespaces.scripts.content import (
+from ......types.workers_for_platforms.dispatch.namespaces.scripts import (
SettingGetResponse,
SettingEditResponse,
setting_edit_params,
diff --git a/src/cloudflare/resources/zero_trust/devices/__init__.py b/src/cloudflare/resources/zero_trust/devices/__init__.py
index 66b7dc98120..719cd4c0842 100644
--- a/src/cloudflare/resources/zero_trust/devices/__init__.py
+++ b/src/cloudflare/resources/zero_trust/devices/__init__.py
@@ -1,5 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+from .revoke import (
+ Revoke,
+ AsyncRevoke,
+ RevokeWithRawResponse,
+ AsyncRevokeWithRawResponse,
+ RevokeWithStreamingResponse,
+ AsyncRevokeWithStreamingResponse,
+)
from .devices import (
Devices,
AsyncDevices,
@@ -16,14 +24,6 @@
PostureWithStreamingResponse,
AsyncPostureWithStreamingResponse,
)
-from .revokes import (
- Revokes,
- AsyncRevokes,
- RevokesWithRawResponse,
- AsyncRevokesWithRawResponse,
- RevokesWithStreamingResponse,
- AsyncRevokesWithStreamingResponse,
-)
from .networks import (
Networks,
AsyncNetworks,
@@ -48,6 +48,14 @@
SettingsWithStreamingResponse,
AsyncSettingsWithStreamingResponse,
)
+from .unrevoke import (
+ Unrevoke,
+ AsyncUnrevoke,
+ UnrevokeWithRawResponse,
+ AsyncUnrevokeWithRawResponse,
+ UnrevokeWithStreamingResponse,
+ AsyncUnrevokeWithStreamingResponse,
+)
from .dex_tests import (
DEXTests,
AsyncDEXTests,
@@ -56,14 +64,6 @@
DEXTestsWithStreamingResponse,
AsyncDEXTestsWithStreamingResponse,
)
-from .unrevokes import (
- Unrevokes,
- AsyncUnrevokes,
- UnrevokesWithRawResponse,
- AsyncUnrevokesWithRawResponse,
- UnrevokesWithStreamingResponse,
- AsyncUnrevokesWithStreamingResponse,
-)
from .override_codes import (
OverrideCodes,
AsyncOverrideCodes,
@@ -98,24 +98,24 @@
"AsyncPostureWithRawResponse",
"PostureWithStreamingResponse",
"AsyncPostureWithStreamingResponse",
- "Revokes",
- "AsyncRevokes",
- "RevokesWithRawResponse",
- "AsyncRevokesWithRawResponse",
- "RevokesWithStreamingResponse",
- "AsyncRevokesWithStreamingResponse",
+ "Revoke",
+ "AsyncRevoke",
+ "RevokeWithRawResponse",
+ "AsyncRevokeWithRawResponse",
+ "RevokeWithStreamingResponse",
+ "AsyncRevokeWithStreamingResponse",
"Settings",
"AsyncSettings",
"SettingsWithRawResponse",
"AsyncSettingsWithRawResponse",
"SettingsWithStreamingResponse",
"AsyncSettingsWithStreamingResponse",
- "Unrevokes",
- "AsyncUnrevokes",
- "UnrevokesWithRawResponse",
- "AsyncUnrevokesWithRawResponse",
- "UnrevokesWithStreamingResponse",
- "AsyncUnrevokesWithStreamingResponse",
+ "Unrevoke",
+ "AsyncUnrevoke",
+ "UnrevokeWithRawResponse",
+ "AsyncUnrevokeWithRawResponse",
+ "UnrevokeWithStreamingResponse",
+ "AsyncUnrevokeWithStreamingResponse",
"OverrideCodes",
"AsyncOverrideCodes",
"OverrideCodesWithRawResponse",
diff --git a/src/cloudflare/resources/zero_trust/devices/devices.py b/src/cloudflare/resources/zero_trust/devices/devices.py
index 27afa392a13..5f82f03c173 100644
--- a/src/cloudflare/resources/zero_trust/devices/devices.py
+++ b/src/cloudflare/resources/zero_trust/devices/devices.py
@@ -6,6 +6,14 @@
import httpx
+from .revoke import (
+ Revoke,
+ AsyncRevoke,
+ RevokeWithRawResponse,
+ AsyncRevokeWithRawResponse,
+ RevokeWithStreamingResponse,
+ AsyncRevokeWithStreamingResponse,
+)
from .posture import (
Posture,
AsyncPosture,
@@ -14,14 +22,6 @@
PostureWithStreamingResponse,
AsyncPostureWithStreamingResponse,
)
-from .revokes import (
- Revokes,
- AsyncRevokes,
- RevokesWithRawResponse,
- AsyncRevokesWithRawResponse,
- RevokesWithStreamingResponse,
- AsyncRevokesWithStreamingResponse,
-)
from .networks import (
Networks,
AsyncNetworks,
@@ -46,6 +46,14 @@
SettingsWithStreamingResponse,
AsyncSettingsWithStreamingResponse,
)
+from .unrevoke import (
+ Unrevoke,
+ AsyncUnrevoke,
+ UnrevokeWithRawResponse,
+ AsyncUnrevokeWithRawResponse,
+ UnrevokeWithStreamingResponse,
+ AsyncUnrevokeWithStreamingResponse,
+)
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
from .dex_tests import (
DEXTests,
@@ -55,14 +63,6 @@
DEXTestsWithStreamingResponse,
AsyncDEXTestsWithStreamingResponse,
)
-from .unrevokes import (
- Unrevokes,
- AsyncUnrevokes,
- UnrevokesWithRawResponse,
- AsyncUnrevokesWithRawResponse,
- UnrevokesWithStreamingResponse,
- AsyncUnrevokesWithStreamingResponse,
-)
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
@@ -108,16 +108,16 @@ def posture(self) -> Posture:
return Posture(self._client)
@cached_property
- def revokes(self) -> Revokes:
- return Revokes(self._client)
+ def revoke(self) -> Revoke:
+ return Revoke(self._client)
@cached_property
def settings(self) -> Settings:
return Settings(self._client)
@cached_property
- def unrevokes(self) -> Unrevokes:
- return Unrevokes(self._client)
+ def unrevoke(self) -> Unrevoke:
+ return Unrevoke(self._client)
@cached_property
def override_codes(self) -> OverrideCodes:
@@ -230,16 +230,16 @@ def posture(self) -> AsyncPosture:
return AsyncPosture(self._client)
@cached_property
- def revokes(self) -> AsyncRevokes:
- return AsyncRevokes(self._client)
+ def revoke(self) -> AsyncRevoke:
+ return AsyncRevoke(self._client)
@cached_property
def settings(self) -> AsyncSettings:
return AsyncSettings(self._client)
@cached_property
- def unrevokes(self) -> AsyncUnrevokes:
- return AsyncUnrevokes(self._client)
+ def unrevoke(self) -> AsyncUnrevoke:
+ return AsyncUnrevoke(self._client)
@cached_property
def override_codes(self) -> AsyncOverrideCodes:
@@ -362,16 +362,16 @@ def posture(self) -> PostureWithRawResponse:
return PostureWithRawResponse(self._devices.posture)
@cached_property
- def revokes(self) -> RevokesWithRawResponse:
- return RevokesWithRawResponse(self._devices.revokes)
+ def revoke(self) -> RevokeWithRawResponse:
+ return RevokeWithRawResponse(self._devices.revoke)
@cached_property
def settings(self) -> SettingsWithRawResponse:
return SettingsWithRawResponse(self._devices.settings)
@cached_property
- def unrevokes(self) -> UnrevokesWithRawResponse:
- return UnrevokesWithRawResponse(self._devices.unrevokes)
+ def unrevoke(self) -> UnrevokeWithRawResponse:
+ return UnrevokeWithRawResponse(self._devices.unrevoke)
@cached_property
def override_codes(self) -> OverrideCodesWithRawResponse:
@@ -406,16 +406,16 @@ def posture(self) -> AsyncPostureWithRawResponse:
return AsyncPostureWithRawResponse(self._devices.posture)
@cached_property
- def revokes(self) -> AsyncRevokesWithRawResponse:
- return AsyncRevokesWithRawResponse(self._devices.revokes)
+ def revoke(self) -> AsyncRevokeWithRawResponse:
+ return AsyncRevokeWithRawResponse(self._devices.revoke)
@cached_property
def settings(self) -> AsyncSettingsWithRawResponse:
return AsyncSettingsWithRawResponse(self._devices.settings)
@cached_property
- def unrevokes(self) -> AsyncUnrevokesWithRawResponse:
- return AsyncUnrevokesWithRawResponse(self._devices.unrevokes)
+ def unrevoke(self) -> AsyncUnrevokeWithRawResponse:
+ return AsyncUnrevokeWithRawResponse(self._devices.unrevoke)
@cached_property
def override_codes(self) -> AsyncOverrideCodesWithRawResponse:
@@ -450,16 +450,16 @@ def posture(self) -> PostureWithStreamingResponse:
return PostureWithStreamingResponse(self._devices.posture)
@cached_property
- def revokes(self) -> RevokesWithStreamingResponse:
- return RevokesWithStreamingResponse(self._devices.revokes)
+ def revoke(self) -> RevokeWithStreamingResponse:
+ return RevokeWithStreamingResponse(self._devices.revoke)
@cached_property
def settings(self) -> SettingsWithStreamingResponse:
return SettingsWithStreamingResponse(self._devices.settings)
@cached_property
- def unrevokes(self) -> UnrevokesWithStreamingResponse:
- return UnrevokesWithStreamingResponse(self._devices.unrevokes)
+ def unrevoke(self) -> UnrevokeWithStreamingResponse:
+ return UnrevokeWithStreamingResponse(self._devices.unrevoke)
@cached_property
def override_codes(self) -> OverrideCodesWithStreamingResponse:
@@ -494,16 +494,16 @@ def posture(self) -> AsyncPostureWithStreamingResponse:
return AsyncPostureWithStreamingResponse(self._devices.posture)
@cached_property
- def revokes(self) -> AsyncRevokesWithStreamingResponse:
- return AsyncRevokesWithStreamingResponse(self._devices.revokes)
+ def revoke(self) -> AsyncRevokeWithStreamingResponse:
+ return AsyncRevokeWithStreamingResponse(self._devices.revoke)
@cached_property
def settings(self) -> AsyncSettingsWithStreamingResponse:
return AsyncSettingsWithStreamingResponse(self._devices.settings)
@cached_property
- def unrevokes(self) -> AsyncUnrevokesWithStreamingResponse:
- return AsyncUnrevokesWithStreamingResponse(self._devices.unrevokes)
+ def unrevoke(self) -> AsyncUnrevokeWithStreamingResponse:
+ return AsyncUnrevokeWithStreamingResponse(self._devices.unrevoke)
@cached_property
def override_codes(self) -> AsyncOverrideCodesWithStreamingResponse:
diff --git a/src/cloudflare/resources/zero_trust/devices/revokes.py b/src/cloudflare/resources/zero_trust/devices/revoke.py
similarity index 79%
rename from src/cloudflare/resources/zero_trust/devices/revokes.py
rename to src/cloudflare/resources/zero_trust/devices/revoke.py
index 0871cc35377..7ae23b07302 100644
--- a/src/cloudflare/resources/zero_trust/devices/revokes.py
+++ b/src/cloudflare/resources/zero_trust/devices/revoke.py
@@ -25,17 +25,17 @@
)
from ....types.zero_trust.devices import RevokeCreateResponse, revoke_create_params
-__all__ = ["Revokes", "AsyncRevokes"]
+__all__ = ["Revoke", "AsyncRevoke"]
-class Revokes(SyncAPIResource):
+class Revoke(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> RevokesWithRawResponse:
- return RevokesWithRawResponse(self)
+ def with_raw_response(self) -> RevokeWithRawResponse:
+ return RevokeWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> RevokesWithStreamingResponse:
- return RevokesWithStreamingResponse(self)
+ def with_streaming_response(self) -> RevokeWithStreamingResponse:
+ return RevokeWithStreamingResponse(self)
def create(
self,
@@ -82,14 +82,14 @@ def create(
)
-class AsyncRevokes(AsyncAPIResource):
+class AsyncRevoke(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncRevokesWithRawResponse:
- return AsyncRevokesWithRawResponse(self)
+ def with_raw_response(self) -> AsyncRevokeWithRawResponse:
+ return AsyncRevokeWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncRevokesWithStreamingResponse:
- return AsyncRevokesWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncRevokeWithStreamingResponse:
+ return AsyncRevokeWithStreamingResponse(self)
async def create(
self,
@@ -136,37 +136,37 @@ async def create(
)
-class RevokesWithRawResponse:
- def __init__(self, revokes: Revokes) -> None:
- self._revokes = revokes
+class RevokeWithRawResponse:
+ def __init__(self, revoke: Revoke) -> None:
+ self._revoke = revoke
self.create = to_raw_response_wrapper(
- revokes.create,
+ revoke.create,
)
-class AsyncRevokesWithRawResponse:
- def __init__(self, revokes: AsyncRevokes) -> None:
- self._revokes = revokes
+class AsyncRevokeWithRawResponse:
+ def __init__(self, revoke: AsyncRevoke) -> None:
+ self._revoke = revoke
self.create = async_to_raw_response_wrapper(
- revokes.create,
+ revoke.create,
)
-class RevokesWithStreamingResponse:
- def __init__(self, revokes: Revokes) -> None:
- self._revokes = revokes
+class RevokeWithStreamingResponse:
+ def __init__(self, revoke: Revoke) -> None:
+ self._revoke = revoke
self.create = to_streamed_response_wrapper(
- revokes.create,
+ revoke.create,
)
-class AsyncRevokesWithStreamingResponse:
- def __init__(self, revokes: AsyncRevokes) -> None:
- self._revokes = revokes
+class AsyncRevokeWithStreamingResponse:
+ def __init__(self, revoke: AsyncRevoke) -> None:
+ self._revoke = revoke
self.create = async_to_streamed_response_wrapper(
- revokes.create,
+ revoke.create,
)
diff --git a/src/cloudflare/resources/zero_trust/devices/unrevokes.py b/src/cloudflare/resources/zero_trust/devices/unrevoke.py
similarity index 78%
rename from src/cloudflare/resources/zero_trust/devices/unrevokes.py
rename to src/cloudflare/resources/zero_trust/devices/unrevoke.py
index a95a0ec691b..9cd285453a3 100644
--- a/src/cloudflare/resources/zero_trust/devices/unrevokes.py
+++ b/src/cloudflare/resources/zero_trust/devices/unrevoke.py
@@ -25,17 +25,17 @@
)
from ....types.zero_trust.devices import UnrevokeCreateResponse, unrevoke_create_params
-__all__ = ["Unrevokes", "AsyncUnrevokes"]
+__all__ = ["Unrevoke", "AsyncUnrevoke"]
-class Unrevokes(SyncAPIResource):
+class Unrevoke(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> UnrevokesWithRawResponse:
- return UnrevokesWithRawResponse(self)
+ def with_raw_response(self) -> UnrevokeWithRawResponse:
+ return UnrevokeWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> UnrevokesWithStreamingResponse:
- return UnrevokesWithStreamingResponse(self)
+ def with_streaming_response(self) -> UnrevokeWithStreamingResponse:
+ return UnrevokeWithStreamingResponse(self)
def create(
self,
@@ -82,14 +82,14 @@ def create(
)
-class AsyncUnrevokes(AsyncAPIResource):
+class AsyncUnrevoke(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncUnrevokesWithRawResponse:
- return AsyncUnrevokesWithRawResponse(self)
+ def with_raw_response(self) -> AsyncUnrevokeWithRawResponse:
+ return AsyncUnrevokeWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncUnrevokesWithStreamingResponse:
- return AsyncUnrevokesWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncUnrevokeWithStreamingResponse:
+ return AsyncUnrevokeWithStreamingResponse(self)
async def create(
self,
@@ -136,37 +136,37 @@ async def create(
)
-class UnrevokesWithRawResponse:
- def __init__(self, unrevokes: Unrevokes) -> None:
- self._unrevokes = unrevokes
+class UnrevokeWithRawResponse:
+ def __init__(self, unrevoke: Unrevoke) -> None:
+ self._unrevoke = unrevoke
self.create = to_raw_response_wrapper(
- unrevokes.create,
+ unrevoke.create,
)
-class AsyncUnrevokesWithRawResponse:
- def __init__(self, unrevokes: AsyncUnrevokes) -> None:
- self._unrevokes = unrevokes
+class AsyncUnrevokeWithRawResponse:
+ def __init__(self, unrevoke: AsyncUnrevoke) -> None:
+ self._unrevoke = unrevoke
self.create = async_to_raw_response_wrapper(
- unrevokes.create,
+ unrevoke.create,
)
-class UnrevokesWithStreamingResponse:
- def __init__(self, unrevokes: Unrevokes) -> None:
- self._unrevokes = unrevokes
+class UnrevokeWithStreamingResponse:
+ def __init__(self, unrevoke: Unrevoke) -> None:
+ self._unrevoke = unrevoke
self.create = to_streamed_response_wrapper(
- unrevokes.create,
+ unrevoke.create,
)
-class AsyncUnrevokesWithStreamingResponse:
- def __init__(self, unrevokes: AsyncUnrevokes) -> None:
- self._unrevokes = unrevokes
+class AsyncUnrevokeWithStreamingResponse:
+ def __init__(self, unrevoke: AsyncUnrevoke) -> None:
+ self._unrevoke = unrevoke
self.create = async_to_streamed_response_wrapper(
- unrevokes.create,
+ unrevoke.create,
)
diff --git a/src/cloudflare/resources/zones/settings/__init__.py b/src/cloudflare/resources/zones/settings/__init__.py
index e91e31fd0c3..2757eb7e695 100644
--- a/src/cloudflare/resources/zones/settings/__init__.py
+++ b/src/cloudflare/resources/zones/settings/__init__.py
@@ -33,12 +33,12 @@
AsyncIPV6WithStreamingResponse,
)
from .webp import (
- Webp,
- AsyncWebp,
- WebpWithRawResponse,
- AsyncWebpWithRawResponse,
- WebpWithStreamingResponse,
- AsyncWebpWithStreamingResponse,
+ WebP,
+ AsyncWebP,
+ WebPWithRawResponse,
+ AsyncWebPWithRawResponse,
+ WebPWithStreamingResponse,
+ AsyncWebPWithStreamingResponse,
)
from .http2 import (
HTTP2,
@@ -706,12 +706,12 @@
"AsyncWAFWithRawResponse",
"WAFWithStreamingResponse",
"AsyncWAFWithStreamingResponse",
- "Webp",
- "AsyncWebp",
- "WebpWithRawResponse",
- "AsyncWebpWithRawResponse",
- "WebpWithStreamingResponse",
- "AsyncWebpWithStreamingResponse",
+ "WebP",
+ "AsyncWebP",
+ "WebPWithRawResponse",
+ "AsyncWebPWithRawResponse",
+ "WebPWithStreamingResponse",
+ "AsyncWebPWithStreamingResponse",
"Websocket",
"AsyncWebsocket",
"WebsocketWithRawResponse",
diff --git a/src/cloudflare/resources/zones/settings/settings.py b/src/cloudflare/resources/zones/settings/settings.py
index 1e9dcd01895..cd42d6e7010 100644
--- a/src/cloudflare/resources/zones/settings/settings.py
+++ b/src/cloudflare/resources/zones/settings/settings.py
@@ -39,12 +39,12 @@
AsyncIPV6WithStreamingResponse,
)
from .webp import (
- Webp,
- AsyncWebp,
- WebpWithRawResponse,
- AsyncWebpWithRawResponse,
- WebpWithStreamingResponse,
- AsyncWebpWithStreamingResponse,
+ WebP,
+ AsyncWebP,
+ WebPWithRawResponse,
+ AsyncWebPWithRawResponse,
+ WebPWithStreamingResponse,
+ AsyncWebPWithStreamingResponse,
)
from .http2 import (
HTTP2,
@@ -630,8 +630,8 @@ def waf(self) -> WAF:
return WAF(self._client)
@cached_property
- def webp(self) -> Webp:
- return Webp(self._client)
+ def webp(self) -> WebP:
+ return WebP(self._client)
@cached_property
def websocket(self) -> Websocket:
@@ -926,8 +926,8 @@ def waf(self) -> AsyncWAF:
return AsyncWAF(self._client)
@cached_property
- def webp(self) -> AsyncWebp:
- return AsyncWebp(self._client)
+ def webp(self) -> AsyncWebP:
+ return AsyncWebP(self._client)
@cached_property
def websocket(self) -> AsyncWebsocket:
@@ -1232,8 +1232,8 @@ def waf(self) -> WAFWithRawResponse:
return WAFWithRawResponse(self._settings.waf)
@cached_property
- def webp(self) -> WebpWithRawResponse:
- return WebpWithRawResponse(self._settings.webp)
+ def webp(self) -> WebPWithRawResponse:
+ return WebPWithRawResponse(self._settings.webp)
@cached_property
def websocket(self) -> WebsocketWithRawResponse:
@@ -1448,8 +1448,8 @@ def waf(self) -> AsyncWAFWithRawResponse:
return AsyncWAFWithRawResponse(self._settings.waf)
@cached_property
- def webp(self) -> AsyncWebpWithRawResponse:
- return AsyncWebpWithRawResponse(self._settings.webp)
+ def webp(self) -> AsyncWebPWithRawResponse:
+ return AsyncWebPWithRawResponse(self._settings.webp)
@cached_property
def websocket(self) -> AsyncWebsocketWithRawResponse:
@@ -1664,8 +1664,8 @@ def waf(self) -> WAFWithStreamingResponse:
return WAFWithStreamingResponse(self._settings.waf)
@cached_property
- def webp(self) -> WebpWithStreamingResponse:
- return WebpWithStreamingResponse(self._settings.webp)
+ def webp(self) -> WebPWithStreamingResponse:
+ return WebPWithStreamingResponse(self._settings.webp)
@cached_property
def websocket(self) -> WebsocketWithStreamingResponse:
@@ -1880,8 +1880,8 @@ def waf(self) -> AsyncWAFWithStreamingResponse:
return AsyncWAFWithStreamingResponse(self._settings.waf)
@cached_property
- def webp(self) -> AsyncWebpWithStreamingResponse:
- return AsyncWebpWithStreamingResponse(self._settings.webp)
+ def webp(self) -> AsyncWebPWithStreamingResponse:
+ return AsyncWebPWithStreamingResponse(self._settings.webp)
@cached_property
def websocket(self) -> AsyncWebsocketWithStreamingResponse:
diff --git a/src/cloudflare/resources/zones/settings/webp.py b/src/cloudflare/resources/zones/settings/webp.py
index 90f388480a7..fa6411e35e4 100644
--- a/src/cloudflare/resources/zones/settings/webp.py
+++ b/src/cloudflare/resources/zones/settings/webp.py
@@ -24,19 +24,19 @@
from ...._base_client import (
make_request_options,
)
-from ....types.zones.settings import ZonesWebp, webp_edit_params
+from ....types.zones.settings import ZonesWebP, webp_edit_params
-__all__ = ["Webp", "AsyncWebp"]
+__all__ = ["WebP", "AsyncWebP"]
-class Webp(SyncAPIResource):
+class WebP(SyncAPIResource):
@cached_property
- def with_raw_response(self) -> WebpWithRawResponse:
- return WebpWithRawResponse(self)
+ def with_raw_response(self) -> WebPWithRawResponse:
+ return WebPWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> WebpWithStreamingResponse:
- return WebpWithStreamingResponse(self)
+ def with_streaming_response(self) -> WebPWithStreamingResponse:
+ return WebPWithStreamingResponse(self)
def edit(
self,
@@ -49,7 +49,7 @@ def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[ZonesWebp]:
+ ) -> Optional[ZonesWebP]:
"""
When the client requesting the image supports the WebP image codec, and WebP
offers a performance advantage over the original image format, Cloudflare will
@@ -72,7 +72,7 @@ def edit(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return self._patch(
f"/zones/{zone_id}/settings/webp",
- body=maybe_transform({"value": value}, webp_edit_params.WebpEditParams),
+ body=maybe_transform({"value": value}, webp_edit_params.WebPEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -80,7 +80,7 @@ def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]),
+ cast_to=cast(Type[Optional[ZonesWebP]], ResultWrapper[ZonesWebP]),
)
def get(
@@ -93,7 +93,7 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[ZonesWebp]:
+ ) -> Optional[ZonesWebP]:
"""
When the client requesting the image supports the WebP image codec, and WebP
offers a performance advantage over the original image format, Cloudflare will
@@ -121,18 +121,18 @@ def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]),
+ cast_to=cast(Type[Optional[ZonesWebP]], ResultWrapper[ZonesWebP]),
)
-class AsyncWebp(AsyncAPIResource):
+class AsyncWebP(AsyncAPIResource):
@cached_property
- def with_raw_response(self) -> AsyncWebpWithRawResponse:
- return AsyncWebpWithRawResponse(self)
+ def with_raw_response(self) -> AsyncWebPWithRawResponse:
+ return AsyncWebPWithRawResponse(self)
@cached_property
- def with_streaming_response(self) -> AsyncWebpWithStreamingResponse:
- return AsyncWebpWithStreamingResponse(self)
+ def with_streaming_response(self) -> AsyncWebPWithStreamingResponse:
+ return AsyncWebPWithStreamingResponse(self)
async def edit(
self,
@@ -145,7 +145,7 @@ async def edit(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[ZonesWebp]:
+ ) -> Optional[ZonesWebP]:
"""
When the client requesting the image supports the WebP image codec, and WebP
offers a performance advantage over the original image format, Cloudflare will
@@ -168,7 +168,7 @@ async def edit(
raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}")
return await self._patch(
f"/zones/{zone_id}/settings/webp",
- body=await async_maybe_transform({"value": value}, webp_edit_params.WebpEditParams),
+ body=await async_maybe_transform({"value": value}, webp_edit_params.WebPEditParams),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
@@ -176,7 +176,7 @@ async def edit(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]),
+ cast_to=cast(Type[Optional[ZonesWebP]], ResultWrapper[ZonesWebP]),
)
async def get(
@@ -189,7 +189,7 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> Optional[ZonesWebp]:
+ ) -> Optional[ZonesWebP]:
"""
When the client requesting the image supports the WebP image codec, and WebP
offers a performance advantage over the original image format, Cloudflare will
@@ -217,12 +217,12 @@ async def get(
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
- cast_to=cast(Type[Optional[ZonesWebp]], ResultWrapper[ZonesWebp]),
+ cast_to=cast(Type[Optional[ZonesWebP]], ResultWrapper[ZonesWebP]),
)
-class WebpWithRawResponse:
- def __init__(self, webp: Webp) -> None:
+class WebPWithRawResponse:
+ def __init__(self, webp: WebP) -> None:
self._webp = webp
self.edit = to_raw_response_wrapper(
@@ -233,8 +233,8 @@ def __init__(self, webp: Webp) -> None:
)
-class AsyncWebpWithRawResponse:
- def __init__(self, webp: AsyncWebp) -> None:
+class AsyncWebPWithRawResponse:
+ def __init__(self, webp: AsyncWebP) -> None:
self._webp = webp
self.edit = async_to_raw_response_wrapper(
@@ -245,8 +245,8 @@ def __init__(self, webp: AsyncWebp) -> None:
)
-class WebpWithStreamingResponse:
- def __init__(self, webp: Webp) -> None:
+class WebPWithStreamingResponse:
+ def __init__(self, webp: WebP) -> None:
self._webp = webp
self.edit = to_streamed_response_wrapper(
@@ -257,8 +257,8 @@ def __init__(self, webp: Webp) -> None:
)
-class AsyncWebpWithStreamingResponse:
- def __init__(self, webp: AsyncWebp) -> None:
+class AsyncWebPWithStreamingResponse:
+ def __init__(self, webp: AsyncWebP) -> None:
self._webp = webp
self.edit = async_to_streamed_response_wrapper(
diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py
index f9c90ca3150..c4af458470e 100644
--- a/src/cloudflare/types/__init__.py
+++ b/src/cloudflare/types/__init__.py
@@ -32,6 +32,7 @@
from .filter_list_params import FilterListParams as FilterListParams
from .pcap_create_params import PCAPCreateParams as PCAPCreateParams
from .pcap_list_response import PCAPListResponse as PCAPListResponse
+from .plan_list_response import PlanListResponse as PlanListResponse
from .stream_list_params import StreamListParams as StreamListParams
from .user_edit_response import UserEditResponse as UserEditResponse
from .zone_create_params import ZoneCreateParams as ZoneCreateParams
@@ -72,6 +73,7 @@
from .pagerule_update_params import PageruleUpdateParams as PageruleUpdateParams
from .rate_limit_edit_params import RateLimitEditParams as RateLimitEditParams
from .rate_limit_list_params import RateLimitListParams as RateLimitListParams
+from .rate_plan_get_response import RatePlanGetResponse as RatePlanGetResponse
from .account_update_response import AccountUpdateResponse as AccountUpdateResponse
from .audit_log_list_response import AuditLogListResponse as AuditLogListResponse
from .healthcheck_edit_params import HealthcheckEditParams as HealthcheckEditParams
@@ -101,6 +103,7 @@
from .speed_schedule_get_params import SpeedScheduleGetParams as SpeedScheduleGetParams
from .subscription_get_response import SubscriptionGetResponse as SubscriptionGetResponse
from .url_scanner_scan_response import URLScannerScanResponse as URLScannerScanResponse
+from .email_routing_get_response import EmailRoutingGetResponse as EmailRoutingGetResponse
from .managed_header_edit_params import ManagedHeaderEditParams as ManagedHeaderEditParams
from .membership_delete_response import MembershipDeleteResponse as MembershipDeleteResponse
from .membership_update_response import MembershipUpdateResponse as MembershipUpdateResponse
@@ -123,7 +126,6 @@
from .load_balancer_list_response import LoadBalancerListResponse as LoadBalancerListResponse
from .load_balancer_update_params import LoadBalancerUpdateParams as LoadBalancerUpdateParams
from .warp_connector_get_response import WARPConnectorGetResponse as WARPConnectorGetResponse
-from .available_plan_list_response import AvailablePlanListResponse as AvailablePlanListResponse
from .bot_management_update_params import BotManagementUpdateParams as BotManagementUpdateParams
from .custom_hostname_get_response import CustomHostnameGetResponse as CustomHostnameGetResponse
from .managed_header_edit_response import ManagedHeaderEditResponse as ManagedHeaderEditResponse
@@ -139,6 +141,7 @@
from .custom_hostname_create_params import CustomHostnameCreateParams as CustomHostnameCreateParams
from .custom_hostname_edit_response import CustomHostnameEditResponse as CustomHostnameEditResponse
from .custom_hostname_list_response import CustomHostnameListResponse as CustomHostnameListResponse
+from .email_routing_enable_response import EmailRoutingEnableResponse as EmailRoutingEnableResponse
from .load_balancer_delete_response import LoadBalancerDeleteResponse as LoadBalancerDeleteResponse
from .page_shield_get_zone_settings import PageShieldGetZoneSettings as PageShieldGetZoneSettings
from .warp_connector_token_response import WARPConnectorTokenResponse as WARPConnectorTokenResponse
@@ -148,6 +151,7 @@
from .custom_certificate_edit_params import CustomCertificateEditParams as CustomCertificateEditParams
from .custom_certificate_list_params import CustomCertificateListParams as CustomCertificateListParams
from .custom_nameserver_get_response import CustomNameserverGetResponse as CustomNameserverGetResponse
+from .email_routing_disable_response import EmailRoutingDisableResponse as EmailRoutingDisableResponse
from .mtls_certificate_create_params import MTLSCertificateCreateParams as MTLSCertificateCreateParams
from .mtls_certificate_list_response import MTLSCertificateListResponse as MTLSCertificateListResponse
from .url_normalization_get_response import URLNormalizationGetResponse as URLNormalizationGetResponse
@@ -159,7 +163,6 @@
from .custom_nameserver_create_params import CustomNameserverCreateParams as CustomNameserverCreateParams
from .keyless_certificate_edit_params import KeylessCertificateEditParams as KeylessCertificateEditParams
from .url_normalization_update_params import URLNormalizationUpdateParams as URLNormalizationUpdateParams
-from .available_rate_plan_get_response import AvailableRatePlanGetResponse as AvailableRatePlanGetResponse
from .brand_protection_url_info_params import BrandProtectionURLInfoParams as BrandProtectionURLInfoParams
from .client_certificate_create_params import ClientCertificateCreateParams as ClientCertificateCreateParams
from .custom_certificate_create_params import CustomCertificateCreateParams as CustomCertificateCreateParams
diff --git a/src/cloudflare/types/alerting/__init__.py b/src/cloudflare/types/alerting/__init__.py
index 7d9e3fd93af..bd56e8344fa 100644
--- a/src/cloudflare/types/alerting/__init__.py
+++ b/src/cloudflare/types/alerting/__init__.py
@@ -2,4 +2,13 @@
from __future__ import annotations
-from .v3_list_response import V3ListResponse as V3ListResponse
+from .aaa_history import AaaHistory as AaaHistory
+from .aaa_policies import AaaPolicies as AaaPolicies
+from .history_list_params import HistoryListParams as HistoryListParams
+from .policy_create_params import PolicyCreateParams as PolicyCreateParams
+from .policy_list_response import PolicyListResponse as PolicyListResponse
+from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams
+from .policy_create_response import PolicyCreateResponse as PolicyCreateResponse
+from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse
+from .policy_update_response import PolicyUpdateResponse as PolicyUpdateResponse
+from .available_alert_list_response import AvailableAlertListResponse as AvailableAlertListResponse
diff --git a/src/cloudflare/types/alerting/v3/aaa_history.py b/src/cloudflare/types/alerting/aaa_history.py
similarity index 97%
rename from src/cloudflare/types/alerting/v3/aaa_history.py
rename to src/cloudflare/types/alerting/aaa_history.py
index 02a32df786b..18dcdceb3eb 100644
--- a/src/cloudflare/types/alerting/v3/aaa_history.py
+++ b/src/cloudflare/types/alerting/aaa_history.py
@@ -4,7 +4,7 @@
from datetime import datetime
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["AaaHistory"]
diff --git a/src/cloudflare/types/alerting/v3/aaa_policies.py b/src/cloudflare/types/alerting/aaa_policies.py
similarity index 99%
rename from src/cloudflare/types/alerting/v3/aaa_policies.py
rename to src/cloudflare/types/alerting/aaa_policies.py
index 1de262d0d23..90947862783 100644
--- a/src/cloudflare/types/alerting/v3/aaa_policies.py
+++ b/src/cloudflare/types/alerting/aaa_policies.py
@@ -4,7 +4,7 @@
from datetime import datetime
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["AaaPolicies", "Filters", "Mechanisms"]
diff --git a/src/cloudflare/types/alerting/v3_list_response.py b/src/cloudflare/types/alerting/available_alert_list_response.py
similarity index 52%
rename from src/cloudflare/types/alerting/v3_list_response.py
rename to src/cloudflare/types/alerting/available_alert_list_response.py
index f98598e24b8..8f97db5d85a 100644
--- a/src/cloudflare/types/alerting/v3_list_response.py
+++ b/src/cloudflare/types/alerting/available_alert_list_response.py
@@ -2,6 +2,6 @@
from typing import List, Union
-__all__ = ["V3ListResponse"]
+__all__ = ["AvailableAlertListResponse"]
-V3ListResponse = Union[object, List[object], str, None]
+AvailableAlertListResponse = Union[object, List[object], str, None]
diff --git a/src/cloudflare/types/alerting/v3/destinations/__init__.py b/src/cloudflare/types/alerting/destinations/__init__.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/__init__.py
rename to src/cloudflare/types/alerting/destinations/__init__.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/aaa_pagerduty.py b/src/cloudflare/types/alerting/destinations/aaa_pagerduty.py
similarity index 89%
rename from src/cloudflare/types/alerting/v3/destinations/aaa_pagerduty.py
rename to src/cloudflare/types/alerting/destinations/aaa_pagerduty.py
index 0c216843e83..86f14c88d4c 100644
--- a/src/cloudflare/types/alerting/v3/destinations/aaa_pagerduty.py
+++ b/src/cloudflare/types/alerting/destinations/aaa_pagerduty.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["AaaPagerduty"]
diff --git a/src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py b/src/cloudflare/types/alerting/destinations/aaa_webhooks.py
similarity index 97%
rename from src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py
rename to src/cloudflare/types/alerting/destinations/aaa_webhooks.py
index a5f342ad78b..94ab6e5b9d6 100644
--- a/src/cloudflare/types/alerting/v3/destinations/aaa_webhooks.py
+++ b/src/cloudflare/types/alerting/destinations/aaa_webhooks.py
@@ -4,7 +4,7 @@
from datetime import datetime
from typing_extensions import Literal
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["AaaWebhooks"]
diff --git a/src/cloudflare/types/alerting/v3/destinations/eligible_get_response.py b/src/cloudflare/types/alerting/destinations/eligible_get_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/eligible_get_response.py
rename to src/cloudflare/types/alerting/destinations/eligible_get_response.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/pagerduty_create_response.py b/src/cloudflare/types/alerting/destinations/pagerduty_create_response.py
similarity index 88%
rename from src/cloudflare/types/alerting/v3/destinations/pagerduty_create_response.py
rename to src/cloudflare/types/alerting/destinations/pagerduty_create_response.py
index 4d9fd1da8cf..89d2e778506 100644
--- a/src/cloudflare/types/alerting/v3/destinations/pagerduty_create_response.py
+++ b/src/cloudflare/types/alerting/destinations/pagerduty_create_response.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["PagerdutyCreateResponse"]
diff --git a/src/cloudflare/types/alerting/v3/destinations/pagerduty_delete_response.py b/src/cloudflare/types/alerting/destinations/pagerduty_delete_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/pagerduty_delete_response.py
rename to src/cloudflare/types/alerting/destinations/pagerduty_delete_response.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/pagerduty_get_response.py b/src/cloudflare/types/alerting/destinations/pagerduty_get_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/pagerduty_get_response.py
rename to src/cloudflare/types/alerting/destinations/pagerduty_get_response.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/pagerduty_link_response.py b/src/cloudflare/types/alerting/destinations/pagerduty_link_response.py
similarity index 87%
rename from src/cloudflare/types/alerting/v3/destinations/pagerduty_link_response.py
rename to src/cloudflare/types/alerting/destinations/pagerduty_link_response.py
index 663acacce42..4ed62e3d68c 100644
--- a/src/cloudflare/types/alerting/v3/destinations/pagerduty_link_response.py
+++ b/src/cloudflare/types/alerting/destinations/pagerduty_link_response.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["PagerdutyLinkResponse"]
diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_create_params.py b/src/cloudflare/types/alerting/destinations/webhook_create_params.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/webhook_create_params.py
rename to src/cloudflare/types/alerting/destinations/webhook_create_params.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_create_response.py b/src/cloudflare/types/alerting/destinations/webhook_create_response.py
similarity index 87%
rename from src/cloudflare/types/alerting/v3/destinations/webhook_create_response.py
rename to src/cloudflare/types/alerting/destinations/webhook_create_response.py
index 7edd424b5bf..ab273a5048d 100644
--- a/src/cloudflare/types/alerting/v3/destinations/webhook_create_response.py
+++ b/src/cloudflare/types/alerting/destinations/webhook_create_response.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["WebhookCreateResponse"]
diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_delete_response.py b/src/cloudflare/types/alerting/destinations/webhook_delete_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/webhook_delete_response.py
rename to src/cloudflare/types/alerting/destinations/webhook_delete_response.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py b/src/cloudflare/types/alerting/destinations/webhook_list_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/webhook_list_response.py
rename to src/cloudflare/types/alerting/destinations/webhook_list_response.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_update_params.py b/src/cloudflare/types/alerting/destinations/webhook_update_params.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/destinations/webhook_update_params.py
rename to src/cloudflare/types/alerting/destinations/webhook_update_params.py
diff --git a/src/cloudflare/types/alerting/v3/destinations/webhook_update_response.py b/src/cloudflare/types/alerting/destinations/webhook_update_response.py
similarity index 87%
rename from src/cloudflare/types/alerting/v3/destinations/webhook_update_response.py
rename to src/cloudflare/types/alerting/destinations/webhook_update_response.py
index 82922fb431f..ef85a5032ce 100644
--- a/src/cloudflare/types/alerting/v3/destinations/webhook_update_response.py
+++ b/src/cloudflare/types/alerting/destinations/webhook_update_response.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["WebhookUpdateResponse"]
diff --git a/src/cloudflare/types/alerting/v3/history_list_params.py b/src/cloudflare/types/alerting/history_list_params.py
similarity index 96%
rename from src/cloudflare/types/alerting/v3/history_list_params.py
rename to src/cloudflare/types/alerting/history_list_params.py
index c0332c378fc..913da1c6c6f 100644
--- a/src/cloudflare/types/alerting/v3/history_list_params.py
+++ b/src/cloudflare/types/alerting/history_list_params.py
@@ -6,7 +6,7 @@
from datetime import datetime
from typing_extensions import Required, Annotated, TypedDict
-from ...._utils import PropertyInfo
+from ..._utils import PropertyInfo
__all__ = ["HistoryListParams"]
diff --git a/src/cloudflare/types/alerting/v3/policy_create_params.py b/src/cloudflare/types/alerting/policy_create_params.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/policy_create_params.py
rename to src/cloudflare/types/alerting/policy_create_params.py
diff --git a/src/cloudflare/types/alerting/v3/policy_create_response.py b/src/cloudflare/types/alerting/policy_create_response.py
similarity index 87%
rename from src/cloudflare/types/alerting/v3/policy_create_response.py
rename to src/cloudflare/types/alerting/policy_create_response.py
index 80d4fda36ec..39bd66cdfa3 100644
--- a/src/cloudflare/types/alerting/v3/policy_create_response.py
+++ b/src/cloudflare/types/alerting/policy_create_response.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["PolicyCreateResponse"]
diff --git a/src/cloudflare/types/alerting/v3/policy_delete_response.py b/src/cloudflare/types/alerting/policy_delete_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/policy_delete_response.py
rename to src/cloudflare/types/alerting/policy_delete_response.py
diff --git a/src/cloudflare/types/alerting/v3/policy_list_response.py b/src/cloudflare/types/alerting/policy_list_response.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/policy_list_response.py
rename to src/cloudflare/types/alerting/policy_list_response.py
diff --git a/src/cloudflare/types/alerting/v3/policy_update_params.py b/src/cloudflare/types/alerting/policy_update_params.py
similarity index 100%
rename from src/cloudflare/types/alerting/v3/policy_update_params.py
rename to src/cloudflare/types/alerting/policy_update_params.py
diff --git a/src/cloudflare/types/alerting/v3/policy_update_response.py b/src/cloudflare/types/alerting/policy_update_response.py
similarity index 87%
rename from src/cloudflare/types/alerting/v3/policy_update_response.py
rename to src/cloudflare/types/alerting/policy_update_response.py
index 23517ca51fb..10a3c4cdbc7 100644
--- a/src/cloudflare/types/alerting/v3/policy_update_response.py
+++ b/src/cloudflare/types/alerting/policy_update_response.py
@@ -2,7 +2,7 @@
from typing import Optional
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["PolicyUpdateResponse"]
diff --git a/src/cloudflare/types/alerting/v3/__init__.py b/src/cloudflare/types/alerting/v3/__init__.py
deleted file mode 100644
index 1d46e3a60ad..00000000000
--- a/src/cloudflare/types/alerting/v3/__init__.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .aaa_history import AaaHistory as AaaHistory
-from .aaa_policies import AaaPolicies as AaaPolicies
-from .history_list_params import HistoryListParams as HistoryListParams
-from .policy_create_params import PolicyCreateParams as PolicyCreateParams
-from .policy_list_response import PolicyListResponse as PolicyListResponse
-from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams
-from .policy_create_response import PolicyCreateResponse as PolicyCreateResponse
-from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse
-from .policy_update_response import PolicyUpdateResponse as PolicyUpdateResponse
diff --git a/src/cloudflare/types/email_routing/__init__.py b/src/cloudflare/types/email_routing/__init__.py
index de7dd824c61..fc53ea2ebb0 100644
--- a/src/cloudflare/types/email_routing/__init__.py
+++ b/src/cloudflare/types/email_routing/__init__.py
@@ -2,6 +2,19 @@
from __future__ import annotations
-from .routing_get_response import RoutingGetResponse as RoutingGetResponse
-from .routing_enable_response import RoutingEnableResponse as RoutingEnableResponse
-from .routing_disable_response import RoutingDisableResponse as RoutingDisableResponse
+from .dns_get_response import DNSGetResponse as DNSGetResponse
+from .email_dns_record import EmailDNSRecord as EmailDNSRecord
+from .rule_list_params import RuleListParams as RuleListParams
+from .rule_get_response import RuleGetResponse as RuleGetResponse
+from .rule_create_params import RuleCreateParams as RuleCreateParams
+from .rule_list_response import RuleListResponse as RuleListResponse
+from .rule_update_params import RuleUpdateParams as RuleUpdateParams
+from .address_list_params import AddressListParams as AddressListParams
+from .address_get_response import AddressGetResponse as AddressGetResponse
+from .rule_create_response import RuleCreateResponse as RuleCreateResponse
+from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse
+from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse
+from .address_create_params import AddressCreateParams as AddressCreateParams
+from .address_list_response import AddressListResponse as AddressListResponse
+from .address_create_response import AddressCreateResponse as AddressCreateResponse
+from .address_delete_response import AddressDeleteResponse as AddressDeleteResponse
diff --git a/src/cloudflare/types/email_routing/routing/address_create_params.py b/src/cloudflare/types/email_routing/address_create_params.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/address_create_params.py
rename to src/cloudflare/types/email_routing/address_create_params.py
diff --git a/src/cloudflare/types/email_routing/routing/address_create_response.py b/src/cloudflare/types/email_routing/address_create_response.py
similarity index 96%
rename from src/cloudflare/types/email_routing/routing/address_create_response.py
rename to src/cloudflare/types/email_routing/address_create_response.py
index 0dbafe30df1..075fe7f744d 100644
--- a/src/cloudflare/types/email_routing/routing/address_create_response.py
+++ b/src/cloudflare/types/email_routing/address_create_response.py
@@ -3,7 +3,7 @@
from typing import Optional
from datetime import datetime
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["AddressCreateResponse"]
diff --git a/src/cloudflare/types/email_routing/routing/address_delete_response.py b/src/cloudflare/types/email_routing/address_delete_response.py
similarity index 96%
rename from src/cloudflare/types/email_routing/routing/address_delete_response.py
rename to src/cloudflare/types/email_routing/address_delete_response.py
index 75f66305bf5..a1d5c68e46f 100644
--- a/src/cloudflare/types/email_routing/routing/address_delete_response.py
+++ b/src/cloudflare/types/email_routing/address_delete_response.py
@@ -3,7 +3,7 @@
from typing import Optional
from datetime import datetime
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["AddressDeleteResponse"]
diff --git a/src/cloudflare/types/email_routing/routing/address_get_response.py b/src/cloudflare/types/email_routing/address_get_response.py
similarity index 96%
rename from src/cloudflare/types/email_routing/routing/address_get_response.py
rename to src/cloudflare/types/email_routing/address_get_response.py
index 63604e23ef7..1accf84a580 100644
--- a/src/cloudflare/types/email_routing/routing/address_get_response.py
+++ b/src/cloudflare/types/email_routing/address_get_response.py
@@ -3,7 +3,7 @@
from typing import Optional
from datetime import datetime
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["AddressGetResponse"]
diff --git a/src/cloudflare/types/email_routing/routing/address_list_params.py b/src/cloudflare/types/email_routing/address_list_params.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/address_list_params.py
rename to src/cloudflare/types/email_routing/address_list_params.py
diff --git a/src/cloudflare/types/email_routing/routing/address_list_response.py b/src/cloudflare/types/email_routing/address_list_response.py
similarity index 96%
rename from src/cloudflare/types/email_routing/routing/address_list_response.py
rename to src/cloudflare/types/email_routing/address_list_response.py
index 78c6a95f258..fe8f867b4c2 100644
--- a/src/cloudflare/types/email_routing/routing/address_list_response.py
+++ b/src/cloudflare/types/email_routing/address_list_response.py
@@ -3,7 +3,7 @@
from typing import Optional
from datetime import datetime
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["AddressListResponse"]
diff --git a/src/cloudflare/types/email_routing/routing/dns_get_response.py b/src/cloudflare/types/email_routing/dns_get_response.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/dns_get_response.py
rename to src/cloudflare/types/email_routing/dns_get_response.py
diff --git a/src/cloudflare/types/email_routing/routing/email_dns_record.py b/src/cloudflare/types/email_routing/email_dns_record.py
similarity index 97%
rename from src/cloudflare/types/email_routing/routing/email_dns_record.py
rename to src/cloudflare/types/email_routing/email_dns_record.py
index 8ba2049164e..c997907012b 100644
--- a/src/cloudflare/types/email_routing/routing/email_dns_record.py
+++ b/src/cloudflare/types/email_routing/email_dns_record.py
@@ -3,7 +3,7 @@
from typing import Union, Optional
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["EmailDNSRecord"]
diff --git a/src/cloudflare/types/email_routing/routing/__init__.py b/src/cloudflare/types/email_routing/routing/__init__.py
deleted file mode 100644
index fc53ea2ebb0..00000000000
--- a/src/cloudflare/types/email_routing/routing/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .dns_get_response import DNSGetResponse as DNSGetResponse
-from .email_dns_record import EmailDNSRecord as EmailDNSRecord
-from .rule_list_params import RuleListParams as RuleListParams
-from .rule_get_response import RuleGetResponse as RuleGetResponse
-from .rule_create_params import RuleCreateParams as RuleCreateParams
-from .rule_list_response import RuleListResponse as RuleListResponse
-from .rule_update_params import RuleUpdateParams as RuleUpdateParams
-from .address_list_params import AddressListParams as AddressListParams
-from .address_get_response import AddressGetResponse as AddressGetResponse
-from .rule_create_response import RuleCreateResponse as RuleCreateResponse
-from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse
-from .rule_update_response import RuleUpdateResponse as RuleUpdateResponse
-from .address_create_params import AddressCreateParams as AddressCreateParams
-from .address_list_response import AddressListResponse as AddressListResponse
-from .address_create_response import AddressCreateResponse as AddressCreateResponse
-from .address_delete_response import AddressDeleteResponse as AddressDeleteResponse
diff --git a/src/cloudflare/types/email_routing/routing/rule_create_params.py b/src/cloudflare/types/email_routing/rule_create_params.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/rule_create_params.py
rename to src/cloudflare/types/email_routing/rule_create_params.py
diff --git a/src/cloudflare/types/email_routing/routing/rule_create_response.py b/src/cloudflare/types/email_routing/rule_create_response.py
similarity index 97%
rename from src/cloudflare/types/email_routing/routing/rule_create_response.py
rename to src/cloudflare/types/email_routing/rule_create_response.py
index 54229a27f2e..2fe7e7eb776 100644
--- a/src/cloudflare/types/email_routing/routing/rule_create_response.py
+++ b/src/cloudflare/types/email_routing/rule_create_response.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["RuleCreateResponse", "Action", "Matcher"]
diff --git a/src/cloudflare/types/email_routing/routing/rule_delete_response.py b/src/cloudflare/types/email_routing/rule_delete_response.py
similarity index 97%
rename from src/cloudflare/types/email_routing/routing/rule_delete_response.py
rename to src/cloudflare/types/email_routing/rule_delete_response.py
index 9647c5c42e2..e0e35a7443c 100644
--- a/src/cloudflare/types/email_routing/routing/rule_delete_response.py
+++ b/src/cloudflare/types/email_routing/rule_delete_response.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["RuleDeleteResponse", "Action", "Matcher"]
diff --git a/src/cloudflare/types/email_routing/routing/rule_get_response.py b/src/cloudflare/types/email_routing/rule_get_response.py
similarity index 97%
rename from src/cloudflare/types/email_routing/routing/rule_get_response.py
rename to src/cloudflare/types/email_routing/rule_get_response.py
index 987e5680e52..fc0333c3094 100644
--- a/src/cloudflare/types/email_routing/routing/rule_get_response.py
+++ b/src/cloudflare/types/email_routing/rule_get_response.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["RuleGetResponse", "Action", "Matcher"]
diff --git a/src/cloudflare/types/email_routing/routing/rule_list_params.py b/src/cloudflare/types/email_routing/rule_list_params.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/rule_list_params.py
rename to src/cloudflare/types/email_routing/rule_list_params.py
diff --git a/src/cloudflare/types/email_routing/routing/rule_list_response.py b/src/cloudflare/types/email_routing/rule_list_response.py
similarity index 97%
rename from src/cloudflare/types/email_routing/routing/rule_list_response.py
rename to src/cloudflare/types/email_routing/rule_list_response.py
index be3d949ec22..fabb9650223 100644
--- a/src/cloudflare/types/email_routing/routing/rule_list_response.py
+++ b/src/cloudflare/types/email_routing/rule_list_response.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["RuleListResponse", "Action", "Matcher"]
diff --git a/src/cloudflare/types/email_routing/routing/rule_update_params.py b/src/cloudflare/types/email_routing/rule_update_params.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/rule_update_params.py
rename to src/cloudflare/types/email_routing/rule_update_params.py
diff --git a/src/cloudflare/types/email_routing/routing/rule_update_response.py b/src/cloudflare/types/email_routing/rule_update_response.py
similarity index 97%
rename from src/cloudflare/types/email_routing/routing/rule_update_response.py
rename to src/cloudflare/types/email_routing/rule_update_response.py
index 4dbf664cb31..e7124176eaf 100644
--- a/src/cloudflare/types/email_routing/routing/rule_update_response.py
+++ b/src/cloudflare/types/email_routing/rule_update_response.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
-from ...._models import BaseModel
+from ..._models import BaseModel
__all__ = ["RuleUpdateResponse", "Action", "Matcher"]
diff --git a/src/cloudflare/types/email_routing/routing/rules/__init__.py b/src/cloudflare/types/email_routing/rules/__init__.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/rules/__init__.py
rename to src/cloudflare/types/email_routing/rules/__init__.py
diff --git a/src/cloudflare/types/email_routing/routing/rules/catch_all_update_params.py b/src/cloudflare/types/email_routing/rules/catch_all_update_params.py
similarity index 100%
rename from src/cloudflare/types/email_routing/routing/rules/catch_all_update_params.py
rename to src/cloudflare/types/email_routing/rules/catch_all_update_params.py
diff --git a/src/cloudflare/types/email_routing/routing/rules/email_catch_all_rule.py b/src/cloudflare/types/email_routing/rules/email_catch_all_rule.py
similarity index 96%
rename from src/cloudflare/types/email_routing/routing/rules/email_catch_all_rule.py
rename to src/cloudflare/types/email_routing/rules/email_catch_all_rule.py
index 9642d71e840..ac226e6b084 100644
--- a/src/cloudflare/types/email_routing/routing/rules/email_catch_all_rule.py
+++ b/src/cloudflare/types/email_routing/rules/email_catch_all_rule.py
@@ -3,7 +3,7 @@
from typing import List, Optional
from typing_extensions import Literal
-from ....._models import BaseModel
+from ...._models import BaseModel
__all__ = ["EmailCatchAllRule", "Action", "Matcher"]
diff --git a/src/cloudflare/types/email_routing/routing_get_response.py b/src/cloudflare/types/email_routing_disable_response.py
similarity index 90%
rename from src/cloudflare/types/email_routing/routing_get_response.py
rename to src/cloudflare/types/email_routing_disable_response.py
index 25052d2ec35..e1a79c469ae 100644
--- a/src/cloudflare/types/email_routing/routing_get_response.py
+++ b/src/cloudflare/types/email_routing_disable_response.py
@@ -4,12 +4,12 @@
from datetime import datetime
from typing_extensions import Literal
-from ..._models import BaseModel
+from .._models import BaseModel
-__all__ = ["RoutingGetResponse"]
+__all__ = ["EmailRoutingDisableResponse"]
-class RoutingGetResponse(BaseModel):
+class EmailRoutingDisableResponse(BaseModel):
id: Optional[str] = None
"""Email Routing settings identifier."""
diff --git a/src/cloudflare/types/email_routing/routing_enable_response.py b/src/cloudflare/types/email_routing_enable_response.py
similarity index 90%
rename from src/cloudflare/types/email_routing/routing_enable_response.py
rename to src/cloudflare/types/email_routing_enable_response.py
index 69ea4189736..26769d760c9 100644
--- a/src/cloudflare/types/email_routing/routing_enable_response.py
+++ b/src/cloudflare/types/email_routing_enable_response.py
@@ -4,12 +4,12 @@
from datetime import datetime
from typing_extensions import Literal
-from ..._models import BaseModel
+from .._models import BaseModel
-__all__ = ["RoutingEnableResponse"]
+__all__ = ["EmailRoutingEnableResponse"]
-class RoutingEnableResponse(BaseModel):
+class EmailRoutingEnableResponse(BaseModel):
id: Optional[str] = None
"""Email Routing settings identifier."""
diff --git a/src/cloudflare/types/email_routing/routing_disable_response.py b/src/cloudflare/types/email_routing_get_response.py
similarity index 90%
rename from src/cloudflare/types/email_routing/routing_disable_response.py
rename to src/cloudflare/types/email_routing_get_response.py
index 6fcc7275008..8475a143605 100644
--- a/src/cloudflare/types/email_routing/routing_disable_response.py
+++ b/src/cloudflare/types/email_routing_get_response.py
@@ -4,12 +4,12 @@
from datetime import datetime
from typing_extensions import Literal
-from ..._models import BaseModel
+from .._models import BaseModel
-__all__ = ["RoutingDisableResponse"]
+__all__ = ["EmailRoutingGetResponse"]
-class RoutingDisableResponse(BaseModel):
+class EmailRoutingGetResponse(BaseModel):
id: Optional[str] = None
"""Email Routing settings identifier."""
diff --git a/src/cloudflare/types/logs/__init__.py b/src/cloudflare/types/logs/__init__.py
index 28bec6a1261..de089dd3968 100644
--- a/src/cloudflare/types/logs/__init__.py
+++ b/src/cloudflare/types/logs/__init__.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from .rayid_get_params import RayidGetParams as RayidGetParams
-from .rayid_get_response import RayidGetResponse as RayidGetResponse
+from .rayid_get_params import RayIDGetParams as RayIDGetParams
+from .rayid_get_response import RayIDGetResponse as RayIDGetResponse
from .received_get_params import ReceivedGetParams as ReceivedGetParams
from .received_get_response import ReceivedGetResponse as ReceivedGetResponse
diff --git a/src/cloudflare/types/logs/rayid_get_params.py b/src/cloudflare/types/logs/rayid_get_params.py
index 3b18fbcacc2..cb11c3e8b79 100644
--- a/src/cloudflare/types/logs/rayid_get_params.py
+++ b/src/cloudflare/types/logs/rayid_get_params.py
@@ -4,10 +4,10 @@
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["RayidGetParams"]
+__all__ = ["RayIDGetParams"]
-class RayidGetParams(TypedDict, total=False):
+class RayIDGetParams(TypedDict, total=False):
zone_identifier: Required[str]
"""Identifier"""
diff --git a/src/cloudflare/types/logs/rayid_get_response.py b/src/cloudflare/types/logs/rayid_get_response.py
index 4e4c9398b37..f4437a09f17 100644
--- a/src/cloudflare/types/logs/rayid_get_response.py
+++ b/src/cloudflare/types/logs/rayid_get_response.py
@@ -2,6 +2,6 @@
from typing import Union
-__all__ = ["RayidGetResponse"]
+__all__ = ["RayIDGetResponse"]
-RayidGetResponse = Union[str, object]
+RayIDGetResponse = Union[str, object]
diff --git a/src/cloudflare/types/magic_transit/sites/__init__.py b/src/cloudflare/types/magic_transit/sites/__init__.py
index 22e047c3195..3bda645ac5d 100644
--- a/src/cloudflare/types/magic_transit/sites/__init__.py
+++ b/src/cloudflare/types/magic_transit/sites/__init__.py
@@ -3,23 +3,23 @@
from __future__ import annotations
from .acl_get_response import ACLGetResponse as ACLGetResponse
-from .lan_get_response import LanGetResponse as LanGetResponse
-from .wan_get_response import WanGetResponse as WanGetResponse
+from .lan_get_response import LANGetResponse as LANGetResponse
+from .wan_get_response import WANGetResponse as WANGetResponse
from .acl_create_params import ACLCreateParams as ACLCreateParams
from .acl_list_response import ACLListResponse as ACLListResponse
from .acl_update_params import ACLUpdateParams as ACLUpdateParams
-from .lan_create_params import LanCreateParams as LanCreateParams
-from .lan_list_response import LanListResponse as LanListResponse
-from .lan_update_params import LanUpdateParams as LanUpdateParams
-from .wan_create_params import WanCreateParams as WanCreateParams
-from .wan_list_response import WanListResponse as WanListResponse
-from .wan_update_params import WanUpdateParams as WanUpdateParams
+from .lan_create_params import LANCreateParams as LANCreateParams
+from .lan_list_response import LANListResponse as LANListResponse
+from .lan_update_params import LANUpdateParams as LANUpdateParams
+from .wan_create_params import WANCreateParams as WANCreateParams
+from .wan_list_response import WANListResponse as WANListResponse
+from .wan_update_params import WANUpdateParams as WANUpdateParams
from .acl_create_response import ACLCreateResponse as ACLCreateResponse
from .acl_delete_response import ACLDeleteResponse as ACLDeleteResponse
from .acl_update_response import ACLUpdateResponse as ACLUpdateResponse
-from .lan_create_response import LanCreateResponse as LanCreateResponse
-from .lan_delete_response import LanDeleteResponse as LanDeleteResponse
-from .lan_update_response import LanUpdateResponse as LanUpdateResponse
-from .wan_create_response import WanCreateResponse as WanCreateResponse
-from .wan_delete_response import WanDeleteResponse as WanDeleteResponse
-from .wan_update_response import WanUpdateResponse as WanUpdateResponse
+from .lan_create_response import LANCreateResponse as LANCreateResponse
+from .lan_delete_response import LANDeleteResponse as LANDeleteResponse
+from .lan_update_response import LANUpdateResponse as LANUpdateResponse
+from .wan_create_response import WANCreateResponse as WANCreateResponse
+from .wan_delete_response import WANDeleteResponse as WANDeleteResponse
+from .wan_update_response import WANUpdateResponse as WANUpdateResponse
diff --git a/src/cloudflare/types/magic_transit/sites/acl_create_params.py b/src/cloudflare/types/magic_transit/sites/acl_create_params.py
index c98363980a4..019dd8be216 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_create_params.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_create_params.py
@@ -5,7 +5,7 @@
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["ACLCreateParams", "ACL", "ACLLan1", "ACLLan2"]
+__all__ = ["ACLCreateParams", "ACL", "ACLLAN1", "ACLLAN2"]
class ACLCreateParams(TypedDict, total=False):
@@ -15,7 +15,7 @@ class ACLCreateParams(TypedDict, total=False):
acl: ACL
-class ACLLan1(TypedDict, total=False):
+class ACLLAN1(TypedDict, total=False):
lan_id: Required[str]
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -36,7 +36,7 @@ class ACLLan1(TypedDict, total=False):
"""
-class ACLLan2(TypedDict, total=False):
+class ACLLAN2(TypedDict, total=False):
lan_id: Required[str]
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -58,9 +58,9 @@ class ACLLan2(TypedDict, total=False):
class ACL(TypedDict, total=False):
- lan_1: Required[ACLLan1]
+ lan_1: Required[ACLLAN1]
- lan_2: Required[ACLLan2]
+ lan_2: Required[ACLLAN2]
name: Required[str]
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_create_response.py b/src/cloudflare/types/magic_transit/sites/acl_create_response.py
index ed1e407e1cd..8c4d2d61f0e 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_create_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_create_response.py
@@ -5,10 +5,10 @@
from ...._models import BaseModel
-__all__ = ["ACLCreateResponse", "ACL", "ACLLan1", "ACLLan2"]
+__all__ = ["ACLCreateResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-class ACLLan1(BaseModel):
+class ACLLAN1(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -29,7 +29,7 @@ class ACLLan1(BaseModel):
"""
-class ACLLan2(BaseModel):
+class ACLLAN2(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -57,9 +57,9 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""
- lan_1: Optional[ACLLan1] = None
+ lan_1: Optional[ACLLAN1] = None
- lan_2: Optional[ACLLan2] = None
+ lan_2: Optional[ACLLAN2] = None
name: Optional[str] = None
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_delete_response.py b/src/cloudflare/types/magic_transit/sites/acl_delete_response.py
index 6dddb8088f5..b2c42b0af5d 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_delete_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_delete_response.py
@@ -5,10 +5,10 @@
from ...._models import BaseModel
-__all__ = ["ACLDeleteResponse", "DeletedACL", "DeletedACLLan1", "DeletedACLLan2"]
+__all__ = ["ACLDeleteResponse", "DeletedACL", "DeletedACLLAN1", "DeletedACLLAN2"]
-class DeletedACLLan1(BaseModel):
+class DeletedACLLAN1(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -29,7 +29,7 @@ class DeletedACLLan1(BaseModel):
"""
-class DeletedACLLan2(BaseModel):
+class DeletedACLLAN2(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -57,9 +57,9 @@ class DeletedACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""
- lan_1: Optional[DeletedACLLan1] = None
+ lan_1: Optional[DeletedACLLAN1] = None
- lan_2: Optional[DeletedACLLan2] = None
+ lan_2: Optional[DeletedACLLAN2] = None
name: Optional[str] = None
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_get_response.py b/src/cloudflare/types/magic_transit/sites/acl_get_response.py
index e1e517f232c..0bcde798dfb 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_get_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_get_response.py
@@ -5,10 +5,10 @@
from ...._models import BaseModel
-__all__ = ["ACLGetResponse", "ACL", "ACLLan1", "ACLLan2"]
+__all__ = ["ACLGetResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-class ACLLan1(BaseModel):
+class ACLLAN1(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -29,7 +29,7 @@ class ACLLan1(BaseModel):
"""
-class ACLLan2(BaseModel):
+class ACLLAN2(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -57,9 +57,9 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""
- lan_1: Optional[ACLLan1] = None
+ lan_1: Optional[ACLLAN1] = None
- lan_2: Optional[ACLLan2] = None
+ lan_2: Optional[ACLLAN2] = None
name: Optional[str] = None
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_list_response.py b/src/cloudflare/types/magic_transit/sites/acl_list_response.py
index 214f7734b61..e13a92a1fd8 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_list_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_list_response.py
@@ -5,10 +5,10 @@
from ...._models import BaseModel
-__all__ = ["ACLListResponse", "ACL", "ACLLan1", "ACLLan2"]
+__all__ = ["ACLListResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-class ACLLan1(BaseModel):
+class ACLLAN1(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -29,7 +29,7 @@ class ACLLan1(BaseModel):
"""
-class ACLLan2(BaseModel):
+class ACLLAN2(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -57,9 +57,9 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""
- lan_1: Optional[ACLLan1] = None
+ lan_1: Optional[ACLLAN1] = None
- lan_2: Optional[ACLLan2] = None
+ lan_2: Optional[ACLLAN2] = None
name: Optional[str] = None
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_update_params.py b/src/cloudflare/types/magic_transit/sites/acl_update_params.py
index e21d4d18036..9ba0e5a1476 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_update_params.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_update_params.py
@@ -5,7 +5,7 @@
from typing import List, Union, Iterable
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["ACLUpdateParams", "ACL", "ACLLan1", "ACLLan2"]
+__all__ = ["ACLUpdateParams", "ACL", "ACLLAN1", "ACLLAN2"]
class ACLUpdateParams(TypedDict, total=False):
@@ -18,7 +18,7 @@ class ACLUpdateParams(TypedDict, total=False):
acl: ACL
-class ACLLan1(TypedDict, total=False):
+class ACLLAN1(TypedDict, total=False):
lan_id: Required[str]
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -39,7 +39,7 @@ class ACLLan1(TypedDict, total=False):
"""
-class ACLLan2(TypedDict, total=False):
+class ACLLAN2(TypedDict, total=False):
lan_id: Required[str]
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -64,9 +64,9 @@ class ACL(TypedDict, total=False):
description: str
"""Description for the ACL."""
- lan_1: ACLLan1
+ lan_1: ACLLAN1
- lan_2: ACLLan2
+ lan_2: ACLLAN2
name: str
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/acl_update_response.py b/src/cloudflare/types/magic_transit/sites/acl_update_response.py
index 982f491244f..6759f9a921b 100644
--- a/src/cloudflare/types/magic_transit/sites/acl_update_response.py
+++ b/src/cloudflare/types/magic_transit/sites/acl_update_response.py
@@ -5,10 +5,10 @@
from ...._models import BaseModel
-__all__ = ["ACLUpdateResponse", "ACL", "ACLLan1", "ACLLan2"]
+__all__ = ["ACLUpdateResponse", "ACL", "ACLLAN1", "ACLLAN2"]
-class ACLLan1(BaseModel):
+class ACLLAN1(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -29,7 +29,7 @@ class ACLLan1(BaseModel):
"""
-class ACLLan2(BaseModel):
+class ACLLAN2(BaseModel):
lan_id: str
"""The identifier for the LAN you want to create an ACL policy with."""
@@ -57,9 +57,9 @@ class ACL(BaseModel):
description: Optional[str] = None
"""Description for the ACL."""
- lan_1: Optional[ACLLan1] = None
+ lan_1: Optional[ACLLAN1] = None
- lan_2: Optional[ACLLan2] = None
+ lan_2: Optional[ACLLAN2] = None
name: Optional[str] = None
"""The name of the ACL."""
diff --git a/src/cloudflare/types/magic_transit/sites/lan_create_params.py b/src/cloudflare/types/magic_transit/sites/lan_create_params.py
index 0498c6dabde..f9edf052625 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_create_params.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_create_params.py
@@ -6,50 +6,50 @@
from typing_extensions import Required, TypedDict
__all__ = [
- "LanCreateParams",
- "Lan",
- "LanNat",
- "LanRoutedSubnet",
- "LanRoutedSubnetNat",
- "LanStaticAddressing",
- "LanStaticAddressingDhcpRelay",
- "LanStaticAddressingDhcpServer",
+ "LANCreateParams",
+ "LAN",
+ "LANNat",
+ "LANRoutedSubnet",
+ "LANRoutedSubnetNat",
+ "LANStaticAddressing",
+ "LANStaticAddressingDhcpRelay",
+ "LANStaticAddressingDhcpServer",
]
-class LanCreateParams(TypedDict, total=False):
+class LANCreateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
- lan: Lan
+ lan: LAN
-class LanNat(TypedDict, total=False):
+class LANNat(TypedDict, total=False):
static_prefix: str
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnetNat(TypedDict, total=False):
+class LANRoutedSubnetNat(TypedDict, total=False):
static_prefix: str
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnet(TypedDict, total=False):
+class LANRoutedSubnet(TypedDict, total=False):
next_hop: Required[str]
"""A valid IPv4 address."""
prefix: Required[str]
"""A valid CIDR notation representing an IP range."""
- nat: LanRoutedSubnetNat
+ nat: LANRoutedSubnetNat
-class LanStaticAddressingDhcpRelay(TypedDict, total=False):
+class LANStaticAddressingDhcpRelay(TypedDict, total=False):
server_addresses: List[str]
"""List of DHCP server IPs."""
-class LanStaticAddressingDhcpServer(TypedDict, total=False):
+class LANStaticAddressingDhcpServer(TypedDict, total=False):
dhcp_pool_end: str
"""A valid IPv4 address."""
@@ -63,13 +63,13 @@ class LanStaticAddressingDhcpServer(TypedDict, total=False):
"""Mapping of MAC addresses to IP addresses"""
-class LanStaticAddressing(TypedDict, total=False):
+class LANStaticAddressing(TypedDict, total=False):
address: Required[str]
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: LanStaticAddressingDhcpRelay
+ dhcp_relay: LANStaticAddressingDhcpRelay
- dhcp_server: LanStaticAddressingDhcpServer
+ dhcp_server: LANStaticAddressingDhcpServer
secondary_address: str
"""A valid CIDR notation representing an IP range."""
@@ -78,7 +78,7 @@ class LanStaticAddressing(TypedDict, total=False):
"""A valid CIDR notation representing an IP range."""
-class Lan(TypedDict, total=False):
+class LAN(TypedDict, total=False):
physport: Required[int]
vlan_tag: Required[int]
@@ -92,11 +92,11 @@ class Lan(TypedDict, total=False):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: LanNat
+ nat: LANNat
- routed_subnets: Iterable[LanRoutedSubnet]
+ routed_subnets: Iterable[LANRoutedSubnet]
- static_addressing: LanStaticAddressing
+ static_addressing: LANStaticAddressing
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
diff --git a/src/cloudflare/types/magic_transit/sites/lan_create_response.py b/src/cloudflare/types/magic_transit/sites/lan_create_response.py
index 8d15e43d724..7ca8698b400 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_create_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_create_response.py
@@ -5,43 +5,43 @@
from ...._models import BaseModel
__all__ = [
- "LanCreateResponse",
- "Lan",
- "LanNat",
- "LanRoutedSubnet",
- "LanRoutedSubnetNat",
- "LanStaticAddressing",
- "LanStaticAddressingDhcpRelay",
- "LanStaticAddressingDhcpServer",
+ "LANCreateResponse",
+ "LAN",
+ "LANNat",
+ "LANRoutedSubnet",
+ "LANRoutedSubnetNat",
+ "LANStaticAddressing",
+ "LANStaticAddressingDhcpRelay",
+ "LANStaticAddressingDhcpServer",
]
-class LanNat(BaseModel):
+class LANNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnetNat(BaseModel):
+class LANRoutedSubnetNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnet(BaseModel):
+class LANRoutedSubnet(BaseModel):
next_hop: str
"""A valid IPv4 address."""
prefix: str
"""A valid CIDR notation representing an IP range."""
- nat: Optional[LanRoutedSubnetNat] = None
+ nat: Optional[LANRoutedSubnetNat] = None
-class LanStaticAddressingDhcpRelay(BaseModel):
+class LANStaticAddressingDhcpRelay(BaseModel):
server_addresses: Optional[List[str]] = None
"""List of DHCP server IPs."""
-class LanStaticAddressingDhcpServer(BaseModel):
+class LANStaticAddressingDhcpServer(BaseModel):
dhcp_pool_end: Optional[str] = None
"""A valid IPv4 address."""
@@ -55,13 +55,13 @@ class LanStaticAddressingDhcpServer(BaseModel):
"""Mapping of MAC addresses to IP addresses"""
-class LanStaticAddressing(BaseModel):
+class LANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: Optional[LanStaticAddressingDhcpRelay] = None
+ dhcp_relay: Optional[LANStaticAddressingDhcpRelay] = None
- dhcp_server: Optional[LanStaticAddressingDhcpServer] = None
+ dhcp_server: Optional[LANStaticAddressingDhcpServer] = None
secondary_address: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
@@ -70,7 +70,7 @@ class LanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Lan(BaseModel):
+class LAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -82,16 +82,16 @@ class Lan(BaseModel):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: Optional[LanNat] = None
+ nat: Optional[LANNat] = None
physport: Optional[int] = None
- routed_subnets: Optional[List[LanRoutedSubnet]] = None
+ routed_subnets: Optional[List[LANRoutedSubnet]] = None
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[LanStaticAddressing] = None
+ static_addressing: Optional[LANStaticAddressing] = None
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
@@ -102,5 +102,5 @@ class Lan(BaseModel):
"""VLAN port number."""
-class LanCreateResponse(BaseModel):
- lans: Optional[List[Lan]] = None
+class LANCreateResponse(BaseModel):
+ lans: Optional[List[LAN]] = None
diff --git a/src/cloudflare/types/magic_transit/sites/lan_delete_response.py b/src/cloudflare/types/magic_transit/sites/lan_delete_response.py
index dbc2d282573..30c31874a9a 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_delete_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_delete_response.py
@@ -5,43 +5,43 @@
from ...._models import BaseModel
__all__ = [
- "LanDeleteResponse",
- "DeletedLan",
- "DeletedLanNat",
- "DeletedLanRoutedSubnet",
- "DeletedLanRoutedSubnetNat",
- "DeletedLanStaticAddressing",
- "DeletedLanStaticAddressingDhcpRelay",
- "DeletedLanStaticAddressingDhcpServer",
+ "LANDeleteResponse",
+ "DeletedLAN",
+ "DeletedLANNat",
+ "DeletedLANRoutedSubnet",
+ "DeletedLANRoutedSubnetNat",
+ "DeletedLANStaticAddressing",
+ "DeletedLANStaticAddressingDhcpRelay",
+ "DeletedLANStaticAddressingDhcpServer",
]
-class DeletedLanNat(BaseModel):
+class DeletedLANNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class DeletedLanRoutedSubnetNat(BaseModel):
+class DeletedLANRoutedSubnetNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class DeletedLanRoutedSubnet(BaseModel):
+class DeletedLANRoutedSubnet(BaseModel):
next_hop: str
"""A valid IPv4 address."""
prefix: str
"""A valid CIDR notation representing an IP range."""
- nat: Optional[DeletedLanRoutedSubnetNat] = None
+ nat: Optional[DeletedLANRoutedSubnetNat] = None
-class DeletedLanStaticAddressingDhcpRelay(BaseModel):
+class DeletedLANStaticAddressingDhcpRelay(BaseModel):
server_addresses: Optional[List[str]] = None
"""List of DHCP server IPs."""
-class DeletedLanStaticAddressingDhcpServer(BaseModel):
+class DeletedLANStaticAddressingDhcpServer(BaseModel):
dhcp_pool_end: Optional[str] = None
"""A valid IPv4 address."""
@@ -55,13 +55,13 @@ class DeletedLanStaticAddressingDhcpServer(BaseModel):
"""Mapping of MAC addresses to IP addresses"""
-class DeletedLanStaticAddressing(BaseModel):
+class DeletedLANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: Optional[DeletedLanStaticAddressingDhcpRelay] = None
+ dhcp_relay: Optional[DeletedLANStaticAddressingDhcpRelay] = None
- dhcp_server: Optional[DeletedLanStaticAddressingDhcpServer] = None
+ dhcp_server: Optional[DeletedLANStaticAddressingDhcpServer] = None
secondary_address: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
@@ -70,7 +70,7 @@ class DeletedLanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class DeletedLan(BaseModel):
+class DeletedLAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -82,16 +82,16 @@ class DeletedLan(BaseModel):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: Optional[DeletedLanNat] = None
+ nat: Optional[DeletedLANNat] = None
physport: Optional[int] = None
- routed_subnets: Optional[List[DeletedLanRoutedSubnet]] = None
+ routed_subnets: Optional[List[DeletedLANRoutedSubnet]] = None
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[DeletedLanStaticAddressing] = None
+ static_addressing: Optional[DeletedLANStaticAddressing] = None
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
@@ -102,7 +102,7 @@ class DeletedLan(BaseModel):
"""VLAN port number."""
-class LanDeleteResponse(BaseModel):
+class LANDeleteResponse(BaseModel):
deleted: Optional[bool] = None
- deleted_lan: Optional[DeletedLan] = None
+ deleted_lan: Optional[DeletedLAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/lan_get_response.py b/src/cloudflare/types/magic_transit/sites/lan_get_response.py
index 1ab640b81ab..808252dd34d 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_get_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_get_response.py
@@ -5,43 +5,43 @@
from ...._models import BaseModel
__all__ = [
- "LanGetResponse",
- "Lan",
- "LanNat",
- "LanRoutedSubnet",
- "LanRoutedSubnetNat",
- "LanStaticAddressing",
- "LanStaticAddressingDhcpRelay",
- "LanStaticAddressingDhcpServer",
+ "LANGetResponse",
+ "LAN",
+ "LANNat",
+ "LANRoutedSubnet",
+ "LANRoutedSubnetNat",
+ "LANStaticAddressing",
+ "LANStaticAddressingDhcpRelay",
+ "LANStaticAddressingDhcpServer",
]
-class LanNat(BaseModel):
+class LANNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnetNat(BaseModel):
+class LANRoutedSubnetNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnet(BaseModel):
+class LANRoutedSubnet(BaseModel):
next_hop: str
"""A valid IPv4 address."""
prefix: str
"""A valid CIDR notation representing an IP range."""
- nat: Optional[LanRoutedSubnetNat] = None
+ nat: Optional[LANRoutedSubnetNat] = None
-class LanStaticAddressingDhcpRelay(BaseModel):
+class LANStaticAddressingDhcpRelay(BaseModel):
server_addresses: Optional[List[str]] = None
"""List of DHCP server IPs."""
-class LanStaticAddressingDhcpServer(BaseModel):
+class LANStaticAddressingDhcpServer(BaseModel):
dhcp_pool_end: Optional[str] = None
"""A valid IPv4 address."""
@@ -55,13 +55,13 @@ class LanStaticAddressingDhcpServer(BaseModel):
"""Mapping of MAC addresses to IP addresses"""
-class LanStaticAddressing(BaseModel):
+class LANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: Optional[LanStaticAddressingDhcpRelay] = None
+ dhcp_relay: Optional[LANStaticAddressingDhcpRelay] = None
- dhcp_server: Optional[LanStaticAddressingDhcpServer] = None
+ dhcp_server: Optional[LANStaticAddressingDhcpServer] = None
secondary_address: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
@@ -70,7 +70,7 @@ class LanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Lan(BaseModel):
+class LAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -82,16 +82,16 @@ class Lan(BaseModel):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: Optional[LanNat] = None
+ nat: Optional[LANNat] = None
physport: Optional[int] = None
- routed_subnets: Optional[List[LanRoutedSubnet]] = None
+ routed_subnets: Optional[List[LANRoutedSubnet]] = None
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[LanStaticAddressing] = None
+ static_addressing: Optional[LANStaticAddressing] = None
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
@@ -102,5 +102,5 @@ class Lan(BaseModel):
"""VLAN port number."""
-class LanGetResponse(BaseModel):
- lan: Optional[Lan] = None
+class LANGetResponse(BaseModel):
+ lan: Optional[LAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/lan_list_response.py b/src/cloudflare/types/magic_transit/sites/lan_list_response.py
index 2f50f57458e..fa043061f89 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_list_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_list_response.py
@@ -5,43 +5,43 @@
from ...._models import BaseModel
__all__ = [
- "LanListResponse",
- "Lan",
- "LanNat",
- "LanRoutedSubnet",
- "LanRoutedSubnetNat",
- "LanStaticAddressing",
- "LanStaticAddressingDhcpRelay",
- "LanStaticAddressingDhcpServer",
+ "LANListResponse",
+ "LAN",
+ "LANNat",
+ "LANRoutedSubnet",
+ "LANRoutedSubnetNat",
+ "LANStaticAddressing",
+ "LANStaticAddressingDhcpRelay",
+ "LANStaticAddressingDhcpServer",
]
-class LanNat(BaseModel):
+class LANNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnetNat(BaseModel):
+class LANRoutedSubnetNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnet(BaseModel):
+class LANRoutedSubnet(BaseModel):
next_hop: str
"""A valid IPv4 address."""
prefix: str
"""A valid CIDR notation representing an IP range."""
- nat: Optional[LanRoutedSubnetNat] = None
+ nat: Optional[LANRoutedSubnetNat] = None
-class LanStaticAddressingDhcpRelay(BaseModel):
+class LANStaticAddressingDhcpRelay(BaseModel):
server_addresses: Optional[List[str]] = None
"""List of DHCP server IPs."""
-class LanStaticAddressingDhcpServer(BaseModel):
+class LANStaticAddressingDhcpServer(BaseModel):
dhcp_pool_end: Optional[str] = None
"""A valid IPv4 address."""
@@ -55,13 +55,13 @@ class LanStaticAddressingDhcpServer(BaseModel):
"""Mapping of MAC addresses to IP addresses"""
-class LanStaticAddressing(BaseModel):
+class LANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: Optional[LanStaticAddressingDhcpRelay] = None
+ dhcp_relay: Optional[LANStaticAddressingDhcpRelay] = None
- dhcp_server: Optional[LanStaticAddressingDhcpServer] = None
+ dhcp_server: Optional[LANStaticAddressingDhcpServer] = None
secondary_address: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
@@ -70,7 +70,7 @@ class LanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Lan(BaseModel):
+class LAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -82,16 +82,16 @@ class Lan(BaseModel):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: Optional[LanNat] = None
+ nat: Optional[LANNat] = None
physport: Optional[int] = None
- routed_subnets: Optional[List[LanRoutedSubnet]] = None
+ routed_subnets: Optional[List[LANRoutedSubnet]] = None
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[LanStaticAddressing] = None
+ static_addressing: Optional[LANStaticAddressing] = None
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
@@ -102,5 +102,5 @@ class Lan(BaseModel):
"""VLAN port number."""
-class LanListResponse(BaseModel):
- lans: Optional[List[Lan]] = None
+class LANListResponse(BaseModel):
+ lans: Optional[List[LAN]] = None
diff --git a/src/cloudflare/types/magic_transit/sites/lan_update_params.py b/src/cloudflare/types/magic_transit/sites/lan_update_params.py
index 2ded79f1d02..115bd51ddf8 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_update_params.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_update_params.py
@@ -6,53 +6,53 @@
from typing_extensions import Required, TypedDict
__all__ = [
- "LanUpdateParams",
- "Lan",
- "LanNat",
- "LanRoutedSubnet",
- "LanRoutedSubnetNat",
- "LanStaticAddressing",
- "LanStaticAddressingDhcpRelay",
- "LanStaticAddressingDhcpServer",
+ "LANUpdateParams",
+ "LAN",
+ "LANNat",
+ "LANRoutedSubnet",
+ "LANRoutedSubnetNat",
+ "LANStaticAddressing",
+ "LANStaticAddressingDhcpRelay",
+ "LANStaticAddressingDhcpServer",
]
-class LanUpdateParams(TypedDict, total=False):
+class LANUpdateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
site_id: Required[str]
"""Identifier"""
- lan: Lan
+ lan: LAN
-class LanNat(TypedDict, total=False):
+class LANNat(TypedDict, total=False):
static_prefix: str
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnetNat(TypedDict, total=False):
+class LANRoutedSubnetNat(TypedDict, total=False):
static_prefix: str
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnet(TypedDict, total=False):
+class LANRoutedSubnet(TypedDict, total=False):
next_hop: Required[str]
"""A valid IPv4 address."""
prefix: Required[str]
"""A valid CIDR notation representing an IP range."""
- nat: LanRoutedSubnetNat
+ nat: LANRoutedSubnetNat
-class LanStaticAddressingDhcpRelay(TypedDict, total=False):
+class LANStaticAddressingDhcpRelay(TypedDict, total=False):
server_addresses: List[str]
"""List of DHCP server IPs."""
-class LanStaticAddressingDhcpServer(TypedDict, total=False):
+class LANStaticAddressingDhcpServer(TypedDict, total=False):
dhcp_pool_end: str
"""A valid IPv4 address."""
@@ -66,13 +66,13 @@ class LanStaticAddressingDhcpServer(TypedDict, total=False):
"""Mapping of MAC addresses to IP addresses"""
-class LanStaticAddressing(TypedDict, total=False):
+class LANStaticAddressing(TypedDict, total=False):
address: Required[str]
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: LanStaticAddressingDhcpRelay
+ dhcp_relay: LANStaticAddressingDhcpRelay
- dhcp_server: LanStaticAddressingDhcpServer
+ dhcp_server: LANStaticAddressingDhcpServer
secondary_address: str
"""A valid CIDR notation representing an IP range."""
@@ -81,16 +81,16 @@ class LanStaticAddressing(TypedDict, total=False):
"""A valid CIDR notation representing an IP range."""
-class Lan(TypedDict, total=False):
+class LAN(TypedDict, total=False):
description: str
- nat: LanNat
+ nat: LANNat
physport: int
- routed_subnets: Iterable[LanRoutedSubnet]
+ routed_subnets: Iterable[LANRoutedSubnet]
- static_addressing: LanStaticAddressing
+ static_addressing: LANStaticAddressing
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
diff --git a/src/cloudflare/types/magic_transit/sites/lan_update_response.py b/src/cloudflare/types/magic_transit/sites/lan_update_response.py
index f747831a358..516f18d2b88 100644
--- a/src/cloudflare/types/magic_transit/sites/lan_update_response.py
+++ b/src/cloudflare/types/magic_transit/sites/lan_update_response.py
@@ -5,43 +5,43 @@
from ...._models import BaseModel
__all__ = [
- "LanUpdateResponse",
- "Lan",
- "LanNat",
- "LanRoutedSubnet",
- "LanRoutedSubnetNat",
- "LanStaticAddressing",
- "LanStaticAddressingDhcpRelay",
- "LanStaticAddressingDhcpServer",
+ "LANUpdateResponse",
+ "LAN",
+ "LANNat",
+ "LANRoutedSubnet",
+ "LANRoutedSubnetNat",
+ "LANStaticAddressing",
+ "LANStaticAddressingDhcpRelay",
+ "LANStaticAddressingDhcpServer",
]
-class LanNat(BaseModel):
+class LANNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnetNat(BaseModel):
+class LANRoutedSubnetNat(BaseModel):
static_prefix: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
-class LanRoutedSubnet(BaseModel):
+class LANRoutedSubnet(BaseModel):
next_hop: str
"""A valid IPv4 address."""
prefix: str
"""A valid CIDR notation representing an IP range."""
- nat: Optional[LanRoutedSubnetNat] = None
+ nat: Optional[LANRoutedSubnetNat] = None
-class LanStaticAddressingDhcpRelay(BaseModel):
+class LANStaticAddressingDhcpRelay(BaseModel):
server_addresses: Optional[List[str]] = None
"""List of DHCP server IPs."""
-class LanStaticAddressingDhcpServer(BaseModel):
+class LANStaticAddressingDhcpServer(BaseModel):
dhcp_pool_end: Optional[str] = None
"""A valid IPv4 address."""
@@ -55,13 +55,13 @@ class LanStaticAddressingDhcpServer(BaseModel):
"""Mapping of MAC addresses to IP addresses"""
-class LanStaticAddressing(BaseModel):
+class LANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
- dhcp_relay: Optional[LanStaticAddressingDhcpRelay] = None
+ dhcp_relay: Optional[LANStaticAddressingDhcpRelay] = None
- dhcp_server: Optional[LanStaticAddressingDhcpServer] = None
+ dhcp_server: Optional[LANStaticAddressingDhcpServer] = None
secondary_address: Optional[str] = None
"""A valid CIDR notation representing an IP range."""
@@ -70,7 +70,7 @@ class LanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Lan(BaseModel):
+class LAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -82,16 +82,16 @@ class Lan(BaseModel):
only works for site with HA turned on. only one LAN can be set as the ha_link.
"""
- nat: Optional[LanNat] = None
+ nat: Optional[LANNat] = None
physport: Optional[int] = None
- routed_subnets: Optional[List[LanRoutedSubnet]] = None
+ routed_subnets: Optional[List[LANRoutedSubnet]] = None
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[LanStaticAddressing] = None
+ static_addressing: Optional[LANStaticAddressing] = None
"""
If the site is not configured in high availability mode, this configuration is
optional (if omitted, use DHCP). However, if in high availability mode,
@@ -102,5 +102,5 @@ class Lan(BaseModel):
"""VLAN port number."""
-class LanUpdateResponse(BaseModel):
- lan: Optional[Lan] = None
+class LANUpdateResponse(BaseModel):
+ lan: Optional[LAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/wan_create_params.py b/src/cloudflare/types/magic_transit/sites/wan_create_params.py
index 297e70cb958..c5da185af64 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_create_params.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_create_params.py
@@ -4,17 +4,17 @@
from typing_extensions import Required, TypedDict
-__all__ = ["WanCreateParams", "Wan", "WanStaticAddressing"]
+__all__ = ["WANCreateParams", "WAN", "WANStaticAddressing"]
-class WanCreateParams(TypedDict, total=False):
+class WANCreateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
- wan: Wan
+ wan: WAN
-class WanStaticAddressing(TypedDict, total=False):
+class WANStaticAddressing(TypedDict, total=False):
address: Required[str]
"""A valid CIDR notation representing an IP range."""
@@ -25,7 +25,7 @@ class WanStaticAddressing(TypedDict, total=False):
"""A valid CIDR notation representing an IP range."""
-class Wan(TypedDict, total=False):
+class WAN(TypedDict, total=False):
physport: Required[int]
vlan_tag: Required[int]
@@ -35,7 +35,7 @@ class Wan(TypedDict, total=False):
priority: int
- static_addressing: WanStaticAddressing
+ static_addressing: WANStaticAddressing
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
diff --git a/src/cloudflare/types/magic_transit/sites/wan_create_response.py b/src/cloudflare/types/magic_transit/sites/wan_create_response.py
index 3157d618a6b..926aad321d1 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_create_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_create_response.py
@@ -4,10 +4,10 @@
from ...._models import BaseModel
-__all__ = ["WanCreateResponse", "Wan", "WanStaticAddressing"]
+__all__ = ["WANCreateResponse", "WAN", "WANStaticAddressing"]
-class WanStaticAddressing(BaseModel):
+class WANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
@@ -18,7 +18,7 @@ class WanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Wan(BaseModel):
+class WAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -32,7 +32,7 @@ class Wan(BaseModel):
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[WanStaticAddressing] = None
+ static_addressing: Optional[WANStaticAddressing] = None
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
@@ -42,5 +42,5 @@ class Wan(BaseModel):
"""VLAN port number."""
-class WanCreateResponse(BaseModel):
- wans: Optional[List[Wan]] = None
+class WANCreateResponse(BaseModel):
+ wans: Optional[List[WAN]] = None
diff --git a/src/cloudflare/types/magic_transit/sites/wan_delete_response.py b/src/cloudflare/types/magic_transit/sites/wan_delete_response.py
index dea4458ac51..09cecd3e64c 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_delete_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_delete_response.py
@@ -4,10 +4,10 @@
from ...._models import BaseModel
-__all__ = ["WanDeleteResponse", "DeletedWan", "DeletedWanStaticAddressing"]
+__all__ = ["WANDeleteResponse", "DeletedWAN", "DeletedWANStaticAddressing"]
-class DeletedWanStaticAddressing(BaseModel):
+class DeletedWANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
@@ -18,7 +18,7 @@ class DeletedWanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class DeletedWan(BaseModel):
+class DeletedWAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -32,7 +32,7 @@ class DeletedWan(BaseModel):
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[DeletedWanStaticAddressing] = None
+ static_addressing: Optional[DeletedWANStaticAddressing] = None
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
@@ -42,7 +42,7 @@ class DeletedWan(BaseModel):
"""VLAN port number."""
-class WanDeleteResponse(BaseModel):
+class WANDeleteResponse(BaseModel):
deleted: Optional[bool] = None
- deleted_wan: Optional[DeletedWan] = None
+ deleted_wan: Optional[DeletedWAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/wan_get_response.py b/src/cloudflare/types/magic_transit/sites/wan_get_response.py
index 4671f6d6c32..a7910b039fb 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_get_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_get_response.py
@@ -4,10 +4,10 @@
from ...._models import BaseModel
-__all__ = ["WanGetResponse", "Wan", "WanStaticAddressing"]
+__all__ = ["WANGetResponse", "WAN", "WANStaticAddressing"]
-class WanStaticAddressing(BaseModel):
+class WANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
@@ -18,7 +18,7 @@ class WanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Wan(BaseModel):
+class WAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -32,7 +32,7 @@ class Wan(BaseModel):
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[WanStaticAddressing] = None
+ static_addressing: Optional[WANStaticAddressing] = None
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
@@ -42,5 +42,5 @@ class Wan(BaseModel):
"""VLAN port number."""
-class WanGetResponse(BaseModel):
- wan: Optional[Wan] = None
+class WANGetResponse(BaseModel):
+ wan: Optional[WAN] = None
diff --git a/src/cloudflare/types/magic_transit/sites/wan_list_response.py b/src/cloudflare/types/magic_transit/sites/wan_list_response.py
index f77f765f0fa..943c52cf24d 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_list_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_list_response.py
@@ -4,10 +4,10 @@
from ...._models import BaseModel
-__all__ = ["WanListResponse", "Wan", "WanStaticAddressing"]
+__all__ = ["WANListResponse", "WAN", "WANStaticAddressing"]
-class WanStaticAddressing(BaseModel):
+class WANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
@@ -18,7 +18,7 @@ class WanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Wan(BaseModel):
+class WAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -32,7 +32,7 @@ class Wan(BaseModel):
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[WanStaticAddressing] = None
+ static_addressing: Optional[WANStaticAddressing] = None
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
@@ -42,5 +42,5 @@ class Wan(BaseModel):
"""VLAN port number."""
-class WanListResponse(BaseModel):
- wans: Optional[List[Wan]] = None
+class WANListResponse(BaseModel):
+ wans: Optional[List[WAN]] = None
diff --git a/src/cloudflare/types/magic_transit/sites/wan_update_params.py b/src/cloudflare/types/magic_transit/sites/wan_update_params.py
index bf577e3b949..9bf85565d65 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_update_params.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_update_params.py
@@ -4,20 +4,20 @@
from typing_extensions import Required, TypedDict
-__all__ = ["WanUpdateParams", "Wan", "WanStaticAddressing"]
+__all__ = ["WANUpdateParams", "WAN", "WANStaticAddressing"]
-class WanUpdateParams(TypedDict, total=False):
+class WANUpdateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
site_id: Required[str]
"""Identifier"""
- wan: Wan
+ wan: WAN
-class WanStaticAddressing(TypedDict, total=False):
+class WANStaticAddressing(TypedDict, total=False):
address: Required[str]
"""A valid CIDR notation representing an IP range."""
@@ -28,14 +28,14 @@ class WanStaticAddressing(TypedDict, total=False):
"""A valid CIDR notation representing an IP range."""
-class Wan(TypedDict, total=False):
+class WAN(TypedDict, total=False):
description: str
physport: int
priority: int
- static_addressing: WanStaticAddressing
+ static_addressing: WANStaticAddressing
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
diff --git a/src/cloudflare/types/magic_transit/sites/wan_update_response.py b/src/cloudflare/types/magic_transit/sites/wan_update_response.py
index 0fc6a199a9d..958bc745108 100644
--- a/src/cloudflare/types/magic_transit/sites/wan_update_response.py
+++ b/src/cloudflare/types/magic_transit/sites/wan_update_response.py
@@ -4,10 +4,10 @@
from ...._models import BaseModel
-__all__ = ["WanUpdateResponse", "Wan", "WanStaticAddressing"]
+__all__ = ["WANUpdateResponse", "WAN", "WANStaticAddressing"]
-class WanStaticAddressing(BaseModel):
+class WANStaticAddressing(BaseModel):
address: str
"""A valid CIDR notation representing an IP range."""
@@ -18,7 +18,7 @@ class WanStaticAddressing(BaseModel):
"""A valid CIDR notation representing an IP range."""
-class Wan(BaseModel):
+class WAN(BaseModel):
id: Optional[str] = None
"""Identifier"""
@@ -32,7 +32,7 @@ class Wan(BaseModel):
site_id: Optional[str] = None
"""Identifier"""
- static_addressing: Optional[WanStaticAddressing] = None
+ static_addressing: Optional[WANStaticAddressing] = None
"""(optional) if omitted, use DHCP.
Submit secondary_address when site is in high availability mode.
@@ -42,5 +42,5 @@ class Wan(BaseModel):
"""VLAN port number."""
-class WanUpdateResponse(BaseModel):
- wan: Optional[Wan] = None
+class WANUpdateResponse(BaseModel):
+ wan: Optional[WAN] = None
diff --git a/src/cloudflare/types/available_plan_list_response.py b/src/cloudflare/types/plan_list_response.py
similarity index 64%
rename from src/cloudflare/types/available_plan_list_response.py
rename to src/cloudflare/types/plan_list_response.py
index 0e38d2bc1db..349d1a5843c 100644
--- a/src/cloudflare/types/available_plan_list_response.py
+++ b/src/cloudflare/types/plan_list_response.py
@@ -4,6 +4,6 @@
from .bill_subs_api_available_rate_plan import BillSubsAPIAvailableRatePlan
-__all__ = ["AvailablePlanListResponse"]
+__all__ = ["PlanListResponse"]
-AvailablePlanListResponse = List[BillSubsAPIAvailableRatePlan]
+PlanListResponse = List[BillSubsAPIAvailableRatePlan]
diff --git a/src/cloudflare/types/available_rate_plan_get_response.py b/src/cloudflare/types/rate_plan_get_response.py
similarity index 71%
rename from src/cloudflare/types/available_rate_plan_get_response.py
rename to src/cloudflare/types/rate_plan_get_response.py
index 5ef477fee9c..ff3291e8eeb 100644
--- a/src/cloudflare/types/available_rate_plan_get_response.py
+++ b/src/cloudflare/types/rate_plan_get_response.py
@@ -5,14 +5,10 @@
from .._models import BaseModel
-__all__ = [
- "AvailableRatePlanGetResponse",
- "AvailableRatePlanGetResponseItem",
- "AvailableRatePlanGetResponseItemComponent",
-]
+__all__ = ["RatePlanGetResponse", "RatePlanGetResponseItem", "RatePlanGetResponseItemComponent"]
-class AvailableRatePlanGetResponseItemComponent(BaseModel):
+class RatePlanGetResponseItemComponent(BaseModel):
default: Optional[float] = None
"""The default amount allocated."""
@@ -23,11 +19,11 @@ class AvailableRatePlanGetResponseItemComponent(BaseModel):
"""The unit price of the addon."""
-class AvailableRatePlanGetResponseItem(BaseModel):
+class RatePlanGetResponseItem(BaseModel):
id: Optional[str] = None
"""Plan identifier tag."""
- components: Optional[List[AvailableRatePlanGetResponseItemComponent]] = None
+ components: Optional[List[RatePlanGetResponseItemComponent]] = None
"""Array of available components values for the plan."""
currency: Optional[str] = None
@@ -43,4 +39,4 @@ class AvailableRatePlanGetResponseItem(BaseModel):
"""The plan name."""
-AvailableRatePlanGetResponse = List[AvailableRatePlanGetResponseItem]
+RatePlanGetResponse = List[RatePlanGetResponseItem]
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
index f8ee8b14b1c..f02cfa2e631 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/__init__.py
@@ -1,3 +1,9 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
+
+from .setting_edit_params import SettingEditParams as SettingEditParams
+from .binding_get_response import BindingGetResponse as BindingGetResponse
+from .setting_get_response import SettingGetResponse as SettingGetResponse
+from .content_update_params import ContentUpdateParams as ContentUpdateParams
+from .setting_edit_response import SettingEditResponse as SettingEditResponse
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/binding_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py
similarity index 99%
rename from src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/binding_get_response.py
rename to src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py
index fbeff912215..6f4b5914e88 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/binding_get_response.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/binding_get_response.py
@@ -3,7 +3,7 @@
from typing import List, Union, Optional
from typing_extensions import Literal
-from ......._models import BaseModel
+from ......_models import BaseModel
__all__ = [
"BindingGetResponse",
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
deleted file mode 100644
index 934f5509e3a..00000000000
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from .setting_edit_params import SettingEditParams as SettingEditParams
-from .binding_get_response import BindingGetResponse as BindingGetResponse
-from .script_update_params import ScriptUpdateParams as ScriptUpdateParams
-from .setting_get_response import SettingGetResponse as SettingGetResponse
-from .setting_edit_response import SettingEditResponse as SettingEditResponse
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py
similarity index 89%
rename from src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_params.py
rename to src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py
index cb915754791..1b619827982 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/script_update_params.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content_update_params.py
@@ -5,13 +5,13 @@
from typing import List
from typing_extensions import Required, Annotated, TypedDict
-from ......._types import FileTypes
-from ......._utils import PropertyInfo
+from ......_types import FileTypes
+from ......_utils import PropertyInfo
-__all__ = ["ScriptUpdateParams", "Metadata"]
+__all__ = ["ContentUpdateParams", "Metadata"]
-class ScriptUpdateParams(TypedDict, total=False):
+class ContentUpdateParams(TypedDict, total=False):
account_id: Required[str]
"""Identifier"""
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_edit_params.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py
similarity index 100%
rename from src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_edit_params.py
rename to src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_params.py
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_edit_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
similarity index 99%
rename from src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_edit_response.py
rename to src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
index c0348d656ea..28aa5217ce7 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_edit_response.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_edit_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ......._models import BaseModel
+from ......_models import BaseModel
__all__ = [
"SettingEditResponse",
diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_get_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
similarity index 99%
rename from src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_get_response.py
rename to src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
index 5802628bc03..8b545565fe0 100644
--- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/content/setting_get_response.py
+++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/scripts/setting_get_response.py
@@ -5,7 +5,7 @@
from pydantic import Field as FieldInfo
-from ......._models import BaseModel
+from ......_models import BaseModel
__all__ = [
"SettingGetResponse",
diff --git a/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py b/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py
index f4bb690aed0..abecf6ac3ca 100644
--- a/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py
+++ b/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py
@@ -3,6 +3,8 @@
from typing import Optional
from datetime import datetime
+from pydantic import Field as FieldInfo
+
from ....._models import BaseModel
__all__ = ["AccessAccessRequests"]
@@ -29,7 +31,7 @@ class AccessAccessRequests(BaseModel):
ip_address: Optional[str] = None
"""The IP address of the authenticating user."""
- ray_id: Optional[str] = None
+ rayid: Optional[str] = FieldInfo(alias="ray_id", default=None)
"""The unique identifier for the request to Cloudflare."""
user_email: Optional[str] = None
diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py
index a7e811ffb65..0631453703c 100644
--- a/src/cloudflare/types/zones/setting_edit_params.py
+++ b/src/cloudflare/types/zones/setting_edit_params.py
@@ -11,7 +11,7 @@
ZonesWAFParam,
Zones0rttParam,
ZonesIPV6Param,
- ZonesWebpParam,
+ ZonesWebPParam,
ZonesHTTP2Param,
ZonesHTTP3Param,
ZonesBrotliParam,
@@ -202,6 +202,6 @@ class ItemZonesTLS1_2Only(TypedDict, total=False):
ZonesTLSClientAuthParam,
ZonesTrueClientIPHeaderParam,
ZonesWAFParam,
- ZonesWebpParam,
+ ZonesWebPParam,
ZonesWebsocketsParam,
]
diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py
index d6a62495bb7..d510b3accc0 100644
--- a/src/cloudflare/types/zones/setting_edit_response.py
+++ b/src/cloudflare/types/zones/setting_edit_response.py
@@ -10,7 +10,7 @@
ZonesWAF,
Zones0rtt,
ZonesIPV6,
- ZonesWebp,
+ ZonesWebP,
ZonesHTTP2,
ZonesHTTP3,
ZonesBrotli,
@@ -246,7 +246,7 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel):
ZonesTLSClientAuth,
ZonesTrueClientIPHeader,
ZonesWAF,
- ZonesWebp,
+ ZonesWebP,
ZonesWebsockets,
]
diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py
index bdf9f4eb8e8..7dbd0072e8f 100644
--- a/src/cloudflare/types/zones/setting_get_response.py
+++ b/src/cloudflare/types/zones/setting_get_response.py
@@ -10,7 +10,7 @@
ZonesWAF,
Zones0rtt,
ZonesIPV6,
- ZonesWebp,
+ ZonesWebP,
ZonesHTTP2,
ZonesHTTP3,
ZonesBrotli,
@@ -246,7 +246,7 @@ class SettingGetResponseItemZonesTLS1_2Only(BaseModel):
ZonesTLSClientAuth,
ZonesTrueClientIPHeader,
ZonesWAF,
- ZonesWebp,
+ ZonesWebP,
ZonesWebsockets,
]
diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py
index 00668603c98..36b465364e7 100644
--- a/src/cloudflare/types/zones/settings/__init__.py
+++ b/src/cloudflare/types/zones/settings/__init__.py
@@ -7,7 +7,7 @@
from .zones_waf import ZonesWAF as ZonesWAF
from .zones_0rtt import Zones0rtt as Zones0rtt
from .zones_ipv6 import ZonesIPV6 as ZonesIPV6
-from .zones_webp import ZonesWebp as ZonesWebp
+from .zones_webp import ZonesWebP as ZonesWebP
from .zones_http2 import ZonesHTTP2 as ZonesHTTP2
from .zones_http3 import ZonesHTTP3 as ZonesHTTP3
from .zones_brotli import ZonesBrotli as ZonesBrotli
@@ -24,10 +24,10 @@
from .zones_ssl_param import ZonesSSLParam as ZonesSSLParam
from .zones_waf_param import ZonesWAFParam as ZonesWAFParam
from .ipv6_edit_params import IPV6EditParams as IPV6EditParams
-from .webp_edit_params import WebpEditParams as WebpEditParams
+from .webp_edit_params import WebPEditParams as WebPEditParams
from .zones_0rtt_param import Zones0rttParam as Zones0rttParam
from .zones_ipv6_param import ZonesIPV6Param as ZonesIPV6Param
-from .zones_webp_param import ZonesWebpParam as ZonesWebpParam
+from .zones_webp_param import ZonesWebPParam as ZonesWebPParam
from .zones_websockets import ZonesWebsockets as ZonesWebsockets
from .http2_edit_params import HTTP2EditParams as HTTP2EditParams
from .http3_edit_params import HTTP3EditParams as HTTP3EditParams
diff --git a/src/cloudflare/types/zones/settings/webp_edit_params.py b/src/cloudflare/types/zones/settings/webp_edit_params.py
index c338f68d7b8..7850fcfcc33 100644
--- a/src/cloudflare/types/zones/settings/webp_edit_params.py
+++ b/src/cloudflare/types/zones/settings/webp_edit_params.py
@@ -4,10 +4,10 @@
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["WebpEditParams"]
+__all__ = ["WebPEditParams"]
-class WebpEditParams(TypedDict, total=False):
+class WebPEditParams(TypedDict, total=False):
zone_id: Required[str]
"""Identifier"""
diff --git a/src/cloudflare/types/zones/settings/zones_webp.py b/src/cloudflare/types/zones/settings/zones_webp.py
index 6481807a643..9ee628fe0d8 100644
--- a/src/cloudflare/types/zones/settings/zones_webp.py
+++ b/src/cloudflare/types/zones/settings/zones_webp.py
@@ -6,10 +6,10 @@
from ...._models import BaseModel
-__all__ = ["ZonesWebp"]
+__all__ = ["ZonesWebP"]
-class ZonesWebp(BaseModel):
+class ZonesWebP(BaseModel):
id: Literal["webp"]
"""ID of the zone setting."""
diff --git a/src/cloudflare/types/zones/settings/zones_webp_param.py b/src/cloudflare/types/zones/settings/zones_webp_param.py
index c1d3fa1a923..317f8483550 100644
--- a/src/cloudflare/types/zones/settings/zones_webp_param.py
+++ b/src/cloudflare/types/zones/settings/zones_webp_param.py
@@ -4,10 +4,10 @@
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["ZonesWebpParam"]
+__all__ = ["ZonesWebPParam"]
-class ZonesWebpParam(TypedDict, total=False):
+class ZonesWebPParam(TypedDict, total=False):
id: Required[Literal["webp"]]
"""ID of the zone setting."""
diff --git a/tests/api_resources/alerting/v3/__init__.py b/tests/api_resources/alerting/destinations/__init__.py
similarity index 100%
rename from tests/api_resources/alerting/v3/__init__.py
rename to tests/api_resources/alerting/destinations/__init__.py
diff --git a/tests/api_resources/alerting/v3/destinations/test_eligible.py b/tests/api_resources/alerting/destinations/test_eligible.py
similarity index 83%
rename from tests/api_resources/alerting/v3/destinations/test_eligible.py
rename to tests/api_resources/alerting/destinations/test_eligible.py
index 7a9110ad1eb..ef1a207dbd4 100644
--- a/tests/api_resources/alerting/v3/destinations/test_eligible.py
+++ b/tests/api_resources/alerting/destinations/test_eligible.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.alerting.v3.destinations import EligibleGetResponse
+from cloudflare.types.alerting.destinations import EligibleGetResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,7 +20,7 @@ class TestEligible:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- eligible = client.alerting.v3.destinations.eligible.get(
+ eligible = client.alerting.destinations.eligible.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[EligibleGetResponse], eligible, path=["response"])
@@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.eligible.with_raw_response.get(
+ response = client.alerting.destinations.eligible.with_raw_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.eligible.with_streaming_response.get(
+ with client.alerting.destinations.eligible.with_streaming_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -55,7 +55,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.eligible.with_raw_response.get(
+ client.alerting.destinations.eligible.with_raw_response.get(
account_id="",
)
@@ -66,7 +66,7 @@ class TestAsyncEligible:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- eligible = await async_client.alerting.v3.destinations.eligible.get(
+ eligible = await async_client.alerting.destinations.eligible.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[EligibleGetResponse], eligible, path=["response"])
@@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.eligible.with_raw_response.get(
+ response = await async_client.alerting.destinations.eligible.with_raw_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -86,7 +86,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.eligible.with_streaming_response.get(
+ async with async_client.alerting.destinations.eligible.with_streaming_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.eligible.with_raw_response.get(
+ await async_client.alerting.destinations.eligible.with_raw_response.get(
account_id="",
)
diff --git a/tests/api_resources/alerting/v3/destinations/test_pagerduty.py b/tests/api_resources/alerting/destinations/test_pagerduty.py
similarity index 82%
rename from tests/api_resources/alerting/v3/destinations/test_pagerduty.py
rename to tests/api_resources/alerting/destinations/test_pagerduty.py
index 7b6042e1928..07b1cb56436 100644
--- a/tests/api_resources/alerting/v3/destinations/test_pagerduty.py
+++ b/tests/api_resources/alerting/destinations/test_pagerduty.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.alerting.v3.destinations import (
+from cloudflare.types.alerting.destinations import (
PagerdutyGetResponse,
PagerdutyLinkResponse,
PagerdutyCreateResponse,
@@ -25,7 +25,7 @@ class TestPagerduty:
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- pagerduty = client.alerting.v3.destinations.pagerduty.create(
+ pagerduty = client.alerting.destinations.pagerduty.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(PagerdutyCreateResponse, pagerduty, path=["response"])
@@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.pagerduty.with_raw_response.create(
+ response = client.alerting.destinations.pagerduty.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.pagerduty.with_streaming_response.create(
+ with client.alerting.destinations.pagerduty.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -60,14 +60,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.pagerduty.with_raw_response.create(
+ client.alerting.destinations.pagerduty.with_raw_response.create(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- pagerduty = client.alerting.v3.destinations.pagerduty.delete(
+ pagerduty = client.alerting.destinations.pagerduty.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[PagerdutyDeleteResponse], pagerduty, path=["response"])
@@ -75,7 +75,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.pagerduty.with_raw_response.delete(
+ response = client.alerting.destinations.pagerduty.with_raw_response.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -87,7 +87,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.pagerduty.with_streaming_response.delete(
+ with client.alerting.destinations.pagerduty.with_streaming_response.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -102,14 +102,14 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.pagerduty.with_raw_response.delete(
+ client.alerting.destinations.pagerduty.with_raw_response.delete(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- pagerduty = client.alerting.v3.destinations.pagerduty.get(
+ pagerduty = client.alerting.destinations.pagerduty.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[PagerdutyGetResponse], pagerduty, path=["response"])
@@ -117,7 +117,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.pagerduty.with_raw_response.get(
+ response = client.alerting.destinations.pagerduty.with_raw_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -129,7 +129,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.pagerduty.with_streaming_response.get(
+ with client.alerting.destinations.pagerduty.with_streaming_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -144,14 +144,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.pagerduty.with_raw_response.get(
+ client.alerting.destinations.pagerduty.with_raw_response.get(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_link(self, client: Cloudflare) -> None:
- pagerduty = client.alerting.v3.destinations.pagerduty.link(
+ pagerduty = client.alerting.destinations.pagerduty.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -160,7 +160,7 @@ def test_method_link(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_link(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.pagerduty.with_raw_response.link(
+ response = client.alerting.destinations.pagerduty.with_raw_response.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -173,7 +173,7 @@ def test_raw_response_link(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_link(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.pagerduty.with_streaming_response.link(
+ with client.alerting.destinations.pagerduty.with_streaming_response.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -189,13 +189,13 @@ def test_streaming_response_link(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_link(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.pagerduty.with_raw_response.link(
+ client.alerting.destinations.pagerduty.with_raw_response.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"):
- client.alerting.v3.destinations.pagerduty.with_raw_response.link(
+ client.alerting.destinations.pagerduty.with_raw_response.link(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -207,7 +207,7 @@ class TestAsyncPagerduty:
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- pagerduty = await async_client.alerting.v3.destinations.pagerduty.create(
+ pagerduty = await async_client.alerting.destinations.pagerduty.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(PagerdutyCreateResponse, pagerduty, path=["response"])
@@ -215,7 +215,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.pagerduty.with_raw_response.create(
+ response = await async_client.alerting.destinations.pagerduty.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -227,7 +227,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.pagerduty.with_streaming_response.create(
+ async with async_client.alerting.destinations.pagerduty.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -242,14 +242,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.pagerduty.with_raw_response.create(
+ await async_client.alerting.destinations.pagerduty.with_raw_response.create(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- pagerduty = await async_client.alerting.v3.destinations.pagerduty.delete(
+ pagerduty = await async_client.alerting.destinations.pagerduty.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[PagerdutyDeleteResponse], pagerduty, path=["response"])
@@ -257,7 +257,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.pagerduty.with_raw_response.delete(
+ response = await async_client.alerting.destinations.pagerduty.with_raw_response.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -269,7 +269,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.pagerduty.with_streaming_response.delete(
+ async with async_client.alerting.destinations.pagerduty.with_streaming_response.delete(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -284,14 +284,14 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.pagerduty.with_raw_response.delete(
+ await async_client.alerting.destinations.pagerduty.with_raw_response.delete(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- pagerduty = await async_client.alerting.v3.destinations.pagerduty.get(
+ pagerduty = await async_client.alerting.destinations.pagerduty.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[PagerdutyGetResponse], pagerduty, path=["response"])
@@ -299,7 +299,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.pagerduty.with_raw_response.get(
+ response = await async_client.alerting.destinations.pagerduty.with_raw_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -311,7 +311,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.pagerduty.with_streaming_response.get(
+ async with async_client.alerting.destinations.pagerduty.with_streaming_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -326,14 +326,14 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.pagerduty.with_raw_response.get(
+ await async_client.alerting.destinations.pagerduty.with_raw_response.get(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_link(self, async_client: AsyncCloudflare) -> None:
- pagerduty = await async_client.alerting.v3.destinations.pagerduty.link(
+ pagerduty = await async_client.alerting.destinations.pagerduty.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -342,7 +342,7 @@ async def test_method_link(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.pagerduty.with_raw_response.link(
+ response = await async_client.alerting.destinations.pagerduty.with_raw_response.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -355,7 +355,7 @@ async def test_raw_response_link(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.pagerduty.with_streaming_response.link(
+ async with async_client.alerting.destinations.pagerduty.with_streaming_response.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -371,13 +371,13 @@ async def test_streaming_response_link(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_link(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.pagerduty.with_raw_response.link(
+ await async_client.alerting.destinations.pagerduty.with_raw_response.link(
"8c71e667571b4f61b94d9e4b12158038",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `token_id` but received ''"):
- await async_client.alerting.v3.destinations.pagerduty.with_raw_response.link(
+ await async_client.alerting.destinations.pagerduty.with_raw_response.link(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/alerting/v3/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py
similarity index 83%
rename from tests/api_resources/alerting/v3/destinations/test_webhooks.py
rename to tests/api_resources/alerting/destinations/test_webhooks.py
index 5fd46cb03ce..2ea95891b4a 100644
--- a/tests/api_resources/alerting/v3/destinations/test_webhooks.py
+++ b/tests/api_resources/alerting/destinations/test_webhooks.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.alerting.v3.destinations import (
+from cloudflare.types.alerting.destinations import (
AaaWebhooks,
WebhookListResponse,
WebhookCreateResponse,
@@ -26,7 +26,7 @@ class TestWebhooks:
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.create(
+ webhook = client.alerting.destinations.webhooks.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.create(
+ webhook = client.alerting.destinations.webhooks.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.webhooks.with_raw_response.create(
+ response = client.alerting.destinations.webhooks.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -61,7 +61,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.webhooks.with_streaming_response.create(
+ with client.alerting.destinations.webhooks.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -78,7 +78,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.create(
+ client.alerting.destinations.webhooks.with_raw_response.create(
account_id="",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -87,7 +87,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.update(
+ webhook = client.alerting.destinations.webhooks.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -98,7 +98,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.update(
+ webhook = client.alerting.destinations.webhooks.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -110,7 +110,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.webhooks.with_raw_response.update(
+ response = client.alerting.destinations.webhooks.with_raw_response.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -125,7 +125,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.webhooks.with_streaming_response.update(
+ with client.alerting.destinations.webhooks.with_streaming_response.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -143,7 +143,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.update(
+ client.alerting.destinations.webhooks.with_raw_response.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="",
name="Slack Webhook",
@@ -151,7 +151,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.update(
+ client.alerting.destinations.webhooks.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -161,7 +161,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.list(
+ webhook = client.alerting.destinations.webhooks.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"])
@@ -169,7 +169,7 @@ def test_method_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.webhooks.with_raw_response.list(
+ response = client.alerting.destinations.webhooks.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -181,7 +181,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.webhooks.with_streaming_response.list(
+ with client.alerting.destinations.webhooks.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -196,14 +196,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.list(
+ client.alerting.destinations.webhooks.with_raw_response.list(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.delete(
+ webhook = client.alerting.destinations.webhooks.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -212,7 +212,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.webhooks.with_raw_response.delete(
+ response = client.alerting.destinations.webhooks.with_raw_response.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -225,7 +225,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.webhooks.with_streaming_response.delete(
+ with client.alerting.destinations.webhooks.with_streaming_response.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -241,13 +241,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.delete(
+ client.alerting.destinations.webhooks.with_raw_response.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.delete(
+ client.alerting.destinations.webhooks.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -255,7 +255,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- webhook = client.alerting.v3.destinations.webhooks.get(
+ webhook = client.alerting.destinations.webhooks.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -264,7 +264,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.alerting.v3.destinations.webhooks.with_raw_response.get(
+ response = client.alerting.destinations.webhooks.with_raw_response.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -277,7 +277,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.alerting.v3.destinations.webhooks.with_streaming_response.get(
+ with client.alerting.destinations.webhooks.with_streaming_response.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -293,13 +293,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.get(
+ client.alerting.destinations.webhooks.with_raw_response.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"):
- client.alerting.v3.destinations.webhooks.with_raw_response.get(
+ client.alerting.destinations.webhooks.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -311,7 +311,7 @@ class TestAsyncWebhooks:
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.create(
+ webhook = await async_client.alerting.destinations.webhooks.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -321,7 +321,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.create(
+ webhook = await async_client.alerting.destinations.webhooks.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -332,7 +332,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.webhooks.with_raw_response.create(
+ response = await async_client.alerting.destinations.webhooks.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -346,7 +346,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.webhooks.with_streaming_response.create(
+ async with async_client.alerting.destinations.webhooks.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -363,7 +363,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.create(
+ await async_client.alerting.destinations.webhooks.with_raw_response.create(
account_id="",
name="Slack Webhook",
url="https://hooks.slack.com/services/Ds3fdBFbV/456464Gdd",
@@ -372,7 +372,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.update(
+ webhook = await async_client.alerting.destinations.webhooks.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -383,7 +383,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.update(
+ webhook = await async_client.alerting.destinations.webhooks.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -395,7 +395,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.webhooks.with_raw_response.update(
+ response = await async_client.alerting.destinations.webhooks.with_raw_response.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -410,7 +410,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.webhooks.with_streaming_response.update(
+ async with async_client.alerting.destinations.webhooks.with_streaming_response.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -428,7 +428,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.update(
+ await async_client.alerting.destinations.webhooks.with_raw_response.update(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="",
name="Slack Webhook",
@@ -436,7 +436,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.update(
+ await async_client.alerting.destinations.webhooks.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="Slack Webhook",
@@ -446,7 +446,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.list(
+ webhook = await async_client.alerting.destinations.webhooks.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"])
@@ -454,7 +454,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.webhooks.with_raw_response.list(
+ response = await async_client.alerting.destinations.webhooks.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -466,7 +466,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.webhooks.with_streaming_response.list(
+ async with async_client.alerting.destinations.webhooks.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -481,14 +481,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.list(
+ await async_client.alerting.destinations.webhooks.with_raw_response.list(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.delete(
+ webhook = await async_client.alerting.destinations.webhooks.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -497,7 +497,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.webhooks.with_raw_response.delete(
+ response = await async_client.alerting.destinations.webhooks.with_raw_response.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -510,7 +510,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.webhooks.with_streaming_response.delete(
+ async with async_client.alerting.destinations.webhooks.with_streaming_response.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -526,13 +526,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.delete(
+ await async_client.alerting.destinations.webhooks.with_raw_response.delete(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.delete(
+ await async_client.alerting.destinations.webhooks.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -540,7 +540,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- webhook = await async_client.alerting.v3.destinations.webhooks.get(
+ webhook = await async_client.alerting.destinations.webhooks.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -549,7 +549,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.destinations.webhooks.with_raw_response.get(
+ response = await async_client.alerting.destinations.webhooks.with_raw_response.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -562,7 +562,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.destinations.webhooks.with_streaming_response.get(
+ async with async_client.alerting.destinations.webhooks.with_streaming_response.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -578,13 +578,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.get(
+ await async_client.alerting.destinations.webhooks.with_raw_response.get(
"b115d5ec-15c6-41ee-8b76-92c449b5227b",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `webhook_id` but received ''"):
- await async_client.alerting.v3.destinations.webhooks.with_raw_response.get(
+ await async_client.alerting.destinations.webhooks.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/alerting/test_v3.py b/tests/api_resources/alerting/test_available_alerts.py
similarity index 64%
rename from tests/api_resources/alerting/test_v3.py
rename to tests/api_resources/alerting/test_available_alerts.py
index af2eea2e6ab..c3c5c6dc2fe 100644
--- a/tests/api_resources/alerting/test_v3.py
+++ b/tests/api_resources/alerting/test_available_alerts.py
@@ -9,45 +9,45 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.alerting import V3ListResponse
+from cloudflare.types.alerting import AvailableAlertListResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestV3:
+class TestAvailableAlerts:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- v3 = client.alerting.v3.list(
+ available_alert = client.alerting.available_alerts.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[V3ListResponse], v3, path=["response"])
+ assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.alerting.v3.with_raw_response.list(
+ response = client.alerting.available_alerts.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- v3 = response.parse()
- assert_matches_type(Optional[V3ListResponse], v3, path=["response"])
+ available_alert = response.parse()
+ assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.alerting.v3.with_streaming_response.list(
+ with client.alerting.available_alerts.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- v3 = response.parse()
- assert_matches_type(Optional[V3ListResponse], v3, path=["response"])
+ available_alert = response.parse()
+ assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -55,45 +55,45 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.with_raw_response.list(
+ client.alerting.available_alerts.with_raw_response.list(
account_id="",
)
-class TestAsyncV3:
+class TestAsyncAvailableAlerts:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- v3 = await async_client.alerting.v3.list(
+ available_alert = await async_client.alerting.available_alerts.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[V3ListResponse], v3, path=["response"])
+ assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.with_raw_response.list(
+ response = await async_client.alerting.available_alerts.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- v3 = await response.parse()
- assert_matches_type(Optional[V3ListResponse], v3, path=["response"])
+ available_alert = await response.parse()
+ assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.with_streaming_response.list(
+ async with async_client.alerting.available_alerts.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- v3 = await response.parse()
- assert_matches_type(Optional[V3ListResponse], v3, path=["response"])
+ available_alert = await response.parse()
+ assert_matches_type(Optional[AvailableAlertListResponse], available_alert, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -101,6 +101,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.with_raw_response.list(
+ await async_client.alerting.available_alerts.with_raw_response.list(
account_id="",
)
diff --git a/tests/api_resources/alerting/v3/test_histories.py b/tests/api_resources/alerting/test_history.py
similarity index 85%
rename from tests/api_resources/alerting/v3/test_histories.py
rename to tests/api_resources/alerting/test_history.py
index 67ae2a883a5..56d0a52b905 100644
--- a/tests/api_resources/alerting/v3/test_histories.py
+++ b/tests/api_resources/alerting/test_history.py
@@ -11,18 +11,18 @@
from tests.utils import assert_matches_type
from cloudflare._utils import parse_datetime
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from cloudflare.types.alerting.v3 import AaaHistory
+from cloudflare.types.alerting import AaaHistory
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestHistories:
+class TestHistory:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- history = client.alerting.v3.histories.list(
+ history = client.alerting.history.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"])
@@ -30,7 +30,7 @@ def test_method_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- history = client.alerting.v3.histories.list(
+ history = client.alerting.history.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
before=parse_datetime("2022-05-20T20:29:58.679897Z"),
page=1,
@@ -42,7 +42,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.alerting.v3.histories.with_raw_response.list(
+ response = client.alerting.history.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -54,7 +54,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.alerting.v3.histories.with_streaming_response.list(
+ with client.alerting.history.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -69,18 +69,18 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.histories.with_raw_response.list(
+ client.alerting.history.with_raw_response.list(
account_id="",
)
-class TestAsyncHistories:
+class TestAsyncHistory:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- history = await async_client.alerting.v3.histories.list(
+ history = await async_client.alerting.history.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"])
@@ -88,7 +88,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- history = await async_client.alerting.v3.histories.list(
+ history = await async_client.alerting.history.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
before=parse_datetime("2022-05-20T20:29:58.679897Z"),
page=1,
@@ -100,7 +100,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.histories.with_raw_response.list(
+ response = await async_client.alerting.history.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -112,7 +112,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.histories.with_streaming_response.list(
+ async with async_client.alerting.history.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -127,6 +127,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.histories.with_raw_response.list(
+ await async_client.alerting.history.with_raw_response.list(
account_id="",
)
diff --git a/tests/api_resources/alerting/v3/test_policies.py b/tests/api_resources/alerting/test_policies.py
similarity index 90%
rename from tests/api_resources/alerting/v3/test_policies.py
rename to tests/api_resources/alerting/test_policies.py
index 45ce76ed34b..1f130bb584f 100644
--- a/tests/api_resources/alerting/v3/test_policies.py
+++ b/tests/api_resources/alerting/test_policies.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.alerting.v3 import (
+from cloudflare.types.alerting import (
AaaPolicies,
PolicyListResponse,
PolicyCreateResponse,
@@ -26,7 +26,7 @@ class TestPolicies:
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.create(
+ policy = client.alerting.policies.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -42,7 +42,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.create(
+ policy = client.alerting.policies.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -101,7 +101,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.alerting.v3.policies.with_raw_response.create(
+ response = client.alerting.policies.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -121,7 +121,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.alerting.v3.policies.with_streaming_response.create(
+ with client.alerting.policies.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -144,7 +144,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.create(
+ client.alerting.policies.with_raw_response.create(
account_id="",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -159,7 +159,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.update(
+ policy = client.alerting.policies.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -168,7 +168,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.update(
+ policy = client.alerting.policies.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
@@ -228,7 +228,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.alerting.v3.policies.with_raw_response.update(
+ response = client.alerting.policies.with_raw_response.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -241,7 +241,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.alerting.v3.policies.with_streaming_response.update(
+ with client.alerting.policies.with_streaming_response.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -257,13 +257,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.update(
+ client.alerting.policies.with_raw_response.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.update(
+ client.alerting.policies.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -271,7 +271,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.list(
+ policy = client.alerting.policies.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[PolicyListResponse], policy, path=["response"])
@@ -279,7 +279,7 @@ def test_method_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.alerting.v3.policies.with_raw_response.list(
+ response = client.alerting.policies.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -291,7 +291,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.alerting.v3.policies.with_streaming_response.list(
+ with client.alerting.policies.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -306,14 +306,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.list(
+ client.alerting.policies.with_raw_response.list(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.delete(
+ policy = client.alerting.policies.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -322,7 +322,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.alerting.v3.policies.with_raw_response.delete(
+ response = client.alerting.policies.with_raw_response.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -335,7 +335,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.alerting.v3.policies.with_streaming_response.delete(
+ with client.alerting.policies.with_streaming_response.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -351,13 +351,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.delete(
+ client.alerting.policies.with_raw_response.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.delete(
+ client.alerting.policies.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -365,7 +365,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- policy = client.alerting.v3.policies.get(
+ policy = client.alerting.policies.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -374,7 +374,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.alerting.v3.policies.with_raw_response.get(
+ response = client.alerting.policies.with_raw_response.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -387,7 +387,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.alerting.v3.policies.with_streaming_response.get(
+ with client.alerting.policies.with_streaming_response.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -403,13 +403,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.get(
+ client.alerting.policies.with_raw_response.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"):
- client.alerting.v3.policies.with_raw_response.get(
+ client.alerting.policies.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -421,7 +421,7 @@ class TestAsyncPolicies:
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.create(
+ policy = await async_client.alerting.policies.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -437,7 +437,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.create(
+ policy = await async_client.alerting.policies.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -496,7 +496,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.policies.with_raw_response.create(
+ response = await async_client.alerting.policies.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -516,7 +516,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.policies.with_streaming_response.create(
+ async with async_client.alerting.policies.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -539,7 +539,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.create(
+ await async_client.alerting.policies.with_raw_response.create(
account_id="",
alert_type="universal_ssl_event_type",
enabled=True,
@@ -554,7 +554,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.update(
+ policy = await async_client.alerting.policies.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -563,7 +563,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.update(
+ policy = await async_client.alerting.policies.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
alert_type="universal_ssl_event_type",
@@ -623,7 +623,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.policies.with_raw_response.update(
+ response = await async_client.alerting.policies.with_raw_response.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -636,7 +636,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.policies.with_streaming_response.update(
+ async with async_client.alerting.policies.with_streaming_response.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -652,13 +652,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.update(
+ await async_client.alerting.policies.with_raw_response.update(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.update(
+ await async_client.alerting.policies.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -666,7 +666,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.list(
+ policy = await async_client.alerting.policies.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[PolicyListResponse], policy, path=["response"])
@@ -674,7 +674,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.policies.with_raw_response.list(
+ response = await async_client.alerting.policies.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -686,7 +686,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.policies.with_streaming_response.list(
+ async with async_client.alerting.policies.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -701,14 +701,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.list(
+ await async_client.alerting.policies.with_raw_response.list(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.delete(
+ policy = await async_client.alerting.policies.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -717,7 +717,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.policies.with_raw_response.delete(
+ response = await async_client.alerting.policies.with_raw_response.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -730,7 +730,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.policies.with_streaming_response.delete(
+ async with async_client.alerting.policies.with_streaming_response.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -746,13 +746,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.delete(
+ await async_client.alerting.policies.with_raw_response.delete(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.delete(
+ await async_client.alerting.policies.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -760,7 +760,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- policy = await async_client.alerting.v3.policies.get(
+ policy = await async_client.alerting.policies.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -769,7 +769,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.alerting.v3.policies.with_raw_response.get(
+ response = await async_client.alerting.policies.with_raw_response.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -782,7 +782,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.alerting.v3.policies.with_streaming_response.get(
+ async with async_client.alerting.policies.with_streaming_response.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -798,13 +798,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.get(
+ await async_client.alerting.policies.with_raw_response.get(
"0da2b59e-f118-439d-8097-bdfb215203c9",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `policy_id` but received ''"):
- await async_client.alerting.v3.policies.with_raw_response.get(
+ await async_client.alerting.policies.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/email_routing/routing/__init__.py b/tests/api_resources/email_routing/routing/__init__.py
deleted file mode 100644
index fd8019a9a1a..00000000000
--- a/tests/api_resources/email_routing/routing/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/email_routing/routing/rules/__init__.py b/tests/api_resources/email_routing/routing/rules/__init__.py
deleted file mode 100644
index fd8019a9a1a..00000000000
--- a/tests/api_resources/email_routing/routing/rules/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/alerting/v3/destinations/__init__.py b/tests/api_resources/email_routing/rules/__init__.py
similarity index 100%
rename from tests/api_resources/alerting/v3/destinations/__init__.py
rename to tests/api_resources/email_routing/rules/__init__.py
diff --git a/tests/api_resources/email_routing/routing/rules/test_catch_alls.py b/tests/api_resources/email_routing/rules/test_catch_alls.py
similarity index 86%
rename from tests/api_resources/email_routing/routing/rules/test_catch_alls.py
rename to tests/api_resources/email_routing/rules/test_catch_alls.py
index 0f6c264441b..43476d56695 100644
--- a/tests/api_resources/email_routing/routing/rules/test_catch_alls.py
+++ b/tests/api_resources/email_routing/rules/test_catch_alls.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.email_routing.routing.rules import EmailCatchAllRule
+from cloudflare.types.email_routing.rules import EmailCatchAllRule
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,7 +20,7 @@ class TestCatchAlls:
@pytest.mark.skip()
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- catch_all = client.email_routing.routing.rules.catch_alls.update(
+ catch_all = client.email_routing.rules.catch_alls.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- catch_all = client.email_routing.routing.rules.catch_alls.update(
+ catch_all = client.email_routing.rules.catch_alls.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -67,7 +67,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.catch_alls.with_raw_response.update(
+ response = client.email_routing.rules.catch_alls.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -81,7 +81,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.catch_alls.with_streaming_response.update(
+ with client.email_routing.rules.catch_alls.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -98,7 +98,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.catch_alls.with_raw_response.update(
+ client.email_routing.rules.catch_alls.with_raw_response.update(
"",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -107,7 +107,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- catch_all = client.email_routing.routing.rules.catch_alls.get(
+ catch_all = client.email_routing.rules.catch_alls.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(EmailCatchAllRule, catch_all, path=["response"])
@@ -115,7 +115,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.catch_alls.with_raw_response.get(
+ response = client.email_routing.rules.catch_alls.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -127,7 +127,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.catch_alls.with_streaming_response.get(
+ with client.email_routing.rules.catch_alls.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -142,7 +142,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.catch_alls.with_raw_response.get(
+ client.email_routing.rules.catch_alls.with_raw_response.get(
"",
)
@@ -153,7 +153,7 @@ class TestAsyncCatchAlls:
@pytest.mark.skip()
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- catch_all = await async_client.email_routing.routing.rules.catch_alls.update(
+ catch_all = await async_client.email_routing.rules.catch_alls.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -163,7 +163,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- catch_all = await async_client.email_routing.routing.rules.catch_alls.update(
+ catch_all = await async_client.email_routing.rules.catch_alls.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -200,7 +200,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.catch_alls.with_raw_response.update(
+ response = await async_client.email_routing.rules.catch_alls.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -214,7 +214,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.catch_alls.with_streaming_response.update(
+ async with async_client.email_routing.rules.catch_alls.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -231,7 +231,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.catch_alls.with_raw_response.update(
+ await async_client.email_routing.rules.catch_alls.with_raw_response.update(
"",
actions=[{"type": "forward"}, {"type": "forward"}, {"type": "forward"}],
matchers=[{"type": "all"}, {"type": "all"}, {"type": "all"}],
@@ -240,7 +240,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- catch_all = await async_client.email_routing.routing.rules.catch_alls.get(
+ catch_all = await async_client.email_routing.rules.catch_alls.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(EmailCatchAllRule, catch_all, path=["response"])
@@ -248,7 +248,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.catch_alls.with_raw_response.get(
+ response = await async_client.email_routing.rules.catch_alls.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -260,7 +260,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.catch_alls.with_streaming_response.get(
+ async with async_client.email_routing.rules.catch_alls.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -275,6 +275,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.catch_alls.with_raw_response.get(
+ await async_client.email_routing.rules.catch_alls.with_raw_response.get(
"",
)
diff --git a/tests/api_resources/email_routing/routing/test_addresses.py b/tests/api_resources/email_routing/test_addresses.py
similarity index 83%
rename from tests/api_resources/email_routing/routing/test_addresses.py
rename to tests/api_resources/email_routing/test_addresses.py
index 5d783a7d404..5c2ba2fe99c 100644
--- a/tests/api_resources/email_routing/routing/test_addresses.py
+++ b/tests/api_resources/email_routing/test_addresses.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from cloudflare.types.email_routing.routing import (
+from cloudflare.types.email_routing import (
AddressGetResponse,
AddressListResponse,
AddressCreateResponse,
@@ -26,7 +26,7 @@ class TestAddresses:
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- address = client.email_routing.routing.addresses.create(
+ address = client.email_routing.addresses.create(
"023e105f4ecef8ad9ca31a8372d0c353",
email="user@example.com",
)
@@ -35,7 +35,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.addresses.with_raw_response.create(
+ response = client.email_routing.addresses.with_raw_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
email="user@example.com",
)
@@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.email_routing.routing.addresses.with_streaming_response.create(
+ with client.email_routing.addresses.with_streaming_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
email="user@example.com",
) as response:
@@ -64,7 +64,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- client.email_routing.routing.addresses.with_raw_response.create(
+ client.email_routing.addresses.with_raw_response.create(
"",
email="user@example.com",
)
@@ -72,7 +72,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- address = client.email_routing.routing.addresses.list(
+ address = client.email_routing.addresses.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(SyncV4PagePaginationArray[AddressListResponse], address, path=["response"])
@@ -80,7 +80,7 @@ def test_method_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- address = client.email_routing.routing.addresses.list(
+ address = client.email_routing.addresses.list(
"023e105f4ecef8ad9ca31a8372d0c353",
direction="asc",
page=1,
@@ -92,7 +92,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.addresses.with_raw_response.list(
+ response = client.email_routing.addresses.with_raw_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -104,7 +104,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.email_routing.routing.addresses.with_streaming_response.list(
+ with client.email_routing.addresses.with_streaming_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -119,14 +119,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- client.email_routing.routing.addresses.with_raw_response.list(
+ client.email_routing.addresses.with_raw_response.list(
"",
)
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- address = client.email_routing.routing.addresses.delete(
+ address = client.email_routing.addresses.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -135,7 +135,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.addresses.with_raw_response.delete(
+ response = client.email_routing.addresses.with_raw_response.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -148,7 +148,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.email_routing.routing.addresses.with_streaming_response.delete(
+ with client.email_routing.addresses.with_streaming_response.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -164,7 +164,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- client.email_routing.routing.addresses.with_raw_response.delete(
+ client.email_routing.addresses.with_raw_response.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="",
)
@@ -172,7 +172,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(
ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''"
):
- client.email_routing.routing.addresses.with_raw_response.delete(
+ client.email_routing.addresses.with_raw_response.delete(
"",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -180,7 +180,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- address = client.email_routing.routing.addresses.get(
+ address = client.email_routing.addresses.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -189,7 +189,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.addresses.with_raw_response.get(
+ response = client.email_routing.addresses.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -202,7 +202,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.email_routing.routing.addresses.with_streaming_response.get(
+ with client.email_routing.addresses.with_streaming_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -218,7 +218,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- client.email_routing.routing.addresses.with_raw_response.get(
+ client.email_routing.addresses.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="",
)
@@ -226,7 +226,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(
ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''"
):
- client.email_routing.routing.addresses.with_raw_response.get(
+ client.email_routing.addresses.with_raw_response.get(
"",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -238,7 +238,7 @@ class TestAsyncAddresses:
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- address = await async_client.email_routing.routing.addresses.create(
+ address = await async_client.email_routing.addresses.create(
"023e105f4ecef8ad9ca31a8372d0c353",
email="user@example.com",
)
@@ -247,7 +247,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.addresses.with_raw_response.create(
+ response = await async_client.email_routing.addresses.with_raw_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
email="user@example.com",
)
@@ -260,7 +260,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.addresses.with_streaming_response.create(
+ async with async_client.email_routing.addresses.with_streaming_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
email="user@example.com",
) as response:
@@ -276,7 +276,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- await async_client.email_routing.routing.addresses.with_raw_response.create(
+ await async_client.email_routing.addresses.with_raw_response.create(
"",
email="user@example.com",
)
@@ -284,7 +284,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- address = await async_client.email_routing.routing.addresses.list(
+ address = await async_client.email_routing.addresses.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(AsyncV4PagePaginationArray[AddressListResponse], address, path=["response"])
@@ -292,7 +292,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- address = await async_client.email_routing.routing.addresses.list(
+ address = await async_client.email_routing.addresses.list(
"023e105f4ecef8ad9ca31a8372d0c353",
direction="asc",
page=1,
@@ -304,7 +304,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.addresses.with_raw_response.list(
+ response = await async_client.email_routing.addresses.with_raw_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -316,7 +316,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.addresses.with_streaming_response.list(
+ async with async_client.email_routing.addresses.with_streaming_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -331,14 +331,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- await async_client.email_routing.routing.addresses.with_raw_response.list(
+ await async_client.email_routing.addresses.with_raw_response.list(
"",
)
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- address = await async_client.email_routing.routing.addresses.delete(
+ address = await async_client.email_routing.addresses.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -347,7 +347,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.addresses.with_raw_response.delete(
+ response = await async_client.email_routing.addresses.with_raw_response.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -360,7 +360,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.addresses.with_streaming_response.delete(
+ async with async_client.email_routing.addresses.with_streaming_response.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -376,7 +376,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- await async_client.email_routing.routing.addresses.with_raw_response.delete(
+ await async_client.email_routing.addresses.with_raw_response.delete(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="",
)
@@ -384,7 +384,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(
ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''"
):
- await async_client.email_routing.routing.addresses.with_raw_response.delete(
+ await async_client.email_routing.addresses.with_raw_response.delete(
"",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -392,7 +392,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- address = await async_client.email_routing.routing.addresses.get(
+ address = await async_client.email_routing.addresses.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -401,7 +401,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.addresses.with_raw_response.get(
+ response = await async_client.email_routing.addresses.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -414,7 +414,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.addresses.with_streaming_response.get(
+ async with async_client.email_routing.addresses.with_streaming_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -430,7 +430,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
- await async_client.email_routing.routing.addresses.with_raw_response.get(
+ await async_client.email_routing.addresses.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_identifier="",
)
@@ -438,7 +438,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(
ValueError, match=r"Expected a non-empty value for `destination_address_identifier` but received ''"
):
- await async_client.email_routing.routing.addresses.with_raw_response.get(
+ await async_client.email_routing.addresses.with_raw_response.get(
"",
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/email_routing/routing/test_dns.py b/tests/api_resources/email_routing/test_dns.py
similarity index 84%
rename from tests/api_resources/email_routing/routing/test_dns.py
rename to tests/api_resources/email_routing/test_dns.py
index c3c6f2817f8..c4831f6464d 100644
--- a/tests/api_resources/email_routing/routing/test_dns.py
+++ b/tests/api_resources/email_routing/test_dns.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.email_routing.routing import DNSGetResponse
+from cloudflare.types.email_routing import DNSGetResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,7 +20,7 @@ class TestDNS:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- dns = client.email_routing.routing.dns.get(
+ dns = client.email_routing.dns.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[DNSGetResponse], dns, path=["response"])
@@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.dns.with_raw_response.get(
+ response = client.email_routing.dns.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -40,7 +40,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.email_routing.routing.dns.with_streaming_response.get(
+ with client.email_routing.dns.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -55,7 +55,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.dns.with_raw_response.get(
+ client.email_routing.dns.with_raw_response.get(
"",
)
@@ -66,7 +66,7 @@ class TestAsyncDNS:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- dns = await async_client.email_routing.routing.dns.get(
+ dns = await async_client.email_routing.dns.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[DNSGetResponse], dns, path=["response"])
@@ -74,7 +74,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.dns.with_raw_response.get(
+ response = await async_client.email_routing.dns.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -86,7 +86,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.dns.with_streaming_response.get(
+ async with async_client.email_routing.dns.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.dns.with_raw_response.get(
+ await async_client.email_routing.dns.with_raw_response.get(
"",
)
diff --git a/tests/api_resources/email_routing/routing/test_rules.py b/tests/api_resources/email_routing/test_rules.py
similarity index 93%
rename from tests/api_resources/email_routing/routing/test_rules.py
rename to tests/api_resources/email_routing/test_rules.py
index 1e2886d094d..1cef90e4b86 100644
--- a/tests/api_resources/email_routing/routing/test_rules.py
+++ b/tests/api_resources/email_routing/test_rules.py
@@ -10,7 +10,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray
-from cloudflare.types.email_routing.routing import (
+from cloudflare.types.email_routing import (
RuleGetResponse,
RuleListResponse,
RuleCreateResponse,
@@ -27,7 +27,7 @@ class TestRules:
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.create(
+ rule = client.email_routing.rules.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -78,7 +78,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.create(
+ rule = client.email_routing.rules.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -132,7 +132,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.with_raw_response.create(
+ response = client.email_routing.rules.with_raw_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -187,7 +187,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.with_streaming_response.create(
+ with client.email_routing.rules.with_streaming_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -245,7 +245,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.create(
+ client.email_routing.rules.with_raw_response.create(
"",
actions=[
{
@@ -295,7 +295,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.update(
+ rule = client.email_routing.rules.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -347,7 +347,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.update(
+ rule = client.email_routing.rules.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -402,7 +402,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.with_raw_response.update(
+ response = client.email_routing.rules.with_raw_response.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -458,7 +458,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.with_streaming_response.update(
+ with client.email_routing.rules.with_streaming_response.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -517,7 +517,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.update(
+ client.email_routing.rules.with_raw_response.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="",
actions=[
@@ -566,7 +566,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.update(
+ client.email_routing.rules.with_raw_response.update(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -617,7 +617,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.list(
+ rule = client.email_routing.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(SyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@@ -625,7 +625,7 @@ def test_method_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.list(
+ rule = client.email_routing.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
enabled=True,
page=1,
@@ -636,7 +636,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.with_raw_response.list(
+ response = client.email_routing.rules.with_raw_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -648,7 +648,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.with_streaming_response.list(
+ with client.email_routing.rules.with_streaming_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -663,14 +663,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.list(
+ client.email_routing.rules.with_raw_response.list(
"",
)
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.delete(
+ rule = client.email_routing.rules.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -679,7 +679,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.with_raw_response.delete(
+ response = client.email_routing.rules.with_raw_response.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -692,7 +692,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.with_streaming_response.delete(
+ with client.email_routing.rules.with_streaming_response.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -708,13 +708,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.delete(
+ client.email_routing.rules.with_raw_response.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.delete(
+ client.email_routing.rules.with_raw_response.delete(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -722,7 +722,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- rule = client.email_routing.routing.rules.get(
+ rule = client.email_routing.rules.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -731,7 +731,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.rules.with_raw_response.get(
+ response = client.email_routing.rules.with_raw_response.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -744,7 +744,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.email_routing.routing.rules.with_streaming_response.get(
+ with client.email_routing.rules.with_streaming_response.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -760,13 +760,13 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.get(
+ client.email_routing.rules.with_raw_response.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"):
- client.email_routing.routing.rules.with_raw_response.get(
+ client.email_routing.rules.with_raw_response.get(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -778,7 +778,7 @@ class TestAsyncRules:
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.create(
+ rule = await async_client.email_routing.rules.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -829,7 +829,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.create(
+ rule = await async_client.email_routing.rules.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -883,7 +883,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.with_raw_response.create(
+ response = await async_client.email_routing.rules.with_raw_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -938,7 +938,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.with_streaming_response.create(
+ async with async_client.email_routing.rules.with_streaming_response.create(
"023e105f4ecef8ad9ca31a8372d0c353",
actions=[
{
@@ -996,7 +996,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.create(
+ await async_client.email_routing.rules.with_raw_response.create(
"",
actions=[
{
@@ -1046,7 +1046,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.update(
+ rule = await async_client.email_routing.rules.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -1098,7 +1098,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.update(
+ rule = await async_client.email_routing.rules.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -1153,7 +1153,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.with_raw_response.update(
+ response = await async_client.email_routing.rules.with_raw_response.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -1209,7 +1209,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.with_streaming_response.update(
+ async with async_client.email_routing.rules.with_streaming_response.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -1268,7 +1268,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.update(
+ await async_client.email_routing.rules.with_raw_response.update(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="",
actions=[
@@ -1317,7 +1317,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.update(
+ await async_client.email_routing.rules.with_raw_response.update(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
actions=[
@@ -1368,7 +1368,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.list(
+ rule = await async_client.email_routing.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(AsyncV4PagePaginationArray[RuleListResponse], rule, path=["response"])
@@ -1376,7 +1376,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.list(
+ rule = await async_client.email_routing.rules.list(
"023e105f4ecef8ad9ca31a8372d0c353",
enabled=True,
page=1,
@@ -1387,7 +1387,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.with_raw_response.list(
+ response = await async_client.email_routing.rules.with_raw_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -1399,7 +1399,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.with_streaming_response.list(
+ async with async_client.email_routing.rules.with_streaming_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -1414,14 +1414,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.list(
+ await async_client.email_routing.rules.with_raw_response.list(
"",
)
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.delete(
+ rule = await async_client.email_routing.rules.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -1430,7 +1430,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.with_raw_response.delete(
+ response = await async_client.email_routing.rules.with_raw_response.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -1443,7 +1443,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.with_streaming_response.delete(
+ async with async_client.email_routing.rules.with_streaming_response.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -1459,13 +1459,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.delete(
+ await async_client.email_routing.rules.with_raw_response.delete(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.delete(
+ await async_client.email_routing.rules.with_raw_response.delete(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -1473,7 +1473,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- rule = await async_client.email_routing.routing.rules.get(
+ rule = await async_client.email_routing.rules.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -1482,7 +1482,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.rules.with_raw_response.get(
+ response = await async_client.email_routing.rules.with_raw_response.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -1495,7 +1495,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.rules.with_streaming_response.get(
+ async with async_client.email_routing.rules.with_streaming_response.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -1511,13 +1511,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.get(
+ await async_client.email_routing.rules.with_raw_response.get(
"a7e6fb77503c41d8a7f3113c6918f10c",
zone_identifier="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_identifier` but received ''"):
- await async_client.email_routing.routing.rules.with_raw_response.get(
+ await async_client.email_routing.rules.with_raw_response.get(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/logs/test_rayid.py b/tests/api_resources/logs/test_rayid.py
index 465a29f3be1..a5264c4450a 100644
--- a/tests/api_resources/logs/test_rayid.py
+++ b/tests/api_resources/logs/test_rayid.py
@@ -9,12 +9,12 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.logs import RayidGetResponse
+from cloudflare.types.logs import RayIDGetResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestRayid:
+class TestRayID:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -24,7 +24,7 @@ def test_method_get(self, client: Cloudflare) -> None:
"41ddf1740f67442d",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -35,7 +35,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None:
fields="ClientIP,RayID,EdgeStartTimestamp",
timestamps="unixnano",
)
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -48,7 +48,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"
rayid = response.parse()
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -61,7 +61,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rayid = response.parse()
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -81,7 +81,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
-class TestAsyncRayid:
+class TestAsyncRayID:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -91,7 +91,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
"41ddf1740f67442d",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -102,7 +102,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -
fields="ClientIP,RayID,EdgeStartTimestamp",
timestamps="unixnano",
)
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -115,7 +115,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"
rayid = await response.parse()
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -128,7 +128,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
rayid = await response.parse()
- assert_matches_type(RayidGetResponse, rayid, path=["response"])
+ assert_matches_type(RayIDGetResponse, rayid, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/magic_transit/sites/test_lans.py b/tests/api_resources/magic_transit/sites/test_lans.py
index b321ff3e421..8b75553ed95 100644
--- a/tests/api_resources/magic_transit/sites/test_lans.py
+++ b/tests/api_resources/magic_transit/sites/test_lans.py
@@ -10,17 +10,17 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types.magic_transit.sites import (
- LanGetResponse,
- LanListResponse,
- LanCreateResponse,
- LanDeleteResponse,
- LanUpdateResponse,
+ LANGetResponse,
+ LANListResponse,
+ LANCreateResponse,
+ LANDeleteResponse,
+ LANUpdateResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestLans:
+class TestLANs:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -78,7 +78,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"vlan_tag": 0,
},
)
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -91,7 +91,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"
lan = response.parse()
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -104,7 +104,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = response.parse()
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -131,7 +131,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -179,7 +179,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"vlan_tag": 0,
},
)
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -193,7 +193,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"
lan = response.parse()
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -207,7 +207,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = response.parse()
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -242,7 +242,7 @@ def test_method_list(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanListResponse, lan, path=["response"])
+ assert_matches_type(LANListResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -255,7 +255,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"
lan = response.parse()
- assert_matches_type(LanListResponse, lan, path=["response"])
+ assert_matches_type(LANListResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -268,7 +268,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = response.parse()
- assert_matches_type(LanListResponse, lan, path=["response"])
+ assert_matches_type(LANListResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -295,7 +295,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanDeleteResponse, lan, path=["response"])
+ assert_matches_type(LANDeleteResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -309,7 +309,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"
lan = response.parse()
- assert_matches_type(LanDeleteResponse, lan, path=["response"])
+ assert_matches_type(LANDeleteResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -323,7 +323,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = response.parse()
- assert_matches_type(LanDeleteResponse, lan, path=["response"])
+ assert_matches_type(LANDeleteResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -359,7 +359,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanGetResponse, lan, path=["response"])
+ assert_matches_type(LANGetResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -373,7 +373,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"
lan = response.parse()
- assert_matches_type(LanGetResponse, lan, path=["response"])
+ assert_matches_type(LANGetResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -387,7 +387,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = response.parse()
- assert_matches_type(LanGetResponse, lan, path=["response"])
+ assert_matches_type(LANGetResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -416,7 +416,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
-class TestAsyncLans:
+class TestAsyncLANs:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -426,7 +426,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -474,7 +474,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"vlan_tag": 0,
},
)
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -487,7 +487,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"
lan = await response.parse()
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -500,7 +500,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = await response.parse()
- assert_matches_type(LanCreateResponse, lan, path=["response"])
+ assert_matches_type(LANCreateResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -527,7 +527,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -575,7 +575,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"vlan_tag": 0,
},
)
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -589,7 +589,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"
lan = await response.parse()
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -603,7 +603,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = await response.parse()
- assert_matches_type(LanUpdateResponse, lan, path=["response"])
+ assert_matches_type(LANUpdateResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -638,7 +638,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanListResponse, lan, path=["response"])
+ assert_matches_type(LANListResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -651,7 +651,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"
lan = await response.parse()
- assert_matches_type(LanListResponse, lan, path=["response"])
+ assert_matches_type(LANListResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -664,7 +664,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = await response.parse()
- assert_matches_type(LanListResponse, lan, path=["response"])
+ assert_matches_type(LANListResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -691,7 +691,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanDeleteResponse, lan, path=["response"])
+ assert_matches_type(LANDeleteResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -705,7 +705,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"
lan = await response.parse()
- assert_matches_type(LanDeleteResponse, lan, path=["response"])
+ assert_matches_type(LANDeleteResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -719,7 +719,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = await response.parse()
- assert_matches_type(LanDeleteResponse, lan, path=["response"])
+ assert_matches_type(LANDeleteResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -755,7 +755,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(LanGetResponse, lan, path=["response"])
+ assert_matches_type(LANGetResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -769,7 +769,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"
lan = await response.parse()
- assert_matches_type(LanGetResponse, lan, path=["response"])
+ assert_matches_type(LANGetResponse, lan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -783,7 +783,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
lan = await response.parse()
- assert_matches_type(LanGetResponse, lan, path=["response"])
+ assert_matches_type(LANGetResponse, lan, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/magic_transit/sites/test_wans.py b/tests/api_resources/magic_transit/sites/test_wans.py
index 76831883ad5..e7b7728e024 100644
--- a/tests/api_resources/magic_transit/sites/test_wans.py
+++ b/tests/api_resources/magic_transit/sites/test_wans.py
@@ -10,17 +10,17 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
from cloudflare.types.magic_transit.sites import (
- WanGetResponse,
- WanListResponse,
- WanCreateResponse,
- WanDeleteResponse,
- WanUpdateResponse,
+ WANGetResponse,
+ WANListResponse,
+ WANCreateResponse,
+ WANDeleteResponse,
+ WANUpdateResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestWans:
+class TestWANs:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
"vlan_tag": 0,
},
)
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -63,7 +63,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"
wan = response.parse()
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -76,7 +76,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = response.parse()
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -103,7 +103,7 @@ def test_method_update(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -124,7 +124,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"vlan_tag": 0,
},
)
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -138,7 +138,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"
wan = response.parse()
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -152,7 +152,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = response.parse()
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -187,7 +187,7 @@ def test_method_list(self, client: Cloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanListResponse, wan, path=["response"])
+ assert_matches_type(WANListResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -200,7 +200,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"
wan = response.parse()
- assert_matches_type(WanListResponse, wan, path=["response"])
+ assert_matches_type(WANListResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -213,7 +213,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = response.parse()
- assert_matches_type(WanListResponse, wan, path=["response"])
+ assert_matches_type(WANListResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -240,7 +240,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanDeleteResponse, wan, path=["response"])
+ assert_matches_type(WANDeleteResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -254,7 +254,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"
wan = response.parse()
- assert_matches_type(WanDeleteResponse, wan, path=["response"])
+ assert_matches_type(WANDeleteResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -268,7 +268,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = response.parse()
- assert_matches_type(WanDeleteResponse, wan, path=["response"])
+ assert_matches_type(WANDeleteResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -304,7 +304,7 @@ def test_method_get(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanGetResponse, wan, path=["response"])
+ assert_matches_type(WANGetResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -318,7 +318,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"
wan = response.parse()
- assert_matches_type(WanGetResponse, wan, path=["response"])
+ assert_matches_type(WANGetResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -332,7 +332,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = response.parse()
- assert_matches_type(WanGetResponse, wan, path=["response"])
+ assert_matches_type(WANGetResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -361,7 +361,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
-class TestAsyncWans:
+class TestAsyncWANs:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -371,7 +371,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -391,7 +391,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
"vlan_tag": 0,
},
)
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -404,7 +404,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"
wan = await response.parse()
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -417,7 +417,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = await response.parse()
- assert_matches_type(WanCreateResponse, wan, path=["response"])
+ assert_matches_type(WANCreateResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -444,7 +444,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -465,7 +465,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"vlan_tag": 0,
},
)
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -479,7 +479,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"
wan = await response.parse()
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -493,7 +493,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = await response.parse()
- assert_matches_type(WanUpdateResponse, wan, path=["response"])
+ assert_matches_type(WANUpdateResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -528,7 +528,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanListResponse, wan, path=["response"])
+ assert_matches_type(WANListResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -541,7 +541,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"
wan = await response.parse()
- assert_matches_type(WanListResponse, wan, path=["response"])
+ assert_matches_type(WANListResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -554,7 +554,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = await response.parse()
- assert_matches_type(WanListResponse, wan, path=["response"])
+ assert_matches_type(WANListResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -581,7 +581,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanDeleteResponse, wan, path=["response"])
+ assert_matches_type(WANDeleteResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -595,7 +595,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"
wan = await response.parse()
- assert_matches_type(WanDeleteResponse, wan, path=["response"])
+ assert_matches_type(WANDeleteResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -609,7 +609,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = await response.parse()
- assert_matches_type(WanDeleteResponse, wan, path=["response"])
+ assert_matches_type(WANDeleteResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -645,7 +645,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
site_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(WanGetResponse, wan, path=["response"])
+ assert_matches_type(WANGetResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -659,7 +659,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"
wan = await response.parse()
- assert_matches_type(WanGetResponse, wan, path=["response"])
+ assert_matches_type(WANGetResponse, wan, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -673,7 +673,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
wan = await response.parse()
- assert_matches_type(WanGetResponse, wan, path=["response"])
+ assert_matches_type(WANGetResponse, wan, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/pcaps/test_downloads.py b/tests/api_resources/pcaps/test_download.py
similarity index 90%
rename from tests/api_resources/pcaps/test_downloads.py
rename to tests/api_resources/pcaps/test_download.py
index 1121aa87c3f..2b6c3f86def 100644
--- a/tests/api_resources/pcaps/test_downloads.py
+++ b/tests/api_resources/pcaps/test_download.py
@@ -20,7 +20,7 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestDownloads:
+class TestDownload:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -30,7 +30,7 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None:
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- download = client.pcaps.downloads.get(
+ download = client.pcaps.download.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -47,7 +47,7 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- download = client.pcaps.downloads.with_raw_response.get(
+ download = client.pcaps.download.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -64,7 +64,7 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- with client.pcaps.downloads.with_streaming_response.get(
+ with client.pcaps.download.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as download:
@@ -82,19 +82,19 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter
@pytest.mark.respx(base_url=base_url)
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.pcaps.downloads.with_raw_response.get(
+ client.pcaps.download.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"):
- client.pcaps.downloads.with_raw_response.get(
+ client.pcaps.download.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
-class TestAsyncDownloads:
+class TestAsyncDownload:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -104,7 +104,7 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- download = await async_client.pcaps.downloads.get(
+ download = await async_client.pcaps.download.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -121,7 +121,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock:
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- download = await async_client.pcaps.downloads.with_raw_response.get(
+ download = await async_client.pcaps.download.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -138,7 +138,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/pcaps/023e105f4ecef8ad9ca31a8372d0c353/download"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- async with async_client.pcaps.downloads.with_streaming_response.get(
+ async with async_client.pcaps.download.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as download:
@@ -156,13 +156,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx
@pytest.mark.respx(base_url=base_url)
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.pcaps.downloads.with_raw_response.get(
+ await async_client.pcaps.download.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pcap_id` but received ''"):
- await async_client.pcaps.downloads.with_raw_response.get(
+ await async_client.pcaps.download.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/pcaps/test_ownerships.py b/tests/api_resources/pcaps/test_ownership.py
similarity index 86%
rename from tests/api_resources/pcaps/test_ownerships.py
rename to tests/api_resources/pcaps/test_ownership.py
index a8d2606a9c3..47fd90cc6bf 100644
--- a/tests/api_resources/pcaps/test_ownerships.py
+++ b/tests/api_resources/pcaps/test_ownership.py
@@ -17,13 +17,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestOwnerships:
+class TestOwnership:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- ownership = client.pcaps.ownerships.create(
+ ownership = client.pcaps.ownership.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
)
@@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.pcaps.ownerships.with_raw_response.create(
+ response = client.pcaps.ownership.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
)
@@ -45,7 +45,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.pcaps.ownerships.with_streaming_response.create(
+ with client.pcaps.ownership.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
) as response:
@@ -61,7 +61,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.pcaps.ownerships.with_raw_response.create(
+ client.pcaps.ownership.with_raw_response.create(
account_id="",
destination_conf="s3://pcaps-bucket?region=us-east-1",
)
@@ -69,7 +69,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- ownership = client.pcaps.ownerships.delete(
+ ownership = client.pcaps.ownership.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -78,7 +78,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.pcaps.ownerships.with_raw_response.delete(
+ response = client.pcaps.ownership.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -91,7 +91,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.pcaps.ownerships.with_streaming_response.delete(
+ with client.pcaps.ownership.with_streaming_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -107,13 +107,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.pcaps.ownerships.with_raw_response.delete(
+ client.pcaps.ownership.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ownership_id` but received ''"):
- client.pcaps.ownerships.with_raw_response.delete(
+ client.pcaps.ownership.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -121,7 +121,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- ownership = client.pcaps.ownerships.get(
+ ownership = client.pcaps.ownership.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[OwnershipGetResponse], ownership, path=["response"])
@@ -129,7 +129,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.pcaps.ownerships.with_raw_response.get(
+ response = client.pcaps.ownership.with_raw_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -141,7 +141,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.pcaps.ownerships.with_streaming_response.get(
+ with client.pcaps.ownership.with_streaming_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -156,14 +156,14 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.pcaps.ownerships.with_raw_response.get(
+ client.pcaps.ownership.with_raw_response.get(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_validate(self, client: Cloudflare) -> None:
- ownership = client.pcaps.ownerships.validate(
+ ownership = client.pcaps.ownership.validate(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
@@ -173,7 +173,7 @@ def test_method_validate(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_validate(self, client: Cloudflare) -> None:
- response = client.pcaps.ownerships.with_raw_response.validate(
+ response = client.pcaps.ownership.with_raw_response.validate(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
@@ -187,7 +187,7 @@ def test_raw_response_validate(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_validate(self, client: Cloudflare) -> None:
- with client.pcaps.ownerships.with_streaming_response.validate(
+ with client.pcaps.ownership.with_streaming_response.validate(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
@@ -204,20 +204,20 @@ def test_streaming_response_validate(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_validate(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.pcaps.ownerships.with_raw_response.validate(
+ client.pcaps.ownership.with_raw_response.validate(
account_id="",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
)
-class TestAsyncOwnerships:
+class TestAsyncOwnership:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- ownership = await async_client.pcaps.ownerships.create(
+ ownership = await async_client.pcaps.ownership.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
)
@@ -226,7 +226,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.pcaps.ownerships.with_raw_response.create(
+ response = await async_client.pcaps.ownership.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
)
@@ -239,7 +239,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.pcaps.ownerships.with_streaming_response.create(
+ async with async_client.pcaps.ownership.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
) as response:
@@ -255,7 +255,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.pcaps.ownerships.with_raw_response.create(
+ await async_client.pcaps.ownership.with_raw_response.create(
account_id="",
destination_conf="s3://pcaps-bucket?region=us-east-1",
)
@@ -263,7 +263,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- ownership = await async_client.pcaps.ownerships.delete(
+ ownership = await async_client.pcaps.ownership.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -272,7 +272,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.pcaps.ownerships.with_raw_response.delete(
+ response = await async_client.pcaps.ownership.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -285,7 +285,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.pcaps.ownerships.with_streaming_response.delete(
+ async with async_client.pcaps.ownership.with_streaming_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -301,13 +301,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.pcaps.ownerships.with_raw_response.delete(
+ await async_client.pcaps.ownership.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ownership_id` but received ''"):
- await async_client.pcaps.ownerships.with_raw_response.delete(
+ await async_client.pcaps.ownership.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -315,7 +315,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- ownership = await async_client.pcaps.ownerships.get(
+ ownership = await async_client.pcaps.ownership.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[OwnershipGetResponse], ownership, path=["response"])
@@ -323,7 +323,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.pcaps.ownerships.with_raw_response.get(
+ response = await async_client.pcaps.ownership.with_raw_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -335,7 +335,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.pcaps.ownerships.with_streaming_response.get(
+ async with async_client.pcaps.ownership.with_streaming_response.get(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -350,14 +350,14 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.pcaps.ownerships.with_raw_response.get(
+ await async_client.pcaps.ownership.with_raw_response.get(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_validate(self, async_client: AsyncCloudflare) -> None:
- ownership = await async_client.pcaps.ownerships.validate(
+ ownership = await async_client.pcaps.ownership.validate(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
@@ -367,7 +367,7 @@ async def test_method_validate(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.pcaps.ownerships.with_raw_response.validate(
+ response = await async_client.pcaps.ownership.with_raw_response.validate(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
@@ -381,7 +381,7 @@ async def test_raw_response_validate(self, async_client: AsyncCloudflare) -> Non
@pytest.mark.skip()
@parametrize
async def test_streaming_response_validate(self, async_client: AsyncCloudflare) -> None:
- async with async_client.pcaps.ownerships.with_streaming_response.validate(
+ async with async_client.pcaps.ownership.with_streaming_response.validate(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
@@ -398,7 +398,7 @@ async def test_streaming_response_validate(self, async_client: AsyncCloudflare)
@parametrize
async def test_path_params_validate(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.pcaps.ownerships.with_raw_response.validate(
+ await async_client.pcaps.ownership.with_raw_response.validate(
account_id="",
destination_conf="s3://pcaps-bucket?region=us-east-1",
ownership_challenge="ownership-challenge-9883874ecac311ec8475433579a6bf5f.txt",
diff --git a/tests/api_resources/rulesets/versions/test_by_tags.py b/tests/api_resources/rulesets/versions/test_by_tag.py
similarity index 85%
rename from tests/api_resources/rulesets/versions/test_by_tags.py
rename to tests/api_resources/rulesets/versions/test_by_tag.py
index 0059af431a7..026deb6874f 100644
--- a/tests/api_resources/rulesets/versions/test_by_tags.py
+++ b/tests/api_resources/rulesets/versions/test_by_tag.py
@@ -14,13 +14,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestByTags:
+class TestByTag:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- by_tag = client.rulesets.versions.by_tags.get(
+ by_tag = client.rulesets.versions.by_tag.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -31,7 +31,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.rulesets.versions.by_tags.with_raw_response.get(
+ response = client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -46,7 +46,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.rulesets.versions.by_tags.with_streaming_response.get(
+ with client.rulesets.versions.by_tag.with_streaming_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -64,7 +64,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.rulesets.versions.by_tags.with_raw_response.get(
+ client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -72,7 +72,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"):
- client.rulesets.versions.by_tags.with_raw_response.get(
+ client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="",
@@ -80,7 +80,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"):
- client.rulesets.versions.by_tags.with_raw_response.get(
+ client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -88,7 +88,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_tag` but received ''"):
- client.rulesets.versions.by_tags.with_raw_response.get(
+ client.rulesets.versions.by_tag.with_raw_response.get(
"",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -96,13 +96,13 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
-class TestAsyncByTags:
+class TestAsyncByTag:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- by_tag = await async_client.rulesets.versions.by_tags.get(
+ by_tag = await async_client.rulesets.versions.by_tag.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -113,7 +113,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.rulesets.versions.by_tags.with_raw_response.get(
+ response = await async_client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -128,7 +128,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.rulesets.versions.by_tags.with_streaming_response.get(
+ async with async_client.rulesets.versions.by_tag.with_streaming_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -146,7 +146,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.rulesets.versions.by_tags.with_raw_response.get(
+ await async_client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -154,7 +154,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_id` but received ''"):
- await async_client.rulesets.versions.by_tags.with_raw_response.get(
+ await async_client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="",
@@ -162,7 +162,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ruleset_version` but received ''"):
- await async_client.rulesets.versions.by_tags.with_raw_response.get(
+ await async_client.rulesets.versions.by_tag.with_raw_response.get(
"directory-traversal",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
@@ -170,7 +170,7 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `rule_tag` but received ''"):
- await async_client.rulesets.versions.by_tags.with_raw_response.get(
+ await async_client.rulesets.versions.by_tag.with_raw_response.get(
"",
account_id="abf9b32d38c5f572afde3336ec0ce302",
ruleset_id="2f2feab2026849078ba485f918791bdc",
diff --git a/tests/api_resources/rum/test_site_infos.py b/tests/api_resources/rum/test_site_info.py
similarity index 85%
rename from tests/api_resources/rum/test_site_infos.py
rename to tests/api_resources/rum/test_site_info.py
index fc5be50bbf6..3b611004ca6 100644
--- a/tests/api_resources/rum/test_site_infos.py
+++ b/tests/api_resources/rum/test_site_info.py
@@ -18,13 +18,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestSiteInfos:
+class TestSiteInfo:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.create(
+ site_info = client.rum.site_info.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[RUMSite], site_info, path=["response"])
@@ -32,7 +32,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.create(
+ site_info = client.rum.site_info.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
auto_install=True,
host="example.com",
@@ -43,7 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.rum.site_infos.with_raw_response.create(
+ response = client.rum.site_info.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -55,7 +55,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.rum.site_infos.with_streaming_response.create(
+ with client.rum.site_info.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -70,14 +70,14 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.rum.site_infos.with_raw_response.create(
+ client.rum.site_info.with_raw_response.create(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.update(
+ site_info = client.rum.site_info.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.update(
+ site_info = client.rum.site_info.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
auto_install=True,
@@ -98,7 +98,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.rum.site_infos.with_raw_response.update(
+ response = client.rum.site_info.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -111,7 +111,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.rum.site_infos.with_streaming_response.update(
+ with client.rum.site_info.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -127,13 +127,13 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.rum.site_infos.with_raw_response.update(
+ client.rum.site_info.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"):
- client.rum.site_infos.with_raw_response.update(
+ client.rum.site_info.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -141,7 +141,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.list(
+ site_info = client.rum.site_info.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(SyncV4PagePaginationArray[RUMSite], site_info, path=["response"])
@@ -149,7 +149,7 @@ def test_method_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.list(
+ site_info = client.rum.site_info.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
order_by="host",
page=1,
@@ -160,7 +160,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.rum.site_infos.with_raw_response.list(
+ response = client.rum.site_info.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -172,7 +172,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.rum.site_infos.with_streaming_response.list(
+ with client.rum.site_info.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -187,14 +187,14 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.rum.site_infos.with_raw_response.list(
+ client.rum.site_info.with_raw_response.list(
account_id="",
)
@pytest.mark.skip()
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.delete(
+ site_info = client.rum.site_info.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -203,7 +203,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
- response = client.rum.site_infos.with_raw_response.delete(
+ response = client.rum.site_info.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -216,7 +216,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
- with client.rum.site_infos.with_streaming_response.delete(
+ with client.rum.site_info.with_streaming_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -232,13 +232,13 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.rum.site_infos.with_raw_response.delete(
+ client.rum.site_info.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"):
- client.rum.site_infos.with_raw_response.delete(
+ client.rum.site_info.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -246,7 +246,7 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- site_info = client.rum.site_infos.get(
+ site_info = client.rum.site_info.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -255,7 +255,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.rum.site_infos.with_raw_response.get(
+ response = client.rum.site_info.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -268,7 +268,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.rum.site_infos.with_streaming_response.get(
+ with client.rum.site_info.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -284,25 +284,25 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.rum.site_infos.with_raw_response.get(
+ client.rum.site_info.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"):
- client.rum.site_infos.with_raw_response.get(
+ client.rum.site_info.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
-class TestAsyncSiteInfos:
+class TestAsyncSiteInfo:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.create(
+ site_info = await async_client.rum.site_info.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(Optional[RUMSite], site_info, path=["response"])
@@ -310,7 +310,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.create(
+ site_info = await async_client.rum.site_info.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
auto_install=True,
host="example.com",
@@ -321,7 +321,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.rum.site_infos.with_raw_response.create(
+ response = await async_client.rum.site_info.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -333,7 +333,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.rum.site_infos.with_streaming_response.create(
+ async with async_client.rum.site_info.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -348,14 +348,14 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.create(
+ await async_client.rum.site_info.with_raw_response.create(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.update(
+ site_info = await async_client.rum.site_info.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -364,7 +364,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.update(
+ site_info = await async_client.rum.site_info.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
auto_install=True,
@@ -376,7 +376,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.rum.site_infos.with_raw_response.update(
+ response = await async_client.rum.site_info.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -389,7 +389,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.rum.site_infos.with_streaming_response.update(
+ async with async_client.rum.site_info.with_streaming_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -405,13 +405,13 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.update(
+ await async_client.rum.site_info.with_raw_response.update(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.update(
+ await async_client.rum.site_info.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -419,7 +419,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.list(
+ site_info = await async_client.rum.site_info.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(AsyncV4PagePaginationArray[RUMSite], site_info, path=["response"])
@@ -427,7 +427,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.list(
+ site_info = await async_client.rum.site_info.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
order_by="host",
page=1,
@@ -438,7 +438,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.rum.site_infos.with_raw_response.list(
+ response = await async_client.rum.site_info.with_raw_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -450,7 +450,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.rum.site_infos.with_streaming_response.list(
+ async with async_client.rum.site_info.with_streaming_response.list(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
@@ -465,14 +465,14 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.list(
+ await async_client.rum.site_info.with_raw_response.list(
account_id="",
)
@pytest.mark.skip()
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.delete(
+ site_info = await async_client.rum.site_info.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -481,7 +481,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.rum.site_infos.with_raw_response.delete(
+ response = await async_client.rum.site_info.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -494,7 +494,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
- async with async_client.rum.site_infos.with_streaming_response.delete(
+ async with async_client.rum.site_info.with_streaming_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -510,13 +510,13 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.delete(
+ await async_client.rum.site_info.with_raw_response.delete(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.delete(
+ await async_client.rum.site_info.with_raw_response.delete(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -524,7 +524,7 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- site_info = await async_client.rum.site_infos.get(
+ site_info = await async_client.rum.site_info.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -533,7 +533,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.rum.site_infos.with_raw_response.get(
+ response = await async_client.rum.site_info.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -546,7 +546,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.rum.site_infos.with_streaming_response.get(
+ async with async_client.rum.site_info.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -562,13 +562,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.get(
+ await async_client.rum.site_info.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `site_id` but received ''"):
- await async_client.rum.site_infos.with_raw_response.get(
+ await async_client.rum.site_info.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/stream/test_clips.py b/tests/api_resources/stream/test_clip.py
similarity index 90%
rename from tests/api_resources/stream/test_clips.py
rename to tests/api_resources/stream/test_clip.py
index 2cfe38553f3..7a39bd3d338 100644
--- a/tests/api_resources/stream/test_clips.py
+++ b/tests/api_resources/stream/test_clip.py
@@ -14,13 +14,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestClips:
+class TestClip:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- clip = client.stream.clips.create(
+ clip = client.stream.clip.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- clip = client.stream.clips.create(
+ clip = client.stream.clip.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.stream.clips.with_raw_response.create(
+ response = client.stream.clip.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -63,7 +63,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.stream.clips.with_streaming_response.create(
+ with client.stream.clip.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -81,7 +81,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.stream.clips.with_raw_response.create(
+ client.stream.clip.with_raw_response.create(
account_id="",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -89,13 +89,13 @@ def test_path_params_create(self, client: Cloudflare) -> None:
)
-class TestAsyncClips:
+class TestAsyncClip:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- clip = await async_client.stream.clips.create(
+ clip = await async_client.stream.clip.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -106,7 +106,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- clip = await async_client.stream.clips.create(
+ clip = await async_client.stream.clip.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -123,7 +123,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.stream.clips.with_raw_response.create(
+ response = await async_client.stream.clip.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -138,7 +138,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.stream.clips.with_streaming_response.create(
+ async with async_client.stream.clip.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
@@ -156,7 +156,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.stream.clips.with_raw_response.create(
+ await async_client.stream.clip.with_raw_response.create(
account_id="",
clipped_from_video_uid="023e105f4ecef8ad9ca31a8372d0c353",
end_time_seconds=0,
diff --git a/tests/api_resources/stream/test_copies.py b/tests/api_resources/stream/test_copy.py
similarity index 88%
rename from tests/api_resources/stream/test_copies.py
rename to tests/api_resources/stream/test_copy.py
index 96ae6f1dc69..84ecfc0a992 100644
--- a/tests/api_resources/stream/test_copies.py
+++ b/tests/api_resources/stream/test_copy.py
@@ -15,13 +15,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestCopies:
+class TestCopy:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- copy = client.stream.copies.create(
+ copy = client.stream.copy.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
)
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- copy = client.stream.copies.create(
+ copy = client.stream.copy.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
allowed_origins=["example.com"],
@@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.stream.copies.with_raw_response.create(
+ response = client.stream.copy.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
)
@@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.stream.copies.with_streaming_response.create(
+ with client.stream.copy.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
) as response:
@@ -75,19 +75,19 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.stream.copies.with_raw_response.create(
+ client.stream.copy.with_raw_response.create(
account_id="",
url="https://example.com/myvideo.mp4",
)
-class TestAsyncCopies:
+class TestAsyncCopy:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- copy = await async_client.stream.copies.create(
+ copy = await async_client.stream.copy.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
)
@@ -96,7 +96,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- copy = await async_client.stream.copies.create(
+ copy = await async_client.stream.copy.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
allowed_origins=["example.com"],
@@ -112,7 +112,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.stream.copies.with_raw_response.create(
+ response = await async_client.stream.copy.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
)
@@ -125,7 +125,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.stream.copies.with_streaming_response.create(
+ async with async_client.stream.copy.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
url="https://example.com/myvideo.mp4",
) as response:
@@ -141,7 +141,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.stream.copies.with_raw_response.create(
+ await async_client.stream.copy.with_raw_response.create(
account_id="",
url="https://example.com/myvideo.mp4",
)
diff --git a/tests/api_resources/stream/test_direct_uploads.py b/tests/api_resources/stream/test_direct_upload.py
similarity index 87%
rename from tests/api_resources/stream/test_direct_uploads.py
rename to tests/api_resources/stream/test_direct_upload.py
index e3ac210e875..e01a1a24cf5 100644
--- a/tests/api_resources/stream/test_direct_uploads.py
+++ b/tests/api_resources/stream/test_direct_upload.py
@@ -15,13 +15,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestDirectUploads:
+class TestDirectUpload:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- direct_upload = client.stream.direct_uploads.create(
+ direct_upload = client.stream.direct_upload.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
)
@@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- direct_upload = client.stream.direct_uploads.create(
+ direct_upload = client.stream.direct_upload.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
allowed_origins=["example.com"],
@@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.stream.direct_uploads.with_raw_response.create(
+ response = client.stream.direct_upload.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
)
@@ -60,7 +60,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.stream.direct_uploads.with_streaming_response.create(
+ with client.stream.direct_upload.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
) as response:
@@ -76,19 +76,19 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.stream.direct_uploads.with_raw_response.create(
+ client.stream.direct_upload.with_raw_response.create(
account_id="",
max_duration_seconds=1,
)
-class TestAsyncDirectUploads:
+class TestAsyncDirectUpload:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- direct_upload = await async_client.stream.direct_uploads.create(
+ direct_upload = await async_client.stream.direct_upload.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
)
@@ -97,7 +97,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- direct_upload = await async_client.stream.direct_uploads.create(
+ direct_upload = await async_client.stream.direct_upload.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
allowed_origins=["example.com"],
@@ -114,7 +114,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.stream.direct_uploads.with_raw_response.create(
+ response = await async_client.stream.direct_upload.with_raw_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
)
@@ -127,7 +127,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.stream.direct_uploads.with_streaming_response.create(
+ async with async_client.stream.direct_upload.with_streaming_response.create(
account_id="023e105f4ecef8ad9ca31a8372d0c353",
max_duration_seconds=1,
) as response:
@@ -143,7 +143,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.stream.direct_uploads.with_raw_response.create(
+ await async_client.stream.direct_upload.with_raw_response.create(
account_id="",
max_duration_seconds=1,
)
diff --git a/tests/api_resources/stream/test_embeds.py b/tests/api_resources/stream/test_embed.py
similarity index 86%
rename from tests/api_resources/stream/test_embeds.py
rename to tests/api_resources/stream/test_embed.py
index bc2d360c519..0f208b94e9e 100644
--- a/tests/api_resources/stream/test_embeds.py
+++ b/tests/api_resources/stream/test_embed.py
@@ -13,13 +13,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestEmbeds:
+class TestEmbed:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- embed = client.stream.embeds.get(
+ embed = client.stream.embed.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.stream.embeds.with_raw_response.get(
+ response = client.stream.embed.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -41,7 +41,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.stream.embeds.with_streaming_response.get(
+ with client.stream.embed.with_streaming_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -57,25 +57,25 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.stream.embeds.with_raw_response.get(
+ client.stream.embed.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- client.stream.embeds.with_raw_response.get(
+ client.stream.embed.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
-class TestAsyncEmbeds:
+class TestAsyncEmbed:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- embed = await async_client.stream.embeds.get(
+ embed = await async_client.stream.embed.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -84,7 +84,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.stream.embeds.with_raw_response.get(
+ response = await async_client.stream.embed.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -97,7 +97,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.stream.embeds.with_streaming_response.get(
+ async with async_client.stream.embed.with_streaming_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -113,13 +113,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.stream.embeds.with_raw_response.get(
+ await async_client.stream.embed.with_raw_response.get(
"ea95132c15732412d22c1476fa83f27a",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- await async_client.stream.embeds.with_raw_response.get(
+ await async_client.stream.embed.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/stream/test_tokens.py b/tests/api_resources/stream/test_token.py
similarity index 93%
rename from tests/api_resources/stream/test_tokens.py
rename to tests/api_resources/stream/test_token.py
index 0391bd6a8bf..e4202e63622 100644
--- a/tests/api_resources/stream/test_tokens.py
+++ b/tests/api_resources/stream/test_token.py
@@ -14,13 +14,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestTokens:
+class TestToken:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- token = client.stream.tokens.create(
+ token = client.stream.token.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_create_with_all_params(self, client: Cloudflare) -> None:
- token = client.stream.tokens.create(
+ token = client.stream.token.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
id="ab0d4ef71g4425f8dcba9041231813000",
@@ -63,7 +63,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.stream.tokens.with_raw_response.create(
+ response = client.stream.token.with_raw_response.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -76,7 +76,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.stream.tokens.with_streaming_response.create(
+ with client.stream.token.with_streaming_response.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -92,25 +92,25 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_create(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.stream.tokens.with_raw_response.create(
+ client.stream.token.with_raw_response.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- client.stream.tokens.with_raw_response.create(
+ client.stream.token.with_raw_response.create(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
-class TestAsyncTokens:
+class TestAsyncToken:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- token = await async_client.stream.tokens.create(
+ token = await async_client.stream.token.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -119,7 +119,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncCloudflare) -> None:
- token = await async_client.stream.tokens.create(
+ token = await async_client.stream.token.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
id="ab0d4ef71g4425f8dcba9041231813000",
@@ -153,7 +153,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.stream.tokens.with_raw_response.create(
+ response = await async_client.stream.token.with_raw_response.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
@@ -166,7 +166,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.stream.tokens.with_streaming_response.create(
+ async with async_client.stream.token.with_streaming_response.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
@@ -182,13 +182,13 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.stream.tokens.with_raw_response.create(
+ await async_client.stream.token.with_raw_response.create(
"ea95132c15732412d22c1476fa83f27a",
account_id="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `identifier` but received ''"):
- await async_client.stream.tokens.with_raw_response.create(
+ await async_client.stream.token.with_raw_response.create(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/email_routing/test_routing.py b/tests/api_resources/test_email_routing.py
similarity index 64%
rename from tests/api_resources/email_routing/test_routing.py
rename to tests/api_resources/test_email_routing.py
index bb79d7f5fba..bf77cca2685 100644
--- a/tests/api_resources/email_routing/test_routing.py
+++ b/tests/api_resources/test_email_routing.py
@@ -9,45 +9,45 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.email_routing import RoutingGetResponse, RoutingEnableResponse, RoutingDisableResponse
+from cloudflare.types import EmailRoutingGetResponse, EmailRoutingEnableResponse, EmailRoutingDisableResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestRouting:
+class TestEmailRouting:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_disable(self, client: Cloudflare) -> None:
- routing = client.email_routing.routing.disable(
+ email_routing = client.email_routing.disable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RoutingDisableResponse, routing, path=["response"])
+ assert_matches_type(EmailRoutingDisableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_disable(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.with_raw_response.disable(
+ response = client.email_routing.with_raw_response.disable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = response.parse()
- assert_matches_type(RoutingDisableResponse, routing, path=["response"])
+ email_routing = response.parse()
+ assert_matches_type(EmailRoutingDisableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_disable(self, client: Cloudflare) -> None:
- with client.email_routing.routing.with_streaming_response.disable(
+ with client.email_routing.with_streaming_response.disable(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = response.parse()
- assert_matches_type(RoutingDisableResponse, routing, path=["response"])
+ email_routing = response.parse()
+ assert_matches_type(EmailRoutingDisableResponse, email_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -55,41 +55,41 @@ def test_streaming_response_disable(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_disable(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.with_raw_response.disable(
+ client.email_routing.with_raw_response.disable(
"",
)
@pytest.mark.skip()
@parametrize
def test_method_enable(self, client: Cloudflare) -> None:
- routing = client.email_routing.routing.enable(
+ email_routing = client.email_routing.enable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RoutingEnableResponse, routing, path=["response"])
+ assert_matches_type(EmailRoutingEnableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_enable(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.with_raw_response.enable(
+ response = client.email_routing.with_raw_response.enable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = response.parse()
- assert_matches_type(RoutingEnableResponse, routing, path=["response"])
+ email_routing = response.parse()
+ assert_matches_type(EmailRoutingEnableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_enable(self, client: Cloudflare) -> None:
- with client.email_routing.routing.with_streaming_response.enable(
+ with client.email_routing.with_streaming_response.enable(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = response.parse()
- assert_matches_type(RoutingEnableResponse, routing, path=["response"])
+ email_routing = response.parse()
+ assert_matches_type(EmailRoutingEnableResponse, email_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -97,41 +97,41 @@ def test_streaming_response_enable(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_enable(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.with_raw_response.enable(
+ client.email_routing.with_raw_response.enable(
"",
)
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- routing = client.email_routing.routing.get(
+ email_routing = client.email_routing.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RoutingGetResponse, routing, path=["response"])
+ assert_matches_type(EmailRoutingGetResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.email_routing.routing.with_raw_response.get(
+ response = client.email_routing.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = response.parse()
- assert_matches_type(RoutingGetResponse, routing, path=["response"])
+ email_routing = response.parse()
+ assert_matches_type(EmailRoutingGetResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.email_routing.routing.with_streaming_response.get(
+ with client.email_routing.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = response.parse()
- assert_matches_type(RoutingGetResponse, routing, path=["response"])
+ email_routing = response.parse()
+ assert_matches_type(EmailRoutingGetResponse, email_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -139,45 +139,45 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.email_routing.routing.with_raw_response.get(
+ client.email_routing.with_raw_response.get(
"",
)
-class TestAsyncRouting:
+class TestAsyncEmailRouting:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_disable(self, async_client: AsyncCloudflare) -> None:
- routing = await async_client.email_routing.routing.disable(
+ email_routing = await async_client.email_routing.disable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RoutingDisableResponse, routing, path=["response"])
+ assert_matches_type(EmailRoutingDisableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_disable(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.with_raw_response.disable(
+ response = await async_client.email_routing.with_raw_response.disable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = await response.parse()
- assert_matches_type(RoutingDisableResponse, routing, path=["response"])
+ email_routing = await response.parse()
+ assert_matches_type(EmailRoutingDisableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.with_streaming_response.disable(
+ async with async_client.email_routing.with_streaming_response.disable(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = await response.parse()
- assert_matches_type(RoutingDisableResponse, routing, path=["response"])
+ email_routing = await response.parse()
+ assert_matches_type(EmailRoutingDisableResponse, email_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -185,41 +185,41 @@ async def test_streaming_response_disable(self, async_client: AsyncCloudflare) -
@parametrize
async def test_path_params_disable(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.with_raw_response.disable(
+ await async_client.email_routing.with_raw_response.disable(
"",
)
@pytest.mark.skip()
@parametrize
async def test_method_enable(self, async_client: AsyncCloudflare) -> None:
- routing = await async_client.email_routing.routing.enable(
+ email_routing = await async_client.email_routing.enable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RoutingEnableResponse, routing, path=["response"])
+ assert_matches_type(EmailRoutingEnableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_enable(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.with_raw_response.enable(
+ response = await async_client.email_routing.with_raw_response.enable(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = await response.parse()
- assert_matches_type(RoutingEnableResponse, routing, path=["response"])
+ email_routing = await response.parse()
+ assert_matches_type(EmailRoutingEnableResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_enable(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.with_streaming_response.enable(
+ async with async_client.email_routing.with_streaming_response.enable(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = await response.parse()
- assert_matches_type(RoutingEnableResponse, routing, path=["response"])
+ email_routing = await response.parse()
+ assert_matches_type(EmailRoutingEnableResponse, email_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -227,41 +227,41 @@ async def test_streaming_response_enable(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_enable(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.with_raw_response.enable(
+ await async_client.email_routing.with_raw_response.enable(
"",
)
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- routing = await async_client.email_routing.routing.get(
+ email_routing = await async_client.email_routing.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(RoutingGetResponse, routing, path=["response"])
+ assert_matches_type(EmailRoutingGetResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.email_routing.routing.with_raw_response.get(
+ response = await async_client.email_routing.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = await response.parse()
- assert_matches_type(RoutingGetResponse, routing, path=["response"])
+ email_routing = await response.parse()
+ assert_matches_type(EmailRoutingGetResponse, email_routing, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.email_routing.routing.with_streaming_response.get(
+ async with async_client.email_routing.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- routing = await response.parse()
- assert_matches_type(RoutingGetResponse, routing, path=["response"])
+ email_routing = await response.parse()
+ assert_matches_type(EmailRoutingGetResponse, email_routing, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -269,6 +269,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.email_routing.routing.with_raw_response.get(
+ await async_client.email_routing.with_raw_response.get(
"",
)
diff --git a/tests/api_resources/test_available_plans.py b/tests/api_resources/test_plans.py
similarity index 67%
rename from tests/api_resources/test_available_plans.py
rename to tests/api_resources/test_plans.py
index c2874a2307b..46e615a6e8a 100644
--- a/tests/api_resources/test_available_plans.py
+++ b/tests/api_resources/test_plans.py
@@ -9,45 +9,45 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types import AvailablePlanListResponse, BillSubsAPIAvailableRatePlan
+from cloudflare.types import PlanListResponse, BillSubsAPIAvailableRatePlan
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestAvailablePlans:
+class TestPlans:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_list(self, client: Cloudflare) -> None:
- available_plan = client.available_plans.list(
+ plan = client.plans.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[AvailablePlanListResponse], available_plan, path=["response"])
+ assert_matches_type(Optional[PlanListResponse], plan, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_list(self, client: Cloudflare) -> None:
- response = client.available_plans.with_raw_response.list(
+ response = client.plans.with_raw_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = response.parse()
- assert_matches_type(Optional[AvailablePlanListResponse], available_plan, path=["response"])
+ plan = response.parse()
+ assert_matches_type(Optional[PlanListResponse], plan, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_list(self, client: Cloudflare) -> None:
- with client.available_plans.with_streaming_response.list(
+ with client.plans.with_streaming_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = response.parse()
- assert_matches_type(Optional[AvailablePlanListResponse], available_plan, path=["response"])
+ plan = response.parse()
+ assert_matches_type(Optional[PlanListResponse], plan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -55,44 +55,44 @@ def test_streaming_response_list(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_list(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.available_plans.with_raw_response.list(
+ client.plans.with_raw_response.list(
"",
)
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- available_plan = client.available_plans.get(
+ plan = client.plans.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"])
+ assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.available_plans.with_raw_response.get(
+ response = client.plans.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = response.parse()
- assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"])
+ plan = response.parse()
+ assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.available_plans.with_streaming_response.get(
+ with client.plans.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = response.parse()
- assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"])
+ plan = response.parse()
+ assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -100,52 +100,52 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.available_plans.with_raw_response.get(
+ client.plans.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_identifier` but received ''"):
- client.available_plans.with_raw_response.get(
+ client.plans.with_raw_response.get(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
-class TestAsyncAvailablePlans:
+class TestAsyncPlans:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
- available_plan = await async_client.available_plans.list(
+ plan = await async_client.plans.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[AvailablePlanListResponse], available_plan, path=["response"])
+ assert_matches_type(Optional[PlanListResponse], plan, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.available_plans.with_raw_response.list(
+ response = await async_client.plans.with_raw_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = await response.parse()
- assert_matches_type(Optional[AvailablePlanListResponse], available_plan, path=["response"])
+ plan = await response.parse()
+ assert_matches_type(Optional[PlanListResponse], plan, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
- async with async_client.available_plans.with_streaming_response.list(
+ async with async_client.plans.with_streaming_response.list(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = await response.parse()
- assert_matches_type(Optional[AvailablePlanListResponse], available_plan, path=["response"])
+ plan = await response.parse()
+ assert_matches_type(Optional[PlanListResponse], plan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -153,44 +153,44 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.available_plans.with_raw_response.list(
+ await async_client.plans.with_raw_response.list(
"",
)
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- available_plan = await async_client.available_plans.get(
+ plan = await async_client.plans.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"])
+ assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.available_plans.with_raw_response.get(
+ response = await async_client.plans.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = await response.parse()
- assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"])
+ plan = await response.parse()
+ assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.available_plans.with_streaming_response.get(
+ async with async_client.plans.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_plan = await response.parse()
- assert_matches_type(BillSubsAPIAvailableRatePlan, available_plan, path=["response"])
+ plan = await response.parse()
+ assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -198,13 +198,13 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.available_plans.with_raw_response.get(
+ await async_client.plans.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
zone_identifier="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `plan_identifier` but received ''"):
- await async_client.available_plans.with_raw_response.get(
+ await async_client.plans.with_raw_response.get(
"",
zone_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)
diff --git a/tests/api_resources/test_available_rate_plans.py b/tests/api_resources/test_rate_plans.py
similarity index 64%
rename from tests/api_resources/test_available_rate_plans.py
rename to tests/api_resources/test_rate_plans.py
index 349668a9f77..a4cb7576276 100644
--- a/tests/api_resources/test_available_rate_plans.py
+++ b/tests/api_resources/test_rate_plans.py
@@ -9,45 +9,45 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types import AvailableRatePlanGetResponse
+from cloudflare.types import RatePlanGetResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestAvailableRatePlans:
+class TestRatePlans:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- available_rate_plan = client.available_rate_plans.get(
+ rate_plan = client.rate_plans.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[AvailableRatePlanGetResponse], available_rate_plan, path=["response"])
+ assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.available_rate_plans.with_raw_response.get(
+ response = client.rate_plans.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_rate_plan = response.parse()
- assert_matches_type(Optional[AvailableRatePlanGetResponse], available_rate_plan, path=["response"])
+ rate_plan = response.parse()
+ assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.available_rate_plans.with_streaming_response.get(
+ with client.rate_plans.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_rate_plan = response.parse()
- assert_matches_type(Optional[AvailableRatePlanGetResponse], available_rate_plan, path=["response"])
+ rate_plan = response.parse()
+ assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -55,45 +55,45 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- client.available_rate_plans.with_raw_response.get(
+ client.rate_plans.with_raw_response.get(
"",
)
-class TestAsyncAvailableRatePlans:
+class TestAsyncRatePlans:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- available_rate_plan = await async_client.available_rate_plans.get(
+ rate_plan = await async_client.rate_plans.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[AvailableRatePlanGetResponse], available_rate_plan, path=["response"])
+ assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.available_rate_plans.with_raw_response.get(
+ response = await async_client.rate_plans.with_raw_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_rate_plan = await response.parse()
- assert_matches_type(Optional[AvailableRatePlanGetResponse], available_rate_plan, path=["response"])
+ rate_plan = await response.parse()
+ assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.available_rate_plans.with_streaming_response.get(
+ async with async_client.rate_plans.with_streaming_response.get(
"023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- available_rate_plan = await response.parse()
- assert_matches_type(Optional[AvailableRatePlanGetResponse], available_rate_plan, path=["response"])
+ rate_plan = await response.parse()
+ assert_matches_type(Optional[RatePlanGetResponse], rate_plan, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -101,6 +101,6 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `zone_identifier` but received ''"):
- await async_client.available_rate_plans.with_raw_response.get(
+ await async_client.rate_plans.with_raw_response.get(
"",
)
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
deleted file mode 100644
index fd8019a9a1a..00000000000
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_bindings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
similarity index 86%
rename from tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_bindings.py
rename to tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
index 6abf9f544d2..e11447ac29a 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_bindings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_bindings.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content import BindingGetResponse
+from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import BindingGetResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -20,7 +20,7 @@ class TestBindings:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- binding = client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.get(
+ binding = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -30,7 +30,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ response = client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -44,7 +44,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_streaming_response.get(
+ with client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -61,21 +61,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -88,7 +88,7 @@ class TestAsyncBindings:
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- binding = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.get(
+ binding = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -98,12 +98,10 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = (
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
- "this-is_my_script-01",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="my-dispatch-namespace",
- )
+ response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
+ "this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="my-dispatch-namespace",
)
assert response.is_closed is True
@@ -114,7 +112,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_streaming_response.get(
+ async with async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_streaming_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -131,21 +129,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.bindings.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.bindings.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
similarity index 70%
rename from tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py
rename to tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
index 7e8a727f84b..2044f5b05b8 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_scripts.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_content.py
@@ -22,23 +22,23 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestScripts:
+class TestContent:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
- script = client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(
+ content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(WorkersScript, content, path=["response"])
@pytest.mark.skip()
@parametrize
def test_method_update_with_all_params(self, client: Cloudflare) -> None:
- script = client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(
+ content = client.workers_for_platforms.dispatch.namespaces.scripts.content.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -48,12 +48,12 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(WorkersScript, content, path=["response"])
@pytest.mark.skip()
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
- response = client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
+ response = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -61,13 +61,13 @@ 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"
- script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ content = response.parse()
+ assert_matches_type(WorkersScript, content, path=["response"])
@pytest.mark.skip()
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
- with client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_streaming_response.update(
+ with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -75,8 +75,8 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- script = response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ content = response.parse()
+ assert_matches_type(WorkersScript, content, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -84,21 +84,21 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
+ client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
+ client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
+ client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -111,15 +111,15 @@ def test_method_get(self, client: Cloudflare, respx_mock: MockRouter) -> None:
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- script = client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.get(
+ content = client.workers_for_platforms.dispatch.namespaces.scripts.content.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert script.is_closed
- assert script.json() == {"foo": "bar"}
- assert cast(Any, script.is_closed) is True
- assert isinstance(script, BinaryAPIResponse)
+ assert content.is_closed
+ assert content.json() == {"foo": "bar"}
+ assert cast(Any, content.is_closed) is True
+ assert isinstance(content, BinaryAPIResponse)
@pytest.mark.skip()
@parametrize
@@ -129,16 +129,16 @@ def test_raw_response_get(self, client: Cloudflare, respx_mock: MockRouter) -> N
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- script = client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ content = client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert script.is_closed is True
- assert script.http_request.headers.get("X-Stainless-Lang") == "python"
- assert script.json() == {"foo": "bar"}
- assert isinstance(script, BinaryAPIResponse)
+ assert content.is_closed is True
+ assert content.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert content.json() == {"foo": "bar"}
+ assert isinstance(content, BinaryAPIResponse)
@pytest.mark.skip()
@parametrize
@@ -147,63 +147,63 @@ def test_streaming_response_get(self, client: Cloudflare, respx_mock: MockRouter
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- with client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_streaming_response.get(
+ with client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
- ) as script:
- assert not script.is_closed
- assert script.http_request.headers.get("X-Stainless-Lang") == "python"
+ ) as content:
+ assert not content.is_closed
+ assert content.http_request.headers.get("X-Stainless-Lang") == "python"
- assert script.json() == {"foo": "bar"}
- assert cast(Any, script.is_closed) is True
- assert isinstance(script, StreamedBinaryAPIResponse)
+ assert content.json() == {"foo": "bar"}
+ assert cast(Any, content.is_closed) is True
+ assert isinstance(content, StreamedBinaryAPIResponse)
- assert cast(Any, script.is_closed) is True
+ assert cast(Any, content.is_closed) is True
@pytest.mark.skip()
@parametrize
@pytest.mark.respx(base_url=base_url)
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
-class TestAsyncScripts:
+class TestAsyncContent:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
- script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(
+ content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(WorkersScript, content, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncCloudflare) -> None:
- script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.update(
+ content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -213,26 +213,28 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
"main_module": "worker.js",
},
)
- assert_matches_type(WorkersScript, script, path=["response"])
+ assert_matches_type(WorkersScript, content, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
- "this-is_my_script-01",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="my-dispatch-namespace",
+ response = (
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
+ "this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="my-dispatch-namespace",
+ )
)
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ content = await response.parse()
+ assert_matches_type(WorkersScript, content, path=["response"])
@pytest.mark.skip()
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
- async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_streaming_response.update(
+ async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.update(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -240,8 +242,8 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- script = await response.parse()
- assert_matches_type(WorkersScript, script, path=["response"])
+ content = await response.parse()
+ assert_matches_type(WorkersScript, content, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -249,30 +251,24 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
@parametrize
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await (
- async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
- "this-is_my_script-01",
- account_id="",
- dispatch_namespace="my-dispatch-namespace",
- )
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
+ "this-is_my_script-01",
+ account_id="",
+ dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- await (
- async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
- "this-is_my_script-01",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="",
- )
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
+ "this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- await (
- async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.update(
- "",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="my-dispatch-namespace",
- )
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.update(
+ "",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="my-dispatch-namespace",
)
@pytest.mark.skip()
@@ -282,15 +278,15 @@ async def test_method_get(self, async_client: AsyncCloudflare, respx_mock: MockR
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- script = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.get(
+ content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
)
- assert script.is_closed
- assert await script.json() == {"foo": "bar"}
- assert cast(Any, script.is_closed) is True
- assert isinstance(script, AsyncBinaryAPIResponse)
+ assert content.is_closed
+ assert await content.json() == {"foo": "bar"}
+ assert cast(Any, content.is_closed) is True
+ assert isinstance(content, AsyncBinaryAPIResponse)
@pytest.mark.skip()
@parametrize
@@ -300,18 +296,16 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare, respx_mock:
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- script = (
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
- "this-is_my_script-01",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="my-dispatch-namespace",
- )
+ content = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
+ "this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="my-dispatch-namespace",
)
- assert script.is_closed is True
- assert script.http_request.headers.get("X-Stainless-Lang") == "python"
- assert await script.json() == {"foo": "bar"}
- assert isinstance(script, AsyncBinaryAPIResponse)
+ assert content.is_closed is True
+ assert content.http_request.headers.get("X-Stainless-Lang") == "python"
+ assert await content.json() == {"foo": "bar"}
+ assert isinstance(content, AsyncBinaryAPIResponse)
@pytest.mark.skip()
@parametrize
@@ -320,40 +314,40 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare, respx
respx_mock.get(
"/accounts/023e105f4ecef8ad9ca31a8372d0c353/workers/dispatch/namespaces/my-dispatch-namespace/scripts/this-is_my_script-01/content"
).mock(return_value=httpx.Response(200, json={"foo": "bar"}))
- async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_streaming_response.get(
+ async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_streaming_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
- ) as script:
- assert not script.is_closed
- assert script.http_request.headers.get("X-Stainless-Lang") == "python"
+ ) as content:
+ assert not content.is_closed
+ assert content.http_request.headers.get("X-Stainless-Lang") == "python"
- assert await script.json() == {"foo": "bar"}
- assert cast(Any, script.is_closed) is True
- assert isinstance(script, AsyncStreamedBinaryAPIResponse)
+ assert await content.json() == {"foo": "bar"}
+ assert cast(Any, content.is_closed) is True
+ assert isinstance(content, AsyncStreamedBinaryAPIResponse)
- assert cast(Any, script.is_closed) is True
+ assert cast(Any, content.is_closed) is True
@pytest.mark.skip()
@parametrize
@pytest.mark.respx(base_url=base_url)
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.scripts.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_settings.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
similarity index 83%
rename from tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_settings.py
rename to tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
index e225f3f79b1..e1abbb919d1 100644
--- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/content/test_settings.py
+++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/scripts/test_settings.py
@@ -9,7 +9,7 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts.content import (
+from cloudflare.types.workers_for_platforms.dispatch.namespaces.scripts import (
SettingGetResponse,
SettingEditResponse,
)
@@ -23,7 +23,7 @@ class TestSettings:
@pytest.mark.skip()
@parametrize
def test_method_edit(self, client: Cloudflare) -> None:
- setting = client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.edit(
+ setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -63,7 +63,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
- setting = client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.edit(
+ setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -169,7 +169,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_edit(self, client: Cloudflare) -> None:
- response = client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
+ response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -213,7 +213,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_edit(self, client: Cloudflare) -> None:
- with client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_streaming_response.edit(
+ with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -260,7 +260,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_edit(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
+ client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
@@ -297,7 +297,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
+ client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
@@ -334,7 +334,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
+ client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -373,7 +373,7 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
- setting = client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.get(
+ setting = client.workers_for_platforms.dispatch.namespaces.scripts.settings.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -383,7 +383,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_get(self, client: Cloudflare) -> None:
- response = client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ response = client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -397,7 +397,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_get(self, client: Cloudflare) -> None:
- with client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_streaming_response.get(
+ with client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -414,21 +414,21 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
@parametrize
def test_path_params_get(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -441,7 +441,7 @@ class TestAsyncSettings:
@pytest.mark.skip()
@parametrize
async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
- setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.edit(
+ setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -481,7 +481,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
- setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.edit(
+ setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -587,7 +587,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
@pytest.mark.skip()
@parametrize
async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
+ response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -631,7 +631,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> None:
- async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_streaming_response.edit(
+ async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.edit(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -678,126 +678,120 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
@parametrize
async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await (
- async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
- "this-is_my_script-01",
- account_id="",
- dispatch_namespace="my-dispatch-namespace",
- errors=[
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- ],
- messages=[
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- ],
- result={},
- success=True,
- )
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
+ "this-is_my_script-01",
+ account_id="",
+ dispatch_namespace="my-dispatch-namespace",
+ errors=[
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ ],
+ messages=[
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ ],
+ result={},
+ success=True,
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- await (
- async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
- "this-is_my_script-01",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="",
- errors=[
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- ],
- messages=[
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- ],
- result={},
- success=True,
- )
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
+ "this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="",
+ errors=[
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ ],
+ messages=[
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ ],
+ result={},
+ success=True,
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- await (
- async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.edit(
- "",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="my-dispatch-namespace",
- errors=[
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- ],
- messages=[
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- {
- "code": 1000,
- "message": "string",
- },
- ],
- result={},
- success=True,
- )
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.edit(
+ "",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="my-dispatch-namespace",
+ errors=[
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ ],
+ messages=[
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ {
+ "code": 1000,
+ "message": "string",
+ },
+ ],
+ result={},
+ success=True,
)
@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
- setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.get(
+ setting = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -807,12 +801,10 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
- response = (
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
- "this-is_my_script-01",
- account_id="023e105f4ecef8ad9ca31a8372d0c353",
- dispatch_namespace="my-dispatch-namespace",
- )
+ response = await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
+ "this-is_my_script-01",
+ account_id="023e105f4ecef8ad9ca31a8372d0c353",
+ dispatch_namespace="my-dispatch-namespace",
)
assert response.is_closed is True
@@ -823,7 +815,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
- async with async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_streaming_response.get(
+ async with async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_streaming_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
@@ -840,21 +832,21 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
@parametrize
async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"this-is_my_script-01",
account_id="",
dispatch_namespace="my-dispatch-namespace",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dispatch_namespace` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"this-is_my_script-01",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `script_name` but received ''"):
- await async_client.workers_for_platforms.dispatch.namespaces.scripts.content.settings.with_raw_response.get(
+ await async_client.workers_for_platforms.dispatch.namespaces.scripts.settings.with_raw_response.get(
"",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
dispatch_namespace="my-dispatch-namespace",
diff --git a/tests/api_resources/zero_trust/devices/test_revokes.py b/tests/api_resources/zero_trust/devices/test_revoke.py
similarity index 89%
rename from tests/api_resources/zero_trust/devices/test_revokes.py
rename to tests/api_resources/zero_trust/devices/test_revoke.py
index 6686a449963..0e651f48842 100644
--- a/tests/api_resources/zero_trust/devices/test_revokes.py
+++ b/tests/api_resources/zero_trust/devices/test_revoke.py
@@ -14,13 +14,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestRevokes:
+class TestRevoke:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- revoke = client.zero_trust.devices.revokes.create(
+ revoke = client.zero_trust.devices.revoke.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.zero_trust.devices.revokes.with_raw_response.create(
+ response = client.zero_trust.devices.revoke.with_raw_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.zero_trust.devices.revokes.with_streaming_response.create(
+ with client.zero_trust.devices.revoke.with_streaming_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -67,13 +67,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
-class TestAsyncRevokes:
+class TestAsyncRevoke:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- revoke = await async_client.zero_trust.devices.revokes.create(
+ revoke = await async_client.zero_trust.devices.revoke.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -86,7 +86,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.zero_trust.devices.revokes.with_raw_response.create(
+ response = await async_client.zero_trust.devices.revoke.with_raw_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -103,7 +103,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.zero_trust.devices.revokes.with_streaming_response.create(
+ async with async_client.zero_trust.devices.revoke.with_streaming_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
diff --git a/tests/api_resources/zero_trust/devices/test_unrevokes.py b/tests/api_resources/zero_trust/devices/test_unrevoke.py
similarity index 91%
rename from tests/api_resources/zero_trust/devices/test_unrevokes.py
rename to tests/api_resources/zero_trust/devices/test_unrevoke.py
index 78a29b4e551..0fe68ea6d2b 100644
--- a/tests/api_resources/zero_trust/devices/test_unrevokes.py
+++ b/tests/api_resources/zero_trust/devices/test_unrevoke.py
@@ -14,13 +14,13 @@
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestUnrevokes:
+class TestUnrevoke:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
def test_method_create(self, client: Cloudflare) -> None:
- unrevoke = client.zero_trust.devices.unrevokes.create(
+ unrevoke = client.zero_trust.devices.unrevoke.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -33,7 +33,7 @@ def test_method_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_raw_response_create(self, client: Cloudflare) -> None:
- response = client.zero_trust.devices.unrevokes.with_raw_response.create(
+ response = client.zero_trust.devices.unrevoke.with_raw_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
@pytest.mark.skip()
@parametrize
def test_streaming_response_create(self, client: Cloudflare) -> None:
- with client.zero_trust.devices.unrevokes.with_streaming_response.create(
+ with client.zero_trust.devices.unrevoke.with_streaming_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -67,13 +67,13 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
assert cast(Any, response.is_closed) is True
-class TestAsyncUnrevokes:
+class TestAsyncUnrevoke:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@parametrize
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
- unrevoke = await async_client.zero_trust.devices.unrevokes.create(
+ unrevoke = await async_client.zero_trust.devices.unrevoke.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -86,7 +86,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
- response = await async_client.zero_trust.devices.unrevokes.with_raw_response.create(
+ response = await async_client.zero_trust.devices.unrevoke.with_raw_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
@@ -103,7 +103,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
@pytest.mark.skip()
@parametrize
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
- async with async_client.zero_trust.devices.unrevokes.with_streaming_response.create(
+ async with async_client.zero_trust.devices.unrevoke.with_streaming_response.create(
account_id="699d98642c564d2e855e9661899b7252",
body=[
"f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
diff --git a/tests/api_resources/zones/settings/test_webp.py b/tests/api_resources/zones/settings/test_webp.py
index 62ec8185442..3c4c3bf82d1 100644
--- a/tests/api_resources/zones/settings/test_webp.py
+++ b/tests/api_resources/zones/settings/test_webp.py
@@ -9,12 +9,12 @@
from cloudflare import Cloudflare, AsyncCloudflare
from tests.utils import assert_matches_type
-from cloudflare.types.zones.settings import ZonesWebp
+from cloudflare.types.zones.settings import ZonesWebP
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
-class TestWebp:
+class TestWebP:
parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
value="off",
)
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -37,7 +37,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"
webp = response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -50,7 +50,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webp = response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None:
webp = client.zones.settings.webp.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -81,7 +81,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"
webp = response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -93,7 +93,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webp = response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -106,7 +106,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
)
-class TestAsyncWebp:
+class TestAsyncWebP:
parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"])
@pytest.mark.skip()
@@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
value="off",
)
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -129,7 +129,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"
webp = await response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -142,7 +142,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webp = await response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
webp = await async_client.zones.settings.webp.get(
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
)
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -173,7 +173,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"
webp = await response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
@pytest.mark.skip()
@parametrize
@@ -185,7 +185,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
webp = await response.parse()
- assert_matches_type(Optional[ZonesWebp], webp, path=["response"])
+ assert_matches_type(Optional[ZonesWebP], webp, path=["response"])
assert cast(Any, response.is_closed) is True