From 0ad46e17772a799cd8a3be894f5a81da0d055ad0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 04:15:39 +0000 Subject: [PATCH 01/16] feat(api): update via SDK Studio (#180) --- src/cloudflare/pagination.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cloudflare/pagination.py b/src/cloudflare/pagination.py index 7382cf23d68..b6f4cc2cfc6 100644 --- a/src/cloudflare/pagination.py +++ b/src/cloudflare/pagination.py @@ -257,14 +257,14 @@ def next_page_info(self) -> Optional[PageInfo]: class SyncSinglePage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): - items: List[_T] + result: List[_T] @override def _get_page_items(self) -> List[_T]: - items = self.items - if not items: + result = self.result + if not result: return [] - return items + return result @override def next_page_info(self) -> None: @@ -279,20 +279,20 @@ def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseM return cls.construct( None, **{ - **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), + **(cast(Mapping[str, Any], data) if is_mapping(data) else {"result": data}), }, ) class AsyncSinglePage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): - items: List[_T] + result: List[_T] @override def _get_page_items(self) -> List[_T]: - items = self.items - if not items: + result = self.result + if not result: return [] - return items + return result @override def next_page_info(self) -> None: @@ -307,6 +307,6 @@ def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseM return cls.construct( None, **{ - **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), + **(cast(Mapping[str, Any], data) if is_mapping(data) else {"result": data}), }, ) From 5fd33784fbb92a0ac2b98f6835287cc6397cb955 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 04:20:00 +0000 Subject: [PATCH 02/16] feat(api): update via SDK Studio (#182) --- api.md | 886 +++++++++--------- src/cloudflare/_client.py | 16 +- src/cloudflare/resources/__init__.py | 24 +- .../alerting/destinations/webhooks.py | 10 +- src/cloudflare/resources/alerting/history.py | 14 +- src/cloudflare/resources/alerting/policies.py | 10 +- .../hostname_associations.py | 30 +- .../resources/client_certificates.py | 77 +- .../custom_certificates.py | 17 +- .../resources/custom_nameservers.py | 10 +- .../dns/analytics/reports/bytimes.py | 10 +- .../dns/analytics/reports/reports.py | 10 +- .../dns/firewall/analytics/reports/bytimes.py | 10 +- .../dns/firewall/analytics/reports/reports.py | 10 +- .../resources/dns/firewall/firewall.py | 38 +- src/cloudflare/resources/dnssec.py | 56 +- .../durable_objects/namespaces/objects.py | 14 +- src/cloudflare/resources/filters.py | 38 +- .../resources/firewall/lockdowns.py | 38 +- src/cloudflare/resources/firewall/rules.py | 38 +- .../resources/firewall/waf/overrides.py | 38 +- .../resources/firewall/waf/packages/groups.py | 14 +- .../resources/healthchecks/healthchecks.py | 34 +- .../resources/healthchecks/previews.py | 18 +- src/cloudflare/resources/images/v1/v1.py | 41 +- .../resources/keyless_certificates.py | 26 +- .../resources/load_balancers/previews.py | 10 +- src/cloudflare/resources/logpush/edge.py | 10 +- src/cloudflare/resources/logpush/jobs.py | 26 +- .../resources/logs/control/cmb/config.py | 18 +- .../configs/configs.py | 42 +- .../magic_network_monitoring/configs/full.py | 10 +- .../rules/advertisements.py | 12 +- .../magic_network_monitoring/rules/rules.py | 42 +- .../mtls_certificates/mtls_certificates.py | 46 +- .../hostnames/certificates.py | 44 +- .../hostnames/hostnames.py | 16 +- .../resources/page_shield/page_shield.py | 18 +- .../resources/page_shield/policies.py | 31 +- .../resources/pagerules/settings.py | 10 +- src/cloudflare/resources/plans.py | 10 +- .../resources/ssl/universal/settings.py | 26 +- .../resources/stream/audio_tracks.py | 18 +- .../resources/user/firewall/access_rules.py | 30 +- .../resources/user/load_balancers/preview.py | 10 +- .../resources/user/organizations.py | 14 +- .../resources/waiting_rooms/events/details.py | 10 +- .../resources/waiting_rooms/events/events.py | 34 +- .../resources/waiting_rooms/waiting_rooms.py | 34 +- .../resources/web3/hostnames/hostnames.py | 26 +- .../content_lists/content_lists.py | 24 +- .../content_lists/entries.py | 38 +- src/cloudflare/resources/workers/filters.py | 10 +- src/cloudflare/resources/workers/routes.py | 18 +- .../dispatch/namespaces/scripts/scripts.py | 10 +- .../access/applications/applications.py | 102 +- .../access/applications/policies.py | 26 +- .../resources/zero_trust/access/bookmarks.py | 26 +- .../access/certificates/certificates.py | 26 +- .../access/certificates/settings.py | 6 +- .../zero_trust/access/custom_pages.py | 28 +- .../resources/zero_trust/access/groups.py | 26 +- .../zero_trust/access/service_tokens.py | 26 +- .../resources/zero_trust/access/tags.py | 26 +- .../access/users/last_seen_identity.py | 10 +- .../resources/zero_trust/devices/dex_tests.py | 44 +- .../resources/zero_trust/devices/networks.py | 38 +- .../zero_trust/devices/policies/excludes.py | 6 +- .../devices/policies/fallback_domains.py | 6 +- .../zero_trust/devices/policies/includes.py | 6 +- .../zero_trust/devices/policies/policies.py | 38 +- .../devices/posture/integrations.py | 44 +- .../zero_trust/devices/posture/posture.py | 26 +- .../resources/zero_trust/devices/settings.py | 30 +- .../zero_trust/identity_providers.py | 150 +-- .../resources/zero_trust/organizations.py | 26 +- .../resources/zones/settings/advanced_ddos.py | 10 +- .../resources/zones/settings/always_online.py | 18 +- .../zones/settings/always_use_https.py | 18 +- .../settings/automatic_https_rewrites.py | 26 +- .../automatic_platform_optimization.py | 28 +- .../resources/zones/settings/brotli.py | 18 +- .../zones/settings/browser_cache_ttl.py | 18 +- .../resources/zones/settings/browser_check.py | 18 +- .../resources/zones/settings/cache_level.py | 18 +- .../resources/zones/settings/challenge_ttl.py | 18 +- .../resources/zones/settings/ciphers.py | 18 +- .../zones/settings/development_mode.py | 18 +- .../resources/zones/settings/early_hints.py | 18 +- .../zones/settings/email_obfuscation.py | 18 +- .../resources/zones/settings/font_settings.py | 18 +- .../zones/settings/h2_prioritization.py | 26 +- .../zones/settings/hotlink_protection.py | 18 +- .../resources/zones/settings/http2.py | 18 +- .../resources/zones/settings/http3.py | 18 +- .../zones/settings/image_resizing.py | 22 +- .../zones/settings/ip_geolocation.py | 18 +- .../resources/zones/settings/ipv6.py | 18 +- .../zones/settings/min_tls_version.py | 18 +- .../resources/zones/settings/minify.py | 18 +- .../resources/zones/settings/mirage.py | 18 +- .../zones/settings/mobile_redirect.py | 18 +- .../resources/zones/settings/nel.py | 22 +- .../settings/opportunistic_encryption.py | 26 +- .../zones/settings/opportunistic_onion.py | 18 +- .../zones/settings/orange_to_orange.py | 26 +- .../settings/origin_error_page_pass_thru.py | 26 +- .../resources/zones/settings/polish.py | 22 +- .../zones/settings/prefetch_preload.py | 18 +- .../zones/settings/proxy_read_timeout.py | 26 +- .../resources/zones/settings/pseudo_ipv4.py | 18 +- .../zones/settings/response_buffering.py | 18 +- .../resources/zones/settings/rocket_loader.py | 22 +- .../zones/settings/security_headers.py | 18 +- .../zones/settings/security_level.py | 18 +- .../zones/settings/server_side_excludes.py | 18 +- .../settings/sort_query_string_for_cache.py | 26 +- .../resources/zones/settings/ssl.py | 18 +- .../zones/settings/ssl_recommender.py | 26 +- .../resources/zones/settings/tls_1_3.py | 18 +- .../zones/settings/tls_client_auth.py | 18 +- .../zones/settings/true_client_ip_header.py | 18 +- .../resources/zones/settings/waf.py | 18 +- .../resources/zones/settings/webp.py | 18 +- .../resources/zones/settings/websocket.py | 18 +- .../resources/zones/settings/zero_rtt.py | 18 +- src/cloudflare/types/__init__.py | 36 +- src/cloudflare/types/accounts/__init__.py | 2 +- .../types/accounts/member_list_response.py | 4 +- .../accounts/{iam_schemas_role.py => role.py} | 4 +- .../types/accounts/role_list_response.py | 4 +- src/cloudflare/types/alerting/__init__.py | 4 +- .../{aaa_history.py => alerting_history.py} | 4 +- .../{aaa_policies.py => alerting_policies.py} | 4 +- .../types/alerting/destinations/__init__.py | 4 +- ...aaa_pagerduty.py => alerting_pagerduty.py} | 4 +- .../{aaa_webhooks.py => alerting_webhooks.py} | 4 +- .../destinations/pagerduty_get_response.py | 4 +- .../destinations/webhook_list_response.py | 4 +- .../types/alerting/policy_list_response.py | 4 +- ...le_rate_plan.py => available_rate_plan.py} | 4 +- .../types/certificate_authorities/__init__.py | 4 +- ...ciation.py => tls_hostname_association.py} | 4 +- ...t_certificate.py => client_certificate.py} | 4 +- ...m_certificate.py => custom_certificate.py} | 8 +- .../prioritize_update_response.py | 4 +- ...vers_custom_ns.py => custom_nameserver.py} | 4 +- .../types/custom_nameserver_get_response.py | 4 +- .../custom_nameserver_verify_response.py | 4 +- src/cloudflare/types/dns/__init__.py | 2 +- .../types/dns/analytics/__init__.py | 2 +- ..._api_report.py => dns_analytics_report.py} | 4 +- .../types/dns/analytics/reports/__init__.py | 2 +- ...ime.py => dns_analytics_report_by_time.py} | 4 +- ...rewall_dns_firewall.py => dns_firewall.py} | 4 +- .../types/{dnssec_dnssec.py => dnssec.py} | 4 +- .../types/durable_objects/__init__.py | 2 +- ...mespace.py => durable_object_namespace.py} | 4 +- .../namespace_list_response.py | 4 +- .../durable_objects/namespaces/__init__.py | 2 +- .../{workers_object.py => durable_object.py} | 4 +- .../types/filter_create_response.py | 4 +- src/cloudflare/types/firewall/__init__.py | 4 +- ...filter_rule.py => firewall_filter_rule.py} | 8 +- ...elockdown.py => firewall_zone_lockdown.py} | 4 +- .../types/firewall/rule_create_response.py | 4 +- .../types/firewall/rule_edit_response.py | 4 +- src/cloudflare/types/firewall/waf/__init__.py | 2 +- .../types/firewall/waf/packages/__init__.py | 2 +- ...as_group.py => waf_managed_rules_group.py} | 4 +- ...legacy_jhs_override.py => waf_override.py} | 4 +- ...egacy_jhs_filter.py => firewall_filter.py} | 4 +- ...hchecks_healthchecks.py => healthcheck.py} | 4 +- .../types/healthcheck_list_response.py | 4 +- src/cloudflare/types/images/__init__.py | 2 +- .../images/{images_image.py => image.py} | 4 +- .../types/images/v1_list_response.py | 4 +- .../types/images/v2_list_response.py | 4 +- src/cloudflare/types/intel/__init__.py | 2 +- ...inkhole_item.py => intel_sinkhole_item.py} | 4 +- .../types/intel/sinkhole_list_response.py | 4 +- ...ase.py => keyless_certificate_hostname.py} | 4 +- .../keyless_certificate_list_response.py | 4 +- src/cloudflare/types/logpush/__init__.py | 2 +- .../types/logpush/datasets/__init__.py | 2 +- .../logpush/datasets/job_get_response.py | 4 +- ...{logpush_logpush_job.py => logpush_job.py} | 4 +- .../types/logpush/edge_get_response.py | 4 +- ...ant_logs_job.py => instant_logpush_job.py} | 4 +- .../types/logpush/job_list_response.py | 4 +- .../types/logs/control/cmb/__init__.py | 2 +- ...logcontrol_cmb_config.py => cmb_config.py} | 4 +- .../magic_network_monitoring/__init__.py | 4 +- ....py => magic_network_monitoring_config.py} | 4 +- ...le.py => magic_network_monitoring_rule.py} | 4 +- .../rule_list_response.py | 4 +- .../rules/__init__.py | 4 +- ...c_network_monitoring_rule_advertisable.py} | 4 +- ...tificate_object.py => mtls_certificate.py} | 4 +- .../types/mtls_certificate_list_response.py | 6 +- ...ect_post.py => mtls_certificate_update.py} | 4 +- .../types/mtls_certificates/__init__.py | 4 +- .../association_get_response.py | 4 +- ...ct.py => mtls_certificate_asssociation.py} | 4 +- .../types/origin_tls_client_auth/__init__.py | 4 +- .../hostname_update_response.py | 4 +- .../hostnames/__init__.py | 4 +- .../hostnames/certificate_list_response.py | 4 +- ...ct.py => origin_tls_client_certificate.py} | 4 +- ...py => origin_tls_client_certificate_id.py} | 4 +- src/cloudflare/types/page_shield/__init__.py | 2 +- ...shield_policy.py => page_shield_policy.py} | 4 +- .../types/page_shield/policy_list_response.py | 4 +- ...one_settings.py => page_shield_setting.py} | 4 +- ...ings.py => page_shield_update_response.py} | 4 +- .../types/pagerule_list_response.py | 4 +- src/cloudflare/types/pagerules/__init__.py | 2 +- ..._settings.py => zone_pagerule_settings.py} | 4 +- src/cloudflare/types/plan_list_response.py | 4 +- .../types/request_tracers/__init__.py | 2 +- ...quest_tracer_trace.py => request_trace.py} | 12 +- .../request_tracers/trace_create_response.py | 4 +- .../types/secondary_dns/__init__.py | 9 +- ...t.py => secondary_dns_disable_transfer.py} | 4 +- .../secondary_dns_disable_transfer_result.py | 6 - .../secondary_dns_enable_transfer.py | 6 + .../secondary_dns_enable_transfer_result.py | 6 - ...force_result.py => secondary_dns_force.py} | 4 +- src/cloudflare/types/ssl/__init__.py | 4 +- ...ication.py => tls_verification_setting.py} | 4 +- .../types/ssl/universal/__init__.py | 4 +- ...universal.py => universal_ssl_settings.py} | 4 +- .../types/ssl/verification_get_response.py | 4 +- src/cloudflare/types/stream/__init__.py | 2 +- .../types/stream/audio_track_get_response.py | 4 +- ...am_additional_audio.py => stream_audio.py} | 4 +- src/cloudflare/types/user/__init__.py | 2 +- src/cloudflare/types/user/billing/__init__.py | 2 +- ..._billing_history.py => billing_history.py} | 4 +- .../user/billing/history_get_response.py | 4 +- .../types/user/firewall/__init__.py | 2 +- .../{legacy_jhs_rule.py => firewall_rule.py} | 4 +- .../types/user/invite_list_response.py | 4 +- .../types/user/load_balancers/__init__.py | 2 +- .../load_balancers/load_balancing_preview.py | 30 + .../load_balancing_preview_result.py | 32 - .../{iam_organization.py => organization.py} | 4 +- .../types/user/token_create_response.py | 4 +- src/cloudflare/types/user/tokens/__init__.py | 2 +- .../tokens/{iam_value.py => token_value.py} | 4 +- ...ingroom_waitingroom.py => waiting_room.py} | 4 +- .../types/waiting_room_list_response.py | 4 +- .../types/waiting_rooms/__init__.py | 4 +- .../waiting_rooms/event_list_response.py | 4 +- .../types/waiting_rooms/events/__init__.py | 2 +- ...result.py => waitingroom_event_details.py} | 4 +- .../waiting_rooms/rule_create_response.py | 4 +- .../waiting_rooms/rule_delete_response.py | 4 +- .../types/waiting_rooms/rule_edit_response.py | 4 +- .../types/waiting_rooms/rule_list_response.py | 4 +- .../waiting_rooms/rule_update_response.py | 4 +- ...m_event_result.py => waitingroom_event.py} | 4 +- ...oom_rule_result.py => waitingroom_rule.py} | 4 +- src/cloudflare/types/web3/__init__.py | 2 +- ...ostname.py => distributed_web_hostname.py} | 4 +- .../types/web3/hostname_list_response.py | 4 +- .../ipfs_universal_paths/__init__.py | 2 +- .../content_list_update_params.py | 4 +- .../content_lists/__init__.py | 8 +- ...tributed_web_config_content_list_entry.py} | 4 +- ...ed_web_config_content_list_entry_param.py} | 4 +- .../content_lists/entry_list_response.py | 4 +- ...=> distributed_web_config_content_list.py} | 4 +- src/cloudflare/types/workers/__init__.py | 4 +- .../types/workers/filter_list_response.py | 4 +- .../types/workers/route_list_response.py | 4 +- .../types/workers/scripts/__init__.py | 2 +- .../workers/scripts/binding_get_response.py | 4 +- ..._schemas_binding.py => workers_binding.py} | 4 +- .../{workers_filters.py => workers_filter.py} | 4 +- .../{workers_routes.py => workers_route.py} | 4 +- .../dispatch/namespaces/__init__.py | 4 +- ...workers_for_platforms_namespace_script.py} | 4 +- src/cloudflare/types/zero_trust/__init__.py | 8 +- .../types/zero_trust/access/__init__.py | 18 +- .../access/application_list_response.py | 4 +- .../access/applications/__init__.py | 4 +- .../access/applications/ca_list_response.py | 4 +- .../applications/policy_list_response.py | 4 +- .../{access_ca.py => zero_trust_ca.py} | 4 +- ...ess_policies.py => zero_trust_policies.py} | 4 +- .../access/bookmark_list_response.py | 4 +- .../access/certificate_list_response.py | 4 +- .../access/certificates/__init__.py | 4 +- .../certificates/setting_get_response.py | 4 +- .../certificates/setting_update_params.py | 4 +- .../certificates/setting_update_response.py | 4 +- ...ess_settings.py => zero_trust_settings.py} | 4 +- ..._param.py => zero_trust_settings_param.py} | 4 +- .../access/custom_page_list_response.py | 4 +- .../zero_trust/access/group_list_response.py | 4 +- .../types/zero_trust/access/logs/__init__.py | 2 +- .../logs/access_request_list_response.py | 4 +- ...uests.py => zero_trust_access_requests.py} | 4 +- .../access/service_token_list_response.py | 4 +- .../zero_trust/access/tag_list_response.py | 4 +- .../zero_trust/access/user_list_response.py | 4 +- .../types/zero_trust/access/users/__init__.py | 2 +- ...ess_identity.py => zero_trust_identity.py} | 4 +- .../{access_apps.py => zero_trust_apps.py} | 4 +- ...s_bookmarks.py => zero_trust_bookmarks.py} | 4 +- ...ificates.py => zero_trust_certificates.py} | 4 +- ...stom_page.py => zero_trust_custom_page.py} | 4 +- ...=> zero_trust_custom_page_without_html.py} | 4 +- ...{access_groups.py => zero_trust_groups.py} | 4 +- ...tokens.py => zero_trust_service_tokens.py} | 4 +- .../{access_tag.py => zero_trust_tag.py} | 4 +- .../{access_users.py => zero_trust_users.py} | 4 +- .../types/zero_trust/device_list_response.py | 4 +- .../types/zero_trust/devices/__init__.py | 16 +- ...networks.py => device_managed_networks.py} | 4 +- ...sture_rules.py => device_posture_rules.py} | 4 +- ...y.py => devices_device_settings_policy.py} | 12 +- .../devices/dex_test_delete_response.py | 4 +- .../devices/dex_test_list_response.py | 4 +- ...hemas_http.py => dex_test_schemas_http.py} | 4 +- .../devices/network_delete_response.py | 4 +- .../devices/network_list_response.py | 4 +- .../zero_trust/devices/policies/__init__.py | 14 +- ...k_domain.py => devices_fallback_domain.py} | 4 +- ...am.py => devices_fallback_domain_param.py} | 4 +- ...plit_tunnel.py => devices_split_tunnel.py} | 4 +- ...ude.py => devices_split_tunnel_include.py} | 4 +- ... => devices_split_tunnel_include_param.py} | 4 +- ...param.py => devices_split_tunnel_param.py} | 4 +- .../devices/policies/exclude_get_response.py | 4 +- .../devices/policies/exclude_list_response.py | 4 +- .../devices/policies/exclude_update_params.py | 4 +- .../policies/exclude_update_response.py | 4 +- .../policies/fallback_domain_get_response.py | 4 +- .../policies/fallback_domain_list_response.py | 4 +- .../policies/fallback_domain_update_params.py | 4 +- .../fallback_domain_update_response.py | 4 +- .../devices/policies/include_get_response.py | 4 +- .../devices/policies/include_list_response.py | 4 +- .../devices/policies/include_update_params.py | 4 +- .../policies/include_update_response.py | 4 +- .../devices/policy_delete_response.py | 4 +- .../devices/policy_list_response.py | 4 +- .../zero_trust/devices/posture/__init__.py | 4 +- ...ions.py => device_posture_integrations.py} | 4 +- .../posture/integration_list_response.py | 4 +- .../devices/posture_list_response.py | 4 +- ... => zero_trust_account_device_settings.py} | 4 +- .../types/zero_trust/seat_edit_response.py | 4 +- ...vices_devices.py => zero_trust_devices.py} | 4 +- ...rs.py => zero_trust_identity_providers.py} | 4 +- ...zations.py => zero_trust_organizations.py} | 4 +- .../{access_seats.py => zero_trust_seats.py} | 4 +- .../types/zones/setting_edit_params.py | 196 ++-- .../types/zones/setting_edit_response.py | 196 ++-- .../types/zones/setting_get_response.py | 196 ++-- .../types/zones/settings/__init__.py | 226 +++-- ...matic_platform_optimization_edit_params.py | 4 +- .../settings/h2_prioritization_edit_params.py | 4 +- .../settings/image_resizing_edit_params.py | 4 +- .../types/zones/settings/nel_edit_params.py | 4 +- .../settings/orange_to_orange_edit_params.py | 4 +- .../zones/settings/polish_edit_params.py | 4 +- .../proxy_read_timeout_edit_params.py | 4 +- .../settings/rocket_loader_edit_params.py | 4 +- .../settings/ssl_recommender_edit_params.py | 4 +- .../{zones_0rtt.py => zone_setting_0rtt.py} | 4 +- ...tt_param.py => zone_setting_0rtt_param.py} | 4 +- ..._ddos.py => zone_setting_advanced_ddos.py} | 4 +- ...py => zone_setting_advanced_ddos_param.py} | 4 +- ...nline.py => zone_setting_always_online.py} | 4 +- ...py => zone_setting_always_online_param.py} | 4 +- ...ps.py => zone_setting_always_use_https.py} | 4 +- ...=> zone_setting_always_use_https_param.py} | 4 +- ... zone_setting_automatic_https_rewrites.py} | 4 +- ...setting_automatic_https_rewrites_param.py} | 4 +- ...etting_automatic_platform_optimization.py} | 4 +- ..._automatic_platform_optimization_param.py} | 4 +- ...zones_brotli.py => zone_setting_brotli.py} | 4 +- ..._param.py => zone_setting_brotli_param.py} | 4 +- ...l.py => zone_setting_browser_cache_ttl.py} | 4 +- ...> zone_setting_browser_cache_ttl_param.py} | 4 +- ...check.py => zone_setting_browser_check.py} | 4 +- ...py => zone_setting_browser_check_param.py} | 4 +- ...buffering.py => zone_setting_buffering.py} | 4 +- ...ram.py => zone_setting_buffering_param.py} | 4 +- ...e_level.py => zone_setting_cache_level.py} | 4 +- ...m.py => zone_setting_cache_level_param.py} | 4 +- ...e_ttl.py => zone_setting_challenge_ttl.py} | 4 +- ...py => zone_setting_challenge_ttl_param.py} | 4 +- ...nes_ciphers.py => zone_setting_ciphers.py} | 4 +- ...param.py => zone_setting_ciphers_param.py} | 4 +- ...de.py => zone_setting_development_mode.py} | 4 +- ...=> zone_setting_development_mode_param.py} | 4 +- ...y_hints.py => zone_setting_early_hints.py} | 4 +- ...m.py => zone_setting_early_hints_param.py} | 4 +- ...n.py => zone_setting_email_obfuscation.py} | 4 +- ...> zone_setting_email_obfuscation_param.py} | 4 +- ...udflare_fonts.py => zone_setting_fonts.py} | 4 +- ...n.py => zone_setting_h2_prioritization.py} | 4 +- ...> zone_setting_h2_prioritization_param.py} | 4 +- ....py => zone_setting_hotlink_protection.py} | 4 +- ... zone_setting_hotlink_protection_param.py} | 4 +- .../{zones_http2.py => zone_setting_http2.py} | 4 +- ...2_param.py => zone_setting_http2_param.py} | 4 +- .../{zones_http3.py => zone_setting_http3.py} | 4 +- ...3_param.py => zone_setting_http3_param.py} | 4 +- ...zing.py => zone_setting_image_resizing.py} | 4 +- ...y => zone_setting_image_resizing_param.py} | 4 +- ...tion.py => zone_setting_ip_geolocation.py} | 4 +- ...y => zone_setting_ip_geolocation_param.py} | 4 +- .../{zones_ipv6.py => zone_setting_ipv6.py} | 4 +- ...v6_param.py => zone_setting_ipv6_param.py} | 4 +- ...ion.py => zone_setting_min_tls_version.py} | 4 +- ... => zone_setting_min_tls_version_param.py} | 4 +- ...zones_minify.py => zone_setting_minify.py} | 4 +- ..._param.py => zone_setting_minify_param.py} | 4 +- ...zones_mirage.py => zone_setting_mirage.py} | 4 +- ..._param.py => zone_setting_mirage_param.py} | 4 +- ...ect.py => zone_setting_mobile_redirect.py} | 4 +- ... => zone_setting_mobile_redirect_param.py} | 4 +- .../{zones_nel.py => zone_setting_nel.py} | 4 +- ...nel_param.py => zone_setting_nel_param.py} | 4 +- ... zone_setting_opportunistic_encryption.py} | 4 +- ...setting_opportunistic_encryption_param.py} | 4 +- ...py => zone_setting_opportunistic_onion.py} | 4 +- ...zone_setting_opportunistic_onion_param.py} | 4 +- ...ge.py => zone_setting_orange_to_orange.py} | 4 +- ...=> zone_setting_orange_to_orange_param.py} | 4 +- ...ne_setting_origin_error_page_pass_thru.py} | 4 +- ...ting_origin_error_page_pass_thru_param.py} | 4 +- ...zones_polish.py => zone_setting_polish.py} | 4 +- ..._param.py => zone_setting_polish_param.py} | 4 +- ...ad.py => zone_setting_prefetch_preload.py} | 4 +- ...=> zone_setting_prefetch_preload_param.py} | 4 +- ....py => zone_setting_proxy_read_timeout.py} | 4 +- ... zone_setting_proxy_read_timeout_param.py} | 4 +- ...do_ipv4.py => zone_setting_pseudo_ipv4.py} | 4 +- ...m.py => zone_setting_pseudo_ipv4_param.py} | 4 +- ...oader.py => zone_setting_rocket_loader.py} | 4 +- ...py => zone_setting_rocket_loader_param.py} | 4 +- ...der.py => zone_setting_security_header.py} | 4 +- ... => zone_setting_security_header_param.py} | 4 +- ...evel.py => zone_setting_security_level.py} | 4 +- ...y => zone_setting_security_level_param.py} | 4 +- ...py => zone_setting_server_side_exclude.py} | 4 +- ...zone_setting_server_side_exclude_param.py} | 4 +- ...ne_setting_sort_query_string_for_cache.py} | 4 +- ...ting_sort_query_string_for_cache_param.py} | 4 +- .../{zones_ssl.py => zone_setting_ssl.py} | 4 +- ...ssl_param.py => zone_setting_ssl_param.py} | 4 +- ...der.py => zone_setting_ssl_recommender.py} | 4 +- ... => zone_setting_ssl_recommender_param.py} | 4 +- ...nes_tls_1_3.py => zone_setting_tls_1_3.py} | 4 +- ...param.py => zone_setting_tls_1_3_param.py} | 4 +- ...uth.py => zone_setting_tls_client_auth.py} | 4 +- ... => zone_setting_tls_client_auth_param.py} | 4 +- ... => zone_setting_true_client_ip_header.py} | 4 +- ...ne_setting_true_client_ip_header_param.py} | 4 +- .../{zones_waf.py => zone_setting_waf.py} | 4 +- ...waf_param.py => zone_setting_waf_param.py} | 4 +- .../{zones_webp.py => zone_setting_webp.py} | 4 +- ...bp_param.py => zone_setting_webp_param.py} | 4 +- ...bsockets.py => zone_setting_websockets.py} | 4 +- ...am.py => zone_setting_websockets_param.py} | 4 +- .../{zones_page_rule.py => zones_pagerule.py} | 4 +- .../alerting/destinations/test_webhooks.py | 14 +- tests/api_resources/alerting/test_history.py | 18 +- tests/api_resources/alerting/test_policies.py | 14 +- .../test_hostname_associations.py | 34 +- .../dns/analytics/reports/test_bytimes.py | 18 +- .../dns/analytics/test_reports.py | 18 +- .../analytics/reports/test_bytimes.py | 18 +- .../dns/firewall/analytics/test_reports.py | 18 +- tests/api_resources/dns/test_firewall.py | 62 +- .../namespaces/test_objects.py | 18 +- .../api_resources/firewall/test_lockdowns.py | 54 +- tests/api_resources/firewall/test_rules.py | 58 +- .../firewall/waf/packages/test_groups.py | 18 +- .../firewall/waf/test_overrides.py | 54 +- .../healthchecks/test_previews.py | 30 +- tests/api_resources/images/test_v1.py | 54 +- .../load_balancers/test_previews.py | 14 +- tests/api_resources/logpush/test_edge.py | 18 +- tests/api_resources/logpush/test_jobs.py | 50 +- .../logs/control/cmb/test_config.py | 30 +- .../configs/test_full.py | 14 +- .../rules/test_advertisements.py | 14 +- .../magic_network_monitoring/test_configs.py | 62 +- .../magic_network_monitoring/test_rules.py | 62 +- .../hostnames/test_certificates.py | 38 +- .../origin_tls_client_auth/test_hostnames.py | 14 +- .../page_shield/test_policies.py | 46 +- .../api_resources/pagerules/test_settings.py | 14 +- .../ssl/universal/test_settings.py | 30 +- .../api_resources/stream/test_audio_tracks.py | 34 +- .../api_resources/test_client_certificates.py | 100 +- .../api_resources/test_custom_certificates.py | 50 +- .../api_resources/test_custom_nameservers.py | 18 +- tests/api_resources/test_dnssec.py | 30 +- tests/api_resources/test_filters.py | 54 +- tests/api_resources/test_healthchecks.py | 62 +- .../test_keyless_certificates.py | 46 +- tests/api_resources/test_mtls_certificates.py | 68 +- tests/api_resources/test_page_shield.py | 30 +- tests/api_resources/test_plans.py | 14 +- tests/api_resources/test_waiting_rooms.py | 62 +- .../user/firewall/test_access_rules.py | 50 +- .../user/load_balancers/test_preview.py | 14 +- .../api_resources/user/test_organizations.py | 18 +- .../waiting_rooms/events/test_details.py | 14 +- .../waiting_rooms/test_events.py | 62 +- .../content_lists/test_entries.py | 46 +- .../test_content_lists.py | 26 +- tests/api_resources/web3/test_hostnames.py | 46 +- tests/api_resources/workers/test_filters.py | 14 +- tests/api_resources/workers/test_routes.py | 30 +- .../dispatch/namespaces/test_scripts.py | 14 +- .../access/applications/test_policies.py | 50 +- .../zero_trust/access/test_applications.py | 274 +++--- .../zero_trust/access/test_bookmarks.py | 38 +- .../zero_trust/access/test_certificates.py | 50 +- .../zero_trust/access/test_custom_pages.py | 48 +- .../zero_trust/access/test_groups.py | 50 +- .../zero_trust/access/test_service_tokens.py | 46 +- .../zero_trust/access/test_tags.py | 38 +- .../access/users/test_last_seen_identity.py | 14 +- .../devices/posture/test_integrations.py | 46 +- .../zero_trust/devices/test_dex_tests.py | 46 +- .../zero_trust/devices/test_networks.py | 46 +- .../zero_trust/devices/test_policies.py | 46 +- .../zero_trust/devices/test_posture.py | 46 +- .../zero_trust/devices/test_settings.py | 30 +- .../zero_trust/test_identity_providers.py | 466 ++++----- .../zero_trust/test_organizations.py | 50 +- .../zones/settings/test_advanced_ddos.py | 14 +- .../zones/settings/test_always_online.py | 26 +- .../zones/settings/test_always_use_https.py | 26 +- .../settings/test_automatic_https_rewrites.py | 26 +- .../test_automatic_platform_optimization.py | 26 +- .../zones/settings/test_brotli.py | 26 +- .../zones/settings/test_browser_cache_ttl.py | 26 +- .../zones/settings/test_browser_check.py | 26 +- .../zones/settings/test_cache_level.py | 26 +- .../zones/settings/test_challenge_ttl.py | 26 +- .../zones/settings/test_ciphers.py | 26 +- .../zones/settings/test_development_mode.py | 26 +- .../zones/settings/test_early_hints.py | 26 +- .../zones/settings/test_email_obfuscation.py | 26 +- .../zones/settings/test_font_settings.py | 26 +- .../zones/settings/test_h2_prioritization.py | 30 +- .../zones/settings/test_hotlink_protection.py | 26 +- .../zones/settings/test_http2.py | 26 +- .../zones/settings/test_http3.py | 26 +- .../zones/settings/test_image_resizing.py | 30 +- .../zones/settings/test_ip_geolocation.py | 26 +- .../api_resources/zones/settings/test_ipv6.py | 26 +- .../zones/settings/test_min_tls_version.py | 26 +- .../zones/settings/test_minify.py | 30 +- .../zones/settings/test_mirage.py | 26 +- .../zones/settings/test_mobile_redirect.py | 30 +- .../api_resources/zones/settings/test_nel.py | 30 +- .../settings/test_opportunistic_encryption.py | 34 +- .../settings/test_opportunistic_onion.py | 26 +- .../zones/settings/test_orange_to_orange.py | 30 +- .../test_origin_error_page_pass_thru.py | 50 +- .../zones/settings/test_polish.py | 30 +- .../zones/settings/test_prefetch_preload.py | 26 +- .../zones/settings/test_proxy_read_timeout.py | 30 +- .../zones/settings/test_pseudo_ipv4.py | 26 +- .../zones/settings/test_response_buffering.py | 26 +- .../zones/settings/test_rocket_loader.py | 30 +- .../zones/settings/test_security_headers.py | 30 +- .../zones/settings/test_security_level.py | 26 +- .../settings/test_server_side_excludes.py | 26 +- .../test_sort_query_string_for_cache.py | 50 +- .../api_resources/zones/settings/test_ssl.py | 26 +- .../zones/settings/test_ssl_recommender.py | 30 +- .../zones/settings/test_tls_1_3.py | 26 +- .../zones/settings/test_tls_client_auth.py | 26 +- .../settings/test_true_client_ip_header.py | 26 +- .../api_resources/zones/settings/test_waf.py | 26 +- .../api_resources/zones/settings/test_webp.py | 26 +- .../zones/settings/test_websocket.py | 26 +- .../zones/settings/test_zero_rtt.py | 26 +- 591 files changed, 5281 insertions(+), 5464 deletions(-) rename src/cloudflare/types/accounts/{iam_schemas_role.py => role.py} (85%) rename src/cloudflare/types/alerting/{aaa_history.py => alerting_history.py} (94%) rename src/cloudflare/types/alerting/{aaa_policies.py => alerting_policies.py} (98%) rename src/cloudflare/types/alerting/destinations/{aaa_pagerduty.py => alerting_pagerduty.py} (80%) rename src/cloudflare/types/alerting/destinations/{aaa_webhooks.py => alerting_webhooks.py} (95%) rename src/cloudflare/types/{bill_subs_api_available_rate_plan.py => available_rate_plan.py} (92%) rename src/cloudflare/types/certificate_authorities/{tls_certificates_and_hostnames_hostname_association.py => tls_hostname_association.py} (78%) rename src/cloudflare/types/{tls_certificates_and_hostnames_client_certificate.py => client_certificate.py} (93%) rename src/cloudflare/types/{tls_certificates_and_hostnames_custom_certificate.py => custom_certificate.py} (90%) rename src/cloudflare/types/{dns_custom_nameservers_custom_ns.py => custom_nameserver.py} (88%) rename src/cloudflare/types/dns/analytics/{dns_dns_analytics_api_report.py => dns_analytics_report.py} (95%) rename src/cloudflare/types/dns/analytics/reports/{dns_dns_analytics_api_report_bytime.py => dns_analytics_report_by_time.py} (95%) rename src/cloudflare/types/dns/{dns_firewall_dns_firewall.py => dns_firewall.py} (94%) rename src/cloudflare/types/{dnssec_dnssec.py => dnssec.py} (97%) rename src/cloudflare/types/durable_objects/{workers_namespace.py => durable_object_namespace.py} (82%) rename src/cloudflare/types/durable_objects/namespaces/{workers_object.py => durable_object.py} (86%) rename src/cloudflare/types/firewall/{legacy_jhs_filter_rule.py => firewall_filter_rule.py} (87%) rename src/cloudflare/types/firewall/{legacy_jhs_zonelockdown.py => firewall_zone_lockdown.py} (96%) rename src/cloudflare/types/firewall/waf/packages/{waf_managed_rules_schemas_group.py => waf_managed_rules_group.py} (92%) rename src/cloudflare/types/firewall/waf/{legacy_jhs_override.py => waf_override.py} (96%) rename src/cloudflare/types/{legacy_jhs_filter.py => firewall_filter.py} (91%) rename src/cloudflare/types/{healthchecks_healthchecks.py => healthcheck.py} (97%) rename src/cloudflare/types/images/{images_image.py => image.py} (94%) rename src/cloudflare/types/intel/{intel_sinkholes_sinkhole_item.py => intel_sinkhole_item.py} (90%) rename src/cloudflare/types/{tls_certificates_and_hostnames_base.py => keyless_certificate_hostname.py} (92%) rename src/cloudflare/types/logpush/datasets/{logpush_logpush_job.py => logpush_job.py} (98%) rename src/cloudflare/types/logpush/{logpush_instant_logs_job.py => instant_logpush_job.py} (90%) rename src/cloudflare/types/logs/control/cmb/{logcontrol_cmb_config.py => cmb_config.py} (76%) rename src/cloudflare/types/magic_network_monitoring/{magic_visibility_mnm_config.py => magic_network_monitoring_config.py} (81%) rename src/cloudflare/types/magic_network_monitoring/{magic_visibility_mnm_rule.py => magic_network_monitoring_rule.py} (94%) rename src/cloudflare/types/magic_network_monitoring/rules/{magic_visibility_mnm_rule_advertisable.py => magic_network_monitoring_rule_advertisable.py} (79%) rename src/cloudflare/types/{tls_certificates_and_hostnames_components_schemas_certificate_object.py => mtls_certificate.py} (86%) rename src/cloudflare/types/{tls_certificates_and_hostnames_certificate_object_post.py => mtls_certificate_update.py} (89%) rename src/cloudflare/types/mtls_certificates/{tls_certificates_and_hostnames_association_object.py => mtls_certificate_asssociation.py} (72%) rename src/cloudflare/types/origin_tls_client_auth/hostnames/{tls_certificates_and_hostnames_schemas_certificate_object.py => origin_tls_client_certificate.py} (89%) rename src/cloudflare/types/origin_tls_client_auth/{tls_certificates_and_hostnames_hostname_certid_object.py => origin_tls_client_certificate_id.py} (94%) rename src/cloudflare/types/page_shield/{page_shield_pageshield_policy.py => page_shield_policy.py} (89%) rename src/cloudflare/types/{page_shield_get_zone_settings.py => page_shield_setting.py} (88%) rename src/cloudflare/types/{page_shield_update_zone_settings.py => page_shield_update_response.py} (88%) rename src/cloudflare/types/pagerules/{zones_settings.py => zone_pagerule_settings.py} (61%) rename src/cloudflare/types/request_tracers/{request_tracer_trace.py => request_trace.py} (78%) rename src/cloudflare/types/secondary_dns/{secondary_dns_schemas_force_result.py => secondary_dns_disable_transfer.py} (52%) delete mode 100644 src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer_result.py create mode 100644 src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer.py delete mode 100644 src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer_result.py rename src/cloudflare/types/secondary_dns/{secondary_dns_force_result.py => secondary_dns_force.py} (56%) rename src/cloudflare/types/ssl/{tls_certificates_and_hostnames_verification.py => tls_verification_setting.py} (91%) rename src/cloudflare/types/ssl/universal/{tls_certificates_and_hostnames_universal.py => universal_ssl_settings.py} (93%) rename src/cloudflare/types/stream/{stream_additional_audio.py => stream_audio.py} (89%) rename src/cloudflare/types/user/billing/{bill_subs_api_billing_history.py => billing_history.py} (88%) rename src/cloudflare/types/user/firewall/{legacy_jhs_rule.py => firewall_rule.py} (98%) create mode 100644 src/cloudflare/types/user/load_balancers/load_balancing_preview.py delete mode 100644 src/cloudflare/types/user/load_balancers/load_balancing_preview_result.py rename src/cloudflare/types/user/{iam_organization.py => organization.py} (91%) rename src/cloudflare/types/user/tokens/{iam_value.py => token_value.py} (67%) rename src/cloudflare/types/{waitingroom_waitingroom.py => waiting_room.py} (99%) rename src/cloudflare/types/waiting_rooms/events/{waitingroom_event_details_result.py => waitingroom_event_details.py} (95%) rename src/cloudflare/types/waiting_rooms/{waitingroom_event_result.py => waitingroom_event.py} (97%) rename src/cloudflare/types/waiting_rooms/{waitingroom_rule_result.py => waitingroom_rule.py} (91%) rename src/cloudflare/types/web3/{dweb_config_web3_hostname.py => distributed_web_hostname.py} (91%) rename src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/{dweb_config_content_list_entry.py => distributed_web_config_content_list_entry.py} (86%) rename src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/{dweb_config_content_list_entry_param.py => distributed_web_config_content_list_entry_param.py} (76%) rename src/cloudflare/types/web3/hostnames/ipfs_universal_paths/{dweb_config_content_list_details.py => distributed_web_config_content_list.py} (74%) rename src/cloudflare/types/workers/scripts/{workers_schemas_binding.py => workers_binding.py} (78%) rename src/cloudflare/types/workers/{workers_filters.py => workers_filter.py} (75%) rename src/cloudflare/types/workers/{workers_routes.py => workers_route.py} (81%) rename src/cloudflare/types/workers_for_platforms/dispatch/namespaces/{workers_namespace_script.py => workers_for_platforms_namespace_script.py} (84%) rename src/cloudflare/types/zero_trust/access/applications/{access_ca.py => zero_trust_ca.py} (88%) rename src/cloudflare/types/zero_trust/access/applications/{access_policies.py => zero_trust_policies.py} (99%) rename src/cloudflare/types/zero_trust/access/certificates/{access_settings.py => zero_trust_settings.py} (90%) rename src/cloudflare/types/zero_trust/access/certificates/{access_settings_param.py => zero_trust_settings_param.py} (88%) rename src/cloudflare/types/zero_trust/access/logs/{access_access_requests.py => zero_trust_access_requests.py} (92%) rename src/cloudflare/types/zero_trust/access/users/{access_identity.py => zero_trust_identity.py} (92%) rename src/cloudflare/types/zero_trust/access/{access_apps.py => zero_trust_apps.py} (99%) rename src/cloudflare/types/zero_trust/access/{access_bookmarks.py => zero_trust_bookmarks.py} (91%) rename src/cloudflare/types/zero_trust/access/{access_certificates.py => zero_trust_certificates.py} (90%) rename src/cloudflare/types/zero_trust/access/{access_custom_page.py => zero_trust_custom_page.py} (89%) rename src/cloudflare/types/zero_trust/access/{access_custom_page_without_html.py => zero_trust_custom_page_without_html.py} (85%) rename src/cloudflare/types/zero_trust/access/{access_groups.py => zero_trust_groups.py} (99%) rename src/cloudflare/types/zero_trust/access/{access_service_tokens.py => zero_trust_service_tokens.py} (91%) rename src/cloudflare/types/zero_trust/access/{access_tag.py => zero_trust_tag.py} (87%) rename src/cloudflare/types/zero_trust/access/{access_users.py => zero_trust_users.py} (94%) rename src/cloudflare/types/zero_trust/devices/{teams_devices_device_managed_networks.py => device_managed_networks.py} (90%) rename src/cloudflare/types/zero_trust/devices/{teams_devices_device_posture_rules.py => device_posture_rules.py} (99%) rename src/cloudflare/types/zero_trust/devices/{teams_devices_device_settings_policy.py => devices_device_settings_policy.py} (87%) rename src/cloudflare/types/zero_trust/devices/{teams_devices_device_dex_test_schemas_http.py => dex_test_schemas_http.py} (87%) rename src/cloudflare/types/zero_trust/devices/policies/{teams_devices_fallback_domain.py => devices_fallback_domain.py} (84%) rename src/cloudflare/types/zero_trust/devices/policies/{teams_devices_fallback_domain_param.py => devices_fallback_domain_param.py} (81%) rename src/cloudflare/types/zero_trust/devices/policies/{teams_devices_split_tunnel.py => devices_split_tunnel.py} (87%) rename src/cloudflare/types/zero_trust/devices/policies/{teams_devices_split_tunnel_include.py => devices_split_tunnel_include.py} (85%) rename src/cloudflare/types/zero_trust/devices/policies/{teams_devices_split_tunnel_include_param.py => devices_split_tunnel_include_param.py} (82%) rename src/cloudflare/types/zero_trust/devices/policies/{teams_devices_split_tunnel_param.py => devices_split_tunnel_param.py} (84%) rename src/cloudflare/types/zero_trust/devices/posture/{teams_devices_device_posture_integrations.py => device_posture_integrations.py} (90%) rename src/cloudflare/types/zero_trust/devices/{teams_devices_zero_trust_account_device_settings.py => zero_trust_account_device_settings.py} (83%) rename src/cloudflare/types/zero_trust/{teams_devices_devices.py => zero_trust_devices.py} (96%) rename src/cloudflare/types/zero_trust/{access_identity_providers.py => zero_trust_identity_providers.py} (99%) rename src/cloudflare/types/zero_trust/{access_organizations.py => zero_trust_organizations.py} (96%) rename src/cloudflare/types/zero_trust/{access_seats.py => zero_trust_seats.py} (88%) rename src/cloudflare/types/zones/settings/{zones_0rtt.py => zone_setting_0rtt.py} (90%) rename src/cloudflare/types/zones/settings/{zones_0rtt_param.py => zone_setting_0rtt_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_advanced_ddos.py => zone_setting_advanced_ddos.py} (88%) rename src/cloudflare/types/zones/settings/{zones_advanced_ddos_param.py => zone_setting_advanced_ddos_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_always_online.py => zone_setting_always_online.py} (88%) rename src/cloudflare/types/zones/settings/{zones_always_online_param.py => zone_setting_always_online_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_always_use_https.py => zone_setting_always_use_https.py} (88%) rename src/cloudflare/types/zones/settings/{zones_always_use_https_param.py => zone_setting_always_use_https_param.py} (76%) rename src/cloudflare/types/zones/settings/{zones_automatic_https_rewrites.py => zone_setting_automatic_https_rewrites.py} (86%) rename src/cloudflare/types/zones/settings/{zones_automatic_https_rewrites_param.py => zone_setting_automatic_https_rewrites_param.py} (74%) rename src/cloudflare/types/zones/settings/{zones_automatic_platform_optimization.py => zone_setting_automatic_platform_optimization.py} (89%) rename src/cloudflare/types/zones/settings/{zones_automatic_platform_optimization_param.py => zone_setting_automatic_platform_optimization_param.py} (88%) rename src/cloudflare/types/zones/settings/{zones_brotli.py => zone_setting_brotli.py} (90%) rename src/cloudflare/types/zones/settings/{zones_brotli_param.py => zone_setting_brotli_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_browser_cache_ttl.py => zone_setting_browser_cache_ttl.py} (92%) rename src/cloudflare/types/zones/settings/{zones_browser_cache_ttl_param.py => zone_setting_browser_cache_ttl_param.py} (89%) rename src/cloudflare/types/zones/settings/{zones_browser_check.py => zone_setting_browser_check.py} (88%) rename src/cloudflare/types/zones/settings/{zones_browser_check_param.py => zone_setting_browser_check_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_buffering.py => zone_setting_buffering.py} (89%) rename src/cloudflare/types/zones/settings/{zones_buffering_param.py => zone_setting_buffering_param.py} (78%) rename src/cloudflare/types/zones/settings/{zones_cache_level.py => zone_setting_cache_level.py} (89%) rename src/cloudflare/types/zones/settings/{zones_cache_level_param.py => zone_setting_cache_level_param.py} (78%) rename src/cloudflare/types/zones/settings/{zones_challenge_ttl.py => zone_setting_challenge_ttl.py} (89%) rename src/cloudflare/types/zones/settings/{zones_challenge_ttl_param.py => zone_setting_challenge_ttl_param.py} (81%) rename src/cloudflare/types/zones/settings/{zones_ciphers.py => zone_setting_ciphers.py} (89%) rename src/cloudflare/types/zones/settings/{zones_ciphers_param.py => zone_setting_ciphers_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_development_mode.py => zone_setting_development_mode.py} (91%) rename src/cloudflare/types/zones/settings/{zones_development_mode_param.py => zone_setting_development_mode_param.py} (76%) rename src/cloudflare/types/zones/settings/{zones_early_hints.py => zone_setting_early_hints.py} (89%) rename src/cloudflare/types/zones/settings/{zones_early_hints_param.py => zone_setting_early_hints_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_email_obfuscation.py => zone_setting_email_obfuscation.py} (87%) rename src/cloudflare/types/zones/settings/{zones_email_obfuscation_param.py => zone_setting_email_obfuscation_param.py} (76%) rename src/cloudflare/types/zones/settings/{speed_cloudflare_fonts.py => zone_setting_fonts.py} (89%) rename src/cloudflare/types/zones/settings/{zones_h2_prioritization.py => zone_setting_h2_prioritization.py} (87%) rename src/cloudflare/types/zones/settings/{zones_h2_prioritization_param.py => zone_setting_h2_prioritization_param.py} (76%) rename src/cloudflare/types/zones/settings/{zones_hotlink_protection.py => zone_setting_hotlink_protection.py} (87%) rename src/cloudflare/types/zones/settings/{zones_hotlink_protection_param.py => zone_setting_hotlink_protection_param.py} (75%) rename src/cloudflare/types/zones/settings/{zones_http2.py => zone_setting_http2.py} (90%) rename src/cloudflare/types/zones/settings/{zones_http2_param.py => zone_setting_http2_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_http3.py => zone_setting_http3.py} (90%) rename src/cloudflare/types/zones/settings/{zones_http3_param.py => zone_setting_http3_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_image_resizing.py => zone_setting_image_resizing.py} (88%) rename src/cloudflare/types/zones/settings/{zones_image_resizing_param.py => zone_setting_image_resizing_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_ip_geolocation.py => zone_setting_ip_geolocation.py} (88%) rename src/cloudflare/types/zones/settings/{zones_ip_geolocation_param.py => zone_setting_ip_geolocation_param.py} (76%) rename src/cloudflare/types/zones/settings/{zones_ipv6.py => zone_setting_ipv6.py} (90%) rename src/cloudflare/types/zones/settings/{zones_ipv6_param.py => zone_setting_ipv6_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_min_tls_version.py => zone_setting_min_tls_version.py} (88%) rename src/cloudflare/types/zones/settings/{zones_min_tls_version_param.py => zone_setting_min_tls_version_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_minify.py => zone_setting_minify.py} (92%) rename src/cloudflare/types/zones/settings/{zones_minify_param.py => zone_setting_minify_param.py} (86%) rename src/cloudflare/types/zones/settings/{zones_mirage.py => zone_setting_mirage.py} (90%) rename src/cloudflare/types/zones/settings/{zones_mirage_param.py => zone_setting_mirage_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_mobile_redirect.py => zone_setting_mobile_redirect.py} (92%) rename src/cloudflare/types/zones/settings/{zones_mobile_redirect_param.py => zone_setting_mobile_redirect_param.py} (88%) rename src/cloudflare/types/zones/settings/{zones_nel.py => zone_setting_nel.py} (90%) rename src/cloudflare/types/zones/settings/{zones_nel_param.py => zone_setting_nel_param.py} (80%) rename src/cloudflare/types/zones/settings/{zones_opportunistic_encryption.py => zone_setting_opportunistic_encryption.py} (86%) rename src/cloudflare/types/zones/settings/{zones_opportunistic_encryption_param.py => zone_setting_opportunistic_encryption_param.py} (74%) rename src/cloudflare/types/zones/settings/{zones_opportunistic_onion.py => zone_setting_opportunistic_onion.py} (87%) rename src/cloudflare/types/zones/settings/{zones_opportunistic_onion_param.py => zone_setting_opportunistic_onion_param.py} (75%) rename src/cloudflare/types/zones/settings/{zones_orange_to_orange.py => zone_setting_orange_to_orange.py} (88%) rename src/cloudflare/types/zones/settings/{zones_orange_to_orange_param.py => zone_setting_orange_to_orange_param.py} (76%) rename src/cloudflare/types/zones/settings/{zones_origin_error_page_pass_thru.py => zone_setting_origin_error_page_pass_thru.py} (86%) rename src/cloudflare/types/zones/settings/{zones_origin_error_page_pass_thru_param.py => zone_setting_origin_error_page_pass_thru_param.py} (74%) rename src/cloudflare/types/zones/settings/{zones_polish.py => zone_setting_polish.py} (90%) rename src/cloudflare/types/zones/settings/{zones_polish_param.py => zone_setting_polish_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_prefetch_preload.py => zone_setting_prefetch_preload.py} (88%) rename src/cloudflare/types/zones/settings/{zones_prefetch_preload_param.py => zone_setting_prefetch_preload_param.py} (76%) rename src/cloudflare/types/zones/settings/{zones_proxy_read_timeout.py => zone_setting_proxy_read_timeout.py} (87%) rename src/cloudflare/types/zones/settings/{zones_proxy_read_timeout_param.py => zone_setting_proxy_read_timeout_param.py} (75%) rename src/cloudflare/types/zones/settings/{zones_pseudo_ipv4.py => zone_setting_pseudo_ipv4.py} (89%) rename src/cloudflare/types/zones/settings/{zones_pseudo_ipv4_param.py => zone_setting_pseudo_ipv4_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_rocket_loader.py => zone_setting_rocket_loader.py} (88%) rename src/cloudflare/types/zones/settings/{zones_rocket_loader_param.py => zone_setting_rocket_loader_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_security_header.py => zone_setting_security_header.py} (90%) rename src/cloudflare/types/zones/settings/{zones_security_header_param.py => zone_setting_security_header_param.py} (85%) rename src/cloudflare/types/zones/settings/{zones_security_level.py => zone_setting_security_level.py} (89%) rename src/cloudflare/types/zones/settings/{zones_security_level_param.py => zone_setting_security_level_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_server_side_exclude.py => zone_setting_server_side_exclude.py} (87%) rename src/cloudflare/types/zones/settings/{zones_server_side_exclude_param.py => zone_setting_server_side_exclude_param.py} (75%) rename src/cloudflare/types/zones/settings/{zones_sort_query_string_for_cache.py => zone_setting_sort_query_string_for_cache.py} (86%) rename src/cloudflare/types/zones/settings/{zones_sort_query_string_for_cache_param.py => zone_setting_sort_query_string_for_cache_param.py} (74%) rename src/cloudflare/types/zones/settings/{zones_ssl.py => zone_setting_ssl.py} (91%) rename src/cloudflare/types/zones/settings/{zones_ssl_param.py => zone_setting_ssl_param.py} (81%) rename src/cloudflare/types/zones/settings/{zones_ssl_recommender.py => zone_setting_ssl_recommender.py} (81%) rename src/cloudflare/types/zones/settings/{zones_ssl_recommender_param.py => zone_setting_ssl_recommender_param.py} (75%) rename src/cloudflare/types/zones/settings/{zones_tls_1_3.py => zone_setting_tls_1_3.py} (90%) rename src/cloudflare/types/zones/settings/{zones_tls_1_3_param.py => zone_setting_tls_1_3_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_tls_client_auth.py => zone_setting_tls_client_auth.py} (88%) rename src/cloudflare/types/zones/settings/{zones_tls_client_auth_param.py => zone_setting_tls_client_auth_param.py} (77%) rename src/cloudflare/types/zones/settings/{zones_true_client_ip_header.py => zone_setting_true_client_ip_header.py} (87%) rename src/cloudflare/types/zones/settings/{zones_true_client_ip_header_param.py => zone_setting_true_client_ip_header_param.py} (75%) rename src/cloudflare/types/zones/settings/{zones_waf.py => zone_setting_waf.py} (90%) rename src/cloudflare/types/zones/settings/{zones_waf_param.py => zone_setting_waf_param.py} (80%) rename src/cloudflare/types/zones/settings/{zones_webp.py => zone_setting_webp.py} (90%) rename src/cloudflare/types/zones/settings/{zones_webp_param.py => zone_setting_webp_param.py} (79%) rename src/cloudflare/types/zones/settings/{zones_websockets.py => zone_setting_websockets.py} (89%) rename src/cloudflare/types/zones/settings/{zones_websockets_param.py => zone_setting_websockets_param.py} (77%) rename src/cloudflare/types/{zones_page_rule.py => zones_pagerule.py} (96%) diff --git a/api.md b/api.md index 772bbed26a2..9c60a9851ae 100644 --- a/api.md +++ b/api.md @@ -44,7 +44,7 @@ Methods: Types: ```python -from cloudflare.types.accounts import IamSchemasRole, RoleListResponse, RoleGetResponse +from cloudflare.types.accounts import Role, RoleListResponse, RoleGetResponse ``` Methods: @@ -137,7 +137,7 @@ Methods: Types: ```python -from cloudflare.types.user.billing import BillSubsAPIBillingHistory, HistoryGetResponse +from cloudflare.types.user.billing import BillingHistory, HistoryGetResponse ``` Methods: @@ -163,15 +163,15 @@ Methods: Types: ```python -from cloudflare.types.user.firewall import LegacyJhsRule, AccessRuleDeleteResponse +from cloudflare.types.user.firewall import FirewallRule, AccessRuleDeleteResponse ``` Methods: -- client.user.firewall.access_rules.create(\*\*params) -> Optional -- client.user.firewall.access_rules.list(\*\*params) -> SyncV4PagePaginationArray[LegacyJhsRule] +- client.user.firewall.access_rules.create(\*\*params) -> Optional +- client.user.firewall.access_rules.list(\*\*params) -> SyncV4PagePaginationArray[FirewallRule] - client.user.firewall.access_rules.delete(identifier) -> Optional -- client.user.firewall.access_rules.edit(identifier, \*\*params) -> Optional +- client.user.firewall.access_rules.edit(identifier, \*\*params) -> Optional ## Invites @@ -179,7 +179,7 @@ Types: ```python from cloudflare.types.user import ( - IamSchemasInvite, + UserInvite, InviteListResponse, InviteEditResponse, InviteGetResponse, @@ -251,12 +251,12 @@ Methods: Types: ```python -from cloudflare.types.user.load_balancers import LoadBalancingPreviewResult +from cloudflare.types.user.load_balancers import LoadBalancingPreview ``` Methods: -- client.user.load_balancers.preview.get(preview_id) -> LoadBalancingPreviewResult +- client.user.load_balancers.preview.get(preview_id) -> LoadBalancingPreview ### Analytics @@ -277,16 +277,12 @@ Methods: Types: ```python -from cloudflare.types.user import ( - IamOrganization, - OrganizationDeleteResponse, - OrganizationGetResponse, -) +from cloudflare.types.user import Organization, OrganizationDeleteResponse, OrganizationGetResponse ``` Methods: -- client.user.organizations.list(\*\*params) -> SyncV4PagePaginationArray[IamOrganization] +- client.user.organizations.list(\*\*params) -> SyncV4PagePaginationArray[Organization] - client.user.organizations.delete(organization_id) -> OrganizationDeleteResponse - client.user.organizations.get(organization_id) -> OrganizationGetResponse @@ -296,7 +292,7 @@ Types: ```python from cloudflare.types.user import ( - BillSubsAPISubscription, + Subscription, SubscriptionUpdateResponse, SubscriptionDeleteResponse, SubscriptionEditResponse, @@ -352,12 +348,12 @@ Methods: Types: ```python -from cloudflare.types.user.tokens import IamValue +from cloudflare.types.user.tokens import TokenValue ``` Methods: -- client.user.tokens.value.update(token_id, \*\*params) -> str +- client.user.tokens.value.update(token_id, \*\*params) -> str # Zones @@ -418,402 +414,402 @@ Methods: Types: ```python -from cloudflare.types.zones.settings import Zones0rtt +from cloudflare.types.zones.settings import ZoneSetting0rtt ``` Methods: -- client.zones.settings.zero_rtt.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.zero_rtt.get(\*, zone_id) -> Optional +- client.zones.settings.zero_rtt.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.zero_rtt.get(\*, zone_id) -> Optional ### AdvancedDDOS Types: ```python -from cloudflare.types.zones.settings import ZonesAdvancedDDOS +from cloudflare.types.zones.settings import ZoneSettingAdvancedDDOS ``` Methods: -- client.zones.settings.advanced_ddos.get(\*, zone_id) -> Optional +- client.zones.settings.advanced_ddos.get(\*, zone_id) -> Optional ### AlwaysOnline Types: ```python -from cloudflare.types.zones.settings import ZonesAlwaysOnline +from cloudflare.types.zones.settings import ZoneSettingAlwaysOnline ``` Methods: -- client.zones.settings.always_online.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.always_online.get(\*, zone_id) -> Optional +- client.zones.settings.always_online.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.always_online.get(\*, zone_id) -> Optional ### AlwaysUseHTTPS Types: ```python -from cloudflare.types.zones.settings import ZonesAlwaysUseHTTPS +from cloudflare.types.zones.settings import ZoneSettingAlwaysUseHTTPS ``` Methods: -- client.zones.settings.always_use_https.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.always_use_https.get(\*, zone_id) -> Optional +- client.zones.settings.always_use_https.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.always_use_https.get(\*, zone_id) -> Optional ### AutomaticHTTPSRewrites Types: ```python -from cloudflare.types.zones.settings import ZonesAutomaticHTTPSRewrites +from cloudflare.types.zones.settings import ZoneSettingAutomaticHTTPSRewrites ``` Methods: -- client.zones.settings.automatic_https_rewrites.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.automatic_https_rewrites.get(\*, zone_id) -> Optional +- client.zones.settings.automatic_https_rewrites.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.automatic_https_rewrites.get(\*, zone_id) -> Optional ### AutomaticPlatformOptimization Types: ```python -from cloudflare.types.zones.settings import ZonesAutomaticPlatformOptimization +from cloudflare.types.zones.settings import ZoneSettingAutomaticPlatformOptimization ``` Methods: -- client.zones.settings.automatic_platform_optimization.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.automatic_platform_optimization.get(\*, zone_id) -> Optional +- client.zones.settings.automatic_platform_optimization.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.automatic_platform_optimization.get(\*, zone_id) -> Optional ### Brotli Types: ```python -from cloudflare.types.zones.settings import ZonesBrotli +from cloudflare.types.zones.settings import ZoneSettingBrotli ``` Methods: -- client.zones.settings.brotli.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.brotli.get(\*, zone_id) -> Optional +- client.zones.settings.brotli.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.brotli.get(\*, zone_id) -> Optional ### BrowserCacheTTL Types: ```python -from cloudflare.types.zones.settings import ZonesBrowserCacheTTL +from cloudflare.types.zones.settings import ZoneSettingBrowserCacheTTL ``` Methods: -- client.zones.settings.browser_cache_ttl.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.browser_cache_ttl.get(\*, zone_id) -> Optional +- client.zones.settings.browser_cache_ttl.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.browser_cache_ttl.get(\*, zone_id) -> Optional ### BrowserCheck Types: ```python -from cloudflare.types.zones.settings import ZonesBrowserCheck +from cloudflare.types.zones.settings import ZoneSettingBrowserCheck ``` Methods: -- client.zones.settings.browser_check.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.browser_check.get(\*, zone_id) -> Optional +- client.zones.settings.browser_check.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.browser_check.get(\*, zone_id) -> Optional ### CacheLevel Types: ```python -from cloudflare.types.zones.settings import ZonesCacheLevel +from cloudflare.types.zones.settings import ZoneSettingCacheLevel ``` Methods: -- client.zones.settings.cache_level.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.cache_level.get(\*, zone_id) -> Optional +- client.zones.settings.cache_level.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.cache_level.get(\*, zone_id) -> Optional ### ChallengeTTL Types: ```python -from cloudflare.types.zones.settings import ZonesChallengeTTL +from cloudflare.types.zones.settings import ZoneSettingChallengeTTL ``` Methods: -- client.zones.settings.challenge_ttl.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.challenge_ttl.get(\*, zone_id) -> Optional +- client.zones.settings.challenge_ttl.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.challenge_ttl.get(\*, zone_id) -> Optional ### Ciphers Types: ```python -from cloudflare.types.zones.settings import ZonesCiphers +from cloudflare.types.zones.settings import ZoneSettingCiphers ``` Methods: -- client.zones.settings.ciphers.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ciphers.get(\*, zone_id) -> Optional +- client.zones.settings.ciphers.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.ciphers.get(\*, zone_id) -> Optional ### DevelopmentMode Types: ```python -from cloudflare.types.zones.settings import ZonesDevelopmentMode +from cloudflare.types.zones.settings import ZoneSettingDevelopmentMode ``` Methods: -- client.zones.settings.development_mode.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.development_mode.get(\*, zone_id) -> Optional +- client.zones.settings.development_mode.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.development_mode.get(\*, zone_id) -> Optional ### EarlyHints Types: ```python -from cloudflare.types.zones.settings import ZonesEarlyHints +from cloudflare.types.zones.settings import ZoneSettingEarlyHints ``` Methods: -- client.zones.settings.early_hints.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.early_hints.get(\*, zone_id) -> Optional +- client.zones.settings.early_hints.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.early_hints.get(\*, zone_id) -> Optional ### EmailObfuscation Types: ```python -from cloudflare.types.zones.settings import ZonesEmailObfuscation +from cloudflare.types.zones.settings import ZoneSettingEmailObfuscation ``` Methods: -- client.zones.settings.email_obfuscation.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.email_obfuscation.get(\*, zone_id) -> Optional +- client.zones.settings.email_obfuscation.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.email_obfuscation.get(\*, zone_id) -> Optional ### H2Prioritization Types: ```python -from cloudflare.types.zones.settings import ZonesH2Prioritization +from cloudflare.types.zones.settings import ZoneSettingH2Prioritization ``` Methods: -- client.zones.settings.h2_prioritization.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.h2_prioritization.get(\*, zone_id) -> Optional +- client.zones.settings.h2_prioritization.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.h2_prioritization.get(\*, zone_id) -> Optional ### HotlinkProtection Types: ```python -from cloudflare.types.zones.settings import ZonesHotlinkProtection +from cloudflare.types.zones.settings import ZoneSettingHotlinkProtection ``` Methods: -- client.zones.settings.hotlink_protection.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.hotlink_protection.get(\*, zone_id) -> Optional +- client.zones.settings.hotlink_protection.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.hotlink_protection.get(\*, zone_id) -> Optional ### HTTP2 Types: ```python -from cloudflare.types.zones.settings import ZonesHTTP2 +from cloudflare.types.zones.settings import ZoneSettingHTTP2 ``` Methods: -- client.zones.settings.http2.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.http2.get(\*, zone_id) -> Optional +- client.zones.settings.http2.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.http2.get(\*, zone_id) -> Optional ### HTTP3 Types: ```python -from cloudflare.types.zones.settings import ZonesHTTP3 +from cloudflare.types.zones.settings import ZoneSettingHTTP3 ``` Methods: -- client.zones.settings.http3.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.http3.get(\*, zone_id) -> Optional +- client.zones.settings.http3.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.http3.get(\*, zone_id) -> Optional ### ImageResizing Types: ```python -from cloudflare.types.zones.settings import ZonesImageResizing +from cloudflare.types.zones.settings import ZoneSettingImageResizing ``` Methods: -- client.zones.settings.image_resizing.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.image_resizing.get(\*, zone_id) -> Optional +- client.zones.settings.image_resizing.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.image_resizing.get(\*, zone_id) -> Optional ### IPGeolocation Types: ```python -from cloudflare.types.zones.settings import ZonesIPGeolocation +from cloudflare.types.zones.settings import ZoneSettingIPGeolocation ``` Methods: -- client.zones.settings.ip_geolocation.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ip_geolocation.get(\*, zone_id) -> Optional +- client.zones.settings.ip_geolocation.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.ip_geolocation.get(\*, zone_id) -> Optional ### IPV6 Types: ```python -from cloudflare.types.zones.settings import ZonesIPV6 +from cloudflare.types.zones.settings import ZoneSettingIPV6 ``` Methods: -- client.zones.settings.ipv6.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ipv6.get(\*, zone_id) -> Optional +- client.zones.settings.ipv6.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.ipv6.get(\*, zone_id) -> Optional ### MinTLSVersion Types: ```python -from cloudflare.types.zones.settings import ZonesMinTLSVersion +from cloudflare.types.zones.settings import ZoneSettingMinTLSVersion ``` Methods: -- client.zones.settings.min_tls_version.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.min_tls_version.get(\*, zone_id) -> Optional +- client.zones.settings.min_tls_version.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.min_tls_version.get(\*, zone_id) -> Optional ### Minify Types: ```python -from cloudflare.types.zones.settings import ZonesMinify +from cloudflare.types.zones.settings import ZoneSettingMinify ``` Methods: -- client.zones.settings.minify.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.minify.get(\*, zone_id) -> Optional +- client.zones.settings.minify.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.minify.get(\*, zone_id) -> Optional ### Mirage Types: ```python -from cloudflare.types.zones.settings import ZonesMirage +from cloudflare.types.zones.settings import ZoneSettingMirage ``` Methods: -- client.zones.settings.mirage.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.mirage.get(\*, zone_id) -> Optional +- client.zones.settings.mirage.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.mirage.get(\*, zone_id) -> Optional ### MobileRedirect Types: ```python -from cloudflare.types.zones.settings import ZonesMobileRedirect +from cloudflare.types.zones.settings import ZoneSettingMobileRedirect ``` Methods: -- client.zones.settings.mobile_redirect.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.mobile_redirect.get(\*, zone_id) -> Optional +- client.zones.settings.mobile_redirect.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.mobile_redirect.get(\*, zone_id) -> Optional ### NEL Types: ```python -from cloudflare.types.zones.settings import ZonesNEL +from cloudflare.types.zones.settings import ZoneSettingNEL ``` Methods: -- client.zones.settings.nel.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.nel.get(\*, zone_id) -> Optional +- client.zones.settings.nel.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.nel.get(\*, zone_id) -> Optional ### OpportunisticEncryption Types: ```python -from cloudflare.types.zones.settings import ZonesOpportunisticEncryption +from cloudflare.types.zones.settings import ZoneSettingOpportunisticEncryption ``` Methods: -- client.zones.settings.opportunistic_encryption.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.opportunistic_encryption.get(\*, zone_id) -> Optional +- client.zones.settings.opportunistic_encryption.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.opportunistic_encryption.get(\*, zone_id) -> Optional ### OpportunisticOnion Types: ```python -from cloudflare.types.zones.settings import ZonesOpportunisticOnion +from cloudflare.types.zones.settings import ZoneSettingOpportunisticOnion ``` Methods: -- client.zones.settings.opportunistic_onion.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.opportunistic_onion.get(\*, zone_id) -> Optional +- client.zones.settings.opportunistic_onion.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.opportunistic_onion.get(\*, zone_id) -> Optional ### OrangeToOrange Types: ```python -from cloudflare.types.zones.settings import ZonesOrangeToOrange +from cloudflare.types.zones.settings import ZoneSettingOrangeToOrange ``` Methods: -- client.zones.settings.orange_to_orange.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.orange_to_orange.get(\*, zone_id) -> Optional +- client.zones.settings.orange_to_orange.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.orange_to_orange.get(\*, zone_id) -> Optional ### OriginErrorPagePassThru Types: ```python -from cloudflare.types.zones.settings import ZonesOriginErrorPagePassThru +from cloudflare.types.zones.settings import ZoneSettingOriginErrorPagePassThru ``` Methods: -- client.zones.settings.origin_error_page_pass_thru.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.origin_error_page_pass_thru.get(\*, zone_id) -> Optional +- client.zones.settings.origin_error_page_pass_thru.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.origin_error_page_pass_thru.get(\*, zone_id) -> Optional ### OriginMaxHTTPVersion @@ -836,247 +832,247 @@ Methods: Types: ```python -from cloudflare.types.zones.settings import ZonesPolish +from cloudflare.types.zones.settings import ZoneSettingPolish ``` Methods: -- client.zones.settings.polish.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.polish.get(\*, zone_id) -> Optional +- client.zones.settings.polish.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.polish.get(\*, zone_id) -> Optional ### PrefetchPreload Types: ```python -from cloudflare.types.zones.settings import ZonesPrefetchPreload +from cloudflare.types.zones.settings import ZoneSettingPrefetchPreload ``` Methods: -- client.zones.settings.prefetch_preload.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.prefetch_preload.get(\*, zone_id) -> Optional +- client.zones.settings.prefetch_preload.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.prefetch_preload.get(\*, zone_id) -> Optional ### ProxyReadTimeout Types: ```python -from cloudflare.types.zones.settings import ZonesProxyReadTimeout +from cloudflare.types.zones.settings import ZoneSettingProxyReadTimeout ``` Methods: -- client.zones.settings.proxy_read_timeout.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.proxy_read_timeout.get(\*, zone_id) -> Optional +- client.zones.settings.proxy_read_timeout.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.proxy_read_timeout.get(\*, zone_id) -> Optional ### PseudoIPV4 Types: ```python -from cloudflare.types.zones.settings import ZonesPseudoIPV4 +from cloudflare.types.zones.settings import ZoneSettingPseudoIPV4 ``` Methods: -- client.zones.settings.pseudo_ipv4.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.pseudo_ipv4.get(\*, zone_id) -> Optional +- client.zones.settings.pseudo_ipv4.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.pseudo_ipv4.get(\*, zone_id) -> Optional ### ResponseBuffering Types: ```python -from cloudflare.types.zones.settings import ZonesBuffering +from cloudflare.types.zones.settings import ZoneSettingBuffering ``` Methods: -- client.zones.settings.response_buffering.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.response_buffering.get(\*, zone_id) -> Optional +- client.zones.settings.response_buffering.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.response_buffering.get(\*, zone_id) -> Optional ### RocketLoader Types: ```python -from cloudflare.types.zones.settings import ZonesRocketLoader +from cloudflare.types.zones.settings import ZoneSettingRocketLoader ``` Methods: -- client.zones.settings.rocket_loader.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.rocket_loader.get(\*, zone_id) -> Optional +- client.zones.settings.rocket_loader.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.rocket_loader.get(\*, zone_id) -> Optional ### SecurityHeaders Types: ```python -from cloudflare.types.zones.settings import ZonesSecurityHeader +from cloudflare.types.zones.settings import ZoneSettingSecurityHeader ``` Methods: -- client.zones.settings.security_headers.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.security_headers.get(\*, zone_id) -> Optional +- client.zones.settings.security_headers.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.security_headers.get(\*, zone_id) -> Optional ### SecurityLevel Types: ```python -from cloudflare.types.zones.settings import ZonesSecurityLevel +from cloudflare.types.zones.settings import ZoneSettingSecurityLevel ``` Methods: -- client.zones.settings.security_level.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.security_level.get(\*, zone_id) -> Optional +- client.zones.settings.security_level.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.security_level.get(\*, zone_id) -> Optional ### ServerSideExcludes Types: ```python -from cloudflare.types.zones.settings import ZonesServerSideExclude +from cloudflare.types.zones.settings import ZoneSettingServerSideExclude ``` Methods: -- client.zones.settings.server_side_excludes.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.server_side_excludes.get(\*, zone_id) -> Optional +- client.zones.settings.server_side_excludes.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.server_side_excludes.get(\*, zone_id) -> Optional ### SortQueryStringForCache Types: ```python -from cloudflare.types.zones.settings import ZonesSortQueryStringForCache +from cloudflare.types.zones.settings import ZoneSettingSortQueryStringForCache ``` Methods: -- client.zones.settings.sort_query_string_for_cache.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.sort_query_string_for_cache.get(\*, zone_id) -> Optional +- client.zones.settings.sort_query_string_for_cache.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.sort_query_string_for_cache.get(\*, zone_id) -> Optional ### SSL Types: ```python -from cloudflare.types.zones.settings import ZonesSSL +from cloudflare.types.zones.settings import ZoneSettingSSL ``` Methods: -- client.zones.settings.ssl.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ssl.get(\*, zone_id) -> Optional +- client.zones.settings.ssl.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.ssl.get(\*, zone_id) -> Optional ### SSLRecommender Types: ```python -from cloudflare.types.zones.settings import ZonesSSLRecommender +from cloudflare.types.zones.settings import ZoneSettingSSLRecommender ``` Methods: -- client.zones.settings.ssl_recommender.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.ssl_recommender.get(\*, zone_id) -> Optional +- client.zones.settings.ssl_recommender.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.ssl_recommender.get(\*, zone_id) -> Optional ### TLS1_3 Types: ```python -from cloudflare.types.zones.settings import ZonesTLS1_3 +from cloudflare.types.zones.settings import ZoneSettingTLS1_3 ``` Methods: -- client.zones.settings.tls_1_3.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.tls_1_3.get(\*, zone_id) -> Optional +- client.zones.settings.tls_1_3.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.tls_1_3.get(\*, zone_id) -> Optional ### TLSClientAuth Types: ```python -from cloudflare.types.zones.settings import ZonesTLSClientAuth +from cloudflare.types.zones.settings import ZoneSettingTLSClientAuth ``` Methods: -- client.zones.settings.tls_client_auth.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.tls_client_auth.get(\*, zone_id) -> Optional +- client.zones.settings.tls_client_auth.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.tls_client_auth.get(\*, zone_id) -> Optional ### TrueClientIPHeader Types: ```python -from cloudflare.types.zones.settings import ZonesTrueClientIPHeader +from cloudflare.types.zones.settings import ZoneSettingTrueClientIPHeader ``` Methods: -- client.zones.settings.true_client_ip_header.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.true_client_ip_header.get(\*, zone_id) -> Optional +- client.zones.settings.true_client_ip_header.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.true_client_ip_header.get(\*, zone_id) -> Optional ### WAF Types: ```python -from cloudflare.types.zones.settings import ZonesWAF +from cloudflare.types.zones.settings import ZoneSettingWAF ``` Methods: -- client.zones.settings.waf.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.waf.get(\*, zone_id) -> Optional +- client.zones.settings.waf.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.waf.get(\*, zone_id) -> Optional ### WebP Types: ```python -from cloudflare.types.zones.settings import ZonesWebP +from cloudflare.types.zones.settings import ZoneSettingWebP ``` Methods: -- client.zones.settings.webp.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.webp.get(\*, zone_id) -> Optional +- client.zones.settings.webp.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.webp.get(\*, zone_id) -> Optional ### Websocket Types: ```python -from cloudflare.types.zones.settings import ZonesWebsockets +from cloudflare.types.zones.settings import ZoneSettingWebsockets ``` Methods: -- client.zones.settings.websocket.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.websocket.get(\*, zone_id) -> Optional +- client.zones.settings.websocket.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.websocket.get(\*, zone_id) -> Optional ### FontSettings Types: ```python -from cloudflare.types.zones.settings import SpeedCloudflareFonts +from cloudflare.types.zones.settings import ZoneSettingFonts ``` Methods: -- client.zones.settings.font_settings.edit(\*, zone_id, \*\*params) -> Optional -- client.zones.settings.font_settings.get(\*, zone_id) -> Optional +- client.zones.settings.font_settings.edit(\*, zone_id, \*\*params) -> Optional +- client.zones.settings.font_settings.get(\*, zone_id) -> Optional ## CustomNameservers @@ -1243,7 +1239,7 @@ Methods: Methods: -- client.load_balancers.previews.get(preview_id, \*, account_id) -> LoadBalancingPreviewResult +- client.load_balancers.previews.get(preview_id, \*, account_id) -> LoadBalancingPreview ## Regions @@ -1424,13 +1420,13 @@ Methods: Types: ```python -from cloudflare.types.ssl.universal import TLSCertificatesAndHostnamesUniversal +from cloudflare.types.ssl.universal import UniversalSSLSettings ``` Methods: -- client.ssl.universal.settings.edit(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesUniversal -- client.ssl.universal.settings.get(\*, zone_id) -> TLSCertificatesAndHostnamesUniversal +- client.ssl.universal.settings.edit(\*, zone_id, \*\*params) -> UniversalSSLSettings +- client.ssl.universal.settings.get(\*, zone_id) -> UniversalSSLSettings ## Verification @@ -1438,7 +1434,7 @@ Types: ```python from cloudflare.types.ssl import ( - TLSCertificatesAndHostnamesVerification, + TLSVerificationSetting, VerificationEditResponse, VerificationGetResponse, ) @@ -1519,20 +1515,20 @@ Methods: Types: ```python -from cloudflare.types import BillSubsAPIAvailableRatePlan, PlanListResponse +from cloudflare.types import AvailableRatePlan, PlanListResponse ``` Methods: - client.plans.list(zone_identifier) -> Optional -- client.plans.get(plan_identifier, \*, zone_identifier) -> BillSubsAPIAvailableRatePlan +- client.plans.get(plan_identifier, \*, zone_identifier) -> AvailableRatePlan # RatePlans Types: ```python -from cloudflare.types import BillSubsRatePlan, RatePlanGetResponse +from cloudflare.types import RatePlan, RatePlanGetResponse ``` Methods: @@ -1546,29 +1542,29 @@ Methods: Types: ```python -from cloudflare.types.certificate_authorities import TLSCertificatesAndHostnamesHostnameAssociation +from cloudflare.types.certificate_authorities import TLSHostnameAssociation ``` Methods: -- client.certificate_authorities.hostname_associations.update(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesHostnameAssociation -- client.certificate_authorities.hostname_associations.get(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesHostnameAssociation +- client.certificate_authorities.hostname_associations.update(\*, zone_id, \*\*params) -> TLSHostnameAssociation +- client.certificate_authorities.hostname_associations.get(\*, zone_id, \*\*params) -> TLSHostnameAssociation # ClientCertificates Types: ```python -from cloudflare.types import TLSCertificatesAndHostnamesClientCertificate +from cloudflare.types import ClientCertificate ``` Methods: -- client.client_certificates.create(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesClientCertificate -- client.client_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate] -- client.client_certificates.delete(client_certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesClientCertificate -- client.client_certificates.edit(client_certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesClientCertificate -- client.client_certificates.get(client_certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesClientCertificate +- client.client_certificates.create(\*, zone_id, \*\*params) -> ClientCertificate +- client.client_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[ClientCertificate] +- client.client_certificates.delete(client_certificate_id, \*, zone_id) -> ClientCertificate +- client.client_certificates.edit(client_certificate_id, \*, zone_id) -> ClientCertificate +- client.client_certificates.get(client_certificate_id, \*, zone_id) -> ClientCertificate # CustomCertificates @@ -1576,7 +1572,7 @@ Types: ```python from cloudflare.types import ( - TLSCertificatesAndHostnamesCustomCertificate, + CustomCertificate, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, CustomCertificateEditResponse, @@ -1587,7 +1583,7 @@ from cloudflare.types import ( Methods: - client.custom_certificates.create(\*, zone_id, \*\*params) -> CustomCertificateCreateResponse -- client.custom_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate] +- client.custom_certificates.list(\*, zone_id, \*\*params) -> SyncV4PagePaginationArray[CustomCertificate] - client.custom_certificates.delete(custom_certificate_id, \*, zone_id) -> CustomCertificateDeleteResponse - client.custom_certificates.edit(custom_certificate_id, \*, zone_id, \*\*params) -> CustomCertificateEditResponse - client.custom_certificates.get(custom_certificate_id, \*, zone_id) -> CustomCertificateGetResponse @@ -1610,7 +1606,7 @@ Types: ```python from cloudflare.types import ( - TLSCertificatesAndHostnamesCustomHostname, + CustomHostname, CustomHostnameCreateResponse, CustomHostnameListResponse, CustomHostnameDeleteResponse, @@ -1651,7 +1647,7 @@ Types: ```python from cloudflare.types import ( - DNSCustomNameserversCustomNS, + CustomNameserver, CustomNameserverDeleteResponse, CustomNameserverAvailabiltyResponse, CustomNameserverGetResponse, @@ -1661,7 +1657,7 @@ from cloudflare.types import ( Methods: -- client.custom_nameservers.create(\*, account_id, \*\*params) -> DNSCustomNameserversCustomNS +- client.custom_nameservers.create(\*, account_id, \*\*params) -> CustomNameserver - client.custom_nameservers.delete(custom_ns_id, \*, account_id) -> Optional - client.custom_nameservers.availabilty(\*, account_id) -> Optional - client.custom_nameservers.get(\*, account_id) -> Optional @@ -1702,40 +1698,40 @@ Methods: Types: ```python -from cloudflare.types.dns.analytics import DNSDNSAnalyticsAPIReport +from cloudflare.types.dns.analytics import DNSAnalyticsReport ``` Methods: -- client.dns.analytics.reports.get(\*, zone_id, \*\*params) -> DNSDNSAnalyticsAPIReport +- client.dns.analytics.reports.get(\*, zone_id, \*\*params) -> DNSAnalyticsReport #### Bytimes Types: ```python -from cloudflare.types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime +from cloudflare.types.dns.analytics.reports import DNSAnalyticsReportByTime ``` Methods: -- client.dns.analytics.reports.bytimes.get(\*, zone_id, \*\*params) -> DNSDNSAnalyticsAPIReportBytime +- client.dns.analytics.reports.bytimes.get(\*, zone_id, \*\*params) -> DNSAnalyticsReportByTime ## Firewall Types: ```python -from cloudflare.types.dns import DNSFirewallDNSFirewall, FirewallDeleteResponse +from cloudflare.types.dns import DNSFirewall, FirewallDeleteResponse ``` Methods: -- client.dns.firewall.create(\*, account_id, \*\*params) -> DNSFirewallDNSFirewall -- client.dns.firewall.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DNSFirewallDNSFirewall] +- client.dns.firewall.create(\*, account_id, \*\*params) -> DNSFirewall +- client.dns.firewall.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[DNSFirewall] - client.dns.firewall.delete(dns_firewall_id, \*, account_id) -> FirewallDeleteResponse -- client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> DNSFirewallDNSFirewall -- client.dns.firewall.get(dns_firewall_id, \*, account_id) -> DNSFirewallDNSFirewall +- client.dns.firewall.edit(dns_firewall_id, \*, account_id, \*\*params) -> DNSFirewall +- client.dns.firewall.get(dns_firewall_id, \*, account_id) -> DNSFirewall ### Analytics @@ -1743,27 +1739,27 @@ Methods: Methods: -- client.dns.firewall.analytics.reports.get(dns_firewall_id, \*, account_id, \*\*params) -> DNSDNSAnalyticsAPIReport +- client.dns.firewall.analytics.reports.get(dns_firewall_id, \*, account_id, \*\*params) -> DNSAnalyticsReport ##### Bytimes Methods: -- client.dns.firewall.analytics.reports.bytimes.get(dns_firewall_id, \*, account_id, \*\*params) -> DNSDNSAnalyticsAPIReportBytime +- client.dns.firewall.analytics.reports.bytimes.get(dns_firewall_id, \*, account_id, \*\*params) -> DNSAnalyticsReportByTime -# DNSSEC +# DNSSECResource Types: ```python -from cloudflare.types import DNSSECDNSSEC, DNSSECDeleteResponse +from cloudflare.types import DNSSEC, DNSSECDeleteResponse ``` Methods: - client.dnssec.delete(\*, zone_id) -> DNSSECDeleteResponse -- client.dnssec.edit(\*, zone_id, \*\*params) -> DNSSECDNSSEC -- client.dnssec.get(\*, zone_id) -> DNSSECDNSSEC +- client.dnssec.edit(\*, zone_id, \*\*params) -> DNSSEC +- client.dnssec.get(\*, zone_id) -> DNSSEC # EmailRouting @@ -1858,16 +1854,16 @@ Methods: Types: ```python -from cloudflare.types import LegacyJhsFilter, FilterCreateResponse +from cloudflare.types import FirewallFilter, FilterCreateResponse ``` Methods: - client.filters.create(zone_identifier, \*\*params) -> Optional -- client.filters.update(id, \*, zone_identifier, \*\*params) -> Optional -- client.filters.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[LegacyJhsFilter] -- client.filters.delete(id, \*, zone_identifier) -> Optional -- client.filters.get(id, \*, zone_identifier) -> Optional +- client.filters.update(id, \*, zone_identifier, \*\*params) -> Optional +- client.filters.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallFilter] +- client.filters.delete(id, \*, zone_identifier) -> Optional +- client.filters.get(id, \*, zone_identifier) -> Optional # Firewall @@ -1876,33 +1872,33 @@ Methods: Types: ```python -from cloudflare.types.firewall import LegacyJhsZonelockdown, LockdownDeleteResponse +from cloudflare.types.firewall import FirewallZoneLockdown, LockdownDeleteResponse ``` Methods: -- client.firewall.lockdowns.create(zone_identifier, \*\*params) -> Optional -- client.firewall.lockdowns.update(id, \*, zone_identifier, \*\*params) -> Optional -- client.firewall.lockdowns.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[LegacyJhsZonelockdown] +- client.firewall.lockdowns.create(zone_identifier, \*\*params) -> Optional +- client.firewall.lockdowns.update(id, \*, zone_identifier, \*\*params) -> Optional +- client.firewall.lockdowns.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallZoneLockdown] - client.firewall.lockdowns.delete(id, \*, zone_identifier) -> Optional -- client.firewall.lockdowns.get(id, \*, zone_identifier) -> Optional +- client.firewall.lockdowns.get(id, \*, zone_identifier) -> Optional ## Rules Types: ```python -from cloudflare.types.firewall import LegacyJhsFilterRule, RuleCreateResponse, RuleEditResponse +from cloudflare.types.firewall import FirewallFilterRule, RuleCreateResponse, RuleEditResponse ``` Methods: - client.firewall.rules.create(zone_identifier, \*\*params) -> Optional -- client.firewall.rules.update(id, \*, zone_identifier, \*\*params) -> Optional -- client.firewall.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[LegacyJhsFilterRule] -- client.firewall.rules.delete(id, \*, zone_identifier, \*\*params) -> Optional +- client.firewall.rules.update(id, \*, zone_identifier, \*\*params) -> Optional +- client.firewall.rules.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[FirewallFilterRule] +- client.firewall.rules.delete(id, \*, zone_identifier, \*\*params) -> Optional - client.firewall.rules.edit(id, \*, zone_identifier, \*\*params) -> Optional -- client.firewall.rules.get(id, \*, zone_identifier) -> Optional +- client.firewall.rules.get(id, \*, zone_identifier) -> Optional ## AccessRules @@ -1932,7 +1928,7 @@ Types: ```python from cloudflare.types.firewall import ( - LegacyJhsUARules, + FirewallUserAgentRule, UARuleCreateResponse, UARuleUpdateResponse, UARuleListResponse, @@ -1956,16 +1952,16 @@ Methods: Types: ```python -from cloudflare.types.firewall.waf import LegacyJhsOverride, OverrideDeleteResponse +from cloudflare.types.firewall.waf import WAFOverride, OverrideDeleteResponse ``` Methods: -- client.firewall.waf.overrides.create(zone_identifier, \*\*params) -> Optional -- client.firewall.waf.overrides.update(id, \*, zone_identifier, \*\*params) -> Optional -- client.firewall.waf.overrides.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[LegacyJhsOverride] +- client.firewall.waf.overrides.create(zone_identifier, \*\*params) -> Optional +- client.firewall.waf.overrides.update(id, \*, zone_identifier, \*\*params) -> Optional +- client.firewall.waf.overrides.list(zone_identifier, \*\*params) -> SyncV4PagePaginationArray[WAFOverride] - client.firewall.waf.overrides.delete(id, \*, zone_identifier) -> Optional -- client.firewall.waf.overrides.get(id, \*, zone_identifier) -> Optional +- client.firewall.waf.overrides.get(id, \*, zone_identifier) -> Optional ### Packages @@ -1986,7 +1982,7 @@ Types: ```python from cloudflare.types.firewall.waf.packages import ( - WAFManagedRulesSchemasGroup, + WAFManagedRulesGroup, GroupEditResponse, GroupGetResponse, ) @@ -1994,7 +1990,7 @@ from cloudflare.types.firewall.waf.packages import ( Methods: -- client.firewall.waf.packages.groups.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup] +- client.firewall.waf.packages.groups.list(package_id, \*, zone_id, \*\*params) -> SyncV4PagePaginationArray[WAFManagedRulesGroup] - client.firewall.waf.packages.groups.edit(group_id, \*, zone_id, package_id, \*\*params) -> GroupEditResponse - client.firewall.waf.packages.groups.get(group_id, \*, zone_id, package_id) -> GroupGetResponse @@ -2021,21 +2017,17 @@ Methods: Types: ```python -from cloudflare.types import ( - HealthchecksHealthchecks, - HealthcheckListResponse, - HealthcheckDeleteResponse, -) +from cloudflare.types import Healthcheck, HealthcheckListResponse, HealthcheckDeleteResponse ``` Methods: -- client.healthchecks.create(\*, zone_id, \*\*params) -> HealthchecksHealthchecks -- client.healthchecks.update(healthcheck_id, \*, zone_id, \*\*params) -> HealthchecksHealthchecks +- client.healthchecks.create(\*, zone_id, \*\*params) -> Healthcheck +- client.healthchecks.update(healthcheck_id, \*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.list(\*, zone_id) -> Optional - client.healthchecks.delete(healthcheck_id, \*, zone_id) -> HealthcheckDeleteResponse -- client.healthchecks.edit(healthcheck_id, \*, zone_id, \*\*params) -> HealthchecksHealthchecks -- client.healthchecks.get(healthcheck_id, \*, zone_id) -> HealthchecksHealthchecks +- client.healthchecks.edit(healthcheck_id, \*, zone_id, \*\*params) -> Healthcheck +- client.healthchecks.get(healthcheck_id, \*, zone_id) -> Healthcheck ## Previews @@ -2047,9 +2039,9 @@ from cloudflare.types.healthchecks import PreviewDeleteResponse Methods: -- client.healthchecks.previews.create(\*, zone_id, \*\*params) -> HealthchecksHealthchecks +- client.healthchecks.previews.create(\*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.previews.delete(healthcheck_id, \*, zone_id) -> PreviewDeleteResponse -- client.healthchecks.previews.get(healthcheck_id, \*, zone_id) -> HealthchecksHealthchecks +- client.healthchecks.previews.get(healthcheck_id, \*, zone_id) -> Healthcheck # KeylessCertificates @@ -2057,8 +2049,8 @@ Types: ```python from cloudflare.types import ( - TLSCertificatesAndHostnamesBase, - TLSCertificatesAndHostnamesKeylessCertificate, + KeylessCertificate, + KeylessCertificateHostname, KeylessCertificateListResponse, KeylessCertificateDeleteResponse, ) @@ -2066,11 +2058,11 @@ from cloudflare.types import ( Methods: -- client.keyless_certificates.create(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesBase +- client.keyless_certificates.create(\*, zone_id, \*\*params) -> KeylessCertificateHostname - client.keyless_certificates.list(\*, zone_id) -> Optional - client.keyless_certificates.delete(keyless_certificate_id, \*, zone_id) -> KeylessCertificateDeleteResponse -- client.keyless_certificates.edit(keyless_certificate_id, \*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesBase -- client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesBase +- client.keyless_certificates.edit(keyless_certificate_id, \*, zone_id, \*\*params) -> KeylessCertificateHostname +- client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> KeylessCertificateHostname # Logpush @@ -2093,7 +2085,7 @@ Methods: Types: ```python -from cloudflare.types.logpush.datasets import LogpushLogpushJob, JobGetResponse +from cloudflare.types.logpush.datasets import LogpushJob, JobGetResponse ``` Methods: @@ -2105,12 +2097,12 @@ Methods: Types: ```python -from cloudflare.types.logpush import LogpushInstantLogsJob, EdgeGetResponse +from cloudflare.types.logpush import InstantLogpushJob, EdgeGetResponse ``` Methods: -- client.logpush.edge.create(\*, zone_id, \*\*params) -> Optional +- client.logpush.edge.create(\*, zone_id, \*\*params) -> Optional - client.logpush.edge.get(\*, zone_id) -> EdgeGetResponse ## Jobs @@ -2123,11 +2115,11 @@ from cloudflare.types.logpush import JobListResponse, JobDeleteResponse Methods: -- client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional -- client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional +- client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional +- client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional - client.logpush.jobs.list(\*, account_id, zone_id) -> JobListResponse - client.logpush.jobs.delete(job_id, \*, account_id, zone_id) -> Optional -- client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional +- client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional ## Ownership @@ -2181,14 +2173,14 @@ Methods: Types: ```python -from cloudflare.types.logs.control.cmb import LogcontrolCmbConfig, ConfigDeleteResponse +from cloudflare.types.logs.control.cmb import CmbConfig, ConfigDeleteResponse ``` Methods: -- client.logs.control.cmb.config.create(\*, account_id, \*\*params) -> Optional +- client.logs.control.cmb.config.create(\*, account_id, \*\*params) -> Optional - client.logs.control.cmb.config.delete(\*, account_id) -> Optional -- client.logs.control.cmb.config.get(\*, account_id) -> Optional +- client.logs.control.cmb.config.get(\*, account_id) -> Optional ## RayID @@ -2232,7 +2224,7 @@ Types: ```python from cloudflare.types import ( - TLSCertificatesAndHostnamesZoneAuthenticatedOriginPull, + OriginTLSClientCertificateZoneAuthenticatedOriginPull, OriginTLSClientAuthCreateResponse, OriginTLSClientAuthListResponse, OriginTLSClientAuthDeleteResponse, @@ -2253,8 +2245,8 @@ Types: ```python from cloudflare.types.origin_tls_client_auth import ( - TLSCertificatesAndHostnamesHostnameAuthenticatedOriginPull, - TLSCertificatesAndHostnamesHostnameCertidObject, + OriginTLSClientCertificateAuthenticatedOriginPull, + OriginTLSClientCertificateID, HostnameUpdateResponse, ) ``` @@ -2262,7 +2254,7 @@ from cloudflare.types.origin_tls_client_auth import ( Methods: - client.origin_tls_client_auth.hostnames.update(\*, zone_id, \*\*params) -> Optional -- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> TLSCertificatesAndHostnamesHostnameCertidObject +- client.origin_tls_client_auth.hostnames.get(hostname, \*, zone_id) -> OriginTLSClientCertificateID ### Certificates @@ -2270,17 +2262,17 @@ Types: ```python from cloudflare.types.origin_tls_client_auth.hostnames import ( - TLSCertificatesAndHostnamesSchemasCertificateObject, + OriginTLSClientCertificate, CertificateListResponse, ) ``` Methods: -- client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> TLSCertificatesAndHostnamesSchemasCertificateObject +- client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> OriginTLSClientCertificate - client.origin_tls_client_auth.hostnames.certificates.list(\*, zone_id) -> Optional -- client.origin_tls_client_auth.hostnames.certificates.delete(certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesSchemasCertificateObject -- client.origin_tls_client_auth.hostnames.certificates.get(certificate_id, \*, zone_id) -> TLSCertificatesAndHostnamesSchemasCertificateObject +- client.origin_tls_client_auth.hostnames.certificates.delete(certificate_id, \*, zone_id) -> OriginTLSClientCertificate +- client.origin_tls_client_auth.hostnames.certificates.get(certificate_id, \*, zone_id) -> OriginTLSClientCertificate ## Settings @@ -2301,7 +2293,7 @@ Types: ```python from cloudflare.types import ( - ZonesPageRule, + ZonesPagerule, PageruleCreateResponse, PageruleUpdateResponse, PageruleListResponse, @@ -2325,12 +2317,12 @@ Methods: Types: ```python -from cloudflare.types.pagerules import ZonesSettings +from cloudflare.types.pagerules import ZonePageruleSettings ``` Methods: -- client.pagerules.settings.list(\*, zone_id) -> ZonesSettings +- client.pagerules.settings.list(\*, zone_id) -> ZonePageruleSettings # RateLimits @@ -2338,7 +2330,7 @@ Types: ```python from cloudflare.types import ( - LegacyJhsRateLimits, + RateLimit, RateLimitCreateResponse, RateLimitListResponse, RateLimitDeleteResponse, @@ -2362,12 +2354,12 @@ Methods: Types: ```python -from cloudflare.types.secondary_dns import SecondaryDNSForceResult +from cloudflare.types.secondary_dns import SecondaryDNSForce ``` Methods: -- client.secondary_dns.force_axfr.create(\*, zone_id) -> str +- client.secondary_dns.force_axfr.create(\*, zone_id) -> str ## Incoming @@ -2395,9 +2387,9 @@ Types: ```python from cloudflare.types.secondary_dns import ( - SecondaryDNSDisableTransferResult, - SecondaryDNSEnableTransferResult, - SecondaryDNSSchemasForceResult, + SecondaryDNSDisableTransfer, + SecondaryDNSEnableTransfer, + SecondaryDNSForce, OutgoingCreateResponse, OutgoingUpdateResponse, OutgoingDeleteResponse, @@ -2410,16 +2402,16 @@ Methods: - client.secondary_dns.outgoing.create(\*, zone_id, \*\*params) -> OutgoingCreateResponse - client.secondary_dns.outgoing.update(\*, zone_id, \*\*params) -> OutgoingUpdateResponse - client.secondary_dns.outgoing.delete(\*, zone_id) -> OutgoingDeleteResponse -- client.secondary_dns.outgoing.disable(\*, zone_id) -> str -- client.secondary_dns.outgoing.enable(\*, zone_id) -> str -- client.secondary_dns.outgoing.force_notify(\*, zone_id) -> str +- client.secondary_dns.outgoing.disable(\*, zone_id) -> str +- client.secondary_dns.outgoing.enable(\*, zone_id) -> str +- client.secondary_dns.outgoing.force_notify(\*, zone_id) -> str - client.secondary_dns.outgoing.get(\*, zone_id) -> OutgoingGetResponse ### Status Methods: -- client.secondary_dns.outgoing.status.get(\*, zone_id) -> str +- client.secondary_dns.outgoing.status.get(\*, zone_id) -> str ## ACLs @@ -2474,21 +2466,17 @@ Methods: Types: ```python -from cloudflare.types import ( - WaitingroomWaitingroom, - WaitingRoomListResponse, - WaitingRoomDeleteResponse, -) +from cloudflare.types import WaitingRoom, WaitingRoomListResponse, WaitingRoomDeleteResponse ``` Methods: -- client.waiting_rooms.create(zone_identifier, \*\*params) -> WaitingroomWaitingroom -- client.waiting_rooms.update(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomWaitingroom +- client.waiting_rooms.create(zone_identifier, \*\*params) -> WaitingRoom +- client.waiting_rooms.update(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingRoom - client.waiting_rooms.list(zone_identifier) -> Optional - client.waiting_rooms.delete(waiting_room_id, \*, zone_identifier) -> WaitingRoomDeleteResponse -- client.waiting_rooms.edit(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomWaitingroom -- client.waiting_rooms.get(waiting_room_id, \*, zone_identifier) -> WaitingroomWaitingroom +- client.waiting_rooms.edit(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingRoom +- client.waiting_rooms.get(waiting_room_id, \*, zone_identifier) -> WaitingRoom ## Page @@ -2507,33 +2495,29 @@ Methods: Types: ```python -from cloudflare.types.waiting_rooms import ( - WaitingroomEventResult, - EventListResponse, - EventDeleteResponse, -) +from cloudflare.types.waiting_rooms import WaitingroomEvent, EventListResponse, EventDeleteResponse ``` Methods: -- client.waiting_rooms.events.create(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomEventResult -- client.waiting_rooms.events.update(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> WaitingroomEventResult +- client.waiting_rooms.events.create(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomEvent +- client.waiting_rooms.events.update(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> WaitingroomEvent - client.waiting_rooms.events.list(waiting_room_id, \*, zone_identifier) -> Optional - client.waiting_rooms.events.delete(event_id, \*, zone_identifier, waiting_room_id) -> EventDeleteResponse -- client.waiting_rooms.events.edit(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> WaitingroomEventResult -- client.waiting_rooms.events.get(event_id, \*, zone_identifier, waiting_room_id) -> WaitingroomEventResult +- client.waiting_rooms.events.edit(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> WaitingroomEvent +- client.waiting_rooms.events.get(event_id, \*, zone_identifier, waiting_room_id) -> WaitingroomEvent ### Details Types: ```python -from cloudflare.types.waiting_rooms.events import WaitingroomEventDetailsResult +from cloudflare.types.waiting_rooms.events import WaitingroomEventDetails ``` Methods: -- client.waiting_rooms.events.details.get(event_id, \*, zone_identifier, waiting_room_id) -> WaitingroomEventDetailsResult +- client.waiting_rooms.events.details.get(event_id, \*, zone_identifier, waiting_room_id) -> WaitingroomEventDetails ## Rules @@ -2541,7 +2525,7 @@ Types: ```python from cloudflare.types.waiting_rooms import ( - WaitingroomRuleResult, + WaitingroomRule, RuleCreateResponse, RuleUpdateResponse, RuleListResponse, @@ -2596,7 +2580,7 @@ Types: ```python from cloudflare.types.web3 import ( - DwebConfigWeb3Hostname, + DistributedWebHostname, HostnameListResponse, HostnameDeleteResponse, ) @@ -2604,11 +2588,11 @@ from cloudflare.types.web3 import ( Methods: -- client.web3.hostnames.create(zone_identifier, \*\*params) -> DwebConfigWeb3Hostname +- client.web3.hostnames.create(zone_identifier, \*\*params) -> DistributedWebHostname - client.web3.hostnames.list(zone_identifier) -> Optional - client.web3.hostnames.delete(identifier, \*, zone_identifier) -> Optional -- client.web3.hostnames.edit(identifier, \*, zone_identifier, \*\*params) -> DwebConfigWeb3Hostname -- client.web3.hostnames.get(identifier, \*, zone_identifier) -> DwebConfigWeb3Hostname +- client.web3.hostnames.edit(identifier, \*, zone_identifier, \*\*params) -> DistributedWebHostname +- client.web3.hostnames.get(identifier, \*, zone_identifier) -> DistributedWebHostname ### IPFSUniversalPaths @@ -2617,13 +2601,13 @@ Methods: Types: ```python -from cloudflare.types.web3.hostnames.ipfs_universal_paths import DwebConfigContentListDetails +from cloudflare.types.web3.hostnames.ipfs_universal_paths import DistributedWebConfigContentList ``` Methods: -- client.web3.hostnames.ipfs_universal_paths.content_lists.update(identifier, \*, zone_identifier, \*\*params) -> DwebConfigContentListDetails -- client.web3.hostnames.ipfs_universal_paths.content_lists.get(identifier, \*, zone_identifier) -> DwebConfigContentListDetails +- client.web3.hostnames.ipfs_universal_paths.content_lists.update(identifier, \*, zone_identifier, \*\*params) -> DistributedWebConfigContentList +- client.web3.hostnames.ipfs_universal_paths.content_lists.get(identifier, \*, zone_identifier) -> DistributedWebConfigContentList ##### Entries @@ -2631,7 +2615,7 @@ Types: ```python from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists import ( - DwebConfigContentListEntry, + DistributedWebConfigContentListEntry, EntryListResponse, EntryDeleteResponse, ) @@ -2639,11 +2623,11 @@ from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists import ( Methods: -- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create(identifier, \*, zone_identifier, \*\*params) -> DwebConfigContentListEntry -- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update(content_list_entry_identifier, \*, zone_identifier, identifier, \*\*params) -> DwebConfigContentListEntry +- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.create(identifier, \*, zone_identifier, \*\*params) -> DistributedWebConfigContentListEntry +- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.update(content_list_entry_identifier, \*, zone_identifier, identifier, \*\*params) -> DistributedWebConfigContentListEntry - client.web3.hostnames.ipfs_universal_paths.content_lists.entries.list(identifier, \*, zone_identifier) -> Optional - client.web3.hostnames.ipfs_universal_paths.content_lists.entries.delete(content_list_entry_identifier, \*, zone_identifier, identifier) -> Optional -- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get(content_list_entry_identifier, \*, zone_identifier, identifier) -> DwebConfigContentListEntry +- client.web3.hostnames.ipfs_universal_paths.content_lists.entries.get(content_list_entry_identifier, \*, zone_identifier, identifier) -> DistributedWebConfigContentListEntry # Workers @@ -2679,7 +2663,7 @@ Methods: Types: ```python -from cloudflare.types.workers.scripts import WorkersSchemasBinding, BindingGetResponse +from cloudflare.types.workers.scripts import WorkersBinding, BindingGetResponse ``` Methods: @@ -2757,7 +2741,7 @@ Types: ```python from cloudflare.types.workers import ( - WorkersFilters, + WorkersFilter, FilterCreateResponse, FilterListResponse, FilterDeleteResponse, @@ -2767,7 +2751,7 @@ from cloudflare.types.workers import ( Methods: - client.workers.filters.create(\*, zone_id, \*\*params) -> Optional -- client.workers.filters.update(filter_id, \*, zone_id, \*\*params) -> WorkersFilters +- client.workers.filters.update(filter_id, \*, zone_id, \*\*params) -> WorkersFilter - client.workers.filters.list(\*, zone_id) -> FilterListResponse - client.workers.filters.delete(filter_id, \*, zone_id) -> Optional @@ -2777,7 +2761,7 @@ Types: ```python from cloudflare.types.workers import ( - WorkersRoutes, + WorkersRoute, RouteCreateResponse, RouteListResponse, RouteDeleteResponse, @@ -2787,10 +2771,10 @@ from cloudflare.types.workers import ( Methods: - client.workers.routes.create(\*, zone_id, \*\*params) -> RouteCreateResponse -- client.workers.routes.update(route_id, \*, zone_id, \*\*params) -> WorkersRoutes +- client.workers.routes.update(route_id, \*, zone_id, \*\*params) -> WorkersRoute - client.workers.routes.list(\*, zone_id) -> RouteListResponse - client.workers.routes.delete(route_id, \*, zone_id) -> RouteDeleteResponse -- client.workers.routes.get(route_id, \*, zone_id) -> WorkersRoutes +- client.workers.routes.get(route_id, \*, zone_id) -> WorkersRoute ## AccountSettings @@ -2962,7 +2946,7 @@ Methods: Types: ```python -from cloudflare.types.durable_objects import WorkersNamespace, NamespaceListResponse +from cloudflare.types.durable_objects import DurableObjectNamespace, NamespaceListResponse ``` Methods: @@ -2974,12 +2958,12 @@ Methods: Types: ```python -from cloudflare.types.durable_objects.namespaces import WorkersObject +from cloudflare.types.durable_objects.namespaces import DurableObject ``` Methods: -- client.durable_objects.namespaces.objects.list(id, \*, account_id, \*\*params) -> SyncCursorLimitPagination[WorkersObject] +- client.durable_objects.namespaces.objects.list(id, \*, account_id, \*\*params) -> SyncCursorLimitPagination[DurableObject] # Queues @@ -2987,9 +2971,9 @@ Types: ```python from cloudflare.types import ( - WorkersQueue, - WorkersQueueCreated, - WorkersQueueUpdated, + Queue, + QueueCreated, + QueueUpdated, QueueCreateResponse, QueueUpdateResponse, QueueListResponse, @@ -3032,9 +3016,9 @@ Types: ```python from cloudflare.types.queues import ( - WorkersConsumer, - WorkersConsumerCreated, - WorkersConsumerUpdated, + QueueConsumer, + QueueConsumerCreated, + QueueConsumerUpdated, MessageAckResponse, MessagePullResponse, ) @@ -3063,29 +3047,29 @@ Methods: Types: ```python -from cloudflare.types import PageShieldGetZoneSettings, PageShieldUpdateZoneSettings +from cloudflare.types import PageShieldSetting, PageShieldUpdateResponse ``` Methods: -- client.page_shield.update(\*, zone_id, \*\*params) -> PageShieldUpdateZoneSettings -- client.page_shield.get(\*, zone_id) -> PageShieldGetZoneSettings +- client.page_shield.update(\*, zone_id, \*\*params) -> PageShieldUpdateResponse +- client.page_shield.get(\*, zone_id) -> PageShieldSetting ## Policies Types: ```python -from cloudflare.types.page_shield import PageShieldPageshieldPolicy, PolicyListResponse +from cloudflare.types.page_shield import PageShieldPolicy, PolicyListResponse ``` Methods: -- client.page_shield.policies.create(\*, zone_id, \*\*params) -> PageShieldPageshieldPolicy -- client.page_shield.policies.update(policy_id, \*, zone_id, \*\*params) -> PageShieldPageshieldPolicy +- client.page_shield.policies.create(\*, zone_id, \*\*params) -> PageShieldPolicy +- client.page_shield.policies.update(policy_id, \*, zone_id, \*\*params) -> PageShieldPolicy - client.page_shield.policies.list(\*, zone_id) -> Optional - client.page_shield.policies.delete(policy_id, \*, zone_id) -> None -- client.page_shield.policies.get(policy_id, \*, zone_id) -> PageShieldPageshieldPolicy +- client.page_shield.policies.get(policy_id, \*, zone_id) -> PageShieldPolicy ## Connections @@ -3489,16 +3473,16 @@ Methods: Types: ```python -from cloudflare.types.images import ImagesImage, V1ListResponse, V1DeleteResponse +from cloudflare.types.images import Image, V1ListResponse, V1DeleteResponse ``` Methods: -- client.images.v1.create(\*, account_id, \*\*params) -> ImagesImage +- client.images.v1.create(\*, account_id, \*\*params) -> Image - client.images.v1.list(\*, account_id, \*\*params) -> SyncV4PagePagination[V1ListResponse] - client.images.v1.delete(image_id, \*, account_id) -> V1DeleteResponse -- client.images.v1.edit(image_id, \*, account_id, \*\*params) -> ImagesImage -- client.images.v1.get(image_id, \*, account_id) -> ImagesImage +- client.images.v1.edit(image_id, \*, account_id, \*\*params) -> Image +- client.images.v1.get(image_id, \*, account_id) -> Image ### Keys @@ -3739,7 +3723,7 @@ Methods: Types: ```python -from cloudflare.types.intel import IntelSinkholesSinkholeItem, SinkholeListResponse +from cloudflare.types.intel import IntelSinkholeItem, SinkholeListResponse ``` Methods: @@ -3967,80 +3951,73 @@ Methods: Types: ```python -from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMConfig +from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringConfig ``` Methods: -- client.magic_network_monitoring.configs.create(\*, account_id) -> MagicVisibilityMNMConfig -- client.magic_network_monitoring.configs.update(\*, account_id) -> MagicVisibilityMNMConfig -- client.magic_network_monitoring.configs.delete(\*, account_id) -> MagicVisibilityMNMConfig -- client.magic_network_monitoring.configs.edit(\*, account_id) -> MagicVisibilityMNMConfig -- client.magic_network_monitoring.configs.get(\*, account_id) -> MagicVisibilityMNMConfig +- client.magic_network_monitoring.configs.create(\*, account_id) -> MagicNetworkMonitoringConfig +- client.magic_network_monitoring.configs.update(\*, account_id) -> MagicNetworkMonitoringConfig +- client.magic_network_monitoring.configs.delete(\*, account_id) -> MagicNetworkMonitoringConfig +- client.magic_network_monitoring.configs.edit(\*, account_id) -> MagicNetworkMonitoringConfig +- client.magic_network_monitoring.configs.get(\*, account_id) -> MagicNetworkMonitoringConfig ### Full Methods: -- client.magic_network_monitoring.configs.full.get(\*, account_id) -> MagicVisibilityMNMConfig +- client.magic_network_monitoring.configs.full.get(\*, account_id) -> MagicNetworkMonitoringConfig ## Rules Types: ```python -from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMRule, RuleListResponse +from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringRule, RuleListResponse ``` Methods: -- client.magic_network_monitoring.rules.create(\*, account_id) -> Optional -- client.magic_network_monitoring.rules.update(\*, account_id) -> Optional +- client.magic_network_monitoring.rules.create(\*, account_id) -> Optional +- client.magic_network_monitoring.rules.update(\*, account_id) -> Optional - client.magic_network_monitoring.rules.list(\*, account_id) -> Optional -- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id) -> Optional -- client.magic_network_monitoring.rules.edit(rule_id, \*, account_id) -> Optional -- client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional +- client.magic_network_monitoring.rules.delete(rule_id, \*, account_id) -> Optional +- client.magic_network_monitoring.rules.edit(rule_id, \*, account_id) -> Optional +- client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional ### Advertisements Types: ```python -from cloudflare.types.magic_network_monitoring.rules import MagicVisibilityMNMRuleAdvertisable +from cloudflare.types.magic_network_monitoring.rules import MagicNetworkMonitoringRuleAdvertisable ``` Methods: -- client.magic_network_monitoring.rules.advertisements.edit(rule_id, \*, account_id) -> Optional +- client.magic_network_monitoring.rules.advertisements.edit(rule_id, \*, account_id) -> Optional # MTLSCertificates Types: ```python -from cloudflare.types import ( - TLSCertificatesAndHostnamesCertificateObjectPost, - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, - MTLSCertificateListResponse, -) +from cloudflare.types import MTLSCertificate, MTLSCertificateUpdate, MTLSCertificateListResponse ``` Methods: -- client.mtls_certificates.create(\*, account_id, \*\*params) -> TLSCertificatesAndHostnamesCertificateObjectPost +- client.mtls_certificates.create(\*, account_id, \*\*params) -> MTLSCertificateUpdate - client.mtls_certificates.list(\*, account_id) -> Optional -- client.mtls_certificates.delete(mtls_certificate_id, \*, account_id) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject -- client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject +- client.mtls_certificates.delete(mtls_certificate_id, \*, account_id) -> MTLSCertificate +- client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> MTLSCertificate ## Associations Types: ```python -from cloudflare.types.mtls_certificates import ( - TLSCertificatesAndHostnamesAssociationObject, - AssociationGetResponse, -) +from cloudflare.types.mtls_certificates import MTLSCertificateAsssociation, AssociationGetResponse ``` Methods: @@ -4170,7 +4147,7 @@ Types: ```python from cloudflare.types.registrar import ( - RegistrarAPIDomains, + RegistrarDomains, DomainUpdateResponse, DomainListResponse, DomainGetResponse, @@ -4190,7 +4167,7 @@ Methods: Types: ```python -from cloudflare.types.request_tracers import RequestTracerTrace, TraceCreateResponse +from cloudflare.types.request_tracers import RequestTrace, TraceCreateResponse ``` Methods: @@ -4284,18 +4261,14 @@ Methods: Types: ```python -from cloudflare.types.stream import ( - StreamAdditionalAudio, - AudioTrackDeleteResponse, - AudioTrackGetResponse, -) +from cloudflare.types.stream import StreamAudio, AudioTrackDeleteResponse, AudioTrackGetResponse ``` Methods: - client.stream.audio_tracks.delete(audio_identifier, \*, account_id, identifier) -> AudioTrackDeleteResponse -- client.stream.audio_tracks.copy(identifier, \*, account_id, \*\*params) -> StreamAdditionalAudio -- client.stream.audio_tracks.edit(audio_identifier, \*, account_id, identifier, \*\*params) -> StreamAdditionalAudio +- client.stream.audio_tracks.copy(identifier, \*, account_id, \*\*params) -> StreamAudio +- client.stream.audio_tracks.edit(audio_identifier, \*, account_id, identifier, \*\*params) -> StreamAudio - client.stream.audio_tracks.get(identifier, \*, account_id) -> AudioTrackGetResponse ## Videos @@ -4515,7 +4488,7 @@ Types: ```python from cloudflare.types.alerting.destinations import ( - AaaPagerduty, + AlertingPagerduty, PagerdutyCreateResponse, PagerdutyDeleteResponse, PagerdutyGetResponse, @@ -4536,7 +4509,7 @@ Types: ```python from cloudflare.types.alerting.destinations import ( - AaaWebhooks, + AlertingWebhooks, WebhookCreateResponse, WebhookUpdateResponse, WebhookListResponse, @@ -4550,19 +4523,19 @@ Methods: - 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 +- client.alerting.destinations.webhooks.get(webhook_id, \*, account_id) -> AlertingWebhooks ## History Types: ```python -from cloudflare.types.alerting import AaaHistory +from cloudflare.types.alerting import AlertingHistory ``` Methods: -- client.alerting.history.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[AaaHistory] +- client.alerting.history.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[AlertingHistory] ## Policies @@ -4570,7 +4543,7 @@ Types: ```python from cloudflare.types.alerting import ( - AaaPolicies, + AlertingPolicies, PolicyCreateResponse, PolicyUpdateResponse, PolicyListResponse, @@ -4584,7 +4557,7 @@ Methods: - 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 +- client.alerting.policies.get(policy_id, \*, account_id) -> AlertingPolicies # D1 @@ -4694,14 +4667,16 @@ Methods: Types: ```python -from cloudflare.types.workers_for_platforms.dispatch.namespaces import WorkersNamespaceScript +from cloudflare.types.workers_for_platforms.dispatch.namespaces import ( + WorkersForPlatformsNamespaceScript, +) ``` Methods: - client.workers_for_platforms.dispatch.namespaces.scripts.update(script_name, \*, account_id, dispatch_namespace, \*\*params) -> WorkersScript - client.workers_for_platforms.dispatch.namespaces.scripts.delete(script_name, \*, account_id, dispatch_namespace, \*\*params) -> None -- client.workers_for_platforms.dispatch.namespaces.scripts.get(script_name, \*, account_id, dispatch_namespace) -> WorkersNamespaceScript +- client.workers_for_platforms.dispatch.namespaces.scripts.get(script_name, \*, account_id, dispatch_namespace) -> WorkersForPlatformsNamespaceScript ##### Content @@ -4745,7 +4720,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust import TeamsDevicesDevices, DeviceListResponse, DeviceGetResponse +from cloudflare.types.zero_trust import ZeroTrustDevices, DeviceListResponse, DeviceGetResponse ``` Methods: @@ -4759,7 +4734,7 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - TeamsDevicesDeviceDEXTestSchemasHTTP, + DEXTestSchemasHTTP, DEXTestListResponse, DEXTestDeleteResponse, ) @@ -4767,11 +4742,11 @@ from cloudflare.types.zero_trust.devices import ( Methods: -- client.zero_trust.devices.dex_tests.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.dex_tests.update(dex_test_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.dex_tests.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.dex_tests.update(dex_test_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.dex_tests.list(\*, account_id) -> Optional - client.zero_trust.devices.dex_tests.delete(dex_test_id, \*, account_id) -> Optional -- client.zero_trust.devices.dex_tests.get(dex_test_id, \*, account_id) -> Optional +- client.zero_trust.devices.dex_tests.get(dex_test_id, \*, account_id) -> Optional ### Networks @@ -4779,7 +4754,7 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - TeamsDevicesDeviceManagedNetworks, + DeviceManagedNetworks, NetworkListResponse, NetworkDeleteResponse, ) @@ -4787,11 +4762,11 @@ from cloudflare.types.zero_trust.devices import ( Methods: -- client.zero_trust.devices.networks.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.networks.update(network_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.networks.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.networks.update(network_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.networks.list(\*, account_id) -> Optional - client.zero_trust.devices.networks.delete(network_id, \*, account_id) -> Optional -- client.zero_trust.devices.networks.get(network_id, \*, account_id) -> Optional +- client.zero_trust.devices.networks.get(network_id, \*, account_id) -> Optional ### Policies @@ -4799,7 +4774,7 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - TeamsDevicesDeviceSettingsPolicy, + DevicesDeviceSettingsPolicy, PolicyListResponse, PolicyDeleteResponse, ) @@ -4807,11 +4782,11 @@ from cloudflare.types.zero_trust.devices import ( Methods: -- client.zero_trust.devices.policies.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.policies.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.policies.list(\*, account_id) -> Optional - client.zero_trust.devices.policies.delete(policy_id, \*, account_id) -> Optional -- client.zero_trust.devices.policies.edit(policy_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.policies.get(policy_id, \*, account_id) -> Optional +- client.zero_trust.devices.policies.edit(policy_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.policies.get(policy_id, \*, account_id) -> Optional #### DefaultPolicy @@ -4831,7 +4806,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.policies import ( - TeamsDevicesSplitTunnel, + DevicesSplitTunnel, ExcludeUpdateResponse, ExcludeListResponse, ExcludeGetResponse, @@ -4850,7 +4825,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.policies import ( - TeamsDevicesFallbackDomain, + DevicesFallbackDomain, FallbackDomainUpdateResponse, FallbackDomainListResponse, FallbackDomainGetResponse, @@ -4869,7 +4844,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.policies import ( - TeamsDevicesSplitTunnelInclude, + DevicesSplitTunnelInclude, IncludeUpdateResponse, IncludeListResponse, IncludeGetResponse, @@ -4888,7 +4863,7 @@ Types: ```python from cloudflare.types.zero_trust.devices import ( - TeamsDevicesDevicePostureRules, + DevicePostureRules, PostureListResponse, PostureDeleteResponse, ) @@ -4896,11 +4871,11 @@ from cloudflare.types.zero_trust.devices import ( Methods: -- client.zero_trust.devices.posture.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.posture.update(rule_id, \*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.posture.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.posture.update(rule_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.list(\*, account_id) -> Optional - client.zero_trust.devices.posture.delete(rule_id, \*, account_id) -> Optional -- client.zero_trust.devices.posture.get(rule_id, \*, account_id) -> Optional +- client.zero_trust.devices.posture.get(rule_id, \*, account_id) -> Optional #### Integrations @@ -4908,7 +4883,7 @@ Types: ```python from cloudflare.types.zero_trust.devices.posture import ( - TeamsDevicesDevicePostureIntegrations, + DevicePostureIntegrations, IntegrationListResponse, IntegrationDeleteResponse, ) @@ -4916,11 +4891,11 @@ from cloudflare.types.zero_trust.devices.posture import ( Methods: -- client.zero_trust.devices.posture.integrations.create(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.posture.integrations.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.integrations.list(\*, account_id) -> Optional - client.zero_trust.devices.posture.integrations.delete(integration_id, \*, account_id) -> Optional -- 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 +- 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 ### Revoke @@ -4939,13 +4914,13 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.devices import TeamsDevicesZeroTrustAccountDeviceSettings +from cloudflare.types.zero_trust.devices import ZeroTrustAccountDeviceSettings ``` Methods: -- client.zero_trust.devices.settings.update(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.settings.list(\*, account_id) -> Optional +- client.zero_trust.devices.settings.update(\*, account_id, \*\*params) -> Optional +- client.zero_trust.devices.settings.list(\*, account_id) -> Optional ### Unrevoke @@ -4977,7 +4952,7 @@ Types: ```python from cloudflare.types.zero_trust import ( - AccessIdentityProviders, + ZeroTrustIdentityProviders, IdentityProviderListResponse, IdentityProviderDeleteResponse, ) @@ -4985,25 +4960,25 @@ from cloudflare.types.zero_trust import ( Methods: -- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> AccessIdentityProviders -- client.zero_trust.identity_providers.update(uuid, \*, account_id, zone_id, \*\*params) -> AccessIdentityProviders +- client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustIdentityProviders +- client.zero_trust.identity_providers.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustIdentityProviders - client.zero_trust.identity_providers.list(\*, account_id, zone_id) -> Optional - client.zero_trust.identity_providers.delete(uuid, \*, account_id, zone_id) -> IdentityProviderDeleteResponse -- client.zero_trust.identity_providers.get(uuid, \*, account_id, zone_id) -> AccessIdentityProviders +- client.zero_trust.identity_providers.get(uuid, \*, account_id, zone_id) -> ZeroTrustIdentityProviders ## Organizations Types: ```python -from cloudflare.types.zero_trust import AccessOrganizations, OrganizationRevokeUsersResponse +from cloudflare.types.zero_trust import ZeroTrustOrganizations, OrganizationRevokeUsersResponse ``` Methods: -- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> AccessOrganizations -- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> AccessOrganizations -- client.zero_trust.organizations.list(\*, account_id, zone_id) -> AccessOrganizations +- client.zero_trust.organizations.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustOrganizations +- client.zero_trust.organizations.update(\*, account_id, zone_id, \*\*params) -> ZeroTrustOrganizations +- client.zero_trust.organizations.list(\*, account_id, zone_id) -> ZeroTrustOrganizations - client.zero_trust.organizations.revoke_users(\*, account_id, zone_id, \*\*params) -> Optional ## Seats @@ -5011,7 +4986,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust import AccessSeats, SeatEditResponse +from cloudflare.types.zero_trust import ZeroTrustSeats, SeatEditResponse ``` Methods: @@ -5026,7 +5001,7 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - AccessApps, + ZeroTrustApps, ApplicationListResponse, ApplicationDeleteResponse, ApplicationRevokeTokensResponse, @@ -5035,11 +5010,11 @@ from cloudflare.types.zero_trust.access import ( Methods: -- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> AccessApps -- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> AccessApps +- client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustApps +- client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> ZeroTrustApps - client.zero_trust.access.applications.list(\*, account_id, zone_id) -> Optional - client.zero_trust.access.applications.delete(app_id, \*, account_id, zone_id) -> ApplicationDeleteResponse -- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> AccessApps +- client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> ZeroTrustApps - client.zero_trust.access.applications.revoke_tokens(app_id, \*, account_id, zone_id) -> object #### CAs @@ -5048,7 +5023,7 @@ Types: ```python from cloudflare.types.zero_trust.access.applications import ( - AccessCA, + ZeroTrustCA, CACreateResponse, CAListResponse, CADeleteResponse, @@ -5081,7 +5056,7 @@ Types: ```python from cloudflare.types.zero_trust.access.applications import ( - AccessPolicies, + ZeroTrustPolicies, PolicyListResponse, PolicyDeleteResponse, ) @@ -5089,11 +5064,11 @@ from cloudflare.types.zero_trust.access.applications import ( Methods: -- client.zero_trust.access.applications.policies.create(uuid, \*, account_id, zone_id, \*\*params) -> AccessPolicies -- client.zero_trust.access.applications.policies.update(uuid, \*, uuid1, account_id, zone_id, \*\*params) -> AccessPolicies +- client.zero_trust.access.applications.policies.create(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustPolicies +- client.zero_trust.access.applications.policies.update(uuid, \*, uuid1, account_id, zone_id, \*\*params) -> ZeroTrustPolicies - client.zero_trust.access.applications.policies.list(uuid, \*, account_id, zone_id) -> Optional - client.zero_trust.access.applications.policies.delete(uuid, \*, uuid1, account_id, zone_id) -> PolicyDeleteResponse -- client.zero_trust.access.applications.policies.get(uuid, \*, uuid1, account_id, zone_id) -> AccessPolicies +- client.zero_trust.access.applications.policies.get(uuid, \*, uuid1, account_id, zone_id) -> ZeroTrustPolicies ### Certificates @@ -5101,7 +5076,7 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - AccessCertificates, + ZeroTrustCertificates, CertificateListResponse, CertificateDeleteResponse, ) @@ -5109,11 +5084,11 @@ from cloudflare.types.zero_trust.access import ( Methods: -- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> AccessCertificates -- client.zero_trust.access.certificates.update(uuid, \*, account_id, zone_id, \*\*params) -> AccessCertificates +- client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustCertificates +- client.zero_trust.access.certificates.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustCertificates - client.zero_trust.access.certificates.list(\*, account_id, zone_id) -> Optional - client.zero_trust.access.certificates.delete(uuid, \*, account_id, zone_id) -> CertificateDeleteResponse -- client.zero_trust.access.certificates.get(uuid, \*, account_id, zone_id) -> AccessCertificates +- client.zero_trust.access.certificates.get(uuid, \*, account_id, zone_id) -> ZeroTrustCertificates #### Settings @@ -5121,7 +5096,7 @@ Types: ```python from cloudflare.types.zero_trust.access.certificates import ( - AccessSettings, + ZeroTrustSettings, SettingUpdateResponse, SettingGetResponse, ) @@ -5137,16 +5112,20 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import AccessGroups, GroupListResponse, GroupDeleteResponse +from cloudflare.types.zero_trust.access import ( + ZeroTrustGroups, + GroupListResponse, + GroupDeleteResponse, +) ``` Methods: -- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> AccessGroups -- client.zero_trust.access.groups.update(uuid, \*, account_id, zone_id, \*\*params) -> AccessGroups +- client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustGroups +- client.zero_trust.access.groups.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustGroups - client.zero_trust.access.groups.list(\*, account_id, zone_id) -> Optional - client.zero_trust.access.groups.delete(uuid, \*, account_id, zone_id) -> GroupDeleteResponse -- client.zero_trust.access.groups.get(uuid, \*, account_id, zone_id) -> AccessGroups +- client.zero_trust.access.groups.get(uuid, \*, account_id, zone_id) -> ZeroTrustGroups ### ServiceTokens @@ -5154,7 +5133,7 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - AccessServiceTokens, + ZeroTrustServiceTokens, ServiceTokenCreateResponse, ServiceTokenListResponse, ServiceTokenRotateResponse, @@ -5164,10 +5143,10 @@ from cloudflare.types.zero_trust.access import ( Methods: - client.zero_trust.access.service_tokens.create(\*, account_id, zone_id, \*\*params) -> ServiceTokenCreateResponse -- client.zero_trust.access.service_tokens.update(uuid, \*, account_id, zone_id, \*\*params) -> AccessServiceTokens +- client.zero_trust.access.service_tokens.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustServiceTokens - client.zero_trust.access.service_tokens.list(\*, account_id, zone_id) -> Optional -- client.zero_trust.access.service_tokens.delete(uuid, \*, account_id, zone_id) -> AccessServiceTokens -- client.zero_trust.access.service_tokens.refresh(uuid, \*, identifier) -> AccessServiceTokens +- client.zero_trust.access.service_tokens.delete(uuid, \*, account_id, zone_id) -> ZeroTrustServiceTokens +- client.zero_trust.access.service_tokens.refresh(uuid, \*, identifier) -> ZeroTrustServiceTokens - client.zero_trust.access.service_tokens.rotate(uuid, \*, identifier) -> ServiceTokenRotateResponse ### Bookmarks @@ -5176,7 +5155,7 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - AccessBookmarks, + ZeroTrustBookmarks, BookmarkListResponse, BookmarkDeleteResponse, ) @@ -5184,11 +5163,11 @@ from cloudflare.types.zero_trust.access import ( Methods: -- client.zero_trust.access.bookmarks.create(uuid, \*, identifier) -> AccessBookmarks -- client.zero_trust.access.bookmarks.update(uuid, \*, identifier) -> AccessBookmarks +- client.zero_trust.access.bookmarks.create(uuid, \*, identifier) -> ZeroTrustBookmarks +- client.zero_trust.access.bookmarks.update(uuid, \*, identifier) -> ZeroTrustBookmarks - client.zero_trust.access.bookmarks.list(identifier) -> Optional - client.zero_trust.access.bookmarks.delete(uuid, \*, identifier) -> BookmarkDeleteResponse -- client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> AccessBookmarks +- client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> ZeroTrustBookmarks ### Keys @@ -5211,7 +5190,10 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access.logs import AccessAccessRequests, AccessRequestListResponse +from cloudflare.types.zero_trust.access.logs import ( + ZeroTrustAccessRequests, + AccessRequestListResponse, +) ``` Methods: @@ -5223,7 +5205,7 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import AccessUsers, UserListResponse +from cloudflare.types.zero_trust.access import ZeroTrustUsers, UserListResponse ``` Methods: @@ -5251,12 +5233,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access.users import AccessIdentity +from cloudflare.types.zero_trust.access.users import ZeroTrustIdentity ``` Methods: -- client.zero_trust.access.users.last_seen_identity.get(id, \*, identifier) -> AccessIdentity +- client.zero_trust.access.users.last_seen_identity.get(id, \*, identifier) -> ZeroTrustIdentity #### FailedLogins @@ -5276,8 +5258,8 @@ Types: ```python from cloudflare.types.zero_trust.access import ( - AccessCustomPage, - AccessCustomPageWithoutHTML, + ZeroTrustCustomPage, + ZeroTrustCustomPageWithoutHTML, CustomPageListResponse, CustomPageDeleteResponse, ) @@ -5285,27 +5267,27 @@ from cloudflare.types.zero_trust.access import ( Methods: -- client.zero_trust.access.custom_pages.create(identifier, \*\*params) -> AccessCustomPageWithoutHTML -- client.zero_trust.access.custom_pages.update(uuid, \*, identifier, \*\*params) -> AccessCustomPageWithoutHTML +- client.zero_trust.access.custom_pages.create(identifier, \*\*params) -> ZeroTrustCustomPageWithoutHTML +- client.zero_trust.access.custom_pages.update(uuid, \*, identifier, \*\*params) -> ZeroTrustCustomPageWithoutHTML - client.zero_trust.access.custom_pages.list(identifier) -> Optional - client.zero_trust.access.custom_pages.delete(uuid, \*, identifier) -> CustomPageDeleteResponse -- client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> AccessCustomPage +- client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> ZeroTrustCustomPage ### Tags Types: ```python -from cloudflare.types.zero_trust.access import AccessTag, TagListResponse, TagDeleteResponse +from cloudflare.types.zero_trust.access import ZeroTrustTag, TagListResponse, TagDeleteResponse ``` Methods: -- client.zero_trust.access.tags.create(identifier, \*\*params) -> AccessTag -- client.zero_trust.access.tags.update(tag_name, \*, identifier, \*\*params) -> AccessTag +- client.zero_trust.access.tags.create(identifier, \*\*params) -> ZeroTrustTag +- client.zero_trust.access.tags.update(tag_name, \*, identifier, \*\*params) -> ZeroTrustTag - client.zero_trust.access.tags.list(identifier) -> Optional - client.zero_trust.access.tags.delete(name, \*, identifier) -> TagDeleteResponse -- client.zero_trust.access.tags.get(name, \*, identifier) -> AccessTag +- client.zero_trust.access.tags.get(name, \*, identifier) -> ZeroTrustTag ## DEX diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index 34eb39d0832..dfb824979f7 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -67,7 +67,7 @@ class Cloudflare(SyncAPIClient): custom_hostnames: resources.CustomHostnames custom_nameservers: resources.CustomNameservers dns: resources.DNS - dnssec: resources.DNSSEC + dnssec: resources.DNSSECResource email_routing: resources.EmailRouting filters: resources.Filters firewall: resources.Firewall @@ -220,7 +220,7 @@ def __init__( self.custom_hostnames = resources.CustomHostnames(self) self.custom_nameservers = resources.CustomNameservers(self) self.dns = resources.DNS(self) - self.dnssec = resources.DNSSEC(self) + self.dnssec = resources.DNSSECResource(self) self.email_routing = resources.EmailRouting(self) self.filters = resources.Filters(self) self.firewall = resources.Firewall(self) @@ -478,7 +478,7 @@ class AsyncCloudflare(AsyncAPIClient): custom_hostnames: resources.AsyncCustomHostnames custom_nameservers: resources.AsyncCustomNameservers dns: resources.AsyncDNS - dnssec: resources.AsyncDNSSEC + dnssec: resources.AsyncDNSSECResource email_routing: resources.AsyncEmailRouting filters: resources.AsyncFilters firewall: resources.AsyncFirewall @@ -631,7 +631,7 @@ def __init__( self.custom_hostnames = resources.AsyncCustomHostnames(self) self.custom_nameservers = resources.AsyncCustomNameservers(self) self.dns = resources.AsyncDNS(self) - self.dnssec = resources.AsyncDNSSEC(self) + self.dnssec = resources.AsyncDNSSECResource(self) self.email_routing = resources.AsyncEmailRouting(self) self.filters = resources.AsyncFilters(self) self.firewall = resources.AsyncFirewall(self) @@ -890,7 +890,7 @@ def __init__(self, client: Cloudflare) -> None: self.custom_hostnames = resources.CustomHostnamesWithRawResponse(client.custom_hostnames) self.custom_nameservers = resources.CustomNameserversWithRawResponse(client.custom_nameservers) self.dns = resources.DNSWithRawResponse(client.dns) - self.dnssec = resources.DNSSECWithRawResponse(client.dnssec) + self.dnssec = resources.DNSSECResourceWithRawResponse(client.dnssec) self.email_routing = resources.EmailRoutingWithRawResponse(client.email_routing) self.filters = resources.FiltersWithRawResponse(client.filters) self.firewall = resources.FirewallWithRawResponse(client.firewall) @@ -978,7 +978,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.custom_hostnames = resources.AsyncCustomHostnamesWithRawResponse(client.custom_hostnames) self.custom_nameservers = resources.AsyncCustomNameserversWithRawResponse(client.custom_nameservers) self.dns = resources.AsyncDNSWithRawResponse(client.dns) - self.dnssec = resources.AsyncDNSSECWithRawResponse(client.dnssec) + self.dnssec = resources.AsyncDNSSECResourceWithRawResponse(client.dnssec) self.email_routing = resources.AsyncEmailRoutingWithRawResponse(client.email_routing) self.filters = resources.AsyncFiltersWithRawResponse(client.filters) self.firewall = resources.AsyncFirewallWithRawResponse(client.firewall) @@ -1068,7 +1068,7 @@ def __init__(self, client: Cloudflare) -> None: self.custom_hostnames = resources.CustomHostnamesWithStreamingResponse(client.custom_hostnames) self.custom_nameservers = resources.CustomNameserversWithStreamingResponse(client.custom_nameservers) self.dns = resources.DNSWithStreamingResponse(client.dns) - self.dnssec = resources.DNSSECWithStreamingResponse(client.dnssec) + self.dnssec = resources.DNSSECResourceWithStreamingResponse(client.dnssec) self.email_routing = resources.EmailRoutingWithStreamingResponse(client.email_routing) self.filters = resources.FiltersWithStreamingResponse(client.filters) self.firewall = resources.FirewallWithStreamingResponse(client.firewall) @@ -1160,7 +1160,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.custom_hostnames = resources.AsyncCustomHostnamesWithStreamingResponse(client.custom_hostnames) self.custom_nameservers = resources.AsyncCustomNameserversWithStreamingResponse(client.custom_nameservers) self.dns = resources.AsyncDNSWithStreamingResponse(client.dns) - self.dnssec = resources.AsyncDNSSECWithStreamingResponse(client.dnssec) + self.dnssec = resources.AsyncDNSSECResourceWithStreamingResponse(client.dnssec) self.email_routing = resources.AsyncEmailRoutingWithStreamingResponse(client.email_routing) self.filters = resources.AsyncFiltersWithStreamingResponse(client.filters) self.firewall = resources.AsyncFirewallWithStreamingResponse(client.firewall) diff --git a/src/cloudflare/resources/__init__.py b/src/cloudflare/resources/__init__.py index 13721178d1d..e9596573a34 100644 --- a/src/cloudflare/resources/__init__.py +++ b/src/cloudflare/resources/__init__.py @@ -177,12 +177,12 @@ AsyncZonesWithStreamingResponse, ) from .dnssec import ( - DNSSEC, - AsyncDNSSEC, - DNSSECWithRawResponse, - AsyncDNSSECWithRawResponse, - DNSSECWithStreamingResponse, - AsyncDNSSECWithStreamingResponse, + DNSSECResource, + AsyncDNSSECResource, + DNSSECResourceWithRawResponse, + AsyncDNSSECResourceWithRawResponse, + DNSSECResourceWithStreamingResponse, + AsyncDNSSECResourceWithStreamingResponse, ) from .images import ( Images, @@ -762,12 +762,12 @@ "AsyncDNSWithRawResponse", "DNSWithStreamingResponse", "AsyncDNSWithStreamingResponse", - "DNSSEC", - "AsyncDNSSEC", - "DNSSECWithRawResponse", - "AsyncDNSSECWithRawResponse", - "DNSSECWithStreamingResponse", - "AsyncDNSSECWithStreamingResponse", + "DNSSECResource", + "AsyncDNSSECResource", + "DNSSECResourceWithRawResponse", + "AsyncDNSSECResourceWithRawResponse", + "DNSSECResourceWithStreamingResponse", + "AsyncDNSSECResourceWithStreamingResponse", "EmailRouting", "AsyncEmailRouting", "EmailRoutingWithRawResponse", diff --git a/src/cloudflare/resources/alerting/destinations/webhooks.py b/src/cloudflare/resources/alerting/destinations/webhooks.py index 3d187f66856..62567e627bb 100644 --- a/src/cloudflare/resources/alerting/destinations/webhooks.py +++ b/src/cloudflare/resources/alerting/destinations/webhooks.py @@ -24,7 +24,7 @@ make_request_options, ) from ....types.alerting.destinations import ( - AaaWebhooks, + AlertingWebhooks, WebhookListResponse, WebhookCreateResponse, WebhookDeleteResponse, @@ -267,7 +267,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AaaWebhooks: + ) -> AlertingWebhooks: """ Get details for a single webhooks destination. @@ -297,7 +297,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AaaWebhooks], ResultWrapper[AaaWebhooks]), + cast_to=cast(Type[AlertingWebhooks], ResultWrapper[AlertingWebhooks]), ) @@ -532,7 +532,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AaaWebhooks: + ) -> AlertingWebhooks: """ Get details for a single webhooks destination. @@ -562,7 +562,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AaaWebhooks], ResultWrapper[AaaWebhooks]), + cast_to=cast(Type[AlertingWebhooks], ResultWrapper[AlertingWebhooks]), ) diff --git a/src/cloudflare/resources/alerting/history.py b/src/cloudflare/resources/alerting/history.py index 9ca93d35575..9d7bfbb9b2b 100644 --- a/src/cloudflare/resources/alerting/history.py +++ b/src/cloudflare/resources/alerting/history.py @@ -22,7 +22,7 @@ AsyncPaginator, make_request_options, ) -from ...types.alerting import AaaHistory, history_list_params +from ...types.alerting import AlertingHistory, history_list_params __all__ = ["History", "AsyncHistory"] @@ -50,7 +50,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[AaaHistory]: + ) -> SyncV4PagePaginationArray[AlertingHistory]: """Gets a list of history records for notifications sent to an account. The records @@ -82,7 +82,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/alerting/v3/history", - page=SyncV4PagePaginationArray[AaaHistory], + page=SyncV4PagePaginationArray[AlertingHistory], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -98,7 +98,7 @@ def list( history_list_params.HistoryListParams, ), ), - model=AaaHistory, + model=AlertingHistory, ) @@ -125,7 +125,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[AaaHistory, AsyncV4PagePaginationArray[AaaHistory]]: + ) -> AsyncPaginator[AlertingHistory, AsyncV4PagePaginationArray[AlertingHistory]]: """Gets a list of history records for notifications sent to an account. The records @@ -157,7 +157,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/alerting/v3/history", - page=AsyncV4PagePaginationArray[AaaHistory], + page=AsyncV4PagePaginationArray[AlertingHistory], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -173,7 +173,7 @@ def list( history_list_params.HistoryListParams, ), ), - model=AaaHistory, + model=AlertingHistory, ) diff --git a/src/cloudflare/resources/alerting/policies.py b/src/cloudflare/resources/alerting/policies.py index 2c6b735855c..434a862f31c 100644 --- a/src/cloudflare/resources/alerting/policies.py +++ b/src/cloudflare/resources/alerting/policies.py @@ -25,7 +25,7 @@ make_request_options, ) from ...types.alerting import ( - AaaPolicies, + AlertingPolicies, PolicyListResponse, PolicyCreateResponse, PolicyDeleteResponse, @@ -409,7 +409,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AaaPolicies: + ) -> AlertingPolicies: """ Get details for a single policy. @@ -439,7 +439,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]), + cast_to=cast(Type[AlertingPolicies], ResultWrapper[AlertingPolicies]), ) @@ -815,7 +815,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AaaPolicies: + ) -> AlertingPolicies: """ Get details for a single policy. @@ -845,7 +845,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AaaPolicies], ResultWrapper[AaaPolicies]), + cast_to=cast(Type[AlertingPolicies], ResultWrapper[AlertingPolicies]), ) diff --git a/src/cloudflare/resources/certificate_authorities/hostname_associations.py b/src/cloudflare/resources/certificate_authorities/hostname_associations.py index cf1a30e097f..87331116d12 100644 --- a/src/cloudflare/resources/certificate_authorities/hostname_associations.py +++ b/src/cloudflare/resources/certificate_authorities/hostname_associations.py @@ -24,7 +24,7 @@ make_request_options, ) from ...types.certificate_authorities import ( - TLSCertificatesAndHostnamesHostnameAssociation, + TLSHostnameAssociation, hostname_association_get_params, hostname_association_update_params, ) @@ -53,7 +53,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesHostnameAssociation: + ) -> TLSHostnameAssociation: """ Replace Hostname Associations @@ -90,10 +90,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesHostnameAssociation], - ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], - ), + cast_to=cast(Type[TLSHostnameAssociation], ResultWrapper[TLSHostnameAssociation]), ) def get( @@ -107,7 +104,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesHostnameAssociation: + ) -> TLSHostnameAssociation: """ List Hostname Associations @@ -141,10 +138,7 @@ def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesHostnameAssociation], - ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], - ), + cast_to=cast(Type[TLSHostnameAssociation], ResultWrapper[TLSHostnameAssociation]), ) @@ -169,7 +163,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesHostnameAssociation: + ) -> TLSHostnameAssociation: """ Replace Hostname Associations @@ -206,10 +200,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesHostnameAssociation], - ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], - ), + cast_to=cast(Type[TLSHostnameAssociation], ResultWrapper[TLSHostnameAssociation]), ) async def get( @@ -223,7 +214,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesHostnameAssociation: + ) -> TLSHostnameAssociation: """ List Hostname Associations @@ -257,10 +248,7 @@ async def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesHostnameAssociation], - ResultWrapper[TLSCertificatesAndHostnamesHostnameAssociation], - ), + cast_to=cast(Type[TLSHostnameAssociation], ResultWrapper[TLSHostnameAssociation]), ) diff --git a/src/cloudflare/resources/client_certificates.py b/src/cloudflare/resources/client_certificates.py index d1554410856..bf6f2cbdef4 100644 --- a/src/cloudflare/resources/client_certificates.py +++ b/src/cloudflare/resources/client_certificates.py @@ -7,11 +7,7 @@ import httpx -from ..types import ( - TLSCertificatesAndHostnamesClientCertificate, - client_certificate_list_params, - client_certificate_create_params, -) +from ..types import ClientCertificate, client_certificate_list_params, client_certificate_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -56,7 +52,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ Create a new API Shield mTLS Client Certificate @@ -93,10 +89,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) def list( @@ -115,7 +108,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate]: + ) -> SyncV4PagePaginationArray[ClientCertificate]: """ List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination @@ -145,7 +138,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/client_certificates", - page=SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + page=SyncV4PagePaginationArray[ClientCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -162,7 +155,7 @@ def list( client_certificate_list_params.ClientCertificateListParams, ), ), - model=TLSCertificatesAndHostnamesClientCertificate, + model=ClientCertificate, ) def delete( @@ -176,7 +169,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status. @@ -209,10 +202,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) def edit( @@ -226,7 +216,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint. @@ -259,10 +249,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) def get( @@ -276,7 +263,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ Get Details for a single mTLS API Shield Client Certificate @@ -308,10 +295,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) @@ -336,7 +320,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ Create a new API Shield mTLS Client Certificate @@ -373,10 +357,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) def list( @@ -395,10 +376,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[ - TLSCertificatesAndHostnamesClientCertificate, - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - ]: + ) -> AsyncPaginator[ClientCertificate, AsyncV4PagePaginationArray[ClientCertificate]]: """ List all of your Zone's API Shield mTLS Client Certificates by Status and/or using Pagination @@ -428,7 +406,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/client_certificates", - page=AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], + page=AsyncV4PagePaginationArray[ClientCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -445,7 +423,7 @@ def list( client_certificate_list_params.ClientCertificateListParams, ), ), - model=TLSCertificatesAndHostnamesClientCertificate, + model=ClientCertificate, ) async def delete( @@ -459,7 +437,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ Set a API Shield mTLS Client Certificate to pending_revocation status for processing to revoked status. @@ -492,10 +470,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) async def edit( @@ -509,7 +484,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ If a API Shield mTLS Client Certificate is in a pending_revocation state, you may reactivate it with this endpoint. @@ -542,10 +517,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) async def get( @@ -559,7 +531,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesClientCertificate: + ) -> ClientCertificate: """ Get Details for a single mTLS API Shield Client Certificate @@ -591,10 +563,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesClientCertificate], - ResultWrapper[TLSCertificatesAndHostnamesClientCertificate], - ), + cast_to=cast(Type[ClientCertificate], ResultWrapper[ClientCertificate]), ) diff --git a/src/cloudflare/resources/custom_certificates/custom_certificates.py b/src/cloudflare/resources/custom_certificates/custom_certificates.py index 85304b76f3f..b6a7d4ab90c 100644 --- a/src/cloudflare/resources/custom_certificates/custom_certificates.py +++ b/src/cloudflare/resources/custom_certificates/custom_certificates.py @@ -8,11 +8,11 @@ import httpx from ...types import ( + CustomCertificate, CustomCertificateGetResponse, CustomCertificateEditResponse, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, - TLSCertificatesAndHostnamesCustomCertificate, custom_certificate_edit_params, custom_certificate_list_params, custom_certificate_create_params, @@ -165,7 +165,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate]: + ) -> SyncV4PagePaginationArray[CustomCertificate]: """List, search, and filter all of your custom SSL certificates. The higher @@ -193,7 +193,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/custom_certificates", - page=SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + page=SyncV4PagePaginationArray[CustomCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -208,7 +208,7 @@ def list( custom_certificate_list_params.CustomCertificateListParams, ), ), - model=TLSCertificatesAndHostnamesCustomCertificate, + model=CustomCertificate, ) def delete( @@ -522,10 +522,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[ - TLSCertificatesAndHostnamesCustomCertificate, - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - ]: + ) -> AsyncPaginator[CustomCertificate, AsyncV4PagePaginationArray[CustomCertificate]]: """List, search, and filter all of your custom SSL certificates. The higher @@ -553,7 +550,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") return self._get_api_list( f"/zones/{zone_id}/custom_certificates", - page=AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], + page=AsyncV4PagePaginationArray[CustomCertificate], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -568,7 +565,7 @@ def list( custom_certificate_list_params.CustomCertificateListParams, ), ), - model=TLSCertificatesAndHostnamesCustomCertificate, + model=CustomCertificate, ) async def delete( diff --git a/src/cloudflare/resources/custom_nameservers.py b/src/cloudflare/resources/custom_nameservers.py index 0ca1090e3c7..bf8e7e65e67 100644 --- a/src/cloudflare/resources/custom_nameservers.py +++ b/src/cloudflare/resources/custom_nameservers.py @@ -7,8 +7,8 @@ import httpx from ..types import ( + CustomNameserver, CustomNameserverGetResponse, - DNSCustomNameserversCustomNS, CustomNameserverDeleteResponse, CustomNameserverVerifyResponse, CustomNameserverAvailabiltyResponse, @@ -56,7 +56,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSCustomNameserversCustomNS: + ) -> CustomNameserver: """ Add Account Custom Nameserver @@ -93,7 +93,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSCustomNameserversCustomNS], ResultWrapper[DNSCustomNameserversCustomNS]), + cast_to=cast(Type[CustomNameserver], ResultWrapper[CustomNameserver]), ) def delete( @@ -286,7 +286,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSCustomNameserversCustomNS: + ) -> CustomNameserver: """ Add Account Custom Nameserver @@ -323,7 +323,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSCustomNameserversCustomNS], ResultWrapper[DNSCustomNameserversCustomNS]), + cast_to=cast(Type[CustomNameserver], ResultWrapper[CustomNameserver]), ) async def delete( diff --git a/src/cloudflare/resources/dns/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/analytics/reports/bytimes.py index eb3865f2a64..7e04d625393 100644 --- a/src/cloudflare/resources/dns/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/analytics/reports/bytimes.py @@ -25,7 +25,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime, bytime_get_params +from .....types.dns.analytics.reports import DNSAnalyticsReportByTime, bytime_get_params __all__ = ["Bytimes", "AsyncBytimes"] @@ -58,7 +58,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReportBytime: + ) -> DNSAnalyticsReportByTime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -118,7 +118,7 @@ def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), + cast_to=cast(Type[DNSAnalyticsReportByTime], ResultWrapper[DNSAnalyticsReportByTime]), ) @@ -150,7 +150,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReportBytime: + ) -> DNSAnalyticsReportByTime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -210,7 +210,7 @@ async def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), + cast_to=cast(Type[DNSAnalyticsReportByTime], ResultWrapper[DNSAnalyticsReportByTime]), ) diff --git a/src/cloudflare/resources/dns/analytics/reports/reports.py b/src/cloudflare/resources/dns/analytics/reports/reports.py index c3c6429a258..0a1f0f1716c 100644 --- a/src/cloudflare/resources/dns/analytics/reports/reports.py +++ b/src/cloudflare/resources/dns/analytics/reports/reports.py @@ -32,7 +32,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.dns.analytics import DNSDNSAnalyticsAPIReport, report_get_params +from .....types.dns.analytics import DNSAnalyticsReport, report_get_params __all__ = ["Reports", "AsyncReports"] @@ -67,7 +67,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReport: + ) -> DNSAnalyticsReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -124,7 +124,7 @@ def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), + cast_to=cast(Type[DNSAnalyticsReport], ResultWrapper[DNSAnalyticsReport]), ) @@ -158,7 +158,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReport: + ) -> DNSAnalyticsReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -215,7 +215,7 @@ async def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), + cast_to=cast(Type[DNSAnalyticsReport], ResultWrapper[DNSAnalyticsReport]), ) diff --git a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py index 49da0f978c8..a86961c5b7b 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/bytimes.py @@ -25,7 +25,7 @@ from ......_base_client import ( make_request_options, ) -from ......types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime +from ......types.dns.analytics.reports import DNSAnalyticsReportByTime from ......types.dns.firewall.analytics.reports import bytime_get_params __all__ = ["Bytimes", "AsyncBytimes"] @@ -60,7 +60,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReportBytime: + ) -> DNSAnalyticsReportByTime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -124,7 +124,7 @@ def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), + cast_to=cast(Type[DNSAnalyticsReportByTime], ResultWrapper[DNSAnalyticsReportByTime]), ) @@ -157,7 +157,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReportBytime: + ) -> DNSAnalyticsReportByTime: """ Retrieves a list of aggregate metrics grouped by time interval. @@ -221,7 +221,7 @@ async def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReportBytime], ResultWrapper[DNSDNSAnalyticsAPIReportBytime]), + cast_to=cast(Type[DNSAnalyticsReportByTime], ResultWrapper[DNSAnalyticsReportByTime]), ) diff --git a/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py b/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py index 91b41572e94..e21dbc531ac 100644 --- a/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py +++ b/src/cloudflare/resources/dns/firewall/analytics/reports/reports.py @@ -32,7 +32,7 @@ from ......_base_client import ( make_request_options, ) -from ......types.dns.analytics import DNSDNSAnalyticsAPIReport +from ......types.dns.analytics import DNSAnalyticsReport from ......types.dns.firewall.analytics import report_get_params __all__ = ["Reports", "AsyncReports"] @@ -69,7 +69,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReport: + ) -> DNSAnalyticsReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -130,7 +130,7 @@ def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), + cast_to=cast(Type[DNSAnalyticsReport], ResultWrapper[DNSAnalyticsReport]), ) @@ -165,7 +165,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSDNSAnalyticsAPIReport: + ) -> DNSAnalyticsReport: """ Retrieves a list of summarised aggregate metrics over a given time period. @@ -226,7 +226,7 @@ async def get( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSDNSAnalyticsAPIReport], ResultWrapper[DNSDNSAnalyticsAPIReport]), + cast_to=cast(Type[DNSAnalyticsReport], ResultWrapper[DNSAnalyticsReport]), ) diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index 4071da419ee..009cbc6681d 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -29,7 +29,7 @@ ) from ...._wrappers import ResultWrapper from ....types.dns import ( - DNSFirewallDNSFirewall, + DNSFirewall, FirewallDeleteResponse, firewall_edit_params, firewall_list_params, @@ -79,7 +79,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSFirewallDNSFirewall: + ) -> DNSFirewall: """ Create a configured DNS Firewall Cluster. @@ -143,7 +143,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), + cast_to=cast(Type[DNSFirewall], ResultWrapper[DNSFirewall]), ) def list( @@ -158,7 +158,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[DNSFirewallDNSFirewall]: + ) -> SyncV4PagePaginationArray[DNSFirewall]: """ List configured DNS Firewall clusters for an account. @@ -181,7 +181,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/dns_firewall", - page=SyncV4PagePaginationArray[DNSFirewallDNSFirewall], + page=SyncV4PagePaginationArray[DNSFirewall], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -195,7 +195,7 @@ def list( firewall_list_params.FirewallListParams, ), ), - model=DNSFirewallDNSFirewall, + model=DNSFirewall, ) def delete( @@ -265,7 +265,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSFirewallDNSFirewall: + ) -> DNSFirewall: """ Modify a DNS Firewall Cluster configuration. @@ -334,7 +334,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), + cast_to=cast(Type[DNSFirewall], ResultWrapper[DNSFirewall]), ) def get( @@ -348,7 +348,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSFirewallDNSFirewall: + ) -> DNSFirewall: """ Show a single configured DNS Firewall cluster for an account. @@ -378,7 +378,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), + cast_to=cast(Type[DNSFirewall], ResultWrapper[DNSFirewall]), ) @@ -416,7 +416,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSFirewallDNSFirewall: + ) -> DNSFirewall: """ Create a configured DNS Firewall Cluster. @@ -480,7 +480,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), + cast_to=cast(Type[DNSFirewall], ResultWrapper[DNSFirewall]), ) def list( @@ -495,7 +495,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[DNSFirewallDNSFirewall, AsyncV4PagePaginationArray[DNSFirewallDNSFirewall]]: + ) -> AsyncPaginator[DNSFirewall, AsyncV4PagePaginationArray[DNSFirewall]]: """ List configured DNS Firewall clusters for an account. @@ -518,7 +518,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/dns_firewall", - page=AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], + page=AsyncV4PagePaginationArray[DNSFirewall], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -532,7 +532,7 @@ def list( firewall_list_params.FirewallListParams, ), ), - model=DNSFirewallDNSFirewall, + model=DNSFirewall, ) async def delete( @@ -602,7 +602,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSFirewallDNSFirewall: + ) -> DNSFirewall: """ Modify a DNS Firewall Cluster configuration. @@ -671,7 +671,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), + cast_to=cast(Type[DNSFirewall], ResultWrapper[DNSFirewall]), ) async def get( @@ -685,7 +685,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSFirewallDNSFirewall: + ) -> DNSFirewall: """ Show a single configured DNS Firewall cluster for an account. @@ -715,7 +715,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSFirewallDNSFirewall], ResultWrapper[DNSFirewallDNSFirewall]), + cast_to=cast(Type[DNSFirewall], ResultWrapper[DNSFirewall]), ) diff --git a/src/cloudflare/resources/dnssec.py b/src/cloudflare/resources/dnssec.py index 34ec1894380..c8799dab26a 100644 --- a/src/cloudflare/resources/dnssec.py +++ b/src/cloudflare/resources/dnssec.py @@ -7,7 +7,7 @@ import httpx -from ..types import DNSSECDNSSEC, DNSSECDeleteResponse, dnssec_edit_params +from ..types import DNSSEC, DNSSECDeleteResponse, dnssec_edit_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -26,17 +26,17 @@ make_request_options, ) -__all__ = ["DNSSEC", "AsyncDNSSEC"] +__all__ = ["DNSSECResource", "AsyncDNSSECResource"] -class DNSSEC(SyncAPIResource): +class DNSSECResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DNSSECWithRawResponse: - return DNSSECWithRawResponse(self) + def with_raw_response(self) -> DNSSECResourceWithRawResponse: + return DNSSECResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DNSSECWithStreamingResponse: - return DNSSECWithStreamingResponse(self) + def with_streaming_response(self) -> DNSSECResourceWithStreamingResponse: + return DNSSECResourceWithStreamingResponse(self) def delete( self, @@ -95,7 +95,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECDNSSEC: + ) -> DNSSEC: """ Enable or disable DNSSEC. @@ -148,7 +148,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), + cast_to=cast(Type[DNSSEC], ResultWrapper[DNSSEC]), ) def get( @@ -161,7 +161,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECDNSSEC: + ) -> DNSSEC: """ Details about DNSSEC status and configuration. @@ -187,18 +187,18 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), + cast_to=cast(Type[DNSSEC], ResultWrapper[DNSSEC]), ) -class AsyncDNSSEC(AsyncAPIResource): +class AsyncDNSSECResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDNSSECWithRawResponse: - return AsyncDNSSECWithRawResponse(self) + def with_raw_response(self) -> AsyncDNSSECResourceWithRawResponse: + return AsyncDNSSECResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDNSSECWithStreamingResponse: - return AsyncDNSSECWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDNSSECResourceWithStreamingResponse: + return AsyncDNSSECResourceWithStreamingResponse(self) async def delete( self, @@ -257,7 +257,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECDNSSEC: + ) -> DNSSEC: """ Enable or disable DNSSEC. @@ -310,7 +310,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), + cast_to=cast(Type[DNSSEC], ResultWrapper[DNSSEC]), ) async def get( @@ -323,7 +323,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DNSSECDNSSEC: + ) -> DNSSEC: """ Details about DNSSEC status and configuration. @@ -349,12 +349,12 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DNSSECDNSSEC], ResultWrapper[DNSSECDNSSEC]), + cast_to=cast(Type[DNSSEC], ResultWrapper[DNSSEC]), ) -class DNSSECWithRawResponse: - def __init__(self, dnssec: DNSSEC) -> None: +class DNSSECResourceWithRawResponse: + def __init__(self, dnssec: DNSSECResource) -> None: self._dnssec = dnssec self.delete = to_raw_response_wrapper( @@ -368,8 +368,8 @@ def __init__(self, dnssec: DNSSEC) -> None: ) -class AsyncDNSSECWithRawResponse: - def __init__(self, dnssec: AsyncDNSSEC) -> None: +class AsyncDNSSECResourceWithRawResponse: + def __init__(self, dnssec: AsyncDNSSECResource) -> None: self._dnssec = dnssec self.delete = async_to_raw_response_wrapper( @@ -383,8 +383,8 @@ def __init__(self, dnssec: AsyncDNSSEC) -> None: ) -class DNSSECWithStreamingResponse: - def __init__(self, dnssec: DNSSEC) -> None: +class DNSSECResourceWithStreamingResponse: + def __init__(self, dnssec: DNSSECResource) -> None: self._dnssec = dnssec self.delete = to_streamed_response_wrapper( @@ -398,8 +398,8 @@ def __init__(self, dnssec: DNSSEC) -> None: ) -class AsyncDNSSECWithStreamingResponse: - def __init__(self, dnssec: AsyncDNSSEC) -> None: +class AsyncDNSSECResourceWithStreamingResponse: + def __init__(self, dnssec: AsyncDNSSECResource) -> None: self._dnssec = dnssec self.delete = async_to_streamed_response_wrapper( diff --git a/src/cloudflare/resources/durable_objects/namespaces/objects.py b/src/cloudflare/resources/durable_objects/namespaces/objects.py index 38ccfca148e..721e40b19d4 100644 --- a/src/cloudflare/resources/durable_objects/namespaces/objects.py +++ b/src/cloudflare/resources/durable_objects/namespaces/objects.py @@ -19,7 +19,7 @@ AsyncPaginator, make_request_options, ) -from ....types.durable_objects.namespaces import WorkersObject, object_list_params +from ....types.durable_objects.namespaces import DurableObject, object_list_params __all__ = ["Objects", "AsyncObjects"] @@ -46,7 +46,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncCursorLimitPagination[WorkersObject]: + ) -> SyncCursorLimitPagination[DurableObject]: """ Returns the Durable Objects in a given namespace. @@ -76,7 +76,7 @@ def list( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._get_api_list( f"/accounts/{account_id}/workers/durable_objects/namespaces/{id}/objects", - page=SyncCursorLimitPagination[WorkersObject], + page=SyncCursorLimitPagination[DurableObject], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -90,7 +90,7 @@ def list( object_list_params.ObjectListParams, ), ), - model=WorkersObject, + model=DurableObject, ) @@ -116,7 +116,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[WorkersObject, AsyncCursorLimitPagination[WorkersObject]]: + ) -> AsyncPaginator[DurableObject, AsyncCursorLimitPagination[DurableObject]]: """ Returns the Durable Objects in a given namespace. @@ -146,7 +146,7 @@ def list( raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") return self._get_api_list( f"/accounts/{account_id}/workers/durable_objects/namespaces/{id}/objects", - page=AsyncCursorLimitPagination[WorkersObject], + page=AsyncCursorLimitPagination[DurableObject], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -160,7 +160,7 @@ def list( object_list_params.ObjectListParams, ), ), - model=WorkersObject, + model=DurableObject, ) diff --git a/src/cloudflare/resources/filters.py b/src/cloudflare/resources/filters.py index bcc5384c86e..2f1348e4137 100644 --- a/src/cloudflare/resources/filters.py +++ b/src/cloudflare/resources/filters.py @@ -7,7 +7,7 @@ import httpx from ..types import ( - LegacyJhsFilter, + FirewallFilter, FilterCreateResponse, filter_list_params, filter_create_params, @@ -98,7 +98,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilter]: + ) -> Optional[FirewallFilter]: """ Updates an existing filter. @@ -129,7 +129,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), + cast_to=cast(Type[Optional[FirewallFilter]], ResultWrapper[FirewallFilter]), ) def list( @@ -148,7 +148,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[LegacyJhsFilter]: + ) -> SyncV4PagePaginationArray[FirewallFilter]: """Fetches filters in a zone. You can filter the results using several optional @@ -181,7 +181,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/filters", - page=SyncV4PagePaginationArray[LegacyJhsFilter], + page=SyncV4PagePaginationArray[FirewallFilter], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -199,7 +199,7 @@ def list( filter_list_params.FilterListParams, ), ), - model=LegacyJhsFilter, + model=FirewallFilter, ) def delete( @@ -213,7 +213,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilter]: + ) -> Optional[FirewallFilter]: """ Deletes an existing filter. @@ -243,7 +243,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), + cast_to=cast(Type[Optional[FirewallFilter]], ResultWrapper[FirewallFilter]), ) def get( @@ -257,7 +257,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilter]: + ) -> Optional[FirewallFilter]: """ Fetches the details of a filter. @@ -287,7 +287,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), + cast_to=cast(Type[Optional[FirewallFilter]], ResultWrapper[FirewallFilter]), ) @@ -353,7 +353,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilter]: + ) -> Optional[FirewallFilter]: """ Updates an existing filter. @@ -384,7 +384,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), + cast_to=cast(Type[Optional[FirewallFilter]], ResultWrapper[FirewallFilter]), ) def list( @@ -403,7 +403,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[LegacyJhsFilter, AsyncV4PagePaginationArray[LegacyJhsFilter]]: + ) -> AsyncPaginator[FirewallFilter, AsyncV4PagePaginationArray[FirewallFilter]]: """Fetches filters in a zone. You can filter the results using several optional @@ -436,7 +436,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/filters", - page=AsyncV4PagePaginationArray[LegacyJhsFilter], + page=AsyncV4PagePaginationArray[FirewallFilter], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -454,7 +454,7 @@ def list( filter_list_params.FilterListParams, ), ), - model=LegacyJhsFilter, + model=FirewallFilter, ) async def delete( @@ -468,7 +468,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilter]: + ) -> Optional[FirewallFilter]: """ Deletes an existing filter. @@ -498,7 +498,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), + cast_to=cast(Type[Optional[FirewallFilter]], ResultWrapper[FirewallFilter]), ) async def get( @@ -512,7 +512,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilter]: + ) -> Optional[FirewallFilter]: """ Fetches the details of a filter. @@ -542,7 +542,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilter]], ResultWrapper[LegacyJhsFilter]), + cast_to=cast(Type[Optional[FirewallFilter]], ResultWrapper[FirewallFilter]), ) diff --git a/src/cloudflare/resources/firewall/lockdowns.py b/src/cloudflare/resources/firewall/lockdowns.py index 88f5e1ee6ae..f3600c66241 100644 --- a/src/cloudflare/resources/firewall/lockdowns.py +++ b/src/cloudflare/resources/firewall/lockdowns.py @@ -26,7 +26,7 @@ make_request_options, ) from ...types.firewall import ( - LegacyJhsZonelockdown, + FirewallZoneLockdown, LockdownDeleteResponse, lockdown_list_params, lockdown_create_params, @@ -56,7 +56,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsZonelockdown]: + ) -> Optional[FirewallZoneLockdown]: """ Creates a new Zone Lockdown rule. @@ -83,7 +83,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), + cast_to=cast(Type[Optional[FirewallZoneLockdown]], ResultWrapper[FirewallZoneLockdown]), ) def update( @@ -98,7 +98,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsZonelockdown]: + ) -> Optional[FirewallZoneLockdown]: """ Updates an existing Zone Lockdown rule. @@ -129,7 +129,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), + cast_to=cast(Type[Optional[FirewallZoneLockdown]], ResultWrapper[FirewallZoneLockdown]), ) def list( @@ -151,7 +151,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[LegacyJhsZonelockdown]: + ) -> SyncV4PagePaginationArray[FirewallZoneLockdown]: """Fetches Zone Lockdown rules. You can filter the results using several optional @@ -193,7 +193,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/firewall/lockdowns", - page=SyncV4PagePaginationArray[LegacyJhsZonelockdown], + page=SyncV4PagePaginationArray[FirewallZoneLockdown], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -214,7 +214,7 @@ def list( lockdown_list_params.LockdownListParams, ), ), - model=LegacyJhsZonelockdown, + model=FirewallZoneLockdown, ) def delete( @@ -272,7 +272,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsZonelockdown]: + ) -> Optional[FirewallZoneLockdown]: """ Fetches the details of a Zone Lockdown rule. @@ -302,7 +302,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), + cast_to=cast(Type[Optional[FirewallZoneLockdown]], ResultWrapper[FirewallZoneLockdown]), ) @@ -326,7 +326,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsZonelockdown]: + ) -> Optional[FirewallZoneLockdown]: """ Creates a new Zone Lockdown rule. @@ -353,7 +353,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), + cast_to=cast(Type[Optional[FirewallZoneLockdown]], ResultWrapper[FirewallZoneLockdown]), ) async def update( @@ -368,7 +368,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsZonelockdown]: + ) -> Optional[FirewallZoneLockdown]: """ Updates an existing Zone Lockdown rule. @@ -399,7 +399,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), + cast_to=cast(Type[Optional[FirewallZoneLockdown]], ResultWrapper[FirewallZoneLockdown]), ) def list( @@ -421,7 +421,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[LegacyJhsZonelockdown, AsyncV4PagePaginationArray[LegacyJhsZonelockdown]]: + ) -> AsyncPaginator[FirewallZoneLockdown, AsyncV4PagePaginationArray[FirewallZoneLockdown]]: """Fetches Zone Lockdown rules. You can filter the results using several optional @@ -463,7 +463,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/firewall/lockdowns", - page=AsyncV4PagePaginationArray[LegacyJhsZonelockdown], + page=AsyncV4PagePaginationArray[FirewallZoneLockdown], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -484,7 +484,7 @@ def list( lockdown_list_params.LockdownListParams, ), ), - model=LegacyJhsZonelockdown, + model=FirewallZoneLockdown, ) async def delete( @@ -542,7 +542,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsZonelockdown]: + ) -> Optional[FirewallZoneLockdown]: """ Fetches the details of a Zone Lockdown rule. @@ -572,7 +572,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsZonelockdown]], ResultWrapper[LegacyJhsZonelockdown]), + cast_to=cast(Type[Optional[FirewallZoneLockdown]], ResultWrapper[FirewallZoneLockdown]), ) diff --git a/src/cloudflare/resources/firewall/rules.py b/src/cloudflare/resources/firewall/rules.py index c19ccaebb96..899df1780bd 100644 --- a/src/cloudflare/resources/firewall/rules.py +++ b/src/cloudflare/resources/firewall/rules.py @@ -27,8 +27,8 @@ ) from ...types.firewall import ( RuleEditResponse, + FirewallFilterRule, RuleCreateResponse, - LegacyJhsFilterRule, rule_edit_params, rule_list_params, rule_create_params, @@ -101,7 +101,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilterRule]: + ) -> Optional[FirewallFilterRule]: """ Updates an existing firewall rule. @@ -132,7 +132,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), + cast_to=cast(Type[Optional[FirewallFilterRule]], ResultWrapper[FirewallFilterRule]), ) def list( @@ -150,7 +150,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[LegacyJhsFilterRule]: + ) -> SyncV4PagePaginationArray[FirewallFilterRule]: """Fetches firewall rules in a zone. You can filter the results using several @@ -181,7 +181,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/firewall/rules", - page=SyncV4PagePaginationArray[LegacyJhsFilterRule], + page=SyncV4PagePaginationArray[FirewallFilterRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -198,7 +198,7 @@ def list( rule_list_params.RuleListParams, ), ), - model=LegacyJhsFilterRule, + model=FirewallFilterRule, ) def delete( @@ -213,7 +213,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilterRule]: + ) -> Optional[FirewallFilterRule]: """ Deletes an existing firewall rule. @@ -249,7 +249,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), + cast_to=cast(Type[Optional[FirewallFilterRule]], ResultWrapper[FirewallFilterRule]), ) def edit( @@ -309,7 +309,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilterRule]: + ) -> Optional[FirewallFilterRule]: """ Fetches the details of a firewall rule. @@ -339,7 +339,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), + cast_to=cast(Type[Optional[FirewallFilterRule]], ResultWrapper[FirewallFilterRule]), ) @@ -405,7 +405,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilterRule]: + ) -> Optional[FirewallFilterRule]: """ Updates an existing firewall rule. @@ -436,7 +436,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), + cast_to=cast(Type[Optional[FirewallFilterRule]], ResultWrapper[FirewallFilterRule]), ) def list( @@ -454,7 +454,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[LegacyJhsFilterRule, AsyncV4PagePaginationArray[LegacyJhsFilterRule]]: + ) -> AsyncPaginator[FirewallFilterRule, AsyncV4PagePaginationArray[FirewallFilterRule]]: """Fetches firewall rules in a zone. You can filter the results using several @@ -485,7 +485,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/firewall/rules", - page=AsyncV4PagePaginationArray[LegacyJhsFilterRule], + page=AsyncV4PagePaginationArray[FirewallFilterRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -502,7 +502,7 @@ def list( rule_list_params.RuleListParams, ), ), - model=LegacyJhsFilterRule, + model=FirewallFilterRule, ) async def delete( @@ -517,7 +517,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilterRule]: + ) -> Optional[FirewallFilterRule]: """ Deletes an existing firewall rule. @@ -553,7 +553,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), + cast_to=cast(Type[Optional[FirewallFilterRule]], ResultWrapper[FirewallFilterRule]), ) async def edit( @@ -613,7 +613,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsFilterRule]: + ) -> Optional[FirewallFilterRule]: """ Fetches the details of a firewall rule. @@ -643,7 +643,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsFilterRule]], ResultWrapper[LegacyJhsFilterRule]), + cast_to=cast(Type[Optional[FirewallFilterRule]], ResultWrapper[FirewallFilterRule]), ) diff --git a/src/cloudflare/resources/firewall/waf/overrides.py b/src/cloudflare/resources/firewall/waf/overrides.py index 65e8336f52a..d6dceea4f8b 100644 --- a/src/cloudflare/resources/firewall/waf/overrides.py +++ b/src/cloudflare/resources/firewall/waf/overrides.py @@ -26,7 +26,7 @@ make_request_options, ) from ....types.firewall.waf import ( - LegacyJhsOverride, + WAFOverride, OverrideDeleteResponse, override_list_params, override_create_params, @@ -56,7 +56,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsOverride]: + ) -> Optional[WAFOverride]: """ Creates a URI-based WAF override for a zone. @@ -86,7 +86,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), + cast_to=cast(Type[Optional[WAFOverride]], ResultWrapper[WAFOverride]), ) def update( @@ -101,7 +101,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsOverride]: + ) -> Optional[WAFOverride]: """ Updates an existing URI-based WAF override. @@ -135,7 +135,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), + cast_to=cast(Type[Optional[WAFOverride]], ResultWrapper[WAFOverride]), ) def list( @@ -150,7 +150,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[LegacyJhsOverride]: + ) -> SyncV4PagePaginationArray[WAFOverride]: """ Fetches the URI-based WAF overrides in a zone. @@ -176,7 +176,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/firewall/waf/overrides", - page=SyncV4PagePaginationArray[LegacyJhsOverride], + page=SyncV4PagePaginationArray[WAFOverride], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -190,7 +190,7 @@ def list( override_list_params.OverrideListParams, ), ), - model=LegacyJhsOverride, + model=WAFOverride, ) def delete( @@ -251,7 +251,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsOverride]: + ) -> Optional[WAFOverride]: """ Fetches the details of a URI-based WAF override. @@ -284,7 +284,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), + cast_to=cast(Type[Optional[WAFOverride]], ResultWrapper[WAFOverride]), ) @@ -308,7 +308,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsOverride]: + ) -> Optional[WAFOverride]: """ Creates a URI-based WAF override for a zone. @@ -338,7 +338,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), + cast_to=cast(Type[Optional[WAFOverride]], ResultWrapper[WAFOverride]), ) async def update( @@ -353,7 +353,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsOverride]: + ) -> Optional[WAFOverride]: """ Updates an existing URI-based WAF override. @@ -387,7 +387,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), + cast_to=cast(Type[Optional[WAFOverride]], ResultWrapper[WAFOverride]), ) def list( @@ -402,7 +402,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[LegacyJhsOverride, AsyncV4PagePaginationArray[LegacyJhsOverride]]: + ) -> AsyncPaginator[WAFOverride, AsyncV4PagePaginationArray[WAFOverride]]: """ Fetches the URI-based WAF overrides in a zone. @@ -428,7 +428,7 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") return self._get_api_list( f"/zones/{zone_identifier}/firewall/waf/overrides", - page=AsyncV4PagePaginationArray[LegacyJhsOverride], + page=AsyncV4PagePaginationArray[WAFOverride], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -442,7 +442,7 @@ def list( override_list_params.OverrideListParams, ), ), - model=LegacyJhsOverride, + model=WAFOverride, ) async def delete( @@ -503,7 +503,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsOverride]: + ) -> Optional[WAFOverride]: """ Fetches the details of a URI-based WAF override. @@ -536,7 +536,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsOverride]], ResultWrapper[LegacyJhsOverride]), + cast_to=cast(Type[Optional[WAFOverride]], ResultWrapper[WAFOverride]), ) diff --git a/src/cloudflare/resources/firewall/waf/packages/groups.py b/src/cloudflare/resources/firewall/waf/packages/groups.py index e88635c71b7..2cf9cf75c11 100644 --- a/src/cloudflare/resources/firewall/waf/packages/groups.py +++ b/src/cloudflare/resources/firewall/waf/packages/groups.py @@ -29,7 +29,7 @@ from .....types.firewall.waf.packages import ( GroupGetResponse, GroupEditResponse, - WAFManagedRulesSchemasGroup, + WAFManagedRulesGroup, group_edit_params, group_list_params, ) @@ -63,7 +63,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup]: + ) -> SyncV4PagePaginationArray[WAFManagedRulesGroup]: """ Fetches the WAF rule groups in a WAF package. @@ -103,7 +103,7 @@ def list( raise ValueError(f"Expected a non-empty value for `package_id` but received {package_id!r}") return self._get_api_list( f"/zones/{zone_id}/firewall/waf/packages/{package_id}/groups", - page=SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], + page=SyncV4PagePaginationArray[WAFManagedRulesGroup], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -121,7 +121,7 @@ def list( group_list_params.GroupListParams, ), ), - model=WAFManagedRulesSchemasGroup, + model=WAFManagedRulesGroup, ) def edit( @@ -272,7 +272,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[WAFManagedRulesSchemasGroup, AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup]]: + ) -> AsyncPaginator[WAFManagedRulesGroup, AsyncV4PagePaginationArray[WAFManagedRulesGroup]]: """ Fetches the WAF rule groups in a WAF package. @@ -312,7 +312,7 @@ def list( raise ValueError(f"Expected a non-empty value for `package_id` but received {package_id!r}") return self._get_api_list( f"/zones/{zone_id}/firewall/waf/packages/{package_id}/groups", - page=AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], + page=AsyncV4PagePaginationArray[WAFManagedRulesGroup], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -330,7 +330,7 @@ def list( group_list_params.GroupListParams, ), ), - model=WAFManagedRulesSchemasGroup, + model=WAFManagedRulesGroup, ) async def edit( diff --git a/src/cloudflare/resources/healthchecks/healthchecks.py b/src/cloudflare/resources/healthchecks/healthchecks.py index 8c7b6640746..113f89b83eb 100644 --- a/src/cloudflare/resources/healthchecks/healthchecks.py +++ b/src/cloudflare/resources/healthchecks/healthchecks.py @@ -8,8 +8,8 @@ import httpx from ...types import ( + Healthcheck, HealthcheckListResponse, - HealthchecksHealthchecks, HealthcheckDeleteResponse, healthcheck_edit_params, healthcheck_create_params, @@ -100,7 +100,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Create a new health check. @@ -178,7 +178,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) def update( @@ -225,7 +225,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Update a configured health check. @@ -307,7 +307,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) def list( @@ -437,7 +437,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Patch a configured health check. @@ -519,7 +519,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) def get( @@ -533,7 +533,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Fetch a single configured health check. @@ -563,7 +563,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) @@ -623,7 +623,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Create a new health check. @@ -701,7 +701,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) async def update( @@ -748,7 +748,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Update a configured health check. @@ -830,7 +830,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) async def list( @@ -960,7 +960,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Patch a configured health check. @@ -1042,7 +1042,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) async def get( @@ -1056,7 +1056,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Fetch a single configured health check. @@ -1086,7 +1086,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) diff --git a/src/cloudflare/resources/healthchecks/previews.py b/src/cloudflare/resources/healthchecks/previews.py index a7350c837ec..376b0e5a5ae 100644 --- a/src/cloudflare/resources/healthchecks/previews.py +++ b/src/cloudflare/resources/healthchecks/previews.py @@ -7,7 +7,7 @@ import httpx -from ...types import HealthchecksHealthchecks +from ...types import Healthcheck from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -82,7 +82,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Create a new preview health check. @@ -160,7 +160,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) def delete( @@ -218,7 +218,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Fetch a single configured health check preview. @@ -248,7 +248,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) @@ -304,7 +304,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Create a new preview health check. @@ -382,7 +382,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) async def delete( @@ -440,7 +440,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> HealthchecksHealthchecks: + ) -> Healthcheck: """ Fetch a single configured health check preview. @@ -470,7 +470,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[HealthchecksHealthchecks], ResultWrapper[HealthchecksHealthchecks]), + cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) diff --git a/src/cloudflare/resources/images/v1/v1.py b/src/cloudflare/resources/images/v1/v1.py index 966f1ef0c82..14e662717ec 100644 --- a/src/cloudflare/resources/images/v1/v1.py +++ b/src/cloudflare/resources/images/v1/v1.py @@ -58,14 +58,7 @@ AsyncPaginator, make_request_options, ) -from ....types.images import ( - ImagesImage, - V1ListResponse, - V1DeleteResponse, - v1_edit_params, - v1_list_params, - v1_create_params, -) +from ....types.images import Image, V1ListResponse, V1DeleteResponse, v1_edit_params, v1_list_params, v1_create_params __all__ = ["V1", "AsyncV1"] @@ -107,7 +100,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """ Upload an image with up to 10 Megabytes using a single HTTP POST (multipart/form-data) request. An image can be uploaded by sending an image file @@ -140,7 +133,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """ Upload an image with up to 10 Megabytes using a single HTTP POST (multipart/form-data) request. An image can be uploaded by sending an image file @@ -174,7 +167,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( @@ -193,7 +186,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), + cast_to=cast(Type[Image], ResultWrapper[Image]), ) def list( @@ -314,7 +307,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """Update image access control. On access control change, all copies of the image @@ -360,7 +353,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), + cast_to=cast(Type[Image], ResultWrapper[Image]), ) def get( @@ -374,7 +367,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """ Fetch details for a single image. @@ -404,7 +397,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), + cast_to=cast(Type[Image], ResultWrapper[Image]), ) @@ -445,7 +438,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """ Upload an image with up to 10 Megabytes using a single HTTP POST (multipart/form-data) request. An image can be uploaded by sending an image file @@ -478,7 +471,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """ Upload an image with up to 10 Megabytes using a single HTTP POST (multipart/form-data) request. An image can be uploaded by sending an image file @@ -512,7 +505,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( @@ -531,7 +524,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), + cast_to=cast(Type[Image], ResultWrapper[Image]), ) def list( @@ -652,7 +645,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """Update image access control. On access control change, all copies of the image @@ -698,7 +691,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), + cast_to=cast(Type[Image], ResultWrapper[Image]), ) async def get( @@ -712,7 +705,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImagesImage: + ) -> Image: """ Fetch details for a single image. @@ -742,7 +735,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImagesImage], ResultWrapper[ImagesImage]), + cast_to=cast(Type[Image], ResultWrapper[Image]), ) diff --git a/src/cloudflare/resources/keyless_certificates.py b/src/cloudflare/resources/keyless_certificates.py index d561877e556..6fa50f619f8 100644 --- a/src/cloudflare/resources/keyless_certificates.py +++ b/src/cloudflare/resources/keyless_certificates.py @@ -8,8 +8,8 @@ import httpx from ..types import ( + KeylessCertificateHostname, KeylessCertificateListResponse, - TLSCertificatesAndHostnamesBase, KeylessCertificateDeleteResponse, keyless_certificate_edit_params, keyless_certificate_create_params, @@ -60,7 +60,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesBase: + ) -> KeylessCertificateHostname: """ Create Keyless SSL Configuration @@ -113,7 +113,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), + cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) def list( @@ -217,7 +217,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesBase: + ) -> KeylessCertificateHostname: """This will update attributes of a Keyless SSL. Consists of one or more of the @@ -272,7 +272,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), + cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) def get( @@ -286,7 +286,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesBase: + ) -> KeylessCertificateHostname: """ Get details for one Keyless SSL configuration. @@ -318,7 +318,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), + cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) @@ -347,7 +347,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesBase: + ) -> KeylessCertificateHostname: """ Create Keyless SSL Configuration @@ -400,7 +400,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), + cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) async def list( @@ -504,7 +504,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesBase: + ) -> KeylessCertificateHostname: """This will update attributes of a Keyless SSL. Consists of one or more of the @@ -559,7 +559,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), + cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) async def get( @@ -573,7 +573,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesBase: + ) -> KeylessCertificateHostname: """ Get details for one Keyless SSL configuration. @@ -605,7 +605,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[TLSCertificatesAndHostnamesBase], ResultWrapper[TLSCertificatesAndHostnamesBase]), + cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) diff --git a/src/cloudflare/resources/load_balancers/previews.py b/src/cloudflare/resources/load_balancers/previews.py index d1000157f0e..06267b7e36a 100644 --- a/src/cloudflare/resources/load_balancers/previews.py +++ b/src/cloudflare/resources/load_balancers/previews.py @@ -19,7 +19,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.user.load_balancers import LoadBalancingPreviewResult +from ...types.user.load_balancers import LoadBalancingPreview __all__ = ["Previews", "AsyncPreviews"] @@ -44,7 +44,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoadBalancingPreviewResult: + ) -> LoadBalancingPreview: """ Get the result of a previous preview operation using the provided preview_id. @@ -72,7 +72,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), + cast_to=cast(Type[LoadBalancingPreview], ResultWrapper[LoadBalancingPreview]), ) @@ -96,7 +96,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoadBalancingPreviewResult: + ) -> LoadBalancingPreview: """ Get the result of a previous preview operation using the provided preview_id. @@ -124,7 +124,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), + cast_to=cast(Type[LoadBalancingPreview], ResultWrapper[LoadBalancingPreview]), ) diff --git a/src/cloudflare/resources/logpush/edge.py b/src/cloudflare/resources/logpush/edge.py index f5d3152481b..6d7d106f081 100644 --- a/src/cloudflare/resources/logpush/edge.py +++ b/src/cloudflare/resources/logpush/edge.py @@ -23,7 +23,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.logpush import EdgeGetResponse, LogpushInstantLogsJob, edge_create_params +from ...types.logpush import EdgeGetResponse, InstantLogpushJob, edge_create_params __all__ = ["Edge", "AsyncEdge"] @@ -50,7 +50,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushInstantLogsJob]: + ) -> Optional[InstantLogpushJob]: """ Creates a new Instant Logs job for a zone. @@ -92,7 +92,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushInstantLogsJob]], ResultWrapper[LogpushInstantLogsJob]), + cast_to=cast(Type[Optional[InstantLogpushJob]], ResultWrapper[InstantLogpushJob]), ) def get( @@ -157,7 +157,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushInstantLogsJob]: + ) -> Optional[InstantLogpushJob]: """ Creates a new Instant Logs job for a zone. @@ -199,7 +199,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushInstantLogsJob]], ResultWrapper[LogpushInstantLogsJob]), + cast_to=cast(Type[Optional[InstantLogpushJob]], ResultWrapper[InstantLogpushJob]), ) async def get( diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 3b915b4c181..56f3a10d613 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -25,7 +25,7 @@ make_request_options, ) from ...types.logpush import JobListResponse, JobDeleteResponse, job_create_params, job_update_params -from ...types.logpush.datasets import LogpushLogpushJob +from ...types.logpush.datasets import LogpushJob __all__ = ["Jobs", "AsyncJobs"] @@ -58,7 +58,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushLogpushJob]: + ) -> Optional[LogpushJob]: """ Creates a new Logpush job for an account or zone. @@ -139,7 +139,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), + cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) def update( @@ -160,7 +160,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushLogpushJob]: + ) -> Optional[LogpushJob]: """ Updates a Logpush job. @@ -235,7 +235,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), + cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) def list( @@ -368,7 +368,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushLogpushJob]: + ) -> Optional[LogpushJob]: """ Gets the details of a Logpush job. @@ -411,7 +411,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), + cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) @@ -443,7 +443,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushLogpushJob]: + ) -> Optional[LogpushJob]: """ Creates a new Logpush job for an account or zone. @@ -524,7 +524,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), + cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) async def update( @@ -545,7 +545,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushLogpushJob]: + ) -> Optional[LogpushJob]: """ Updates a Logpush job. @@ -620,7 +620,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), + cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) async def list( @@ -753,7 +753,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogpushLogpushJob]: + ) -> Optional[LogpushJob]: """ Gets the details of a Logpush job. @@ -796,7 +796,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogpushLogpushJob]], ResultWrapper[LogpushLogpushJob]), + cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) diff --git a/src/cloudflare/resources/logs/control/cmb/config.py b/src/cloudflare/resources/logs/control/cmb/config.py index 368b7072259..bc6f02732b6 100644 --- a/src/cloudflare/resources/logs/control/cmb/config.py +++ b/src/cloudflare/resources/logs/control/cmb/config.py @@ -23,7 +23,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.logs.control.cmb import LogcontrolCmbConfig, ConfigDeleteResponse, config_create_params +from .....types.logs.control.cmb import CmbConfig, ConfigDeleteResponse, config_create_params __all__ = ["Config", "AsyncConfig"] @@ -48,7 +48,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogcontrolCmbConfig]: + ) -> Optional[CmbConfig]: """ Updates CMB config. @@ -77,7 +77,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), + cast_to=cast(Type[Optional[CmbConfig]], ResultWrapper[CmbConfig]), ) def delete( @@ -134,7 +134,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogcontrolCmbConfig]: + ) -> Optional[CmbConfig]: """ Gets CMB config. @@ -160,7 +160,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), + cast_to=cast(Type[Optional[CmbConfig]], ResultWrapper[CmbConfig]), ) @@ -184,7 +184,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogcontrolCmbConfig]: + ) -> Optional[CmbConfig]: """ Updates CMB config. @@ -213,7 +213,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), + cast_to=cast(Type[Optional[CmbConfig]], ResultWrapper[CmbConfig]), ) async def delete( @@ -270,7 +270,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LogcontrolCmbConfig]: + ) -> Optional[CmbConfig]: """ Gets CMB config. @@ -296,7 +296,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LogcontrolCmbConfig]], ResultWrapper[LogcontrolCmbConfig]), + cast_to=cast(Type[Optional[CmbConfig]], ResultWrapper[CmbConfig]), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py index a48cd2b441c..6d2f1e9761d 100644 --- a/src/cloudflare/resources/magic_network_monitoring/configs/configs.py +++ b/src/cloudflare/resources/magic_network_monitoring/configs/configs.py @@ -27,7 +27,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring import MagicVisibilityMNMConfig +from ....types.magic_network_monitoring import MagicNetworkMonitoringConfig __all__ = ["Configs", "AsyncConfigs"] @@ -55,7 +55,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Create a new network monitoring configuration. @@ -79,7 +79,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) def update( @@ -92,7 +92,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Update an existing network monitoring configuration, requires the entire configuration to be updated at once. @@ -117,7 +117,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) def delete( @@ -130,7 +130,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Delete an existing network monitoring configuration. @@ -154,7 +154,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) def edit( @@ -167,7 +167,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Update fields in an existing network monitoring configuration. @@ -191,7 +191,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) def get( @@ -204,7 +204,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Lists default sampling and router IPs for account. @@ -228,7 +228,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) @@ -255,7 +255,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Create a new network monitoring configuration. @@ -279,7 +279,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) async def update( @@ -292,7 +292,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Update an existing network monitoring configuration, requires the entire configuration to be updated at once. @@ -317,7 +317,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) async def delete( @@ -330,7 +330,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Delete an existing network monitoring configuration. @@ -354,7 +354,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) async def edit( @@ -367,7 +367,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Update fields in an existing network monitoring configuration. @@ -391,7 +391,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) async def get( @@ -404,7 +404,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Lists default sampling and router IPs for account. @@ -428,7 +428,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/configs/full.py b/src/cloudflare/resources/magic_network_monitoring/configs/full.py index 987c7648410..14f0d1a6dde 100644 --- a/src/cloudflare/resources/magic_network_monitoring/configs/full.py +++ b/src/cloudflare/resources/magic_network_monitoring/configs/full.py @@ -19,7 +19,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring import MagicVisibilityMNMConfig +from ....types.magic_network_monitoring import MagicNetworkMonitoringConfig __all__ = ["Full", "AsyncFull"] @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Lists default sampling, router IPs, and rules for account. @@ -67,7 +67,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) @@ -90,7 +90,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> MagicVisibilityMNMConfig: + ) -> MagicNetworkMonitoringConfig: """ Lists default sampling, router IPs, and rules for account. @@ -114,7 +114,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[MagicVisibilityMNMConfig], ResultWrapper[MagicVisibilityMNMConfig]), + cast_to=cast(Type[MagicNetworkMonitoringConfig], ResultWrapper[MagicNetworkMonitoringConfig]), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py b/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py index 885f5729edc..a3257fb7f14 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/advertisements.py @@ -19,7 +19,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring.rules import MagicVisibilityMNMRuleAdvertisable +from ....types.magic_network_monitoring.rules import MagicNetworkMonitoringRuleAdvertisable __all__ = ["Advertisements", "AsyncAdvertisements"] @@ -44,7 +44,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRuleAdvertisable]: + ) -> Optional[MagicNetworkMonitoringRuleAdvertisable]: """ Update advertisement for rule. @@ -71,7 +71,8 @@ def edit( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[MagicVisibilityMNMRuleAdvertisable]], ResultWrapper[MagicVisibilityMNMRuleAdvertisable] + Type[Optional[MagicNetworkMonitoringRuleAdvertisable]], + ResultWrapper[MagicNetworkMonitoringRuleAdvertisable], ), ) @@ -96,7 +97,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRuleAdvertisable]: + ) -> Optional[MagicNetworkMonitoringRuleAdvertisable]: """ Update advertisement for rule. @@ -123,7 +124,8 @@ async def edit( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[MagicVisibilityMNMRuleAdvertisable]], ResultWrapper[MagicVisibilityMNMRuleAdvertisable] + Type[Optional[MagicNetworkMonitoringRuleAdvertisable]], + ResultWrapper[MagicNetworkMonitoringRuleAdvertisable], ), ) diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py index 9b868e59894..e1888cd6b18 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py @@ -27,7 +27,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.magic_network_monitoring import RuleListResponse, MagicVisibilityMNMRule +from ....types.magic_network_monitoring import RuleListResponse, MagicNetworkMonitoringRule __all__ = ["Rules", "AsyncRules"] @@ -55,7 +55,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """Create network monitoring rules for account. Currently only supports creating a @@ -81,7 +81,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) def update( @@ -94,7 +94,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ Update network monitoring rules for account. @@ -118,7 +118,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) def list( @@ -169,7 +169,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ Delete a network monitoring rule for account. @@ -195,7 +195,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) def edit( @@ -209,7 +209,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ Update a network monitoring rule for account. @@ -235,7 +235,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) 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, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ List a single network monitoring rule for account. @@ -275,7 +275,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) @@ -302,7 +302,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """Create network monitoring rules for account. Currently only supports creating a @@ -328,7 +328,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) async def update( @@ -341,7 +341,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ Update network monitoring rules for account. @@ -365,7 +365,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) async def list( @@ -416,7 +416,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ Delete a network monitoring rule for account. @@ -442,7 +442,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) async def edit( @@ -456,7 +456,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ Update a network monitoring rule for account. @@ -482,7 +482,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) 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, - ) -> Optional[MagicVisibilityMNMRule]: + ) -> Optional[MagicNetworkMonitoringRule]: """ List a single network monitoring rule for account. @@ -522,7 +522,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[MagicVisibilityMNMRule]], ResultWrapper[MagicVisibilityMNMRule]), + cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) diff --git a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py index d75071c65a6..0b04602dfd9 100644 --- a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py +++ b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py @@ -7,9 +7,9 @@ import httpx from ...types import ( + MTLSCertificate, + MTLSCertificateUpdate, MTLSCertificateListResponse, - TLSCertificatesAndHostnamesCertificateObjectPost, - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate_create_params, ) from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -68,7 +68,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesCertificateObjectPost: + ) -> MTLSCertificateUpdate: """ Upload a certificate that you want to use with mTLS-enabled Cloudflare services. @@ -111,10 +111,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesCertificateObjectPost], - ResultWrapper[TLSCertificatesAndHostnamesCertificateObjectPost], - ), + cast_to=cast(Type[MTLSCertificateUpdate], ResultWrapper[MTLSCertificateUpdate]), ) def list( @@ -167,7 +164,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: + ) -> MTLSCertificate: """ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services. @@ -200,10 +197,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ), + cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), ) def get( @@ -217,7 +211,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: + ) -> MTLSCertificate: """ Fetches a single mTLS certificate. @@ -249,10 +243,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ), + cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), ) @@ -283,7 +274,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesCertificateObjectPost: + ) -> MTLSCertificateUpdate: """ Upload a certificate that you want to use with mTLS-enabled Cloudflare services. @@ -326,10 +317,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesCertificateObjectPost], - ResultWrapper[TLSCertificatesAndHostnamesCertificateObjectPost], - ), + cast_to=cast(Type[MTLSCertificateUpdate], ResultWrapper[MTLSCertificateUpdate]), ) async def list( @@ -382,7 +370,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: + ) -> MTLSCertificate: """ Deletes the mTLS certificate unless the certificate is in use by one or more Cloudflare services. @@ -415,10 +403,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ), + cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), ) async def get( @@ -432,7 +417,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesComponentsSchemasCertificateObject: + ) -> MTLSCertificate: """ Fetches a single mTLS certificate. @@ -464,10 +449,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject], - ), + cast_to=cast(Type[MTLSCertificate], ResultWrapper[MTLSCertificate]), ) diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py index ee2fd407e19..840dd2147a0 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py @@ -25,7 +25,7 @@ ) from ....types.origin_tls_client_auth.hostnames import ( CertificateListResponse, - TLSCertificatesAndHostnamesSchemasCertificateObject, + OriginTLSClientCertificate, certificate_create_params, ) @@ -53,7 +53,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: + ) -> OriginTLSClientCertificate: """Upload a certificate to be used for client authentication on a hostname. 10 @@ -92,10 +92,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], - ), + cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) def list( @@ -148,7 +145,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: + ) -> OriginTLSClientCertificate: """ Delete Hostname Client Certificate @@ -178,10 +175,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], - ), + cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) def get( @@ -195,7 +189,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: + ) -> OriginTLSClientCertificate: """ Get the certificate by ID to be used for client authentication on a hostname. @@ -225,10 +219,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], - ), + cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) @@ -253,7 +244,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: + ) -> OriginTLSClientCertificate: """Upload a certificate to be used for client authentication on a hostname. 10 @@ -292,10 +283,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], - ), + cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) async def list( @@ -348,7 +336,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: + ) -> OriginTLSClientCertificate: """ Delete Hostname Client Certificate @@ -378,10 +366,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], - ), + cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) async def get( @@ -395,7 +380,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSchemasCertificateObject: + ) -> OriginTLSClientCertificate: """ Get the certificate by ID to be used for client authentication on a hostname. @@ -425,10 +410,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSchemasCertificateObject], - ResultWrapper[TLSCertificatesAndHostnamesSchemasCertificateObject], - ), + cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py index 3ad78e8d631..2ebc5bf3915 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/hostnames.py @@ -33,7 +33,7 @@ ) from ....types.origin_tls_client_auth import ( HostnameUpdateResponse, - TLSCertificatesAndHostnamesHostnameCertidObject, + OriginTLSClientCertificateID, hostname_update_params, ) @@ -109,7 +109,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesHostnameCertidObject: + ) -> OriginTLSClientCertificateID: """ Get the Hostname Status for Client Authentication @@ -140,10 +140,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesHostnameCertidObject], - ResultWrapper[TLSCertificatesAndHostnamesHostnameCertidObject], - ), + cast_to=cast(Type[OriginTLSClientCertificateID], ResultWrapper[OriginTLSClientCertificateID]), ) @@ -216,7 +213,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesHostnameCertidObject: + ) -> OriginTLSClientCertificateID: """ Get the Hostname Status for Client Authentication @@ -247,10 +244,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesHostnameCertidObject], - ResultWrapper[TLSCertificatesAndHostnamesHostnameCertidObject], - ), + cast_to=cast(Type[OriginTLSClientCertificateID], ResultWrapper[OriginTLSClientCertificateID]), ) diff --git a/src/cloudflare/resources/page_shield/page_shield.py b/src/cloudflare/resources/page_shield/page_shield.py index 90585101a8f..4c0d32b9133 100644 --- a/src/cloudflare/resources/page_shield/page_shield.py +++ b/src/cloudflare/resources/page_shield/page_shield.py @@ -6,7 +6,7 @@ import httpx -from ...types import PageShieldGetZoneSettings, PageShieldUpdateZoneSettings, page_shield_update_params +from ...types import PageShieldSetting, PageShieldUpdateResponse, page_shield_update_params from .scripts import ( Scripts, AsyncScripts, @@ -86,7 +86,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldUpdateZoneSettings: + ) -> PageShieldUpdateResponse: """ Updates Page Shield settings. @@ -127,7 +127,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldUpdateZoneSettings], ResultWrapper[PageShieldUpdateZoneSettings]), + cast_to=cast(Type[PageShieldUpdateResponse], ResultWrapper[PageShieldUpdateResponse]), ) def get( @@ -140,7 +140,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldGetZoneSettings: + ) -> PageShieldSetting: """ Fetches the Page Shield settings. @@ -166,7 +166,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldGetZoneSettings], ResultWrapper[PageShieldGetZoneSettings]), + cast_to=cast(Type[PageShieldSetting], ResultWrapper[PageShieldSetting]), ) @@ -204,7 +204,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldUpdateZoneSettings: + ) -> PageShieldUpdateResponse: """ Updates Page Shield settings. @@ -245,7 +245,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldUpdateZoneSettings], ResultWrapper[PageShieldUpdateZoneSettings]), + cast_to=cast(Type[PageShieldUpdateResponse], ResultWrapper[PageShieldUpdateResponse]), ) async def get( @@ -258,7 +258,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldGetZoneSettings: + ) -> PageShieldSetting: """ Fetches the Page Shield settings. @@ -284,7 +284,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[PageShieldGetZoneSettings], ResultWrapper[PageShieldGetZoneSettings]), + cast_to=cast(Type[PageShieldSetting], ResultWrapper[PageShieldSetting]), ) diff --git a/src/cloudflare/resources/page_shield/policies.py b/src/cloudflare/resources/page_shield/policies.py index 5f5e5244888..626e619f8ac 100644 --- a/src/cloudflare/resources/page_shield/policies.py +++ b/src/cloudflare/resources/page_shield/policies.py @@ -24,12 +24,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.page_shield import ( - PolicyListResponse, - PageShieldPageshieldPolicy, - policy_create_params, - policy_update_params, -) +from ...types.page_shield import PageShieldPolicy, PolicyListResponse, policy_create_params, policy_update_params __all__ = ["Policies", "AsyncPolicies"] @@ -58,7 +53,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldPageshieldPolicy: + ) -> PageShieldPolicy: """ Create a Page Shield policy. @@ -101,7 +96,7 @@ def create( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PageShieldPageshieldPolicy, + cast_to=PageShieldPolicy, ) def update( @@ -120,7 +115,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldPageshieldPolicy: + ) -> PageShieldPolicy: """ Update a Page Shield policy by ID. @@ -167,7 +162,7 @@ def update( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PageShieldPageshieldPolicy, + cast_to=PageShieldPolicy, ) def list( @@ -261,7 +256,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldPageshieldPolicy: + ) -> PageShieldPolicy: """ Fetches a Page Shield policy by ID. @@ -287,7 +282,7 @@ def get( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PageShieldPageshieldPolicy, + cast_to=PageShieldPolicy, ) @@ -315,7 +310,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldPageshieldPolicy: + ) -> PageShieldPolicy: """ Create a Page Shield policy. @@ -358,7 +353,7 @@ async def create( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PageShieldPageshieldPolicy, + cast_to=PageShieldPolicy, ) async def update( @@ -377,7 +372,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldPageshieldPolicy: + ) -> PageShieldPolicy: """ Update a Page Shield policy by ID. @@ -424,7 +419,7 @@ async def update( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PageShieldPageshieldPolicy, + cast_to=PageShieldPolicy, ) async def list( @@ -518,7 +513,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> PageShieldPageshieldPolicy: + ) -> PageShieldPolicy: """ Fetches a Page Shield policy by ID. @@ -544,7 +539,7 @@ async def get( options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=PageShieldPageshieldPolicy, + cast_to=PageShieldPolicy, ) diff --git a/src/cloudflare/resources/pagerules/settings.py b/src/cloudflare/resources/pagerules/settings.py index 8e904e12da4..d78d2708c42 100644 --- a/src/cloudflare/resources/pagerules/settings.py +++ b/src/cloudflare/resources/pagerules/settings.py @@ -19,7 +19,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.pagerules import ZonesSettings +from ...types.pagerules import ZonePageruleSettings __all__ = ["Settings", "AsyncSettings"] @@ -43,7 +43,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ZonesSettings: + ) -> ZonePageruleSettings: """ Returns a list of settings (and their details) that Page Rules can apply to matching requests. @@ -70,7 +70,7 @@ def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ZonesSettings], ResultWrapper[ZonesSettings]), + cast_to=cast(Type[ZonePageruleSettings], ResultWrapper[ZonePageruleSettings]), ) @@ -93,7 +93,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ZonesSettings: + ) -> ZonePageruleSettings: """ Returns a list of settings (and their details) that Page Rules can apply to matching requests. @@ -120,7 +120,7 @@ async def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ZonesSettings], ResultWrapper[ZonesSettings]), + cast_to=cast(Type[ZonePageruleSettings], ResultWrapper[ZonePageruleSettings]), ) diff --git a/src/cloudflare/resources/plans.py b/src/cloudflare/resources/plans.py index d29e72ed769..f6ed7bc0e42 100644 --- a/src/cloudflare/resources/plans.py +++ b/src/cloudflare/resources/plans.py @@ -6,7 +6,7 @@ import httpx -from ..types import PlanListResponse, BillSubsAPIAvailableRatePlan +from ..types import PlanListResponse, AvailableRatePlan from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -83,7 +83,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BillSubsAPIAvailableRatePlan: + ) -> AvailableRatePlan: """ Details of the available plan that the zone can subscribe to. @@ -113,7 +113,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BillSubsAPIAvailableRatePlan], ResultWrapper[BillSubsAPIAvailableRatePlan]), + cast_to=cast(Type[AvailableRatePlan], ResultWrapper[AvailableRatePlan]), ) @@ -176,7 +176,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BillSubsAPIAvailableRatePlan: + ) -> AvailableRatePlan: """ Details of the available plan that the zone can subscribe to. @@ -206,7 +206,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[BillSubsAPIAvailableRatePlan], ResultWrapper[BillSubsAPIAvailableRatePlan]), + cast_to=cast(Type[AvailableRatePlan], ResultWrapper[AvailableRatePlan]), ) diff --git a/src/cloudflare/resources/ssl/universal/settings.py b/src/cloudflare/resources/ssl/universal/settings.py index 36de0618329..c81ede1c479 100644 --- a/src/cloudflare/resources/ssl/universal/settings.py +++ b/src/cloudflare/resources/ssl/universal/settings.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.ssl.universal import TLSCertificatesAndHostnamesUniversal, setting_edit_params +from ....types.ssl.universal import UniversalSSLSettings, setting_edit_params __all__ = ["Settings", "AsyncSettings"] @@ -48,7 +48,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesUniversal: + ) -> UniversalSSLSettings: """ Patch Universal SSL Settings for a Zone. @@ -101,9 +101,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] - ), + cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), ) def get( @@ -116,7 +114,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesUniversal: + ) -> UniversalSSLSettings: """ Get Universal SSL Settings for a Zone. @@ -142,9 +140,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] - ), + cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), ) @@ -168,7 +164,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesUniversal: + ) -> UniversalSSLSettings: """ Patch Universal SSL Settings for a Zone. @@ -221,9 +217,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] - ), + cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), ) async def get( @@ -236,7 +230,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesUniversal: + ) -> UniversalSSLSettings: """ Get Universal SSL Settings for a Zone. @@ -262,9 +256,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesUniversal], ResultWrapper[TLSCertificatesAndHostnamesUniversal] - ), + cast_to=cast(Type[UniversalSSLSettings], ResultWrapper[UniversalSSLSettings]), ) diff --git a/src/cloudflare/resources/stream/audio_tracks.py b/src/cloudflare/resources/stream/audio_tracks.py index 44c8c6646a1..3ac3d43c20d 100644 --- a/src/cloudflare/resources/stream/audio_tracks.py +++ b/src/cloudflare/resources/stream/audio_tracks.py @@ -24,8 +24,8 @@ make_request_options, ) from ...types.stream import ( + StreamAudio, AudioTrackGetResponse, - StreamAdditionalAudio, AudioTrackDeleteResponse, audio_track_copy_params, audio_track_edit_params, @@ -112,7 +112,7 @@ def copy( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamAdditionalAudio: + ) -> StreamAudio: """ Adds an additional audio track to a video using the provided audio track URL. @@ -156,7 +156,7 @@ def copy( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), + cast_to=cast(Type[StreamAudio], ResultWrapper[StreamAudio]), ) def edit( @@ -173,7 +173,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamAdditionalAudio: + ) -> StreamAudio: """Edits additional audio tracks on a video. Editing the default status of an audio @@ -222,7 +222,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), + cast_to=cast(Type[StreamAudio], ResultWrapper[StreamAudio]), ) def get( @@ -350,7 +350,7 @@ async def copy( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamAdditionalAudio: + ) -> StreamAudio: """ Adds an additional audio track to a video using the provided audio track URL. @@ -394,7 +394,7 @@ async def copy( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), + cast_to=cast(Type[StreamAudio], ResultWrapper[StreamAudio]), ) async def edit( @@ -411,7 +411,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamAdditionalAudio: + ) -> StreamAudio: """Edits additional audio tracks on a video. Editing the default status of an audio @@ -460,7 +460,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamAdditionalAudio], ResultWrapper[StreamAdditionalAudio]), + cast_to=cast(Type[StreamAudio], ResultWrapper[StreamAudio]), ) async def get( diff --git a/src/cloudflare/resources/user/firewall/access_rules.py b/src/cloudflare/resources/user/firewall/access_rules.py index 8a6c4c17d29..762b30cfa70 100644 --- a/src/cloudflare/resources/user/firewall/access_rules.py +++ b/src/cloudflare/resources/user/firewall/access_rules.py @@ -27,7 +27,7 @@ make_request_options, ) from ....types.user.firewall import ( - LegacyJhsRule, + FirewallRule, AccessRuleDeleteResponse, access_rule_edit_params, access_rule_list_params, @@ -58,7 +58,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsRule]: + ) -> Optional[FirewallRule]: """ Creates a new IP Access rule for all zones owned by the current user. @@ -97,7 +97,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), + cast_to=cast(Type[Optional[FirewallRule]], ResultWrapper[FirewallRule]), ) def list( @@ -115,7 +115,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[LegacyJhsRule]: + ) -> SyncV4PagePaginationArray[FirewallRule]: """Fetches IP Access rules of the user. You can filter the results using several @@ -140,7 +140,7 @@ def list( """ return self._get_api_list( "/user/firewall/access_rules/rules", - page=SyncV4PagePaginationArray[LegacyJhsRule], + page=SyncV4PagePaginationArray[FirewallRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -158,7 +158,7 @@ def list( access_rule_list_params.AccessRuleListParams, ), ), - model=LegacyJhsRule, + model=FirewallRule, ) def delete( @@ -214,7 +214,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsRule]: + ) -> Optional[FirewallRule]: """Updates an IP Access rule defined at the user level. You can only update the @@ -253,7 +253,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), + cast_to=cast(Type[Optional[FirewallRule]], ResultWrapper[FirewallRule]), ) @@ -278,7 +278,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsRule]: + ) -> Optional[FirewallRule]: """ Creates a new IP Access rule for all zones owned by the current user. @@ -317,7 +317,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), + cast_to=cast(Type[Optional[FirewallRule]], ResultWrapper[FirewallRule]), ) def list( @@ -335,7 +335,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[LegacyJhsRule, AsyncV4PagePaginationArray[LegacyJhsRule]]: + ) -> AsyncPaginator[FirewallRule, AsyncV4PagePaginationArray[FirewallRule]]: """Fetches IP Access rules of the user. You can filter the results using several @@ -360,7 +360,7 @@ def list( """ return self._get_api_list( "/user/firewall/access_rules/rules", - page=AsyncV4PagePaginationArray[LegacyJhsRule], + page=AsyncV4PagePaginationArray[FirewallRule], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -378,7 +378,7 @@ def list( access_rule_list_params.AccessRuleListParams, ), ), - model=LegacyJhsRule, + model=FirewallRule, ) async def delete( @@ -434,7 +434,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LegacyJhsRule]: + ) -> Optional[FirewallRule]: """Updates an IP Access rule defined at the user level. You can only update the @@ -473,7 +473,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[LegacyJhsRule]], ResultWrapper[LegacyJhsRule]), + cast_to=cast(Type[Optional[FirewallRule]], ResultWrapper[FirewallRule]), ) diff --git a/src/cloudflare/resources/user/load_balancers/preview.py b/src/cloudflare/resources/user/load_balancers/preview.py index 859f9e7c8e5..ded8823d74b 100644 --- a/src/cloudflare/resources/user/load_balancers/preview.py +++ b/src/cloudflare/resources/user/load_balancers/preview.py @@ -19,7 +19,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.user.load_balancers import LoadBalancingPreviewResult +from ....types.user.load_balancers import LoadBalancingPreview __all__ = ["Preview", "AsyncPreview"] @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoadBalancingPreviewResult: + ) -> LoadBalancingPreview: """ Get the result of a previous preview operation using the provided preview_id. @@ -67,7 +67,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), + cast_to=cast(Type[LoadBalancingPreview], ResultWrapper[LoadBalancingPreview]), ) @@ -90,7 +90,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> LoadBalancingPreviewResult: + ) -> LoadBalancingPreview: """ Get the result of a previous preview operation using the provided preview_id. @@ -114,7 +114,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[LoadBalancingPreviewResult], ResultWrapper[LoadBalancingPreviewResult]), + cast_to=cast(Type[LoadBalancingPreview], ResultWrapper[LoadBalancingPreview]), ) diff --git a/src/cloudflare/resources/user/organizations.py b/src/cloudflare/resources/user/organizations.py index 97ce0a41c27..1e3d17f1184 100644 --- a/src/cloudflare/resources/user/organizations.py +++ b/src/cloudflare/resources/user/organizations.py @@ -19,7 +19,7 @@ ) from ..._wrappers import ResultWrapper from ...pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from ...types.user import IamOrganization, OrganizationGetResponse, OrganizationDeleteResponse, organization_list_params +from ...types.user import Organization, OrganizationGetResponse, OrganizationDeleteResponse, organization_list_params from ..._base_client import ( AsyncPaginator, make_request_options, @@ -53,7 +53,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[IamOrganization]: + ) -> SyncV4PagePaginationArray[Organization]: """ Lists organizations the user is associated with. @@ -82,7 +82,7 @@ def list( """ return self._get_api_list( "/user/organizations", - page=SyncV4PagePaginationArray[IamOrganization], + page=SyncV4PagePaginationArray[Organization], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -101,7 +101,7 @@ def list( organization_list_params.OrganizationListParams, ), ), - model=IamOrganization, + model=Organization, ) def delete( @@ -209,7 +209,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[IamOrganization, AsyncV4PagePaginationArray[IamOrganization]]: + ) -> AsyncPaginator[Organization, AsyncV4PagePaginationArray[Organization]]: """ Lists organizations the user is associated with. @@ -238,7 +238,7 @@ def list( """ return self._get_api_list( "/user/organizations", - page=AsyncV4PagePaginationArray[IamOrganization], + page=AsyncV4PagePaginationArray[Organization], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -257,7 +257,7 @@ def list( organization_list_params.OrganizationListParams, ), ), - model=IamOrganization, + model=Organization, ) async def delete( diff --git a/src/cloudflare/resources/waiting_rooms/events/details.py b/src/cloudflare/resources/waiting_rooms/events/details.py index 9cfcbd76f2e..9cdb0fc0c8b 100644 --- a/src/cloudflare/resources/waiting_rooms/events/details.py +++ b/src/cloudflare/resources/waiting_rooms/events/details.py @@ -19,7 +19,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.waiting_rooms.events import WaitingroomEventDetailsResult +from ....types.waiting_rooms.events import WaitingroomEventDetails __all__ = ["Details", "AsyncDetails"] @@ -45,7 +45,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventDetailsResult: + ) -> WaitingroomEventDetails: """Previews an event's configuration as if it was active. Inherited fields from the @@ -77,7 +77,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventDetailsResult], ResultWrapper[WaitingroomEventDetailsResult]), + cast_to=cast(Type[WaitingroomEventDetails], ResultWrapper[WaitingroomEventDetails]), ) @@ -102,7 +102,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventDetailsResult: + ) -> WaitingroomEventDetails: """Previews an event's configuration as if it was active. Inherited fields from the @@ -134,7 +134,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventDetailsResult], ResultWrapper[WaitingroomEventDetailsResult]), + cast_to=cast(Type[WaitingroomEventDetails], ResultWrapper[WaitingroomEventDetails]), ) diff --git a/src/cloudflare/resources/waiting_rooms/events/events.py b/src/cloudflare/resources/waiting_rooms/events/events.py index 705e4ab4eb0..0f506aa3801 100644 --- a/src/cloudflare/resources/waiting_rooms/events/events.py +++ b/src/cloudflare/resources/waiting_rooms/events/events.py @@ -32,9 +32,9 @@ make_request_options, ) from ....types.waiting_rooms import ( + WaitingroomEvent, EventListResponse, EventDeleteResponse, - WaitingroomEventResult, event_edit_params, event_create_params, event_update_params, @@ -80,7 +80,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """Only available for the Waiting Room Advanced subscription. Creates an event for @@ -177,7 +177,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) def update( @@ -205,7 +205,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """ Updates a configured event for a waiting room. @@ -298,7 +298,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) def list( @@ -413,7 +413,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """ Patches a configured event for a waiting room. @@ -506,7 +506,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) def get( @@ -521,7 +521,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """ Fetches a single configured event for a waiting room. @@ -551,7 +551,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) @@ -592,7 +592,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """Only available for the Waiting Room Advanced subscription. Creates an event for @@ -689,7 +689,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) async def update( @@ -717,7 +717,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """ Updates a configured event for a waiting room. @@ -810,7 +810,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) async def list( @@ -925,7 +925,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """ Patches a configured event for a waiting room. @@ -1018,7 +1018,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) async def get( @@ -1033,7 +1033,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomEventResult: + ) -> WaitingroomEvent: """ Fetches a single configured event for a waiting room. @@ -1063,7 +1063,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomEventResult], ResultWrapper[WaitingroomEventResult]), + cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) diff --git a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py index 213c648f1a2..ff2bb29295e 100644 --- a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py +++ b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py @@ -32,7 +32,7 @@ AsyncEventsWithStreamingResponse, ) from ...types import ( - WaitingroomWaitingroom, + WaitingRoom, WaitingRoomListResponse, WaitingRoomDeleteResponse, waiting_room_edit_params, @@ -153,7 +153,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Creates a new waiting room. @@ -458,7 +458,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) def update( @@ -509,7 +509,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Updates a configured waiting room. @@ -816,7 +816,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) def list( @@ -948,7 +948,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Patches a configured waiting room. @@ -1255,7 +1255,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) def get( @@ -1269,7 +1269,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Fetches a single configured waiting room. @@ -1297,7 +1297,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) @@ -1377,7 +1377,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Creates a new waiting room. @@ -1682,7 +1682,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) async def update( @@ -1733,7 +1733,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Updates a configured waiting room. @@ -2040,7 +2040,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) async def list( @@ -2172,7 +2172,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Patches a configured waiting room. @@ -2479,7 +2479,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) async def get( @@ -2493,7 +2493,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WaitingroomWaitingroom: + ) -> WaitingRoom: """ Fetches a single configured waiting room. @@ -2521,7 +2521,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WaitingroomWaitingroom], ResultWrapper[WaitingroomWaitingroom]), + cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) diff --git a/src/cloudflare/resources/web3/hostnames/hostnames.py b/src/cloudflare/resources/web3/hostnames/hostnames.py index b50b1398a70..9473bfe6c9d 100644 --- a/src/cloudflare/resources/web3/hostnames/hostnames.py +++ b/src/cloudflare/resources/web3/hostnames/hostnames.py @@ -23,7 +23,7 @@ from ...._wrappers import ResultWrapper from ....types.web3 import ( HostnameListResponse, - DwebConfigWeb3Hostname, + DistributedWebHostname, HostnameDeleteResponse, hostname_edit_params, hostname_create_params, @@ -70,7 +70,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigWeb3Hostname: + ) -> DistributedWebHostname: """ Create Web3 Hostname @@ -110,7 +110,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), + cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) def list( @@ -209,7 +209,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigWeb3Hostname: + ) -> DistributedWebHostname: """ Edit Web3 Hostname @@ -250,7 +250,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), + cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) def get( @@ -264,7 +264,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigWeb3Hostname: + ) -> DistributedWebHostname: """ Web3 Hostname Details @@ -294,7 +294,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), + cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) @@ -324,7 +324,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigWeb3Hostname: + ) -> DistributedWebHostname: """ Create Web3 Hostname @@ -364,7 +364,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), + cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) async def list( @@ -463,7 +463,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigWeb3Hostname: + ) -> DistributedWebHostname: """ Edit Web3 Hostname @@ -504,7 +504,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), + cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) async def get( @@ -518,7 +518,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigWeb3Hostname: + ) -> DistributedWebHostname: """ Web3 Hostname Details @@ -548,7 +548,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigWeb3Hostname], ResultWrapper[DwebConfigWeb3Hostname]), + cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) diff --git a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py index 4b7e437e1ae..c3119b5683d 100644 --- a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py +++ b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/content_lists.py @@ -32,8 +32,8 @@ from ......_base_client import ( make_request_options, ) -from ......types.web3.hostnames.ipfs_universal_paths import DwebConfigContentListDetails, content_list_update_params -from ......types.web3.hostnames.ipfs_universal_paths.content_lists import DwebConfigContentListEntryParam +from ......types.web3.hostnames.ipfs_universal_paths import DistributedWebConfigContentList, content_list_update_params +from ......types.web3.hostnames.ipfs_universal_paths.content_lists import DistributedWebConfigContentListEntryParam __all__ = ["ContentLists", "AsyncContentLists"] @@ -57,14 +57,14 @@ def update( *, zone_identifier: str, action: Literal["block"], - entries: Iterable[DwebConfigContentListEntryParam], + entries: Iterable[DistributedWebConfigContentListEntryParam], # 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, - ) -> DwebConfigContentListDetails: + ) -> DistributedWebConfigContentList: """ Update IPFS Universal Path Gateway Content List @@ -105,7 +105,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), + cast_to=cast(Type[DistributedWebConfigContentList], ResultWrapper[DistributedWebConfigContentList]), ) def get( @@ -119,7 +119,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListDetails: + ) -> DistributedWebConfigContentList: """ IPFS Universal Path Gateway Content List Details @@ -149,7 +149,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), + cast_to=cast(Type[DistributedWebConfigContentList], ResultWrapper[DistributedWebConfigContentList]), ) @@ -172,14 +172,14 @@ async def update( *, zone_identifier: str, action: Literal["block"], - entries: Iterable[DwebConfigContentListEntryParam], + entries: Iterable[DistributedWebConfigContentListEntryParam], # 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, - ) -> DwebConfigContentListDetails: + ) -> DistributedWebConfigContentList: """ Update IPFS Universal Path Gateway Content List @@ -220,7 +220,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), + cast_to=cast(Type[DistributedWebConfigContentList], ResultWrapper[DistributedWebConfigContentList]), ) async def get( @@ -234,7 +234,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListDetails: + ) -> DistributedWebConfigContentList: """ IPFS Universal Path Gateway Content List Details @@ -264,7 +264,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListDetails], ResultWrapper[DwebConfigContentListDetails]), + cast_to=cast(Type[DistributedWebConfigContentList], ResultWrapper[DistributedWebConfigContentList]), ) diff --git a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py index 4c135417cc9..5c3b41f76dd 100644 --- a/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py +++ b/src/cloudflare/resources/web3/hostnames/ipfs_universal_paths/content_lists/entries.py @@ -27,7 +27,7 @@ from ......types.web3.hostnames.ipfs_universal_paths.content_lists import ( EntryListResponse, EntryDeleteResponse, - DwebConfigContentListEntry, + DistributedWebConfigContentListEntry, entry_create_params, entry_update_params, ) @@ -58,7 +58,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListEntry: + ) -> DistributedWebConfigContentListEntry: """ Create IPFS Universal Path Gateway Content List Entry @@ -102,7 +102,9 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), + cast_to=cast( + Type[DistributedWebConfigContentListEntry], ResultWrapper[DistributedWebConfigContentListEntry] + ), ) def update( @@ -120,7 +122,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListEntry: + ) -> DistributedWebConfigContentListEntry: """ Edit IPFS Universal Path Gateway Content List Entry @@ -170,7 +172,9 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), + cast_to=cast( + Type[DistributedWebConfigContentListEntry], ResultWrapper[DistributedWebConfigContentListEntry] + ), ) def list( @@ -280,7 +284,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListEntry: + ) -> DistributedWebConfigContentListEntry: """ IPFS Universal Path Gateway Content List Entry Details @@ -316,7 +320,9 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), + cast_to=cast( + Type[DistributedWebConfigContentListEntry], ResultWrapper[DistributedWebConfigContentListEntry] + ), ) @@ -343,7 +349,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListEntry: + ) -> DistributedWebConfigContentListEntry: """ Create IPFS Universal Path Gateway Content List Entry @@ -387,7 +393,9 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), + cast_to=cast( + Type[DistributedWebConfigContentListEntry], ResultWrapper[DistributedWebConfigContentListEntry] + ), ) async def update( @@ -405,7 +413,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListEntry: + ) -> DistributedWebConfigContentListEntry: """ Edit IPFS Universal Path Gateway Content List Entry @@ -455,7 +463,9 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), + cast_to=cast( + Type[DistributedWebConfigContentListEntry], ResultWrapper[DistributedWebConfigContentListEntry] + ), ) async def list( @@ -565,7 +575,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DwebConfigContentListEntry: + ) -> DistributedWebConfigContentListEntry: """ IPFS Universal Path Gateway Content List Entry Details @@ -601,7 +611,9 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DwebConfigContentListEntry], ResultWrapper[DwebConfigContentListEntry]), + cast_to=cast( + Type[DistributedWebConfigContentListEntry], ResultWrapper[DistributedWebConfigContentListEntry] + ), ) diff --git a/src/cloudflare/resources/workers/filters.py b/src/cloudflare/resources/workers/filters.py index 07ea8ea8ee7..ab63f0f0627 100644 --- a/src/cloudflare/resources/workers/filters.py +++ b/src/cloudflare/resources/workers/filters.py @@ -24,7 +24,7 @@ make_request_options, ) from ...types.workers import ( - WorkersFilters, + WorkersFilter, FilterListResponse, FilterCreateResponse, FilterDeleteResponse, @@ -105,7 +105,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersFilters: + ) -> WorkersFilter: """ Update Filter @@ -142,7 +142,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersFilters], ResultWrapper[WorkersFilters]), + cast_to=cast(Type[WorkersFilter], ResultWrapper[WorkersFilter]), ) def list( @@ -299,7 +299,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersFilters: + ) -> WorkersFilter: """ Update Filter @@ -336,7 +336,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersFilters], ResultWrapper[WorkersFilters]), + cast_to=cast(Type[WorkersFilter], ResultWrapper[WorkersFilter]), ) async def list( diff --git a/src/cloudflare/resources/workers/routes.py b/src/cloudflare/resources/workers/routes.py index c54301e8b1a..3231926ebed 100644 --- a/src/cloudflare/resources/workers/routes.py +++ b/src/cloudflare/resources/workers/routes.py @@ -24,7 +24,7 @@ make_request_options, ) from ...types.workers import ( - WorkersRoutes, + WorkersRoute, RouteListResponse, RouteCreateResponse, RouteDeleteResponse, @@ -112,7 +112,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersRoutes: + ) -> WorkersRoute: """ Updates the URL pattern or Worker associated with a route. @@ -151,7 +151,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), + cast_to=cast(Type[WorkersRoute], ResultWrapper[WorkersRoute]), ) def list( @@ -253,7 +253,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersRoutes: + ) -> WorkersRoute: """ Returns information about a route, including URL pattern and Worker. @@ -283,7 +283,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), + cast_to=cast(Type[WorkersRoute], ResultWrapper[WorkersRoute]), ) @@ -364,7 +364,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersRoutes: + ) -> WorkersRoute: """ Updates the URL pattern or Worker associated with a route. @@ -403,7 +403,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), + cast_to=cast(Type[WorkersRoute], ResultWrapper[WorkersRoute]), ) async def list( @@ -505,7 +505,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersRoutes: + ) -> WorkersRoute: """ Returns information about a route, including URL pattern and Worker. @@ -535,7 +535,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersRoutes], ResultWrapper[WorkersRoutes]), + cast_to=cast(Type[WorkersRoute], ResultWrapper[WorkersRoute]), ) 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 085440bfc01..98e0600546d 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 @@ -50,7 +50,7 @@ ) from ......types.workers import WorkersScript from ......types.workers_for_platforms.dispatch.namespaces import ( - WorkersNamespaceScript, + WorkersForPlatformsNamespaceScript, script_delete_params, script_update_params, ) @@ -271,7 +271,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersNamespaceScript: + ) -> WorkersForPlatformsNamespaceScript: """ Fetch information about a script uploaded to a Workers for Platforms namespace. @@ -305,7 +305,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersNamespaceScript], ResultWrapper[WorkersNamespaceScript]), + cast_to=cast(Type[WorkersForPlatformsNamespaceScript], ResultWrapper[WorkersForPlatformsNamespaceScript]), ) @@ -522,7 +522,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WorkersNamespaceScript: + ) -> WorkersForPlatformsNamespaceScript: """ Fetch information about a script uploaded to a Workers for Platforms namespace. @@ -556,7 +556,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[WorkersNamespaceScript], ResultWrapper[WorkersNamespaceScript]), + cast_to=cast(Type[WorkersForPlatformsNamespaceScript], ResultWrapper[WorkersForPlatformsNamespaceScript]), ) diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index c0cbaa87422..e2069c027d2 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -49,7 +49,7 @@ AsyncUserPolicyChecksWithStreamingResponse, ) from .....types.zero_trust.access import ( - AccessApps, + ZeroTrustApps, ApplicationListResponse, ApplicationDeleteResponse, application_create_params, @@ -114,7 +114,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -212,7 +212,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -284,7 +284,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -395,7 +395,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -488,7 +488,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -535,7 +535,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -582,7 +582,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -631,7 +631,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -697,7 +697,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not zone_id: @@ -714,7 +714,7 @@ def create( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessApps, + ZeroTrustApps, self._post( f"/{account_or_zone}/{account_or_zone_id}/access/apps", body=maybe_transform( @@ -753,7 +753,7 @@ def create( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessApps] + Any, ResultWrapper[ZeroTrustApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -793,7 +793,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -894,7 +894,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -969,7 +969,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -1083,7 +1083,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -1179,7 +1179,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -1229,7 +1229,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -1279,7 +1279,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -1331,7 +1331,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -1400,7 +1400,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not zone_id: @@ -1417,7 +1417,7 @@ def update( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessApps, + ZeroTrustApps, self._put( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", body=maybe_transform( @@ -1456,7 +1456,7 @@ def update( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessApps] + Any, ResultWrapper[ZeroTrustApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -1586,7 +1586,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Fetches information about an Access application. @@ -1621,7 +1621,7 @@ def get( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessApps, + ZeroTrustApps, self._get( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", options=make_request_options( @@ -1632,7 +1632,7 @@ def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessApps] + Any, ResultWrapper[ZeroTrustApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -1751,7 +1751,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -1849,7 +1849,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -1921,7 +1921,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -2032,7 +2032,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -2125,7 +2125,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -2172,7 +2172,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -2219,7 +2219,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -2268,7 +2268,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Adds a new application to Access. @@ -2334,7 +2334,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not zone_id: @@ -2351,7 +2351,7 @@ async def create( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessApps, + ZeroTrustApps, await self._post( f"/{account_or_zone}/{account_or_zone_id}/access/apps", body=await async_maybe_transform( @@ -2390,7 +2390,7 @@ async def create( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessApps] + Any, ResultWrapper[ZeroTrustApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -2430,7 +2430,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2531,7 +2531,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2606,7 +2606,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2720,7 +2720,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2816,7 +2816,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2866,7 +2866,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2916,7 +2916,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -2968,7 +2968,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Updates an Access application. @@ -3037,7 +3037,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not zone_id: @@ -3054,7 +3054,7 @@ async def update( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessApps, + ZeroTrustApps, await self._put( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", body=await async_maybe_transform( @@ -3093,7 +3093,7 @@ async def update( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessApps] + Any, ResultWrapper[ZeroTrustApps] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -3223,7 +3223,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessApps: + ) -> ZeroTrustApps: """ Fetches information about an Access application. @@ -3258,7 +3258,7 @@ async def get( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessApps, + ZeroTrustApps, await self._get( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{app_id}", options=make_request_options( @@ -3269,7 +3269,7 @@ async def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessApps] + Any, ResultWrapper[ZeroTrustApps] ), # Union types cannot be passed in as arguments in the type system ), ) diff --git a/src/cloudflare/resources/zero_trust/access/applications/policies.py b/src/cloudflare/resources/zero_trust/access/applications/policies.py index 6f95bb14f44..1b96d6d8493 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/policies.py +++ b/src/cloudflare/resources/zero_trust/access/applications/policies.py @@ -25,7 +25,7 @@ make_request_options, ) from .....types.zero_trust.access.applications import ( - AccessPolicies, + ZeroTrustPolicies, PolicyListResponse, PolicyDeleteResponse, policy_create_params, @@ -68,7 +68,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessPolicies: + ) -> ZeroTrustPolicies: """ Create a new Access policy for an application. @@ -162,7 +162,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), + cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) def update( @@ -190,7 +190,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessPolicies: + ) -> ZeroTrustPolicies: """ Update a configured Access policy. @@ -288,7 +288,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), + cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) def list( @@ -429,7 +429,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessPolicies: + ) -> ZeroTrustPolicies: """ Fetches a single Access policy. @@ -478,7 +478,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), + cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) @@ -515,7 +515,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessPolicies: + ) -> ZeroTrustPolicies: """ Create a new Access policy for an application. @@ -609,7 +609,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), + cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) async def update( @@ -637,7 +637,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessPolicies: + ) -> ZeroTrustPolicies: """ Update a configured Access policy. @@ -735,7 +735,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), + cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) async def list( @@ -876,7 +876,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessPolicies: + ) -> ZeroTrustPolicies: """ Fetches a single Access policy. @@ -925,7 +925,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessPolicies], ResultWrapper[AccessPolicies]), + cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) diff --git a/src/cloudflare/resources/zero_trust/access/bookmarks.py b/src/cloudflare/resources/zero_trust/access/bookmarks.py index fbb03946096..488fc78f779 100644 --- a/src/cloudflare/resources/zero_trust/access/bookmarks.py +++ b/src/cloudflare/resources/zero_trust/access/bookmarks.py @@ -19,7 +19,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.access import AccessBookmarks, BookmarkListResponse, BookmarkDeleteResponse +from ....types.zero_trust.access import ZeroTrustBookmarks, BookmarkListResponse, BookmarkDeleteResponse __all__ = ["Bookmarks", "AsyncBookmarks"] @@ -44,7 +44,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessBookmarks: + ) -> ZeroTrustBookmarks: """ Create a new Bookmark application. @@ -72,7 +72,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), + cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) def update( @@ -86,7 +86,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessBookmarks: + ) -> ZeroTrustBookmarks: """ Updates a configured Bookmark application. @@ -114,7 +114,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), + cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) def list( @@ -207,7 +207,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessBookmarks: + ) -> ZeroTrustBookmarks: """ Fetches a single Bookmark application. @@ -235,7 +235,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), + cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) @@ -259,7 +259,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessBookmarks: + ) -> ZeroTrustBookmarks: """ Create a new Bookmark application. @@ -287,7 +287,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), + cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) async def update( @@ -301,7 +301,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessBookmarks: + ) -> ZeroTrustBookmarks: """ Updates a configured Bookmark application. @@ -329,7 +329,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), + cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) async def list( @@ -422,7 +422,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessBookmarks: + ) -> ZeroTrustBookmarks: """ Fetches a single Bookmark application. @@ -450,7 +450,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessBookmarks], ResultWrapper[AccessBookmarks]), + cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) diff --git a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py index b230e139adc..c356a526d8f 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py @@ -32,7 +32,7 @@ make_request_options, ) from .....types.zero_trust.access import ( - AccessCertificates, + ZeroTrustCertificates, CertificateListResponse, CertificateDeleteResponse, certificate_create_params, @@ -69,7 +69,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCertificates: + ) -> ZeroTrustCertificates: """ Adds a new mTLS root certificate to Access. @@ -124,7 +124,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), + cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) def update( @@ -141,7 +141,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCertificates: + ) -> ZeroTrustCertificates: """ Updates a configured mTLS certificate. @@ -197,7 +197,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), + cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) def list( @@ -327,7 +327,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCertificates: + ) -> ZeroTrustCertificates: """ Fetches a single mTLS certificate. @@ -372,7 +372,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), + cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) @@ -403,7 +403,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCertificates: + ) -> ZeroTrustCertificates: """ Adds a new mTLS root certificate to Access. @@ -458,7 +458,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), + cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) async def update( @@ -475,7 +475,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCertificates: + ) -> ZeroTrustCertificates: """ Updates a configured mTLS certificate. @@ -531,7 +531,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), + cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) async def list( @@ -661,7 +661,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCertificates: + ) -> ZeroTrustCertificates: """ Fetches a single mTLS certificate. @@ -706,7 +706,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCertificates], ResultWrapper[AccessCertificates]), + cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) diff --git a/src/cloudflare/resources/zero_trust/access/certificates/settings.py b/src/cloudflare/resources/zero_trust/access/certificates/settings.py index 0b63fa9cf6c..a526bed3ef1 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/settings.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/settings.py @@ -25,8 +25,8 @@ ) from .....types.zero_trust.access.certificates import ( SettingGetResponse, - AccessSettingsParam, SettingUpdateResponse, + ZeroTrustSettingsParam, setting_update_params, ) @@ -45,7 +45,7 @@ def with_streaming_response(self) -> SettingsWithStreamingResponse: def update( self, *, - settings: Iterable[AccessSettingsParam], + settings: Iterable[ZeroTrustSettingsParam], account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -167,7 +167,7 @@ def with_streaming_response(self) -> AsyncSettingsWithStreamingResponse: async def update( self, *, - settings: Iterable[AccessSettingsParam], + settings: Iterable[ZeroTrustSettingsParam], account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. diff --git a/src/cloudflare/resources/zero_trust/access/custom_pages.py b/src/cloudflare/resources/zero_trust/access/custom_pages.py index c8a807c8d28..e5d50209dac 100644 --- a/src/cloudflare/resources/zero_trust/access/custom_pages.py +++ b/src/cloudflare/resources/zero_trust/access/custom_pages.py @@ -25,10 +25,10 @@ make_request_options, ) from ....types.zero_trust.access import ( - AccessCustomPage, + ZeroTrustCustomPage, CustomPageListResponse, CustomPageDeleteResponse, - AccessCustomPageWithoutHTML, + ZeroTrustCustomPageWithoutHTML, custom_page_create_params, custom_page_update_params, ) @@ -59,7 +59,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCustomPageWithoutHTML: + ) -> ZeroTrustCustomPageWithoutHTML: """ Create a custom page @@ -102,7 +102,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), + cast_to=cast(Type[ZeroTrustCustomPageWithoutHTML], ResultWrapper[ZeroTrustCustomPageWithoutHTML]), ) def update( @@ -120,7 +120,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCustomPageWithoutHTML: + ) -> ZeroTrustCustomPageWithoutHTML: """ Update a custom page @@ -167,7 +167,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), + cast_to=cast(Type[ZeroTrustCustomPageWithoutHTML], ResultWrapper[ZeroTrustCustomPageWithoutHTML]), ) def list( @@ -264,7 +264,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCustomPage: + ) -> ZeroTrustCustomPage: """ Fetches a custom page and also returns its HTML. @@ -294,7 +294,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCustomPage], ResultWrapper[AccessCustomPage]), + cast_to=cast(Type[ZeroTrustCustomPage], ResultWrapper[ZeroTrustCustomPage]), ) @@ -321,7 +321,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCustomPageWithoutHTML: + ) -> ZeroTrustCustomPageWithoutHTML: """ Create a custom page @@ -364,7 +364,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), + cast_to=cast(Type[ZeroTrustCustomPageWithoutHTML], ResultWrapper[ZeroTrustCustomPageWithoutHTML]), ) async def update( @@ -382,7 +382,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCustomPageWithoutHTML: + ) -> ZeroTrustCustomPageWithoutHTML: """ Update a custom page @@ -429,7 +429,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCustomPageWithoutHTML], ResultWrapper[AccessCustomPageWithoutHTML]), + cast_to=cast(Type[ZeroTrustCustomPageWithoutHTML], ResultWrapper[ZeroTrustCustomPageWithoutHTML]), ) async def list( @@ -526,7 +526,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessCustomPage: + ) -> ZeroTrustCustomPage: """ Fetches a custom page and also returns its HTML. @@ -556,7 +556,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessCustomPage], ResultWrapper[AccessCustomPage]), + cast_to=cast(Type[ZeroTrustCustomPage], ResultWrapper[ZeroTrustCustomPage]), ) diff --git a/src/cloudflare/resources/zero_trust/access/groups.py b/src/cloudflare/resources/zero_trust/access/groups.py index a1665becab0..250aa7914f5 100644 --- a/src/cloudflare/resources/zero_trust/access/groups.py +++ b/src/cloudflare/resources/zero_trust/access/groups.py @@ -24,7 +24,7 @@ make_request_options, ) from ....types.zero_trust.access import ( - AccessGroups, + ZeroTrustGroups, GroupListResponse, GroupDeleteResponse, group_create_params, @@ -59,7 +59,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessGroups: + ) -> ZeroTrustGroups: """ Creates a new Access group. @@ -123,7 +123,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), + cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) def update( @@ -143,7 +143,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessGroups: + ) -> ZeroTrustGroups: """ Updates a configured Access group. @@ -211,7 +211,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), + cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) def list( @@ -341,7 +341,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessGroups: + ) -> ZeroTrustGroups: """ Fetches a single Access group. @@ -386,7 +386,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), + cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) @@ -415,7 +415,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessGroups: + ) -> ZeroTrustGroups: """ Creates a new Access group. @@ -479,7 +479,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), + cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) async def update( @@ -499,7 +499,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessGroups: + ) -> ZeroTrustGroups: """ Updates a configured Access group. @@ -567,7 +567,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), + cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) async def list( @@ -697,7 +697,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessGroups: + ) -> ZeroTrustGroups: """ Fetches a single Access group. @@ -742,7 +742,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessGroups], ResultWrapper[AccessGroups]), + cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) diff --git a/src/cloudflare/resources/zero_trust/access/service_tokens.py b/src/cloudflare/resources/zero_trust/access/service_tokens.py index 2cbc6169fed..f318849caa8 100644 --- a/src/cloudflare/resources/zero_trust/access/service_tokens.py +++ b/src/cloudflare/resources/zero_trust/access/service_tokens.py @@ -24,7 +24,7 @@ make_request_options, ) from ....types.zero_trust.access import ( - AccessServiceTokens, + ZeroTrustServiceTokens, ServiceTokenListResponse, ServiceTokenCreateResponse, ServiceTokenRotateResponse, @@ -131,7 +131,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessServiceTokens: + ) -> ZeroTrustServiceTokens: """ Updates a configured service token. @@ -189,7 +189,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), + cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) def list( @@ -259,7 +259,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessServiceTokens: + ) -> ZeroTrustServiceTokens: """ Deletes a service token. @@ -304,7 +304,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), + cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) def refresh( @@ -318,7 +318,7 @@ def refresh( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessServiceTokens: + ) -> ZeroTrustServiceTokens: """ Refreshes the expiration of a service token. @@ -348,7 +348,7 @@ def refresh( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), + cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) def rotate( @@ -492,7 +492,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessServiceTokens: + ) -> ZeroTrustServiceTokens: """ Updates a configured service token. @@ -550,7 +550,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), + cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) async def list( @@ -620,7 +620,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessServiceTokens: + ) -> ZeroTrustServiceTokens: """ Deletes a service token. @@ -665,7 +665,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), + cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) async def refresh( @@ -679,7 +679,7 @@ async def refresh( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessServiceTokens: + ) -> ZeroTrustServiceTokens: """ Refreshes the expiration of a service token. @@ -709,7 +709,7 @@ async def refresh( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessServiceTokens], ResultWrapper[AccessServiceTokens]), + cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) async def rotate( diff --git a/src/cloudflare/resources/zero_trust/access/tags.py b/src/cloudflare/resources/zero_trust/access/tags.py index 670925a4efc..57cd3bb4b25 100644 --- a/src/cloudflare/resources/zero_trust/access/tags.py +++ b/src/cloudflare/resources/zero_trust/access/tags.py @@ -24,7 +24,7 @@ make_request_options, ) from ....types.zero_trust.access import ( - AccessTag, + ZeroTrustTag, TagListResponse, TagDeleteResponse, tag_create_params, @@ -54,7 +54,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessTag: + ) -> ZeroTrustTag: """ Create a tag @@ -83,7 +83,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), + cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) def update( @@ -98,7 +98,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessTag: + ) -> ZeroTrustTag: """ Update a tag @@ -131,7 +131,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), + cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) def list( @@ -228,7 +228,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessTag: + ) -> ZeroTrustTag: """ Get a tag @@ -258,7 +258,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), + cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) @@ -282,7 +282,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessTag: + ) -> ZeroTrustTag: """ Create a tag @@ -311,7 +311,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), + cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) async def update( @@ -326,7 +326,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessTag: + ) -> ZeroTrustTag: """ Update a tag @@ -359,7 +359,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), + cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) async def list( @@ -456,7 +456,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessTag: + ) -> ZeroTrustTag: """ Get a tag @@ -486,7 +486,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessTag], ResultWrapper[AccessTag]), + cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) diff --git a/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py b/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py index 3934032e777..851f87f1182 100644 --- a/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py +++ b/src/cloudflare/resources/zero_trust/access/users/last_seen_identity.py @@ -19,7 +19,7 @@ from ....._base_client import ( make_request_options, ) -from .....types.zero_trust.access.users import AccessIdentity +from .....types.zero_trust.access.users import ZeroTrustIdentity __all__ = ["LastSeenIdentity", "AsyncLastSeenIdentity"] @@ -44,7 +44,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentity: + ) -> ZeroTrustIdentity: """ Get last seen identity for a single user. @@ -74,7 +74,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessIdentity], ResultWrapper[AccessIdentity]), + cast_to=cast(Type[ZeroTrustIdentity], ResultWrapper[ZeroTrustIdentity]), ) @@ -98,7 +98,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentity: + ) -> ZeroTrustIdentity: """ Get last seen identity for a single user. @@ -128,7 +128,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessIdentity], ResultWrapper[AccessIdentity]), + cast_to=cast(Type[ZeroTrustIdentity], ResultWrapper[ZeroTrustIdentity]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py index 40d4c19999b..50735d5de84 100644 --- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py +++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py @@ -24,9 +24,9 @@ make_request_options, ) from ....types.zero_trust.devices import ( + DEXTestSchemasHTTP, DEXTestListResponse, DEXTestDeleteResponse, - TeamsDevicesDeviceDEXTestSchemasHTTP, dex_test_create_params, dex_test_update_params, ) @@ -58,7 +58,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: + ) -> Optional[DEXTestSchemasHTTP]: """ Create a DEX test. @@ -103,10 +103,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], - ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], - ), + cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) def update( @@ -125,7 +122,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: + ) -> Optional[DEXTestSchemasHTTP]: """ Update a DEX test. @@ -174,10 +171,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], - ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], - ), + cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) def list( @@ -272,7 +266,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: + ) -> Optional[DEXTestSchemasHTTP]: """ Fetch a single DEX test. @@ -300,10 +294,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], - ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], - ), + cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) @@ -331,7 +322,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: + ) -> Optional[DEXTestSchemasHTTP]: """ Create a DEX test. @@ -376,10 +367,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], - ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], - ), + cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) async def update( @@ -398,7 +386,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: + ) -> Optional[DEXTestSchemasHTTP]: """ Update a DEX test. @@ -447,10 +435,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], - ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], - ), + cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) async def list( @@ -545,7 +530,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]: + ) -> Optional[DEXTestSchemasHTTP]: """ Fetch a single DEX test. @@ -573,10 +558,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceDEXTestSchemasHTTP]], - ResultWrapper[TeamsDevicesDeviceDEXTestSchemasHTTP], - ), + cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/networks.py b/src/cloudflare/resources/zero_trust/devices/networks.py index a8f2a12f426..4666e1cd3ba 100644 --- a/src/cloudflare/resources/zero_trust/devices/networks.py +++ b/src/cloudflare/resources/zero_trust/devices/networks.py @@ -26,8 +26,8 @@ ) from ....types.zero_trust.devices import ( NetworkListResponse, + DeviceManagedNetworks, NetworkDeleteResponse, - TeamsDevicesDeviceManagedNetworks, network_create_params, network_update_params, ) @@ -57,7 +57,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceManagedNetworks]: + ) -> Optional[DeviceManagedNetworks]: """ Creates a new device managed network. @@ -96,9 +96,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] - ), + cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) def update( @@ -115,7 +113,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceManagedNetworks]: + ) -> Optional[DeviceManagedNetworks]: """ Updates a configured device managed network. @@ -158,9 +156,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] - ), + cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) def list( @@ -254,7 +250,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceManagedNetworks]: + ) -> Optional[DeviceManagedNetworks]: """ Fetches details for a single managed network. @@ -282,9 +278,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] - ), + cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) @@ -310,7 +304,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceManagedNetworks]: + ) -> Optional[DeviceManagedNetworks]: """ Creates a new device managed network. @@ -349,9 +343,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] - ), + cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) async def update( @@ -368,7 +360,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceManagedNetworks]: + ) -> Optional[DeviceManagedNetworks]: """ Updates a configured device managed network. @@ -411,9 +403,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] - ), + cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) async def list( @@ -507,7 +497,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceManagedNetworks]: + ) -> Optional[DeviceManagedNetworks]: """ Fetches details for a single managed network. @@ -535,9 +525,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceManagedNetworks]], ResultWrapper[TeamsDevicesDeviceManagedNetworks] - ), + cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py index 7b66b83e1d3..cc9d47f8db6 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py @@ -27,7 +27,7 @@ ExcludeGetResponse, ExcludeListResponse, ExcludeUpdateResponse, - TeamsDevicesSplitTunnelParam, + DevicesSplitTunnelParam, exclude_update_params, ) @@ -47,7 +47,7 @@ def update( self, *, account_id: str, - body: Iterable[TeamsDevicesSplitTunnelParam], + body: Iterable[DevicesSplitTunnelParam], # 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, @@ -176,7 +176,7 @@ async def update( self, *, account_id: str, - body: Iterable[TeamsDevicesSplitTunnelParam], + body: Iterable[DevicesSplitTunnelParam], # 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, diff --git a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py index b00314179e2..3984767e2d7 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py @@ -25,9 +25,9 @@ ) from .....types.zero_trust.devices.policies import ( FallbackDomainGetResponse, + DevicesFallbackDomainParam, FallbackDomainListResponse, FallbackDomainUpdateResponse, - TeamsDevicesFallbackDomainParam, fallback_domain_update_params, ) @@ -48,7 +48,7 @@ def update( policy_id: str, *, account_id: str, - body: Iterable[TeamsDevicesFallbackDomainParam], + body: Iterable[DevicesFallbackDomainParam], # 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, @@ -188,7 +188,7 @@ async def update( policy_id: str, *, account_id: str, - body: Iterable[TeamsDevicesFallbackDomainParam], + body: Iterable[DevicesFallbackDomainParam], # 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, diff --git a/src/cloudflare/resources/zero_trust/devices/policies/includes.py b/src/cloudflare/resources/zero_trust/devices/policies/includes.py index e9d565e140b..d04eaa8f338 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/includes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/includes.py @@ -27,7 +27,7 @@ IncludeGetResponse, IncludeListResponse, IncludeUpdateResponse, - TeamsDevicesSplitTunnelIncludeParam, + DevicesSplitTunnelIncludeParam, include_update_params, ) @@ -47,7 +47,7 @@ def update( self, *, account_id: str, - body: Iterable[TeamsDevicesSplitTunnelIncludeParam], + body: Iterable[DevicesSplitTunnelIncludeParam], # 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, @@ -176,7 +176,7 @@ async def update( self, *, account_id: str, - body: Iterable[TeamsDevicesSplitTunnelIncludeParam], + body: Iterable[DevicesSplitTunnelIncludeParam], # 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, diff --git a/src/cloudflare/resources/zero_trust/devices/policies/policies.py b/src/cloudflare/resources/zero_trust/devices/policies/policies.py index e1b1e2574a4..7a2ad9f251f 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/policies.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/policies.py @@ -58,7 +58,7 @@ from .....types.zero_trust.devices import ( PolicyListResponse, PolicyDeleteResponse, - TeamsDevicesDeviceSettingsPolicy, + DevicesDeviceSettingsPolicy, policy_edit_params, policy_create_params, ) @@ -118,7 +118,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: + ) -> Optional[DevicesDeviceSettingsPolicy]: """ Creates a device settings profile to be applied to certain devices matching the criteria. @@ -205,9 +205,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] - ), + cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) def list( @@ -316,7 +314,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: + ) -> Optional[DevicesDeviceSettingsPolicy]: """ Updates a configured device settings profile. @@ -396,9 +394,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] - ), + cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) def get( @@ -412,7 +408,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: + ) -> Optional[DevicesDeviceSettingsPolicy]: """ Fetches a device settings profile by ID. @@ -440,9 +436,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] - ), + cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) @@ -498,7 +492,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: + ) -> Optional[DevicesDeviceSettingsPolicy]: """ Creates a device settings profile to be applied to certain devices matching the criteria. @@ -585,9 +579,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] - ), + cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) async def list( @@ -696,7 +688,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: + ) -> Optional[DevicesDeviceSettingsPolicy]: """ Updates a configured device settings profile. @@ -776,9 +768,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] - ), + cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) async def get( @@ -792,7 +782,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDeviceSettingsPolicy]: + ) -> Optional[DevicesDeviceSettingsPolicy]: """ Fetches a device settings profile by ID. @@ -820,9 +810,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDeviceSettingsPolicy]], ResultWrapper[TeamsDevicesDeviceSettingsPolicy] - ), + cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py index 14694ffaf70..829193dfa63 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py @@ -26,8 +26,8 @@ ) from .....types.zero_trust.devices.posture import ( IntegrationListResponse, + DevicePostureIntegrations, IntegrationDeleteResponse, - TeamsDevicesDevicePostureIntegrations, integration_edit_params, integration_create_params, ) @@ -58,7 +58,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureIntegrations]: + ) -> Optional[DevicePostureIntegrations]: """ Create a new device posture integration. @@ -100,10 +100,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDevicePostureIntegrations]], - ResultWrapper[TeamsDevicesDevicePostureIntegrations], - ), + cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) def list( @@ -206,7 +203,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureIntegrations]: + ) -> Optional[DevicePostureIntegrations]: """ Updates a configured device posture integration. @@ -252,10 +249,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDevicePostureIntegrations]], - ResultWrapper[TeamsDevicesDevicePostureIntegrations], - ), + cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) def get( @@ -269,7 +263,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureIntegrations]: + ) -> Optional[DevicePostureIntegrations]: """ Fetches details for a single device posture integration. @@ -297,10 +291,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDevicePostureIntegrations]], - ResultWrapper[TeamsDevicesDevicePostureIntegrations], - ), + cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) @@ -327,7 +318,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureIntegrations]: + ) -> Optional[DevicePostureIntegrations]: """ Create a new device posture integration. @@ -369,10 +360,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDevicePostureIntegrations]], - ResultWrapper[TeamsDevicesDevicePostureIntegrations], - ), + cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) async def list( @@ -475,7 +463,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureIntegrations]: + ) -> Optional[DevicePostureIntegrations]: """ Updates a configured device posture integration. @@ -521,10 +509,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDevicePostureIntegrations]], - ResultWrapper[TeamsDevicesDevicePostureIntegrations], - ), + cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) async def get( @@ -538,7 +523,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureIntegrations]: + ) -> Optional[DevicePostureIntegrations]: """ Fetches details for a single device posture integration. @@ -566,10 +551,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesDevicePostureIntegrations]], - ResultWrapper[TeamsDevicesDevicePostureIntegrations], - ), + cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/posture/posture.py b/src/cloudflare/resources/zero_trust/devices/posture/posture.py index bc330745789..07d0f53e101 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/posture.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/posture.py @@ -33,9 +33,9 @@ make_request_options, ) from .....types.zero_trust.devices import ( + DevicePostureRules, PostureListResponse, PostureDeleteResponse, - TeamsDevicesDevicePostureRules, posture_create_params, posture_update_params, ) @@ -93,7 +93,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureRules]: + ) -> Optional[DevicePostureRules]: """ Creates a new device posture rule. @@ -145,7 +145,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), + cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) def update( @@ -186,7 +186,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureRules]: + ) -> Optional[DevicePostureRules]: """ Updates a device posture rule. @@ -242,7 +242,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), + cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) def list( @@ -335,7 +335,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureRules]: + ) -> Optional[DevicePostureRules]: """ Fetches a single device posture rule. @@ -363,7 +363,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), + cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) @@ -417,7 +417,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureRules]: + ) -> Optional[DevicePostureRules]: """ Creates a new device posture rule. @@ -469,7 +469,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), + cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) async def update( @@ -510,7 +510,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureRules]: + ) -> Optional[DevicePostureRules]: """ Updates a device posture rule. @@ -566,7 +566,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), + cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) async def list( @@ -659,7 +659,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesDevicePostureRules]: + ) -> Optional[DevicePostureRules]: """ Fetches a single device posture rule. @@ -687,7 +687,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[TeamsDevicesDevicePostureRules]], ResultWrapper[TeamsDevicesDevicePostureRules]), + cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) diff --git a/src/cloudflare/resources/zero_trust/devices/settings.py b/src/cloudflare/resources/zero_trust/devices/settings.py index 1651f7a55dd..8fb8a01800d 100644 --- a/src/cloudflare/resources/zero_trust/devices/settings.py +++ b/src/cloudflare/resources/zero_trust/devices/settings.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zero_trust.devices import TeamsDevicesZeroTrustAccountDeviceSettings, setting_update_params +from ....types.zero_trust.devices import ZeroTrustAccountDeviceSettings, setting_update_params __all__ = ["Settings", "AsyncSettings"] @@ -51,7 +51,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: + ) -> Optional[ZeroTrustAccountDeviceSettings]: """ Updates the current device settings for a Zero Trust account. @@ -92,10 +92,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], - ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], - ), + cast_to=cast(Type[Optional[ZeroTrustAccountDeviceSettings]], ResultWrapper[ZeroTrustAccountDeviceSettings]), ) def list( @@ -108,7 +105,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: + ) -> Optional[ZeroTrustAccountDeviceSettings]: """ Describes the current device settings for a Zero Trust account. @@ -132,10 +129,7 @@ def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], - ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], - ), + cast_to=cast(Type[Optional[ZeroTrustAccountDeviceSettings]], ResultWrapper[ZeroTrustAccountDeviceSettings]), ) @@ -162,7 +156,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: + ) -> Optional[ZeroTrustAccountDeviceSettings]: """ Updates the current device settings for a Zero Trust account. @@ -203,10 +197,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], - ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], - ), + cast_to=cast(Type[Optional[ZeroTrustAccountDeviceSettings]], ResultWrapper[ZeroTrustAccountDeviceSettings]), ) async def list( @@ -219,7 +210,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TeamsDevicesZeroTrustAccountDeviceSettings]: + ) -> Optional[ZeroTrustAccountDeviceSettings]: """ Describes the current device settings for a Zero Trust account. @@ -243,10 +234,7 @@ async def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[Optional[TeamsDevicesZeroTrustAccountDeviceSettings]], - ResultWrapper[TeamsDevicesZeroTrustAccountDeviceSettings], - ), + cast_to=cast(Type[Optional[ZeroTrustAccountDeviceSettings]], ResultWrapper[ZeroTrustAccountDeviceSettings]), ) diff --git a/src/cloudflare/resources/zero_trust/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers.py index e8719f6a7a2..f24db0e102f 100644 --- a/src/cloudflare/resources/zero_trust/identity_providers.py +++ b/src/cloudflare/resources/zero_trust/identity_providers.py @@ -26,7 +26,7 @@ make_request_options, ) from ...types.zero_trust import ( - AccessIdentityProviders, + ZeroTrustIdentityProviders, IdentityProviderListResponse, IdentityProviderDeleteResponse, identity_provider_create_params, @@ -76,7 +76,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -139,7 +139,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -202,7 +202,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -265,7 +265,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -328,7 +328,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -391,7 +391,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -454,7 +454,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -517,7 +517,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -580,7 +580,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -643,7 +643,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -706,7 +706,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -769,7 +769,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -832,7 +832,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -895,7 +895,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -983,7 +983,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not zone_id: @@ -1000,7 +1000,7 @@ def create( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessIdentityProviders, + ZeroTrustIdentityProviders, self._post( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers", body=maybe_transform( @@ -1020,7 +1020,7 @@ def create( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessIdentityProviders] + Any, ResultWrapper[ZeroTrustIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -1057,7 +1057,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1123,7 +1123,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1189,7 +1189,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1255,7 +1255,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1321,7 +1321,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1387,7 +1387,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1453,7 +1453,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1519,7 +1519,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1585,7 +1585,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1651,7 +1651,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1717,7 +1717,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1783,7 +1783,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1849,7 +1849,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -1915,7 +1915,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -2006,7 +2006,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: if not uuid: raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}") if not account_id: @@ -2025,7 +2025,7 @@ def update( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessIdentityProviders, + ZeroTrustIdentityProviders, self._put( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", body=maybe_transform( @@ -2045,7 +2045,7 @@ def update( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessIdentityProviders] + Any, ResultWrapper[ZeroTrustIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -2177,7 +2177,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Fetches a configured identity provider. @@ -2214,7 +2214,7 @@ def get( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessIdentityProviders, + ZeroTrustIdentityProviders, self._get( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", options=make_request_options( @@ -2225,7 +2225,7 @@ def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessIdentityProviders] + Any, ResultWrapper[ZeroTrustIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -2271,7 +2271,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2334,7 +2334,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2397,7 +2397,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2460,7 +2460,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2523,7 +2523,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2586,7 +2586,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2649,7 +2649,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2712,7 +2712,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2775,7 +2775,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2838,7 +2838,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2901,7 +2901,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -2964,7 +2964,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -3027,7 +3027,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -3090,7 +3090,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Adds a new identity provider to Access. @@ -3178,7 +3178,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not zone_id: @@ -3195,7 +3195,7 @@ async def create( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessIdentityProviders, + ZeroTrustIdentityProviders, await self._post( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers", body=await async_maybe_transform( @@ -3215,7 +3215,7 @@ async def create( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessIdentityProviders] + Any, ResultWrapper[ZeroTrustIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -3252,7 +3252,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3318,7 +3318,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3384,7 +3384,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3450,7 +3450,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3516,7 +3516,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3582,7 +3582,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3648,7 +3648,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3714,7 +3714,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3780,7 +3780,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3846,7 +3846,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3912,7 +3912,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -3978,7 +3978,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -4044,7 +4044,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -4110,7 +4110,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Updates a configured identity provider. @@ -4201,7 +4201,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: if not uuid: raise ValueError(f"Expected a non-empty value for `uuid` but received {uuid!r}") if not account_id: @@ -4220,7 +4220,7 @@ async def update( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessIdentityProviders, + ZeroTrustIdentityProviders, await self._put( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", body=await async_maybe_transform( @@ -4240,7 +4240,7 @@ async def update( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessIdentityProviders] + Any, ResultWrapper[ZeroTrustIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) @@ -4372,7 +4372,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessIdentityProviders: + ) -> ZeroTrustIdentityProviders: """ Fetches a configured identity provider. @@ -4409,7 +4409,7 @@ async def get( account_or_zone = "zones" account_or_zone_id = zone_id return cast( - AccessIdentityProviders, + ZeroTrustIdentityProviders, await self._get( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers/{uuid}", options=make_request_options( @@ -4420,7 +4420,7 @@ async def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Any, ResultWrapper[AccessIdentityProviders] + Any, ResultWrapper[ZeroTrustIdentityProviders] ), # Union types cannot be passed in as arguments in the type system ), ) diff --git a/src/cloudflare/resources/zero_trust/organizations.py b/src/cloudflare/resources/zero_trust/organizations.py index 8c7c370ca26..97ed2e833a3 100644 --- a/src/cloudflare/resources/zero_trust/organizations.py +++ b/src/cloudflare/resources/zero_trust/organizations.py @@ -24,7 +24,7 @@ make_request_options, ) from ...types.zero_trust import ( - AccessOrganizations, + ZeroTrustOrganizations, OrganizationRevokeUsersResponse, organization_create_params, organization_update_params, @@ -64,7 +64,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessOrganizations: + ) -> ZeroTrustOrganizations: """ Sets up a Zero Trust organization for your account or zone. @@ -147,7 +147,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), + cast_to=cast(Type[ZeroTrustOrganizations], ResultWrapper[ZeroTrustOrganizations]), ) def update( @@ -172,7 +172,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessOrganizations: + ) -> ZeroTrustOrganizations: """ Updates the configuration for your Zero Trust organization. @@ -256,7 +256,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), + cast_to=cast(Type[ZeroTrustOrganizations], ResultWrapper[ZeroTrustOrganizations]), ) def list( @@ -270,7 +270,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessOrganizations: + ) -> ZeroTrustOrganizations: """ Returns the configuration for your Zero Trust organization. @@ -311,7 +311,7 @@ def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), + cast_to=cast(Type[ZeroTrustOrganizations], ResultWrapper[ZeroTrustOrganizations]), ) def revoke_users( @@ -406,7 +406,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessOrganizations: + ) -> ZeroTrustOrganizations: """ Sets up a Zero Trust organization for your account or zone. @@ -489,7 +489,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), + cast_to=cast(Type[ZeroTrustOrganizations], ResultWrapper[ZeroTrustOrganizations]), ) async def update( @@ -514,7 +514,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessOrganizations: + ) -> ZeroTrustOrganizations: """ Updates the configuration for your Zero Trust organization. @@ -598,7 +598,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), + cast_to=cast(Type[ZeroTrustOrganizations], ResultWrapper[ZeroTrustOrganizations]), ) async def list( @@ -612,7 +612,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AccessOrganizations: + ) -> ZeroTrustOrganizations: """ Returns the configuration for your Zero Trust organization. @@ -653,7 +653,7 @@ async def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[AccessOrganizations], ResultWrapper[AccessOrganizations]), + cast_to=cast(Type[ZeroTrustOrganizations], ResultWrapper[ZeroTrustOrganizations]), ) async def revoke_users( diff --git a/src/cloudflare/resources/zones/settings/advanced_ddos.py b/src/cloudflare/resources/zones/settings/advanced_ddos.py index 49b34129d39..132ee89a02b 100644 --- a/src/cloudflare/resources/zones/settings/advanced_ddos.py +++ b/src/cloudflare/resources/zones/settings/advanced_ddos.py @@ -19,7 +19,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesAdvancedDDOS +from ....types.zones.settings import ZoneSettingAdvancedDDOS __all__ = ["AdvancedDDOS", "AsyncAdvancedDDOS"] @@ -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[ZonesAdvancedDDOS]: + ) -> Optional[ZoneSettingAdvancedDDOS]: """ Advanced protection from Distributed Denial of Service (DDoS) attacks on your website. This is an uneditable value that is 'on' in the case of Business and @@ -71,7 +71,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAdvancedDDOS]], ResultWrapper[ZonesAdvancedDDOS]), + cast_to=cast(Type[Optional[ZoneSettingAdvancedDDOS]], ResultWrapper[ZoneSettingAdvancedDDOS]), ) @@ -94,7 +94,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAdvancedDDOS]: + ) -> Optional[ZoneSettingAdvancedDDOS]: """ Advanced protection from Distributed Denial of Service (DDoS) attacks on your website. This is an uneditable value that is 'on' in the case of Business and @@ -122,7 +122,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAdvancedDDOS]], ResultWrapper[ZonesAdvancedDDOS]), + cast_to=cast(Type[Optional[ZoneSettingAdvancedDDOS]], ResultWrapper[ZoneSettingAdvancedDDOS]), ) diff --git a/src/cloudflare/resources/zones/settings/always_online.py b/src/cloudflare/resources/zones/settings/always_online.py index 858a3f969f7..83205d34902 100644 --- a/src/cloudflare/resources/zones/settings/always_online.py +++ b/src/cloudflare/resources/zones/settings/always_online.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesAlwaysOnline, always_online_edit_params +from ....types.zones.settings import ZoneSettingAlwaysOnline, always_online_edit_params __all__ = ["AlwaysOnline", "AsyncAlwaysOnline"] @@ -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[ZonesAlwaysOnline]: + ) -> Optional[ZoneSettingAlwaysOnline]: """ When enabled, Cloudflare serves limited copies of web pages available from the [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is @@ -82,7 +82,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]), ) def get( @@ -95,7 +95,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAlwaysOnline]: + ) -> Optional[ZoneSettingAlwaysOnline]: """ When enabled, Cloudflare serves limited copies of web pages available from the [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is @@ -125,7 +125,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]), ) @@ -149,7 +149,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAlwaysOnline]: + ) -> Optional[ZoneSettingAlwaysOnline]: """ When enabled, Cloudflare serves limited copies of web pages available from the [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is @@ -182,7 +182,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]), ) async def get( @@ -195,7 +195,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAlwaysOnline]: + ) -> Optional[ZoneSettingAlwaysOnline]: """ When enabled, Cloudflare serves limited copies of web pages available from the [Internet Archive's Wayback Machine](https://archive.org/web/) if your server is @@ -225,7 +225,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysOnline]], ResultWrapper[ZonesAlwaysOnline]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysOnline]], ResultWrapper[ZoneSettingAlwaysOnline]), ) diff --git a/src/cloudflare/resources/zones/settings/always_use_https.py b/src/cloudflare/resources/zones/settings/always_use_https.py index 15a89b7c7d2..e0f3523f82d 100644 --- a/src/cloudflare/resources/zones/settings/always_use_https.py +++ b/src/cloudflare/resources/zones/settings/always_use_https.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesAlwaysUseHTTPS, always_use_https_edit_params +from ....types.zones.settings import ZoneSettingAlwaysUseHTTPS, always_use_https_edit_params __all__ = ["AlwaysUseHTTPS", "AsyncAlwaysUseHTTPS"] @@ -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[ZonesAlwaysUseHTTPS]: + ) -> Optional[ZoneSettingAlwaysUseHTTPS]: """ Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, @@ -80,7 +80,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]), ) 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[ZonesAlwaysUseHTTPS]: + ) -> Optional[ZoneSettingAlwaysUseHTTPS]: """ Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, @@ -121,7 +121,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]), ) @@ -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[ZonesAlwaysUseHTTPS]: + ) -> Optional[ZoneSettingAlwaysUseHTTPS]: """ Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, @@ -176,7 +176,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]), ) 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[ZonesAlwaysUseHTTPS]: + ) -> Optional[ZoneSettingAlwaysUseHTTPS]: """ Reply to all requests for URLs that use "http" with a 301 redirect to the equivalent "https" URL. If you only want to redirect for a subset of requests, @@ -217,7 +217,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAlwaysUseHTTPS]], ResultWrapper[ZonesAlwaysUseHTTPS]), + cast_to=cast(Type[Optional[ZoneSettingAlwaysUseHTTPS]], ResultWrapper[ZoneSettingAlwaysUseHTTPS]), ) diff --git a/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py b/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py index dddc5bf4b01..2950a699243 100644 --- a/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py +++ b/src/cloudflare/resources/zones/settings/automatic_https_rewrites.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesAutomaticHTTPSRewrites, automatic_https_rewrite_edit_params +from ....types.zones.settings import ZoneSettingAutomaticHTTPSRewrites, automatic_https_rewrite_edit_params __all__ = ["AutomaticHTTPSRewrites", "AsyncAutomaticHTTPSRewrites"] @@ -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[ZonesAutomaticHTTPSRewrites]: + ) -> Optional[ZoneSettingAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -79,7 +79,9 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), + cast_to=cast( + Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites] + ), ) def get( @@ -92,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAutomaticHTTPSRewrites]: + ) -> Optional[ZoneSettingAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -118,7 +120,9 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), + cast_to=cast( + Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites] + ), ) @@ -142,7 +146,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAutomaticHTTPSRewrites]: + ) -> Optional[ZoneSettingAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -174,7 +178,9 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), + cast_to=cast( + Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites] + ), ) async def get( @@ -187,7 +193,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAutomaticHTTPSRewrites]: + ) -> Optional[ZoneSettingAutomaticHTTPSRewrites]: """ Enable the Automatic HTTPS Rewrites feature for this zone. @@ -213,7 +219,9 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesAutomaticHTTPSRewrites]], ResultWrapper[ZonesAutomaticHTTPSRewrites]), + cast_to=cast( + Type[Optional[ZoneSettingAutomaticHTTPSRewrites]], ResultWrapper[ZoneSettingAutomaticHTTPSRewrites] + ), ) diff --git a/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py b/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py index 7beb3a942ea..c8f97509389 100644 --- a/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py +++ b/src/cloudflare/resources/zones/settings/automatic_platform_optimization.py @@ -24,8 +24,8 @@ make_request_options, ) from ....types.zones.settings import ( - ZonesAutomaticPlatformOptimization, - ZonesAutomaticPlatformOptimizationParam, + ZoneSettingAutomaticPlatformOptimization, + ZoneSettingAutomaticPlatformOptimizationParam, automatic_platform_optimization_edit_params, ) @@ -45,14 +45,14 @@ def edit( self, *, zone_id: str, - value: ZonesAutomaticPlatformOptimizationParam, + value: ZoneSettingAutomaticPlatformOptimizationParam, # 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[ZonesAutomaticPlatformOptimization]: + ) -> Optional[ZoneSettingAutomaticPlatformOptimization]: """ [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) serves your WordPress site from Cloudflare's edge network and caches third-party @@ -84,7 +84,8 @@ def edit( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] + Type[Optional[ZoneSettingAutomaticPlatformOptimization]], + ResultWrapper[ZoneSettingAutomaticPlatformOptimization], ), ) @@ -98,7 +99,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAutomaticPlatformOptimization]: + ) -> Optional[ZoneSettingAutomaticPlatformOptimization]: """ [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) serves your WordPress site from Cloudflare's edge network and caches third-party @@ -127,7 +128,8 @@ def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] + Type[Optional[ZoneSettingAutomaticPlatformOptimization]], + ResultWrapper[ZoneSettingAutomaticPlatformOptimization], ), ) @@ -145,14 +147,14 @@ async def edit( self, *, zone_id: str, - value: ZonesAutomaticPlatformOptimizationParam, + value: ZoneSettingAutomaticPlatformOptimizationParam, # 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[ZonesAutomaticPlatformOptimization]: + ) -> Optional[ZoneSettingAutomaticPlatformOptimization]: """ [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) serves your WordPress site from Cloudflare's edge network and caches third-party @@ -184,7 +186,8 @@ async def edit( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] + Type[Optional[ZoneSettingAutomaticPlatformOptimization]], + ResultWrapper[ZoneSettingAutomaticPlatformOptimization], ), ) @@ -198,7 +201,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesAutomaticPlatformOptimization]: + ) -> Optional[ZoneSettingAutomaticPlatformOptimization]: """ [Automatic Platform Optimization for WordPress](https://developers.cloudflare.com/automatic-platform-optimization/) serves your WordPress site from Cloudflare's edge network and caches third-party @@ -227,7 +230,8 @@ async def get( post_parser=ResultWrapper._unwrapper, ), cast_to=cast( - Type[Optional[ZonesAutomaticPlatformOptimization]], ResultWrapper[ZonesAutomaticPlatformOptimization] + Type[Optional[ZoneSettingAutomaticPlatformOptimization]], + ResultWrapper[ZoneSettingAutomaticPlatformOptimization], ), ) diff --git a/src/cloudflare/resources/zones/settings/brotli.py b/src/cloudflare/resources/zones/settings/brotli.py index fc2680af244..3c9d6bb215e 100644 --- a/src/cloudflare/resources/zones/settings/brotli.py +++ b/src/cloudflare/resources/zones/settings/brotli.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesBrotli, brotli_edit_params +from ....types.zones.settings import ZoneSettingBrotli, brotli_edit_params __all__ = ["Brotli", "AsyncBrotli"] @@ -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[ZonesBrotli]: + ) -> Optional[ZoneSettingBrotli]: """ When the client requesting an asset supports the Brotli compression algorithm, Cloudflare will serve a Brotli compressed version of the asset. @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), + cast_to=cast(Type[Optional[ZoneSettingBrotli]], ResultWrapper[ZoneSettingBrotli]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrotli]: + ) -> Optional[ZoneSettingBrotli]: """ When the client requesting an asset supports the Brotli compression algorithm, Cloudflare will serve a Brotli compressed version of the asset. @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), + cast_to=cast(Type[Optional[ZoneSettingBrotli]], ResultWrapper[ZoneSettingBrotli]), ) @@ -143,7 +143,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrotli]: + ) -> Optional[ZoneSettingBrotli]: """ When the client requesting an asset supports the Brotli compression algorithm, Cloudflare will serve a Brotli compressed version of the asset. @@ -173,7 +173,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), + cast_to=cast(Type[Optional[ZoneSettingBrotli]], ResultWrapper[ZoneSettingBrotli]), ) async def get( @@ -186,7 +186,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrotli]: + ) -> Optional[ZoneSettingBrotli]: """ When the client requesting an asset supports the Brotli compression algorithm, Cloudflare will serve a Brotli compressed version of the asset. @@ -213,7 +213,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrotli]], ResultWrapper[ZonesBrotli]), + cast_to=cast(Type[Optional[ZoneSettingBrotli]], ResultWrapper[ZoneSettingBrotli]), ) diff --git a/src/cloudflare/resources/zones/settings/browser_cache_ttl.py b/src/cloudflare/resources/zones/settings/browser_cache_ttl.py index 80720154239..ffa3a59e1b2 100644 --- a/src/cloudflare/resources/zones/settings/browser_cache_ttl.py +++ b/src/cloudflare/resources/zones/settings/browser_cache_ttl.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesBrowserCacheTTL, browser_cache_ttl_edit_params +from ....types.zones.settings import ZoneSettingBrowserCacheTTL, browser_cache_ttl_edit_params __all__ = ["BrowserCacheTTL", "AsyncBrowserCacheTTL"] @@ -78,7 +78,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCacheTTL]: + ) -> Optional[ZoneSettingBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -111,7 +111,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCacheTTL]], ResultWrapper[ZoneSettingBrowserCacheTTL]), ) def get( @@ -124,7 +124,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCacheTTL]: + ) -> Optional[ZoneSettingBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -153,7 +153,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCacheTTL]], ResultWrapper[ZoneSettingBrowserCacheTTL]), ) @@ -206,7 +206,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCacheTTL]: + ) -> Optional[ZoneSettingBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -239,7 +239,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCacheTTL]], ResultWrapper[ZoneSettingBrowserCacheTTL]), ) async def get( @@ -252,7 +252,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCacheTTL]: + ) -> Optional[ZoneSettingBrowserCacheTTL]: """ Browser Cache TTL (in seconds) specifies how long Cloudflare-cached resources will remain on your visitors' computers. Cloudflare will honor any larger times @@ -281,7 +281,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCacheTTL]], ResultWrapper[ZonesBrowserCacheTTL]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCacheTTL]], ResultWrapper[ZoneSettingBrowserCacheTTL]), ) diff --git a/src/cloudflare/resources/zones/settings/browser_check.py b/src/cloudflare/resources/zones/settings/browser_check.py index e14711a6a70..ab4b6e9e7ec 100644 --- a/src/cloudflare/resources/zones/settings/browser_check.py +++ b/src/cloudflare/resources/zones/settings/browser_check.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesBrowserCheck, browser_check_edit_params +from ....types.zones.settings import ZoneSettingBrowserCheck, browser_check_edit_params __all__ = ["BrowserCheck", "AsyncBrowserCheck"] @@ -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[ZonesBrowserCheck]: + ) -> Optional[ZoneSettingBrowserCheck]: """ Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will @@ -82,7 +82,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCheck]], ResultWrapper[ZoneSettingBrowserCheck]), ) def get( @@ -95,7 +95,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCheck]: + ) -> Optional[ZoneSettingBrowserCheck]: """ Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will @@ -125,7 +125,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCheck]], ResultWrapper[ZoneSettingBrowserCheck]), ) @@ -149,7 +149,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCheck]: + ) -> Optional[ZoneSettingBrowserCheck]: """ Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will @@ -182,7 +182,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCheck]], ResultWrapper[ZoneSettingBrowserCheck]), ) async def get( @@ -195,7 +195,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBrowserCheck]: + ) -> Optional[ZoneSettingBrowserCheck]: """ Browser Integrity Check is similar to Bad Behavior and looks for common HTTP headers abused most commonly by spammers and denies access to your page. It will @@ -225,7 +225,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBrowserCheck]], ResultWrapper[ZonesBrowserCheck]), + cast_to=cast(Type[Optional[ZoneSettingBrowserCheck]], ResultWrapper[ZoneSettingBrowserCheck]), ) diff --git a/src/cloudflare/resources/zones/settings/cache_level.py b/src/cloudflare/resources/zones/settings/cache_level.py index f4ecda6669d..eeff2a8091d 100644 --- a/src/cloudflare/resources/zones/settings/cache_level.py +++ b/src/cloudflare/resources/zones/settings/cache_level.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesCacheLevel, cache_level_edit_params +from ....types.zones.settings import ZoneSettingCacheLevel, cache_level_edit_params __all__ = ["CacheLevel", "AsyncCacheLevel"] @@ -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[ZonesCacheLevel]: + ) -> Optional[ZoneSettingCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -83,7 +83,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), + cast_to=cast(Type[Optional[ZoneSettingCacheLevel]], ResultWrapper[ZoneSettingCacheLevel]), ) def get( @@ -96,7 +96,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCacheLevel]: + ) -> Optional[ZoneSettingCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -127,7 +127,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), + cast_to=cast(Type[Optional[ZoneSettingCacheLevel]], ResultWrapper[ZoneSettingCacheLevel]), ) @@ -151,7 +151,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCacheLevel]: + ) -> Optional[ZoneSettingCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -185,7 +185,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), + cast_to=cast(Type[Optional[ZoneSettingCacheLevel]], ResultWrapper[ZoneSettingCacheLevel]), ) async def get( @@ -198,7 +198,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCacheLevel]: + ) -> Optional[ZoneSettingCacheLevel]: """Cache Level functions based off the setting level. The basic setting will cache @@ -229,7 +229,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCacheLevel]], ResultWrapper[ZonesCacheLevel]), + cast_to=cast(Type[Optional[ZoneSettingCacheLevel]], ResultWrapper[ZoneSettingCacheLevel]), ) diff --git a/src/cloudflare/resources/zones/settings/challenge_ttl.py b/src/cloudflare/resources/zones/settings/challenge_ttl.py index 39791c9eac1..b1c812074f9 100644 --- a/src/cloudflare/resources/zones/settings/challenge_ttl.py +++ b/src/cloudflare/resources/zones/settings/challenge_ttl.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesChallengeTTL, challenge_ttl_edit_params +from ....types.zones.settings import ZoneSettingChallengeTTL, challenge_ttl_edit_params __all__ = ["ChallengeTTL", "AsyncChallengeTTL"] @@ -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[ZonesChallengeTTL]: + ) -> Optional[ZoneSettingChallengeTTL]: """ Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the @@ -82,7 +82,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), + cast_to=cast(Type[Optional[ZoneSettingChallengeTTL]], ResultWrapper[ZoneSettingChallengeTTL]), ) def get( @@ -95,7 +95,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesChallengeTTL]: + ) -> Optional[ZoneSettingChallengeTTL]: """ Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the @@ -125,7 +125,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), + cast_to=cast(Type[Optional[ZoneSettingChallengeTTL]], ResultWrapper[ZoneSettingChallengeTTL]), ) @@ -149,7 +149,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesChallengeTTL]: + ) -> Optional[ZoneSettingChallengeTTL]: """ Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the @@ -182,7 +182,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), + cast_to=cast(Type[Optional[ZoneSettingChallengeTTL]], ResultWrapper[ZoneSettingChallengeTTL]), ) async def get( @@ -195,7 +195,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesChallengeTTL]: + ) -> Optional[ZoneSettingChallengeTTL]: """ Specify how long a visitor is allowed access to your site after successfully completing a challenge (such as a CAPTCHA). After the TTL has expired the @@ -225,7 +225,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesChallengeTTL]], ResultWrapper[ZonesChallengeTTL]), + cast_to=cast(Type[Optional[ZoneSettingChallengeTTL]], ResultWrapper[ZoneSettingChallengeTTL]), ) diff --git a/src/cloudflare/resources/zones/settings/ciphers.py b/src/cloudflare/resources/zones/settings/ciphers.py index 3c89a124667..7a3ae57a9c6 100644 --- a/src/cloudflare/resources/zones/settings/ciphers.py +++ b/src/cloudflare/resources/zones/settings/ciphers.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesCiphers, cipher_edit_params +from ....types.zones.settings import ZoneSettingCiphers, cipher_edit_params __all__ = ["Ciphers", "AsyncCiphers"] @@ -48,7 +48,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCiphers]: + ) -> Optional[ZoneSettingCiphers]: """ Changes ciphers setting. @@ -77,7 +77,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), + cast_to=cast(Type[Optional[ZoneSettingCiphers]], ResultWrapper[ZoneSettingCiphers]), ) def get( @@ -90,7 +90,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCiphers]: + ) -> Optional[ZoneSettingCiphers]: """ Gets ciphers setting. @@ -116,7 +116,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), + cast_to=cast(Type[Optional[ZoneSettingCiphers]], ResultWrapper[ZoneSettingCiphers]), ) @@ -140,7 +140,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCiphers]: + ) -> Optional[ZoneSettingCiphers]: """ Changes ciphers setting. @@ -169,7 +169,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), + cast_to=cast(Type[Optional[ZoneSettingCiphers]], ResultWrapper[ZoneSettingCiphers]), ) async def get( @@ -182,7 +182,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesCiphers]: + ) -> Optional[ZoneSettingCiphers]: """ Gets ciphers setting. @@ -208,7 +208,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesCiphers]], ResultWrapper[ZonesCiphers]), + cast_to=cast(Type[Optional[ZoneSettingCiphers]], ResultWrapper[ZoneSettingCiphers]), ) diff --git a/src/cloudflare/resources/zones/settings/development_mode.py b/src/cloudflare/resources/zones/settings/development_mode.py index 0e7a2d532c6..a79b455bbb2 100644 --- a/src/cloudflare/resources/zones/settings/development_mode.py +++ b/src/cloudflare/resources/zones/settings/development_mode.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesDevelopmentMode, development_mode_edit_params +from ....types.zones.settings import ZoneSettingDevelopmentMode, development_mode_edit_params __all__ = ["DevelopmentMode", "AsyncDevelopmentMode"] @@ -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[ZonesDevelopmentMode]: + ) -> Optional[ZoneSettingDevelopmentMode]: """ Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's @@ -83,7 +83,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), + cast_to=cast(Type[Optional[ZoneSettingDevelopmentMode]], ResultWrapper[ZoneSettingDevelopmentMode]), ) def get( @@ -96,7 +96,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesDevelopmentMode]: + ) -> Optional[ZoneSettingDevelopmentMode]: """ Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's @@ -127,7 +127,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), + cast_to=cast(Type[Optional[ZoneSettingDevelopmentMode]], ResultWrapper[ZoneSettingDevelopmentMode]), ) @@ -151,7 +151,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesDevelopmentMode]: + ) -> Optional[ZoneSettingDevelopmentMode]: """ Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's @@ -185,7 +185,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), + cast_to=cast(Type[Optional[ZoneSettingDevelopmentMode]], ResultWrapper[ZoneSettingDevelopmentMode]), ) async def get( @@ -198,7 +198,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesDevelopmentMode]: + ) -> Optional[ZoneSettingDevelopmentMode]: """ Development Mode temporarily allows you to enter development mode for your websites if you need to make changes to your site. This will bypass Cloudflare's @@ -229,7 +229,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesDevelopmentMode]], ResultWrapper[ZonesDevelopmentMode]), + cast_to=cast(Type[Optional[ZoneSettingDevelopmentMode]], ResultWrapper[ZoneSettingDevelopmentMode]), ) diff --git a/src/cloudflare/resources/zones/settings/early_hints.py b/src/cloudflare/resources/zones/settings/early_hints.py index 9324bebd6c1..d4b971bdf17 100644 --- a/src/cloudflare/resources/zones/settings/early_hints.py +++ b/src/cloudflare/resources/zones/settings/early_hints.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesEarlyHints, early_hint_edit_params +from ....types.zones.settings import ZoneSettingEarlyHints, early_hint_edit_params __all__ = ["EarlyHints", "AsyncEarlyHints"] @@ -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[ZonesEarlyHints]: + ) -> Optional[ZoneSettingEarlyHints]: """ When enabled, Cloudflare will attempt to speed up overall page loads by serving `103` responses with `Link` headers from the final response. Refer to @@ -81,7 +81,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), + cast_to=cast(Type[Optional[ZoneSettingEarlyHints]], ResultWrapper[ZoneSettingEarlyHints]), ) def get( @@ -94,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesEarlyHints]: + ) -> Optional[ZoneSettingEarlyHints]: """ When enabled, Cloudflare will attempt to speed up overall page loads by serving `103` responses with `Link` headers from the final response. Refer to @@ -123,7 +123,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), + cast_to=cast(Type[Optional[ZoneSettingEarlyHints]], ResultWrapper[ZoneSettingEarlyHints]), ) @@ -147,7 +147,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesEarlyHints]: + ) -> Optional[ZoneSettingEarlyHints]: """ When enabled, Cloudflare will attempt to speed up overall page loads by serving `103` responses with `Link` headers from the final response. Refer to @@ -179,7 +179,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), + cast_to=cast(Type[Optional[ZoneSettingEarlyHints]], ResultWrapper[ZoneSettingEarlyHints]), ) async def get( @@ -192,7 +192,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesEarlyHints]: + ) -> Optional[ZoneSettingEarlyHints]: """ When enabled, Cloudflare will attempt to speed up overall page loads by serving `103` responses with `Link` headers from the final response. Refer to @@ -221,7 +221,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEarlyHints]], ResultWrapper[ZonesEarlyHints]), + cast_to=cast(Type[Optional[ZoneSettingEarlyHints]], ResultWrapper[ZoneSettingEarlyHints]), ) diff --git a/src/cloudflare/resources/zones/settings/email_obfuscation.py b/src/cloudflare/resources/zones/settings/email_obfuscation.py index 2fa4945f3b9..2e544bb44af 100644 --- a/src/cloudflare/resources/zones/settings/email_obfuscation.py +++ b/src/cloudflare/resources/zones/settings/email_obfuscation.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesEmailObfuscation, email_obfuscation_edit_params +from ....types.zones.settings import ZoneSettingEmailObfuscation, email_obfuscation_edit_params __all__ = ["EmailObfuscation", "AsyncEmailObfuscation"] @@ -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[ZonesEmailObfuscation]: + ) -> Optional[ZoneSettingEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), + cast_to=cast(Type[Optional[ZoneSettingEmailObfuscation]], ResultWrapper[ZoneSettingEmailObfuscation]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesEmailObfuscation]: + ) -> Optional[ZoneSettingEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), + cast_to=cast(Type[Optional[ZoneSettingEmailObfuscation]], ResultWrapper[ZoneSettingEmailObfuscation]), ) @@ -143,7 +143,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesEmailObfuscation]: + ) -> Optional[ZoneSettingEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -175,7 +175,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), + cast_to=cast(Type[Optional[ZoneSettingEmailObfuscation]], ResultWrapper[ZoneSettingEmailObfuscation]), ) async def get( @@ -188,7 +188,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesEmailObfuscation]: + ) -> Optional[ZoneSettingEmailObfuscation]: """ Encrypt email adresses on your web page from bots, while keeping them visible to humans. (https://support.cloudflare.com/hc/en-us/articles/200170016). @@ -215,7 +215,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesEmailObfuscation]], ResultWrapper[ZonesEmailObfuscation]), + cast_to=cast(Type[Optional[ZoneSettingEmailObfuscation]], ResultWrapper[ZoneSettingEmailObfuscation]), ) diff --git a/src/cloudflare/resources/zones/settings/font_settings.py b/src/cloudflare/resources/zones/settings/font_settings.py index a014ba5ea49..301bb27d686 100644 --- a/src/cloudflare/resources/zones/settings/font_settings.py +++ b/src/cloudflare/resources/zones/settings/font_settings.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import SpeedCloudflareFonts, font_setting_edit_params +from ....types.zones.settings import ZoneSettingFonts, font_setting_edit_params __all__ = ["FontSettings", "AsyncFontSettings"] @@ -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[SpeedCloudflareFonts]: + ) -> Optional[ZoneSettingFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -81,7 +81,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), + cast_to=cast(Type[Optional[ZoneSettingFonts]], ResultWrapper[ZoneSettingFonts]), ) def get( @@ -94,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedCloudflareFonts]: + ) -> Optional[ZoneSettingFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -123,7 +123,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), + cast_to=cast(Type[Optional[ZoneSettingFonts]], ResultWrapper[ZoneSettingFonts]), ) @@ -147,7 +147,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedCloudflareFonts]: + ) -> Optional[ZoneSettingFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -179,7 +179,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), + cast_to=cast(Type[Optional[ZoneSettingFonts]], ResultWrapper[ZoneSettingFonts]), ) async def get( @@ -192,7 +192,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SpeedCloudflareFonts]: + ) -> Optional[ZoneSettingFonts]: """Enhance your website's font delivery with Cloudflare Fonts. Deliver Google @@ -221,7 +221,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[SpeedCloudflareFonts]], ResultWrapper[SpeedCloudflareFonts]), + cast_to=cast(Type[Optional[ZoneSettingFonts]], ResultWrapper[ZoneSettingFonts]), ) diff --git a/src/cloudflare/resources/zones/settings/h2_prioritization.py b/src/cloudflare/resources/zones/settings/h2_prioritization.py index fa2fac902a1..6b571b0dcd1 100644 --- a/src/cloudflare/resources/zones/settings/h2_prioritization.py +++ b/src/cloudflare/resources/zones/settings/h2_prioritization.py @@ -23,7 +23,11 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesH2Prioritization, ZonesH2PrioritizationParam, h2_prioritization_edit_params +from ....types.zones.settings import ( + ZoneSettingH2Prioritization, + ZoneSettingH2PrioritizationParam, + h2_prioritization_edit_params, +) __all__ = ["H2Prioritization", "AsyncH2Prioritization"] @@ -41,14 +45,14 @@ def edit( self, *, zone_id: str, - value: ZonesH2PrioritizationParam, + value: ZoneSettingH2PrioritizationParam, # 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[ZonesH2Prioritization]: + ) -> Optional[ZoneSettingH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -79,7 +83,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), + cast_to=cast(Type[Optional[ZoneSettingH2Prioritization]], ResultWrapper[ZoneSettingH2Prioritization]), ) def get( @@ -92,7 +96,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesH2Prioritization]: + ) -> Optional[ZoneSettingH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -118,7 +122,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), + cast_to=cast(Type[Optional[ZoneSettingH2Prioritization]], ResultWrapper[ZoneSettingH2Prioritization]), ) @@ -135,14 +139,14 @@ async def edit( self, *, zone_id: str, - value: ZonesH2PrioritizationParam, + value: ZoneSettingH2PrioritizationParam, # 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[ZonesH2Prioritization]: + ) -> Optional[ZoneSettingH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -175,7 +179,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), + cast_to=cast(Type[Optional[ZoneSettingH2Prioritization]], ResultWrapper[ZoneSettingH2Prioritization]), ) async def get( @@ -188,7 +192,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesH2Prioritization]: + ) -> Optional[ZoneSettingH2Prioritization]: """ Gets HTTP/2 Edge Prioritization setting. @@ -214,7 +218,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesH2Prioritization]], ResultWrapper[ZonesH2Prioritization]), + cast_to=cast(Type[Optional[ZoneSettingH2Prioritization]], ResultWrapper[ZoneSettingH2Prioritization]), ) diff --git a/src/cloudflare/resources/zones/settings/hotlink_protection.py b/src/cloudflare/resources/zones/settings/hotlink_protection.py index 031cefeab45..aa71c4eb57b 100644 --- a/src/cloudflare/resources/zones/settings/hotlink_protection.py +++ b/src/cloudflare/resources/zones/settings/hotlink_protection.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesHotlinkProtection, hotlink_protection_edit_params +from ....types.zones.settings import ZoneSettingHotlinkProtection, hotlink_protection_edit_params __all__ = ["HotlinkProtection", "AsyncHotlinkProtection"] @@ -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[ZonesHotlinkProtection]: + ) -> Optional[ZoneSettingHotlinkProtection]: """ When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime @@ -84,7 +84,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), + cast_to=cast(Type[Optional[ZoneSettingHotlinkProtection]], ResultWrapper[ZoneSettingHotlinkProtection]), ) def get( @@ -97,7 +97,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHotlinkProtection]: + ) -> Optional[ZoneSettingHotlinkProtection]: """ When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime @@ -129,7 +129,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), + cast_to=cast(Type[Optional[ZoneSettingHotlinkProtection]], ResultWrapper[ZoneSettingHotlinkProtection]), ) @@ -153,7 +153,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHotlinkProtection]: + ) -> Optional[ZoneSettingHotlinkProtection]: """ When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime @@ -190,7 +190,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), + cast_to=cast(Type[Optional[ZoneSettingHotlinkProtection]], ResultWrapper[ZoneSettingHotlinkProtection]), ) async def get( @@ -203,7 +203,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHotlinkProtection]: + ) -> Optional[ZoneSettingHotlinkProtection]: """ When enabled, the Hotlink Protection option ensures that other sites cannot suck up your bandwidth by building pages that use images hosted on your site. Anytime @@ -235,7 +235,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHotlinkProtection]], ResultWrapper[ZonesHotlinkProtection]), + cast_to=cast(Type[Optional[ZoneSettingHotlinkProtection]], ResultWrapper[ZoneSettingHotlinkProtection]), ) diff --git a/src/cloudflare/resources/zones/settings/http2.py b/src/cloudflare/resources/zones/settings/http2.py index 1f598816f74..0fd5bd4100d 100644 --- a/src/cloudflare/resources/zones/settings/http2.py +++ b/src/cloudflare/resources/zones/settings/http2.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesHTTP2, http2_edit_params +from ....types.zones.settings import ZoneSettingHTTP2, http2_edit_params __all__ = ["HTTP2", "AsyncHTTP2"] @@ -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[ZonesHTTP2]: + ) -> Optional[ZoneSettingHTTP2]: """ Value of the HTTP2 setting. @@ -78,7 +78,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), + cast_to=cast(Type[Optional[ZoneSettingHTTP2]], ResultWrapper[ZoneSettingHTTP2]), ) def get( @@ -91,7 +91,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHTTP2]: + ) -> Optional[ZoneSettingHTTP2]: """ Value of the HTTP2 setting. @@ -117,7 +117,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), + cast_to=cast(Type[Optional[ZoneSettingHTTP2]], ResultWrapper[ZoneSettingHTTP2]), ) @@ -141,7 +141,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHTTP2]: + ) -> Optional[ZoneSettingHTTP2]: """ Value of the HTTP2 setting. @@ -170,7 +170,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), + cast_to=cast(Type[Optional[ZoneSettingHTTP2]], ResultWrapper[ZoneSettingHTTP2]), ) async def get( @@ -183,7 +183,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHTTP2]: + ) -> Optional[ZoneSettingHTTP2]: """ Value of the HTTP2 setting. @@ -209,7 +209,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP2]], ResultWrapper[ZonesHTTP2]), + cast_to=cast(Type[Optional[ZoneSettingHTTP2]], ResultWrapper[ZoneSettingHTTP2]), ) diff --git a/src/cloudflare/resources/zones/settings/http3.py b/src/cloudflare/resources/zones/settings/http3.py index eadc6cb11a2..3ce7c57c1eb 100644 --- a/src/cloudflare/resources/zones/settings/http3.py +++ b/src/cloudflare/resources/zones/settings/http3.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesHTTP3, http3_edit_params +from ....types.zones.settings import ZoneSettingHTTP3, http3_edit_params __all__ = ["HTTP3", "AsyncHTTP3"] @@ -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[ZonesHTTP3]: + ) -> Optional[ZoneSettingHTTP3]: """ Value of the HTTP3 setting. @@ -78,7 +78,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), + cast_to=cast(Type[Optional[ZoneSettingHTTP3]], ResultWrapper[ZoneSettingHTTP3]), ) def get( @@ -91,7 +91,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHTTP3]: + ) -> Optional[ZoneSettingHTTP3]: """ Value of the HTTP3 setting. @@ -117,7 +117,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), + cast_to=cast(Type[Optional[ZoneSettingHTTP3]], ResultWrapper[ZoneSettingHTTP3]), ) @@ -141,7 +141,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHTTP3]: + ) -> Optional[ZoneSettingHTTP3]: """ Value of the HTTP3 setting. @@ -170,7 +170,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), + cast_to=cast(Type[Optional[ZoneSettingHTTP3]], ResultWrapper[ZoneSettingHTTP3]), ) async def get( @@ -183,7 +183,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesHTTP3]: + ) -> Optional[ZoneSettingHTTP3]: """ Value of the HTTP3 setting. @@ -209,7 +209,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesHTTP3]], ResultWrapper[ZonesHTTP3]), + cast_to=cast(Type[Optional[ZoneSettingHTTP3]], ResultWrapper[ZoneSettingHTTP3]), ) diff --git a/src/cloudflare/resources/zones/settings/image_resizing.py b/src/cloudflare/resources/zones/settings/image_resizing.py index 5997bf0a050..3b3a9f888c3 100644 --- a/src/cloudflare/resources/zones/settings/image_resizing.py +++ b/src/cloudflare/resources/zones/settings/image_resizing.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesImageResizing, ZonesImageResizingParam, image_resizing_edit_params +from ....types.zones.settings import ZoneSettingImageResizing, ZoneSettingImageResizingParam, image_resizing_edit_params __all__ = ["ImageResizing", "AsyncImageResizing"] @@ -41,14 +41,14 @@ def edit( self, *, zone_id: str, - value: ZonesImageResizingParam, + value: ZoneSettingImageResizingParam, # 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[ZonesImageResizing]: + ) -> Optional[ZoneSettingImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -83,7 +83,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), + cast_to=cast(Type[Optional[ZoneSettingImageResizing]], ResultWrapper[ZoneSettingImageResizing]), ) def get( @@ -96,7 +96,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesImageResizing]: + ) -> Optional[ZoneSettingImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -125,7 +125,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), + cast_to=cast(Type[Optional[ZoneSettingImageResizing]], ResultWrapper[ZoneSettingImageResizing]), ) @@ -142,14 +142,14 @@ async def edit( self, *, zone_id: str, - value: ZonesImageResizingParam, + value: ZoneSettingImageResizingParam, # 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[ZonesImageResizing]: + ) -> Optional[ZoneSettingImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -184,7 +184,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), + cast_to=cast(Type[Optional[ZoneSettingImageResizing]], ResultWrapper[ZoneSettingImageResizing]), ) async def get( @@ -197,7 +197,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesImageResizing]: + ) -> Optional[ZoneSettingImageResizing]: """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the @@ -226,7 +226,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesImageResizing]], ResultWrapper[ZonesImageResizing]), + cast_to=cast(Type[Optional[ZoneSettingImageResizing]], ResultWrapper[ZoneSettingImageResizing]), ) diff --git a/src/cloudflare/resources/zones/settings/ip_geolocation.py b/src/cloudflare/resources/zones/settings/ip_geolocation.py index 0c94d359ae0..8a14a19702a 100644 --- a/src/cloudflare/resources/zones/settings/ip_geolocation.py +++ b/src/cloudflare/resources/zones/settings/ip_geolocation.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesIPGeolocation, ip_geolocation_edit_params +from ....types.zones.settings import ZoneSettingIPGeolocation, ip_geolocation_edit_params __all__ = ["IPGeolocation", "AsyncIPGeolocation"] @@ -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[ZonesIPGeolocation]: + ) -> Optional[ZoneSettingIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -80,7 +80,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), + cast_to=cast(Type[Optional[ZoneSettingIPGeolocation]], ResultWrapper[ZoneSettingIPGeolocation]), ) 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[ZonesIPGeolocation]: + ) -> Optional[ZoneSettingIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -121,7 +121,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), + cast_to=cast(Type[Optional[ZoneSettingIPGeolocation]], ResultWrapper[ZoneSettingIPGeolocation]), ) @@ -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[ZonesIPGeolocation]: + ) -> Optional[ZoneSettingIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -176,7 +176,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), + cast_to=cast(Type[Optional[ZoneSettingIPGeolocation]], ResultWrapper[ZoneSettingIPGeolocation]), ) 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[ZonesIPGeolocation]: + ) -> Optional[ZoneSettingIPGeolocation]: """ Enable IP Geolocation to have Cloudflare geolocate visitors to your website and pass the country code to you. @@ -217,7 +217,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPGeolocation]], ResultWrapper[ZonesIPGeolocation]), + cast_to=cast(Type[Optional[ZoneSettingIPGeolocation]], ResultWrapper[ZoneSettingIPGeolocation]), ) diff --git a/src/cloudflare/resources/zones/settings/ipv6.py b/src/cloudflare/resources/zones/settings/ipv6.py index 8cd71522937..f9284b5731d 100644 --- a/src/cloudflare/resources/zones/settings/ipv6.py +++ b/src/cloudflare/resources/zones/settings/ipv6.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesIPV6, ipv6_edit_params +from ....types.zones.settings import ZoneSettingIPV6, ipv6_edit_params __all__ = ["IPV6", "AsyncIPV6"] @@ -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[ZonesIPV6]: + ) -> Optional[ZoneSettingIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), + cast_to=cast(Type[Optional[ZoneSettingIPV6]], ResultWrapper[ZoneSettingIPV6]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesIPV6]: + ) -> Optional[ZoneSettingIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), + cast_to=cast(Type[Optional[ZoneSettingIPV6]], ResultWrapper[ZoneSettingIPV6]), ) @@ -143,7 +143,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesIPV6]: + ) -> Optional[ZoneSettingIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -173,7 +173,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), + cast_to=cast(Type[Optional[ZoneSettingIPV6]], ResultWrapper[ZoneSettingIPV6]), ) async def get( @@ -186,7 +186,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesIPV6]: + ) -> Optional[ZoneSettingIPV6]: """ Enable IPv6 on all subdomains that are Cloudflare enabled. (https://support.cloudflare.com/hc/en-us/articles/200168586). @@ -213,7 +213,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesIPV6]], ResultWrapper[ZonesIPV6]), + cast_to=cast(Type[Optional[ZoneSettingIPV6]], ResultWrapper[ZoneSettingIPV6]), ) diff --git a/src/cloudflare/resources/zones/settings/min_tls_version.py b/src/cloudflare/resources/zones/settings/min_tls_version.py index bbd5bfb1b55..bbddcecee43 100644 --- a/src/cloudflare/resources/zones/settings/min_tls_version.py +++ b/src/cloudflare/resources/zones/settings/min_tls_version.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesMinTLSVersion, min_tls_version_edit_params +from ....types.zones.settings import ZoneSettingMinTLSVersion, min_tls_version_edit_params __all__ = ["MinTLSVersion", "AsyncMinTLSVersion"] @@ -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[ZonesMinTLSVersion]: + ) -> Optional[ZoneSettingMinTLSVersion]: """ Changes Minimum TLS Version setting. @@ -78,7 +78,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), + cast_to=cast(Type[Optional[ZoneSettingMinTLSVersion]], ResultWrapper[ZoneSettingMinTLSVersion]), ) def get( @@ -91,7 +91,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMinTLSVersion]: + ) -> Optional[ZoneSettingMinTLSVersion]: """ Gets Minimum TLS Version setting. @@ -117,7 +117,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), + cast_to=cast(Type[Optional[ZoneSettingMinTLSVersion]], ResultWrapper[ZoneSettingMinTLSVersion]), ) @@ -141,7 +141,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMinTLSVersion]: + ) -> Optional[ZoneSettingMinTLSVersion]: """ Changes Minimum TLS Version setting. @@ -170,7 +170,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), + cast_to=cast(Type[Optional[ZoneSettingMinTLSVersion]], ResultWrapper[ZoneSettingMinTLSVersion]), ) async def get( @@ -183,7 +183,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMinTLSVersion]: + ) -> Optional[ZoneSettingMinTLSVersion]: """ Gets Minimum TLS Version setting. @@ -209,7 +209,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinTLSVersion]], ResultWrapper[ZonesMinTLSVersion]), + cast_to=cast(Type[Optional[ZoneSettingMinTLSVersion]], ResultWrapper[ZoneSettingMinTLSVersion]), ) diff --git a/src/cloudflare/resources/zones/settings/minify.py b/src/cloudflare/resources/zones/settings/minify.py index 56a0df5b161..c6c627305e3 100644 --- a/src/cloudflare/resources/zones/settings/minify.py +++ b/src/cloudflare/resources/zones/settings/minify.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesMinify, minify_edit_params +from ....types.zones.settings import ZoneSettingMinify, minify_edit_params __all__ = ["Minify", "AsyncMinify"] @@ -48,7 +48,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMinify]: + ) -> Optional[ZoneSettingMinify]: """Automatically minify certain assets for your website. Refer to @@ -80,7 +80,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), + cast_to=cast(Type[Optional[ZoneSettingMinify]], ResultWrapper[ZoneSettingMinify]), ) 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[ZonesMinify]: + ) -> Optional[ZoneSettingMinify]: """Automatically minify certain assets for your website. Refer to @@ -122,7 +122,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), + cast_to=cast(Type[Optional[ZoneSettingMinify]], ResultWrapper[ZoneSettingMinify]), ) @@ -146,7 +146,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMinify]: + ) -> Optional[ZoneSettingMinify]: """Automatically minify certain assets for your website. Refer to @@ -178,7 +178,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), + cast_to=cast(Type[Optional[ZoneSettingMinify]], ResultWrapper[ZoneSettingMinify]), ) async def get( @@ -191,7 +191,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMinify]: + ) -> Optional[ZoneSettingMinify]: """Automatically minify certain assets for your website. Refer to @@ -220,7 +220,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMinify]], ResultWrapper[ZonesMinify]), + cast_to=cast(Type[Optional[ZoneSettingMinify]], ResultWrapper[ZoneSettingMinify]), ) diff --git a/src/cloudflare/resources/zones/settings/mirage.py b/src/cloudflare/resources/zones/settings/mirage.py index e9cc9bc6620..adb93b4163a 100644 --- a/src/cloudflare/resources/zones/settings/mirage.py +++ b/src/cloudflare/resources/zones/settings/mirage.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesMirage, mirage_edit_params +from ....types.zones.settings import ZoneSettingMirage, mirage_edit_params __all__ = ["Mirage", "AsyncMirage"] @@ -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[ZonesMirage]: + ) -> Optional[ZoneSettingMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -81,7 +81,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), + cast_to=cast(Type[Optional[ZoneSettingMirage]], ResultWrapper[ZoneSettingMirage]), ) def get( @@ -94,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMirage]: + ) -> Optional[ZoneSettingMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -123,7 +123,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), + cast_to=cast(Type[Optional[ZoneSettingMirage]], ResultWrapper[ZoneSettingMirage]), ) @@ -147,7 +147,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMirage]: + ) -> Optional[ZoneSettingMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -179,7 +179,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), + cast_to=cast(Type[Optional[ZoneSettingMirage]], ResultWrapper[ZoneSettingMirage]), ) async def get( @@ -192,7 +192,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMirage]: + ) -> Optional[ZoneSettingMirage]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our @@ -221,7 +221,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMirage]], ResultWrapper[ZonesMirage]), + cast_to=cast(Type[Optional[ZoneSettingMirage]], ResultWrapper[ZoneSettingMirage]), ) diff --git a/src/cloudflare/resources/zones/settings/mobile_redirect.py b/src/cloudflare/resources/zones/settings/mobile_redirect.py index b96a963172c..f02b392efff 100644 --- a/src/cloudflare/resources/zones/settings/mobile_redirect.py +++ b/src/cloudflare/resources/zones/settings/mobile_redirect.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesMobileRedirect, mobile_redirect_edit_params +from ....types.zones.settings import ZoneSettingMobileRedirect, mobile_redirect_edit_params __all__ = ["MobileRedirect", "AsyncMobileRedirect"] @@ -48,7 +48,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMobileRedirect]: + ) -> Optional[ZoneSettingMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -80,7 +80,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), + cast_to=cast(Type[Optional[ZoneSettingMobileRedirect]], ResultWrapper[ZoneSettingMobileRedirect]), ) 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[ZonesMobileRedirect]: + ) -> Optional[ZoneSettingMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -122,7 +122,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), + cast_to=cast(Type[Optional[ZoneSettingMobileRedirect]], ResultWrapper[ZoneSettingMobileRedirect]), ) @@ -146,7 +146,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMobileRedirect]: + ) -> Optional[ZoneSettingMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -178,7 +178,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), + cast_to=cast(Type[Optional[ZoneSettingMobileRedirect]], ResultWrapper[ZoneSettingMobileRedirect]), ) async def get( @@ -191,7 +191,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesMobileRedirect]: + ) -> Optional[ZoneSettingMobileRedirect]: """ Automatically redirect visitors on mobile devices to a mobile-optimized subdomain. Refer to @@ -220,7 +220,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesMobileRedirect]], ResultWrapper[ZonesMobileRedirect]), + cast_to=cast(Type[Optional[ZoneSettingMobileRedirect]], ResultWrapper[ZoneSettingMobileRedirect]), ) diff --git a/src/cloudflare/resources/zones/settings/nel.py b/src/cloudflare/resources/zones/settings/nel.py index 60fde343c6e..a258ecdf639 100644 --- a/src/cloudflare/resources/zones/settings/nel.py +++ b/src/cloudflare/resources/zones/settings/nel.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesNEL, ZonesNELParam, nel_edit_params +from ....types.zones.settings import ZoneSettingNEL, ZoneSettingNELParam, nel_edit_params __all__ = ["NEL", "AsyncNEL"] @@ -41,14 +41,14 @@ def edit( self, *, zone_id: str, - value: ZonesNELParam, + value: ZoneSettingNELParam, # 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[ZonesNEL]: + ) -> Optional[ZoneSettingNEL]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our [blog post](http://blog.cloudflare.com/nel-solving-mobile-speed) @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), + cast_to=cast(Type[Optional[ZoneSettingNEL]], ResultWrapper[ZoneSettingNEL]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesNEL]: + ) -> Optional[ZoneSettingNEL]: """Enable Network Error Logging reporting on your zone. (Beta) @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), + cast_to=cast(Type[Optional[ZoneSettingNEL]], ResultWrapper[ZoneSettingNEL]), ) @@ -136,14 +136,14 @@ async def edit( self, *, zone_id: str, - value: ZonesNELParam, + value: ZoneSettingNELParam, # 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[ZonesNEL]: + ) -> Optional[ZoneSettingNEL]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our [blog post](http://blog.cloudflare.com/nel-solving-mobile-speed) @@ -174,7 +174,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), + cast_to=cast(Type[Optional[ZoneSettingNEL]], ResultWrapper[ZoneSettingNEL]), ) async def get( @@ -187,7 +187,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesNEL]: + ) -> Optional[ZoneSettingNEL]: """Enable Network Error Logging reporting on your zone. (Beta) @@ -214,7 +214,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesNEL]], ResultWrapper[ZonesNEL]), + cast_to=cast(Type[Optional[ZoneSettingNEL]], ResultWrapper[ZoneSettingNEL]), ) diff --git a/src/cloudflare/resources/zones/settings/opportunistic_encryption.py b/src/cloudflare/resources/zones/settings/opportunistic_encryption.py index 75363b46b4a..bccb494ce3c 100644 --- a/src/cloudflare/resources/zones/settings/opportunistic_encryption.py +++ b/src/cloudflare/resources/zones/settings/opportunistic_encryption.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesOpportunisticEncryption, opportunistic_encryption_edit_params +from ....types.zones.settings import ZoneSettingOpportunisticEncryption, opportunistic_encryption_edit_params __all__ = ["OpportunisticEncryption", "AsyncOpportunisticEncryption"] @@ -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[ZonesOpportunisticEncryption]: + ) -> Optional[ZoneSettingOpportunisticEncryption]: """ Changes Opportunistic Encryption setting. @@ -81,7 +81,9 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), + cast_to=cast( + Type[Optional[ZoneSettingOpportunisticEncryption]], ResultWrapper[ZoneSettingOpportunisticEncryption] + ), ) def get( @@ -94,7 +96,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOpportunisticEncryption]: + ) -> Optional[ZoneSettingOpportunisticEncryption]: """ Gets Opportunistic Encryption setting. @@ -120,7 +122,9 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), + cast_to=cast( + Type[Optional[ZoneSettingOpportunisticEncryption]], ResultWrapper[ZoneSettingOpportunisticEncryption] + ), ) @@ -144,7 +148,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOpportunisticEncryption]: + ) -> Optional[ZoneSettingOpportunisticEncryption]: """ Changes Opportunistic Encryption setting. @@ -176,7 +180,9 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), + cast_to=cast( + Type[Optional[ZoneSettingOpportunisticEncryption]], ResultWrapper[ZoneSettingOpportunisticEncryption] + ), ) async def get( @@ -189,7 +195,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOpportunisticEncryption]: + ) -> Optional[ZoneSettingOpportunisticEncryption]: """ Gets Opportunistic Encryption setting. @@ -215,7 +221,9 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticEncryption]], ResultWrapper[ZonesOpportunisticEncryption]), + cast_to=cast( + Type[Optional[ZoneSettingOpportunisticEncryption]], ResultWrapper[ZoneSettingOpportunisticEncryption] + ), ) diff --git a/src/cloudflare/resources/zones/settings/opportunistic_onion.py b/src/cloudflare/resources/zones/settings/opportunistic_onion.py index 0574063f078..b7aac17aec4 100644 --- a/src/cloudflare/resources/zones/settings/opportunistic_onion.py +++ b/src/cloudflare/resources/zones/settings/opportunistic_onion.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesOpportunisticOnion, opportunistic_onion_edit_params +from ....types.zones.settings import ZoneSettingOpportunisticOnion, opportunistic_onion_edit_params __all__ = ["OpportunisticOnion", "AsyncOpportunisticOnion"] @@ -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[ZonesOpportunisticOnion]: + ) -> Optional[ZoneSettingOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -80,7 +80,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), + cast_to=cast(Type[Optional[ZoneSettingOpportunisticOnion]], ResultWrapper[ZoneSettingOpportunisticOnion]), ) 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[ZonesOpportunisticOnion]: + ) -> Optional[ZoneSettingOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -120,7 +120,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), + cast_to=cast(Type[Optional[ZoneSettingOpportunisticOnion]], ResultWrapper[ZoneSettingOpportunisticOnion]), ) @@ -144,7 +144,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOpportunisticOnion]: + ) -> Optional[ZoneSettingOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -177,7 +177,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), + cast_to=cast(Type[Optional[ZoneSettingOpportunisticOnion]], ResultWrapper[ZoneSettingOpportunisticOnion]), ) async def get( @@ -190,7 +190,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOpportunisticOnion]: + ) -> Optional[ZoneSettingOpportunisticOnion]: """ Add an Alt-Svc header to all legitimate requests from Tor, allowing the connection to use our onion services instead of exit nodes. @@ -217,7 +217,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOpportunisticOnion]], ResultWrapper[ZonesOpportunisticOnion]), + cast_to=cast(Type[Optional[ZoneSettingOpportunisticOnion]], ResultWrapper[ZoneSettingOpportunisticOnion]), ) diff --git a/src/cloudflare/resources/zones/settings/orange_to_orange.py b/src/cloudflare/resources/zones/settings/orange_to_orange.py index 8be3931f792..305f070cad6 100644 --- a/src/cloudflare/resources/zones/settings/orange_to_orange.py +++ b/src/cloudflare/resources/zones/settings/orange_to_orange.py @@ -23,7 +23,11 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesOrangeToOrange, ZonesOrangeToOrangeParam, orange_to_orange_edit_params +from ....types.zones.settings import ( + ZoneSettingOrangeToOrange, + ZoneSettingOrangeToOrangeParam, + orange_to_orange_edit_params, +) __all__ = ["OrangeToOrange", "AsyncOrangeToOrange"] @@ -41,14 +45,14 @@ def edit( self, *, zone_id: str, - value: ZonesOrangeToOrangeParam, + value: ZoneSettingOrangeToOrangeParam, # 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[ZonesOrangeToOrange]: + ) -> Optional[ZoneSettingOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -79,7 +83,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), + cast_to=cast(Type[Optional[ZoneSettingOrangeToOrange]], ResultWrapper[ZoneSettingOrangeToOrange]), ) def get( @@ -92,7 +96,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOrangeToOrange]: + ) -> Optional[ZoneSettingOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -119,7 +123,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), + cast_to=cast(Type[Optional[ZoneSettingOrangeToOrange]], ResultWrapper[ZoneSettingOrangeToOrange]), ) @@ -136,14 +140,14 @@ async def edit( self, *, zone_id: str, - value: ZonesOrangeToOrangeParam, + value: ZoneSettingOrangeToOrangeParam, # 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[ZonesOrangeToOrange]: + ) -> Optional[ZoneSettingOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -174,7 +178,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), + cast_to=cast(Type[Optional[ZoneSettingOrangeToOrange]], ResultWrapper[ZoneSettingOrangeToOrange]), ) async def get( @@ -187,7 +191,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOrangeToOrange]: + ) -> Optional[ZoneSettingOrangeToOrange]: """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. @@ -214,7 +218,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOrangeToOrange]], ResultWrapper[ZonesOrangeToOrange]), + cast_to=cast(Type[Optional[ZoneSettingOrangeToOrange]], ResultWrapper[ZoneSettingOrangeToOrange]), ) diff --git a/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py b/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py index d49494cfd19..3253bc91a55 100644 --- a/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py +++ b/src/cloudflare/resources/zones/settings/origin_error_page_pass_thru.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesOriginErrorPagePassThru, origin_error_page_pass_thru_edit_params +from ....types.zones.settings import ZoneSettingOriginErrorPagePassThru, origin_error_page_pass_thru_edit_params __all__ = ["OriginErrorPagePassThru", "AsyncOriginErrorPagePassThru"] @@ -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[ZonesOriginErrorPagePassThru]: + ) -> Optional[ZoneSettingOriginErrorPagePassThru]: """ Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply @@ -82,7 +82,9 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), + cast_to=cast( + Type[Optional[ZoneSettingOriginErrorPagePassThru]], ResultWrapper[ZoneSettingOriginErrorPagePassThru] + ), ) def get( @@ -95,7 +97,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOriginErrorPagePassThru]: + ) -> Optional[ZoneSettingOriginErrorPagePassThru]: """ Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply @@ -123,7 +125,9 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), + cast_to=cast( + Type[Optional[ZoneSettingOriginErrorPagePassThru]], ResultWrapper[ZoneSettingOriginErrorPagePassThru] + ), ) @@ -147,7 +151,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOriginErrorPagePassThru]: + ) -> Optional[ZoneSettingOriginErrorPagePassThru]: """ Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply @@ -180,7 +184,9 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), + cast_to=cast( + Type[Optional[ZoneSettingOriginErrorPagePassThru]], ResultWrapper[ZoneSettingOriginErrorPagePassThru] + ), ) async def get( @@ -193,7 +199,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesOriginErrorPagePassThru]: + ) -> Optional[ZoneSettingOriginErrorPagePassThru]: """ Cloudflare will proxy customer error pages on any 502,504 errors on origin server instead of showing a default Cloudflare error page. This does not apply @@ -221,7 +227,9 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesOriginErrorPagePassThru]], ResultWrapper[ZonesOriginErrorPagePassThru]), + cast_to=cast( + Type[Optional[ZoneSettingOriginErrorPagePassThru]], ResultWrapper[ZoneSettingOriginErrorPagePassThru] + ), ) diff --git a/src/cloudflare/resources/zones/settings/polish.py b/src/cloudflare/resources/zones/settings/polish.py index 6737f8912d6..90d2b75fd7a 100644 --- a/src/cloudflare/resources/zones/settings/polish.py +++ b/src/cloudflare/resources/zones/settings/polish.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesPolish, ZonesPolishParam, polish_edit_params +from ....types.zones.settings import ZoneSettingPolish, ZoneSettingPolishParam, polish_edit_params __all__ = ["Polish", "AsyncPolish"] @@ -41,14 +41,14 @@ def edit( self, *, zone_id: str, - value: ZonesPolishParam, + value: ZoneSettingPolishParam, # 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[ZonesPolish]: + ) -> Optional[ZoneSettingPolish]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) @@ -84,7 +84,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), + cast_to=cast(Type[Optional[ZoneSettingPolish]], ResultWrapper[ZoneSettingPolish]), ) def get( @@ -97,7 +97,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPolish]: + ) -> Optional[ZoneSettingPolish]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) @@ -125,7 +125,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), + cast_to=cast(Type[Optional[ZoneSettingPolish]], ResultWrapper[ZoneSettingPolish]), ) @@ -142,14 +142,14 @@ async def edit( self, *, zone_id: str, - value: ZonesPolishParam, + value: ZoneSettingPolishParam, # 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[ZonesPolish]: + ) -> Optional[ZoneSettingPolish]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) @@ -185,7 +185,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), + cast_to=cast(Type[Optional[ZoneSettingPolish]], ResultWrapper[ZoneSettingPolish]), ) async def get( @@ -198,7 +198,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPolish]: + ) -> Optional[ZoneSettingPolish]: """ Automatically optimize image loading for website visitors on mobile devices. Refer to our [blog post](http://blog.cloudflare.com/polish-solving-mobile-speed) @@ -226,7 +226,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPolish]], ResultWrapper[ZonesPolish]), + cast_to=cast(Type[Optional[ZoneSettingPolish]], ResultWrapper[ZoneSettingPolish]), ) diff --git a/src/cloudflare/resources/zones/settings/prefetch_preload.py b/src/cloudflare/resources/zones/settings/prefetch_preload.py index e10ff64b5d3..bff8a11f510 100644 --- a/src/cloudflare/resources/zones/settings/prefetch_preload.py +++ b/src/cloudflare/resources/zones/settings/prefetch_preload.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesPrefetchPreload, prefetch_preload_edit_params +from ....types.zones.settings import ZoneSettingPrefetchPreload, prefetch_preload_edit_params __all__ = ["PrefetchPreload", "AsyncPrefetchPreload"] @@ -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[ZonesPrefetchPreload]: + ) -> Optional[ZoneSettingPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), + cast_to=cast(Type[Optional[ZoneSettingPrefetchPreload]], ResultWrapper[ZoneSettingPrefetchPreload]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPrefetchPreload]: + ) -> Optional[ZoneSettingPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), + cast_to=cast(Type[Optional[ZoneSettingPrefetchPreload]], ResultWrapper[ZoneSettingPrefetchPreload]), ) @@ -143,7 +143,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPrefetchPreload]: + ) -> Optional[ZoneSettingPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -173,7 +173,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), + cast_to=cast(Type[Optional[ZoneSettingPrefetchPreload]], ResultWrapper[ZoneSettingPrefetchPreload]), ) async def get( @@ -186,7 +186,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPrefetchPreload]: + ) -> Optional[ZoneSettingPrefetchPreload]: """ Cloudflare will prefetch any URLs that are included in the response headers. This is limited to Enterprise Zones. @@ -213,7 +213,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPrefetchPreload]], ResultWrapper[ZonesPrefetchPreload]), + cast_to=cast(Type[Optional[ZoneSettingPrefetchPreload]], ResultWrapper[ZoneSettingPrefetchPreload]), ) diff --git a/src/cloudflare/resources/zones/settings/proxy_read_timeout.py b/src/cloudflare/resources/zones/settings/proxy_read_timeout.py index 1e615776fad..4fd41b55eca 100644 --- a/src/cloudflare/resources/zones/settings/proxy_read_timeout.py +++ b/src/cloudflare/resources/zones/settings/proxy_read_timeout.py @@ -23,7 +23,11 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesProxyReadTimeout, ZonesProxyReadTimeoutParam, proxy_read_timeout_edit_params +from ....types.zones.settings import ( + ZoneSettingProxyReadTimeout, + ZoneSettingProxyReadTimeoutParam, + proxy_read_timeout_edit_params, +) __all__ = ["ProxyReadTimeout", "AsyncProxyReadTimeout"] @@ -41,14 +45,14 @@ def edit( self, *, zone_id: str, - value: ZonesProxyReadTimeoutParam, + value: ZoneSettingProxyReadTimeoutParam, # 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[ZonesProxyReadTimeout]: + ) -> Optional[ZoneSettingProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -77,7 +81,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), + cast_to=cast(Type[Optional[ZoneSettingProxyReadTimeout]], ResultWrapper[ZoneSettingProxyReadTimeout]), ) def get( @@ -90,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesProxyReadTimeout]: + ) -> Optional[ZoneSettingProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -116,7 +120,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), + cast_to=cast(Type[Optional[ZoneSettingProxyReadTimeout]], ResultWrapper[ZoneSettingProxyReadTimeout]), ) @@ -133,14 +137,14 @@ async def edit( self, *, zone_id: str, - value: ZonesProxyReadTimeoutParam, + value: ZoneSettingProxyReadTimeoutParam, # 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[ZonesProxyReadTimeout]: + ) -> Optional[ZoneSettingProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -171,7 +175,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), + cast_to=cast(Type[Optional[ZoneSettingProxyReadTimeout]], ResultWrapper[ZoneSettingProxyReadTimeout]), ) async def get( @@ -184,7 +188,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesProxyReadTimeout]: + ) -> Optional[ZoneSettingProxyReadTimeout]: """ Maximum time between two read operations from origin. @@ -210,7 +214,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesProxyReadTimeout]], ResultWrapper[ZonesProxyReadTimeout]), + cast_to=cast(Type[Optional[ZoneSettingProxyReadTimeout]], ResultWrapper[ZoneSettingProxyReadTimeout]), ) diff --git a/src/cloudflare/resources/zones/settings/pseudo_ipv4.py b/src/cloudflare/resources/zones/settings/pseudo_ipv4.py index ec1e9c924dc..ab49ee30256 100644 --- a/src/cloudflare/resources/zones/settings/pseudo_ipv4.py +++ b/src/cloudflare/resources/zones/settings/pseudo_ipv4.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesPseudoIPV4, pseudo_ipv4_edit_params +from ....types.zones.settings import ZoneSettingPseudoIPV4, pseudo_ipv4_edit_params __all__ = ["PseudoIPV4", "AsyncPseudoIPV4"] @@ -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[ZonesPseudoIPV4]: + ) -> Optional[ZoneSettingPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -78,7 +78,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), + cast_to=cast(Type[Optional[ZoneSettingPseudoIPV4]], ResultWrapper[ZoneSettingPseudoIPV4]), ) def get( @@ -91,7 +91,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPseudoIPV4]: + ) -> Optional[ZoneSettingPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -117,7 +117,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), + cast_to=cast(Type[Optional[ZoneSettingPseudoIPV4]], ResultWrapper[ZoneSettingPseudoIPV4]), ) @@ -141,7 +141,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPseudoIPV4]: + ) -> Optional[ZoneSettingPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -170,7 +170,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), + cast_to=cast(Type[Optional[ZoneSettingPseudoIPV4]], ResultWrapper[ZoneSettingPseudoIPV4]), ) async def get( @@ -183,7 +183,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesPseudoIPV4]: + ) -> Optional[ZoneSettingPseudoIPV4]: """ Value of the Pseudo IPv4 setting. @@ -209,7 +209,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesPseudoIPV4]], ResultWrapper[ZonesPseudoIPV4]), + cast_to=cast(Type[Optional[ZoneSettingPseudoIPV4]], ResultWrapper[ZoneSettingPseudoIPV4]), ) diff --git a/src/cloudflare/resources/zones/settings/response_buffering.py b/src/cloudflare/resources/zones/settings/response_buffering.py index a24e08c8aa4..041eb425af5 100644 --- a/src/cloudflare/resources/zones/settings/response_buffering.py +++ b/src/cloudflare/resources/zones/settings/response_buffering.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesBuffering, response_buffering_edit_params +from ....types.zones.settings import ZoneSettingBuffering, response_buffering_edit_params __all__ = ["ResponseBuffering", "AsyncResponseBuffering"] @@ -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[ZonesBuffering]: + ) -> Optional[ZoneSettingBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -82,7 +82,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), + cast_to=cast(Type[Optional[ZoneSettingBuffering]], ResultWrapper[ZoneSettingBuffering]), ) def get( @@ -95,7 +95,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBuffering]: + ) -> Optional[ZoneSettingBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -125,7 +125,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), + cast_to=cast(Type[Optional[ZoneSettingBuffering]], ResultWrapper[ZoneSettingBuffering]), ) @@ -149,7 +149,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBuffering]: + ) -> Optional[ZoneSettingBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -184,7 +184,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), + cast_to=cast(Type[Optional[ZoneSettingBuffering]], ResultWrapper[ZoneSettingBuffering]), ) async def get( @@ -197,7 +197,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesBuffering]: + ) -> Optional[ZoneSettingBuffering]: """Enables or disables buffering of responses from the proxied server. Cloudflare @@ -227,7 +227,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesBuffering]], ResultWrapper[ZonesBuffering]), + cast_to=cast(Type[Optional[ZoneSettingBuffering]], ResultWrapper[ZoneSettingBuffering]), ) diff --git a/src/cloudflare/resources/zones/settings/rocket_loader.py b/src/cloudflare/resources/zones/settings/rocket_loader.py index 1fdfd09ec30..73b5ddadd6c 100644 --- a/src/cloudflare/resources/zones/settings/rocket_loader.py +++ b/src/cloudflare/resources/zones/settings/rocket_loader.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesRocketLoader, ZonesRocketLoaderParam, rocket_loader_edit_params +from ....types.zones.settings import ZoneSettingRocketLoader, ZoneSettingRocketLoaderParam, rocket_loader_edit_params __all__ = ["RocketLoader", "AsyncRocketLoader"] @@ -41,14 +41,14 @@ def edit( self, *, zone_id: str, - value: ZonesRocketLoaderParam, + value: ZoneSettingRocketLoaderParam, # 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[ZonesRocketLoader]: + ) -> Optional[ZoneSettingRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -95,7 +95,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), + cast_to=cast(Type[Optional[ZoneSettingRocketLoader]], ResultWrapper[ZoneSettingRocketLoader]), ) def get( @@ -108,7 +108,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesRocketLoader]: + ) -> Optional[ZoneSettingRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -143,7 +143,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), + cast_to=cast(Type[Optional[ZoneSettingRocketLoader]], ResultWrapper[ZoneSettingRocketLoader]), ) @@ -160,14 +160,14 @@ async def edit( self, *, zone_id: str, - value: ZonesRocketLoaderParam, + value: ZoneSettingRocketLoaderParam, # 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[ZonesRocketLoader]: + ) -> Optional[ZoneSettingRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -214,7 +214,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), + cast_to=cast(Type[Optional[ZoneSettingRocketLoader]], ResultWrapper[ZoneSettingRocketLoader]), ) async def get( @@ -227,7 +227,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesRocketLoader]: + ) -> Optional[ZoneSettingRocketLoader]: """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript @@ -262,7 +262,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesRocketLoader]], ResultWrapper[ZonesRocketLoader]), + cast_to=cast(Type[Optional[ZoneSettingRocketLoader]], ResultWrapper[ZoneSettingRocketLoader]), ) diff --git a/src/cloudflare/resources/zones/settings/security_headers.py b/src/cloudflare/resources/zones/settings/security_headers.py index 60af7822510..88fcd7d0bab 100644 --- a/src/cloudflare/resources/zones/settings/security_headers.py +++ b/src/cloudflare/resources/zones/settings/security_headers.py @@ -23,7 +23,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesSecurityHeader, security_header_edit_params +from ....types.zones.settings import ZoneSettingSecurityHeader, security_header_edit_params __all__ = ["SecurityHeaders", "AsyncSecurityHeaders"] @@ -48,7 +48,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityHeader]: + ) -> Optional[ZoneSettingSecurityHeader]: """ Cloudflare security header for a zone. @@ -75,7 +75,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), + cast_to=cast(Type[Optional[ZoneSettingSecurityHeader]], ResultWrapper[ZoneSettingSecurityHeader]), ) def get( @@ -88,7 +88,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityHeader]: + ) -> Optional[ZoneSettingSecurityHeader]: """ Cloudflare security header for a zone. @@ -114,7 +114,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), + cast_to=cast(Type[Optional[ZoneSettingSecurityHeader]], ResultWrapper[ZoneSettingSecurityHeader]), ) @@ -138,7 +138,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityHeader]: + ) -> Optional[ZoneSettingSecurityHeader]: """ Cloudflare security header for a zone. @@ -165,7 +165,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), + cast_to=cast(Type[Optional[ZoneSettingSecurityHeader]], ResultWrapper[ZoneSettingSecurityHeader]), ) async def get( @@ -178,7 +178,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityHeader]: + ) -> Optional[ZoneSettingSecurityHeader]: """ Cloudflare security header for a zone. @@ -204,7 +204,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityHeader]], ResultWrapper[ZonesSecurityHeader]), + cast_to=cast(Type[Optional[ZoneSettingSecurityHeader]], ResultWrapper[ZoneSettingSecurityHeader]), ) diff --git a/src/cloudflare/resources/zones/settings/security_level.py b/src/cloudflare/resources/zones/settings/security_level.py index 6e0ad7e646e..a5d0c78ed39 100644 --- a/src/cloudflare/resources/zones/settings/security_level.py +++ b/src/cloudflare/resources/zones/settings/security_level.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesSecurityLevel, security_level_edit_params +from ....types.zones.settings import ZoneSettingSecurityLevel, security_level_edit_params __all__ = ["SecurityLevel", "AsyncSecurityLevel"] @@ -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[ZonesSecurityLevel]: + ) -> Optional[ZoneSettingSecurityLevel]: """ Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize @@ -81,7 +81,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), + cast_to=cast(Type[Optional[ZoneSettingSecurityLevel]], ResultWrapper[ZoneSettingSecurityLevel]), ) def get( @@ -94,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityLevel]: + ) -> Optional[ZoneSettingSecurityLevel]: """ Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize @@ -123,7 +123,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), + cast_to=cast(Type[Optional[ZoneSettingSecurityLevel]], ResultWrapper[ZoneSettingSecurityLevel]), ) @@ -147,7 +147,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityLevel]: + ) -> Optional[ZoneSettingSecurityLevel]: """ Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize @@ -179,7 +179,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), + cast_to=cast(Type[Optional[ZoneSettingSecurityLevel]], ResultWrapper[ZoneSettingSecurityLevel]), ) async def get( @@ -192,7 +192,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSecurityLevel]: + ) -> Optional[ZoneSettingSecurityLevel]: """ Choose the appropriate security profile for your website, which will automatically adjust each of the security settings. If you choose to customize @@ -221,7 +221,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSecurityLevel]], ResultWrapper[ZonesSecurityLevel]), + cast_to=cast(Type[Optional[ZoneSettingSecurityLevel]], ResultWrapper[ZoneSettingSecurityLevel]), ) diff --git a/src/cloudflare/resources/zones/settings/server_side_excludes.py b/src/cloudflare/resources/zones/settings/server_side_excludes.py index f5e9f271cdc..27502785358 100644 --- a/src/cloudflare/resources/zones/settings/server_side_excludes.py +++ b/src/cloudflare/resources/zones/settings/server_side_excludes.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesServerSideExclude, server_side_exclude_edit_params +from ....types.zones.settings import ZoneSettingServerSideExclude, server_side_exclude_edit_params __all__ = ["ServerSideExcludes", "AsyncServerSideExcludes"] @@ -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[ZonesServerSideExclude]: + ) -> Optional[ZoneSettingServerSideExclude]: """ If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do @@ -88,7 +88,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), + cast_to=cast(Type[Optional[ZoneSettingServerSideExclude]], ResultWrapper[ZoneSettingServerSideExclude]), ) def get( @@ -101,7 +101,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesServerSideExclude]: + ) -> Optional[ZoneSettingServerSideExclude]: """ If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do @@ -137,7 +137,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), + cast_to=cast(Type[Optional[ZoneSettingServerSideExclude]], ResultWrapper[ZoneSettingServerSideExclude]), ) @@ -161,7 +161,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesServerSideExclude]: + ) -> Optional[ZoneSettingServerSideExclude]: """ If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do @@ -202,7 +202,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), + cast_to=cast(Type[Optional[ZoneSettingServerSideExclude]], ResultWrapper[ZoneSettingServerSideExclude]), ) async def get( @@ -215,7 +215,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesServerSideExclude]: + ) -> Optional[ZoneSettingServerSideExclude]: """ If there is sensitive content on your website that you want visible to real visitors, but that you want to hide from suspicious visitors, all you have to do @@ -251,7 +251,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesServerSideExclude]], ResultWrapper[ZonesServerSideExclude]), + cast_to=cast(Type[Optional[ZoneSettingServerSideExclude]], ResultWrapper[ZoneSettingServerSideExclude]), ) diff --git a/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py b/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py index 677bccc7c81..cfb80498265 100644 --- a/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py +++ b/src/cloudflare/resources/zones/settings/sort_query_string_for_cache.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesSortQueryStringForCache, sort_query_string_for_cache_edit_params +from ....types.zones.settings import ZoneSettingSortQueryStringForCache, sort_query_string_for_cache_edit_params __all__ = ["SortQueryStringForCache", "AsyncSortQueryStringForCache"] @@ -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[ZonesSortQueryStringForCache]: + ) -> Optional[ZoneSettingSortQueryStringForCache]: """ Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to @@ -82,7 +82,9 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), + cast_to=cast( + Type[Optional[ZoneSettingSortQueryStringForCache]], ResultWrapper[ZoneSettingSortQueryStringForCache] + ), ) def get( @@ -95,7 +97,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSortQueryStringForCache]: + ) -> Optional[ZoneSettingSortQueryStringForCache]: """ Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to @@ -123,7 +125,9 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), + cast_to=cast( + Type[Optional[ZoneSettingSortQueryStringForCache]], ResultWrapper[ZoneSettingSortQueryStringForCache] + ), ) @@ -147,7 +151,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSortQueryStringForCache]: + ) -> Optional[ZoneSettingSortQueryStringForCache]: """ Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to @@ -180,7 +184,9 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), + cast_to=cast( + Type[Optional[ZoneSettingSortQueryStringForCache]], ResultWrapper[ZoneSettingSortQueryStringForCache] + ), ) async def get( @@ -193,7 +199,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSortQueryStringForCache]: + ) -> Optional[ZoneSettingSortQueryStringForCache]: """ Cloudflare will treat files with the same query strings as the same file in cache, regardless of the order of the query strings. This is limited to @@ -221,7 +227,9 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSortQueryStringForCache]], ResultWrapper[ZonesSortQueryStringForCache]), + cast_to=cast( + Type[Optional[ZoneSettingSortQueryStringForCache]], ResultWrapper[ZoneSettingSortQueryStringForCache] + ), ) diff --git a/src/cloudflare/resources/zones/settings/ssl.py b/src/cloudflare/resources/zones/settings/ssl.py index c08cfe7797e..56c95e74fea 100644 --- a/src/cloudflare/resources/zones/settings/ssl.py +++ b/src/cloudflare/resources/zones/settings/ssl.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesSSL, ssl_edit_params +from ....types.zones.settings import ZoneSettingSSL, ssl_edit_params __all__ = ["SSL", "AsyncSSL"] @@ -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[ZonesSSL]: + ) -> Optional[ZoneSettingSSL]: """ SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to @@ -93,7 +93,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), + cast_to=cast(Type[Optional[ZoneSettingSSL]], ResultWrapper[ZoneSettingSSL]), ) def get( @@ -106,7 +106,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSSL]: + ) -> Optional[ZoneSettingSSL]: """ SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to @@ -147,7 +147,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), + cast_to=cast(Type[Optional[ZoneSettingSSL]], ResultWrapper[ZoneSettingSSL]), ) @@ -171,7 +171,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSSL]: + ) -> Optional[ZoneSettingSSL]: """ SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to @@ -215,7 +215,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), + cast_to=cast(Type[Optional[ZoneSettingSSL]], ResultWrapper[ZoneSettingSSL]), ) async def get( @@ -228,7 +228,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSSL]: + ) -> Optional[ZoneSettingSSL]: """ SSL encrypts your visitor's connection and safeguards credit card numbers and other personal data to and from your website. SSL can take up to 5 minutes to @@ -269,7 +269,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSL]], ResultWrapper[ZonesSSL]), + cast_to=cast(Type[Optional[ZoneSettingSSL]], ResultWrapper[ZoneSettingSSL]), ) diff --git a/src/cloudflare/resources/zones/settings/ssl_recommender.py b/src/cloudflare/resources/zones/settings/ssl_recommender.py index 8bf548423b3..8ec9470c556 100644 --- a/src/cloudflare/resources/zones/settings/ssl_recommender.py +++ b/src/cloudflare/resources/zones/settings/ssl_recommender.py @@ -23,7 +23,11 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesSSLRecommender, ZonesSSLRecommenderParam, ssl_recommender_edit_params +from ....types.zones.settings import ( + ZoneSettingSSLRecommender, + ZoneSettingSSLRecommenderParam, + ssl_recommender_edit_params, +) __all__ = ["SSLRecommender", "AsyncSSLRecommender"] @@ -41,14 +45,14 @@ def edit( self, *, zone_id: str, - value: ZonesSSLRecommenderParam, + value: ZoneSettingSSLRecommenderParam, # 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[ZonesSSLRecommender]: + ) -> Optional[ZoneSettingSSLRecommender]: """ Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your @@ -81,7 +85,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), + cast_to=cast(Type[Optional[ZoneSettingSSLRecommender]], ResultWrapper[ZoneSettingSSLRecommender]), ) def get( @@ -94,7 +98,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSSLRecommender]: + ) -> Optional[ZoneSettingSSLRecommender]: """ Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your @@ -122,7 +126,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), + cast_to=cast(Type[Optional[ZoneSettingSSLRecommender]], ResultWrapper[ZoneSettingSSLRecommender]), ) @@ -139,14 +143,14 @@ async def edit( self, *, zone_id: str, - value: ZonesSSLRecommenderParam, + value: ZoneSettingSSLRecommenderParam, # 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[ZonesSSLRecommender]: + ) -> Optional[ZoneSettingSSLRecommender]: """ Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your @@ -179,7 +183,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), + cast_to=cast(Type[Optional[ZoneSettingSSLRecommender]], ResultWrapper[ZoneSettingSSLRecommender]), ) async def get( @@ -192,7 +196,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesSSLRecommender]: + ) -> Optional[ZoneSettingSSLRecommender]: """ Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your @@ -220,7 +224,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesSSLRecommender]], ResultWrapper[ZonesSSLRecommender]), + cast_to=cast(Type[Optional[ZoneSettingSSLRecommender]], ResultWrapper[ZoneSettingSSLRecommender]), ) diff --git a/src/cloudflare/resources/zones/settings/tls_1_3.py b/src/cloudflare/resources/zones/settings/tls_1_3.py index d5b3a53ce57..c928cb1581a 100644 --- a/src/cloudflare/resources/zones/settings/tls_1_3.py +++ b/src/cloudflare/resources/zones/settings/tls_1_3.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesTLS1_3, tls_1_3_edit_params +from ....types.zones.settings import ZoneSettingTLS1_3, tls_1_3_edit_params __all__ = ["TLS1_3", "AsyncTLS1_3"] @@ -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[ZonesTLS1_3]: + ) -> Optional[ZoneSettingTLS1_3]: """ Changes TLS 1.3 setting. @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), + cast_to=cast(Type[Optional[ZoneSettingTLS1_3]], ResultWrapper[ZoneSettingTLS1_3]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTLS1_3]: + ) -> Optional[ZoneSettingTLS1_3]: """ Gets TLS 1.3 setting enabled for a zone. @@ -118,7 +118,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), + cast_to=cast(Type[Optional[ZoneSettingTLS1_3]], ResultWrapper[ZoneSettingTLS1_3]), ) @@ -142,7 +142,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTLS1_3]: + ) -> Optional[ZoneSettingTLS1_3]: """ Changes TLS 1.3 setting. @@ -172,7 +172,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), + cast_to=cast(Type[Optional[ZoneSettingTLS1_3]], ResultWrapper[ZoneSettingTLS1_3]), ) async def get( @@ -185,7 +185,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTLS1_3]: + ) -> Optional[ZoneSettingTLS1_3]: """ Gets TLS 1.3 setting enabled for a zone. @@ -211,7 +211,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLS1_3]], ResultWrapper[ZonesTLS1_3]), + cast_to=cast(Type[Optional[ZoneSettingTLS1_3]], ResultWrapper[ZoneSettingTLS1_3]), ) diff --git a/src/cloudflare/resources/zones/settings/tls_client_auth.py b/src/cloudflare/resources/zones/settings/tls_client_auth.py index 3a7f051793a..e54e66bebe8 100644 --- a/src/cloudflare/resources/zones/settings/tls_client_auth.py +++ b/src/cloudflare/resources/zones/settings/tls_client_auth.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesTLSClientAuth, tls_client_auth_edit_params +from ....types.zones.settings import ZoneSettingTLSClientAuth, tls_client_auth_edit_params __all__ = ["TLSClientAuth", "AsyncTLSClientAuth"] @@ -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[ZonesTLSClientAuth]: + ) -> Optional[ZoneSettingTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), + cast_to=cast(Type[Optional[ZoneSettingTLSClientAuth]], ResultWrapper[ZoneSettingTLSClientAuth]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTLSClientAuth]: + ) -> Optional[ZoneSettingTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), + cast_to=cast(Type[Optional[ZoneSettingTLSClientAuth]], ResultWrapper[ZoneSettingTLSClientAuth]), ) @@ -143,7 +143,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTLSClientAuth]: + ) -> Optional[ZoneSettingTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -173,7 +173,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), + cast_to=cast(Type[Optional[ZoneSettingTLSClientAuth]], ResultWrapper[ZoneSettingTLSClientAuth]), ) async def get( @@ -186,7 +186,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTLSClientAuth]: + ) -> Optional[ZoneSettingTLSClientAuth]: """ TLS Client Auth requires Cloudflare to connect to your origin server using a client certificate (Enterprise Only). @@ -213,7 +213,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTLSClientAuth]], ResultWrapper[ZonesTLSClientAuth]), + cast_to=cast(Type[Optional[ZoneSettingTLSClientAuth]], ResultWrapper[ZoneSettingTLSClientAuth]), ) diff --git a/src/cloudflare/resources/zones/settings/true_client_ip_header.py b/src/cloudflare/resources/zones/settings/true_client_ip_header.py index aa2f197f54e..20b9b22963d 100644 --- a/src/cloudflare/resources/zones/settings/true_client_ip_header.py +++ b/src/cloudflare/resources/zones/settings/true_client_ip_header.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesTrueClientIPHeader, true_client_ip_header_edit_params +from ....types.zones.settings import ZoneSettingTrueClientIPHeader, true_client_ip_header_edit_params __all__ = ["TrueClientIPHeader", "AsyncTrueClientIPHeader"] @@ -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[ZonesTrueClientIPHeader]: + ) -> Optional[ZoneSettingTrueClientIPHeader]: """ Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones. @@ -79,7 +79,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), + cast_to=cast(Type[Optional[ZoneSettingTrueClientIPHeader]], ResultWrapper[ZoneSettingTrueClientIPHeader]), ) def get( @@ -92,7 +92,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTrueClientIPHeader]: + ) -> Optional[ZoneSettingTrueClientIPHeader]: """ Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones. @@ -119,7 +119,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), + cast_to=cast(Type[Optional[ZoneSettingTrueClientIPHeader]], ResultWrapper[ZoneSettingTrueClientIPHeader]), ) @@ -143,7 +143,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTrueClientIPHeader]: + ) -> Optional[ZoneSettingTrueClientIPHeader]: """ Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones. @@ -175,7 +175,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), + cast_to=cast(Type[Optional[ZoneSettingTrueClientIPHeader]], ResultWrapper[ZoneSettingTrueClientIPHeader]), ) async def get( @@ -188,7 +188,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesTrueClientIPHeader]: + ) -> Optional[ZoneSettingTrueClientIPHeader]: """ Allows customer to continue to use True Client IP (Akamai feature) in the headers we send to the origin. This is limited to Enterprise Zones. @@ -215,7 +215,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesTrueClientIPHeader]], ResultWrapper[ZonesTrueClientIPHeader]), + cast_to=cast(Type[Optional[ZoneSettingTrueClientIPHeader]], ResultWrapper[ZoneSettingTrueClientIPHeader]), ) diff --git a/src/cloudflare/resources/zones/settings/waf.py b/src/cloudflare/resources/zones/settings/waf.py index 68097b84f36..542ffe9f82e 100644 --- a/src/cloudflare/resources/zones/settings/waf.py +++ b/src/cloudflare/resources/zones/settings/waf.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesWAF, waf_edit_params +from ....types.zones.settings import ZoneSettingWAF, waf_edit_params __all__ = ["WAF", "AsyncWAF"] @@ -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[ZonesWAF]: + ) -> Optional[ZoneSettingWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -88,7 +88,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), + cast_to=cast(Type[Optional[ZoneSettingWAF]], ResultWrapper[ZoneSettingWAF]), ) def get( @@ -101,7 +101,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesWAF]: + ) -> Optional[ZoneSettingWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -137,7 +137,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), + cast_to=cast(Type[Optional[ZoneSettingWAF]], ResultWrapper[ZoneSettingWAF]), ) @@ -161,7 +161,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesWAF]: + ) -> Optional[ZoneSettingWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -200,7 +200,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), + cast_to=cast(Type[Optional[ZoneSettingWAF]], ResultWrapper[ZoneSettingWAF]), ) async def get( @@ -213,7 +213,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesWAF]: + ) -> Optional[ZoneSettingWAF]: """The WAF examines HTTP requests to your website. It inspects both GET and POST @@ -249,7 +249,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWAF]], ResultWrapper[ZonesWAF]), + cast_to=cast(Type[Optional[ZoneSettingWAF]], ResultWrapper[ZoneSettingWAF]), ) diff --git a/src/cloudflare/resources/zones/settings/webp.py b/src/cloudflare/resources/zones/settings/webp.py index fa6411e35e4..78ec7612555 100644 --- a/src/cloudflare/resources/zones/settings/webp.py +++ b/src/cloudflare/resources/zones/settings/webp.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesWebP, webp_edit_params +from ....types.zones.settings import ZoneSettingWebP, webp_edit_params __all__ = ["WebP", "AsyncWebP"] @@ -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[ZoneSettingWebP]: """ When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will @@ -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[ZoneSettingWebP]], ResultWrapper[ZoneSettingWebP]), ) 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[ZoneSettingWebP]: """ 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,7 +121,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWebP]], ResultWrapper[ZonesWebP]), + cast_to=cast(Type[Optional[ZoneSettingWebP]], ResultWrapper[ZoneSettingWebP]), ) @@ -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[ZoneSettingWebP]: """ When the client requesting the image supports the WebP image codec, and WebP offers a performance advantage over the original image format, Cloudflare will @@ -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[ZoneSettingWebP]], ResultWrapper[ZoneSettingWebP]), ) 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[ZoneSettingWebP]: """ 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,7 +217,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWebP]], ResultWrapper[ZonesWebP]), + cast_to=cast(Type[Optional[ZoneSettingWebP]], ResultWrapper[ZoneSettingWebP]), ) diff --git a/src/cloudflare/resources/zones/settings/websocket.py b/src/cloudflare/resources/zones/settings/websocket.py index 1798467fca7..68b4940c9fd 100644 --- a/src/cloudflare/resources/zones/settings/websocket.py +++ b/src/cloudflare/resources/zones/settings/websocket.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZonesWebsockets, websocket_edit_params +from ....types.zones.settings import ZoneSettingWebsockets, websocket_edit_params __all__ = ["Websocket", "AsyncWebsocket"] @@ -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[ZonesWebsockets]: + ) -> Optional[ZoneSettingWebsockets]: """Changes Websockets setting. For more information about Websockets, please refer @@ -81,7 +81,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), + cast_to=cast(Type[Optional[ZoneSettingWebsockets]], ResultWrapper[ZoneSettingWebsockets]), ) def get( @@ -94,7 +94,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesWebsockets]: + ) -> Optional[ZoneSettingWebsockets]: """Gets Websockets setting. For more information about Websockets, please refer to @@ -122,7 +122,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), + cast_to=cast(Type[Optional[ZoneSettingWebsockets]], ResultWrapper[ZoneSettingWebsockets]), ) @@ -146,7 +146,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesWebsockets]: + ) -> Optional[ZoneSettingWebsockets]: """Changes Websockets setting. For more information about Websockets, please refer @@ -178,7 +178,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), + cast_to=cast(Type[Optional[ZoneSettingWebsockets]], ResultWrapper[ZoneSettingWebsockets]), ) async def get( @@ -191,7 +191,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZonesWebsockets]: + ) -> Optional[ZoneSettingWebsockets]: """Gets Websockets setting. For more information about Websockets, please refer to @@ -219,7 +219,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZonesWebsockets]], ResultWrapper[ZonesWebsockets]), + cast_to=cast(Type[Optional[ZoneSettingWebsockets]], ResultWrapper[ZoneSettingWebsockets]), ) diff --git a/src/cloudflare/resources/zones/settings/zero_rtt.py b/src/cloudflare/resources/zones/settings/zero_rtt.py index 069a81a55d4..9f47865ed16 100644 --- a/src/cloudflare/resources/zones/settings/zero_rtt.py +++ b/src/cloudflare/resources/zones/settings/zero_rtt.py @@ -24,7 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import Zones0rtt, zero_rtt_edit_params +from ....types.zones.settings import ZoneSetting0rtt, zero_rtt_edit_params __all__ = ["ZeroRTT", "AsyncZeroRTT"] @@ -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[Zones0rtt]: + ) -> Optional[ZoneSetting0rtt]: """ Changes the 0-RTT session resumption setting. @@ -78,7 +78,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), + cast_to=cast(Type[Optional[ZoneSetting0rtt]], ResultWrapper[ZoneSetting0rtt]), ) def get( @@ -91,7 +91,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Zones0rtt]: + ) -> Optional[ZoneSetting0rtt]: """ Gets 0-RTT session resumption setting. @@ -117,7 +117,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), + cast_to=cast(Type[Optional[ZoneSetting0rtt]], ResultWrapper[ZoneSetting0rtt]), ) @@ -141,7 +141,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Zones0rtt]: + ) -> Optional[ZoneSetting0rtt]: """ Changes the 0-RTT session resumption setting. @@ -170,7 +170,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), + cast_to=cast(Type[Optional[ZoneSetting0rtt]], ResultWrapper[ZoneSetting0rtt]), ) async def get( @@ -183,7 +183,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[Zones0rtt]: + ) -> Optional[ZoneSetting0rtt]: """ Gets 0-RTT session resumption setting. @@ -209,7 +209,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[Zones0rtt]], ResultWrapper[Zones0rtt]), + cast_to=cast(Type[Optional[ZoneSetting0rtt]], ResultWrapper[ZoneSetting0rtt]), ) diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index 302dcfb7a30..743bd7b3600 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -4,22 +4,26 @@ from .ips import IPs as IPs from .zone import Zone as Zone +from .dnssec import DNSSEC as DNSSEC from .shared import ErrorData as ErrorData from .account import Account as Account from .snippet import Snippet as Snippet from .calls_app import CallsApp as CallsApp from .membership import Membership as Membership +from .healthcheck import Healthcheck as Healthcheck from .jdcloud_ips import JDCloudIPs as JDCloudIPs -from .dnssec_dnssec import DNSSECDNSSEC as DNSSECDNSSEC +from .waiting_room import WaitingRoom as WaitingRoom from .load_balancer import LoadBalancer as LoadBalancer from .stream_videos import StreamVideos as StreamVideos from .ip_list_params import IPListParams as IPListParams -from .zones_page_rule import ZonesPageRule as ZonesPageRule +from .zones_pagerule import ZonesPagerule as ZonesPagerule +from .firewall_filter import FirewallFilter as FirewallFilter from .ip_list_response import IPListResponse as IPListResponse +from .mtls_certificate import MTLSCertificate as MTLSCertificate from .user_edit_params import UserEditParams as UserEditParams from .zone_edit_params import ZoneEditParams as ZoneEditParams from .zone_list_params import ZoneListParams as ZoneListParams -from .legacy_jhs_filter import LegacyJhsFilter as LegacyJhsFilter +from .custom_nameserver import CustomNameserver as CustomNameserver from .observatory_trend import ObservatoryTrend as ObservatoryTrend from .pcap_get_response import PCAPGetResponse as PCAPGetResponse from .user_get_response import UserGetResponse as UserGetResponse @@ -27,6 +31,8 @@ from .call_create_params import CallCreateParams as CallCreateParams from .call_list_response import CallListResponse as CallListResponse from .call_update_params import CallUpdateParams as CallUpdateParams +from .client_certificate import ClientCertificate as ClientCertificate +from .custom_certificate import CustomCertificate as CustomCertificate from .dnssec_edit_params import DNSSECEditParams as DNSSECEditParams from .filter_list_params import FilterListParams as FilterListParams from .pcap_create_params import PCAPCreateParams as PCAPCreateParams @@ -37,6 +43,8 @@ from .user_edit_response import UserEditResponse as UserEditResponse from .zone_create_params import ZoneCreateParams as ZoneCreateParams from .account_list_params import AccountListParams as AccountListParams +from .available_rate_plan import AvailableRatePlan as AvailableRatePlan +from .page_shield_setting import PageShieldSetting as PageShieldSetting from .queue_create_params import QueueCreateParams as QueueCreateParams from .queue_list_response import QueueListResponse as QueueListResponse from .queue_update_params import QueueUpdateParams as QueueUpdateParams @@ -79,10 +87,10 @@ from .healthcheck_edit_params import HealthcheckEditParams as HealthcheckEditParams from .intel_phishing_url_info import IntelPhishingURLInfo as IntelPhishingURLInfo from .membership_get_response import MembershipGetResponse as MembershipGetResponse +from .mtls_certificate_update import MTLSCertificateUpdate as MTLSCertificateUpdate from .rate_limit_get_response import RateLimitGetResponse as RateLimitGetResponse from .snippet_delete_response import SnippetDeleteResponse as SnippetDeleteResponse from .url_scanner_scan_params import URLScannerScanParams as URLScannerScanParams -from .waitingroom_waitingroom import WaitingroomWaitingroom as WaitingroomWaitingroom from .membership_update_params import MembershipUpdateParams as MembershipUpdateParams from .pagerule_create_response import PageruleCreateResponse as PageruleCreateResponse from .pagerule_delete_response import PageruleDeleteResponse as PageruleDeleteResponse @@ -95,7 +103,6 @@ from .healthcheck_create_params import HealthcheckCreateParams as HealthcheckCreateParams from .healthcheck_list_response import HealthcheckListResponse as HealthcheckListResponse from .healthcheck_update_params import HealthcheckUpdateParams as HealthcheckUpdateParams -from .healthchecks_healthchecks import HealthchecksHealthchecks as HealthchecksHealthchecks from .intel_phishing_url_submit import IntelPhishingURLSubmit as IntelPhishingURLSubmit from .load_balancer_edit_params import LoadBalancerEditParams as LoadBalancerEditParams from .page_shield_update_params import PageShieldUpdateParams as PageShieldUpdateParams @@ -125,9 +132,11 @@ from .load_balancer_create_params import LoadBalancerCreateParams as LoadBalancerCreateParams from .load_balancer_list_response import LoadBalancerListResponse as LoadBalancerListResponse from .load_balancer_update_params import LoadBalancerUpdateParams as LoadBalancerUpdateParams +from .page_shield_update_response import PageShieldUpdateResponse as PageShieldUpdateResponse from .warp_connector_get_response import WARPConnectorGetResponse as WARPConnectorGetResponse from .bot_management_update_params import BotManagementUpdateParams as BotManagementUpdateParams from .custom_hostname_get_response import CustomHostnameGetResponse as CustomHostnameGetResponse +from .keyless_certificate_hostname import KeylessCertificateHostname as KeylessCertificateHostname from .managed_header_edit_response import ManagedHeaderEditResponse as ManagedHeaderEditResponse from .managed_header_list_response import ManagedHeaderListResponse as ManagedHeaderListResponse from .subscription_create_response import SubscriptionCreateResponse as SubscriptionCreateResponse @@ -143,7 +152,6 @@ 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 from .bot_management_update_response import BotManagementUpdateResponse as BotManagementUpdateResponse from .brand_protection_submit_params import BrandProtectionSubmitParams as BrandProtectionSubmitParams @@ -167,9 +175,6 @@ from .client_certificate_create_params import ClientCertificateCreateParams as ClientCertificateCreateParams from .custom_certificate_create_params import CustomCertificateCreateParams as CustomCertificateCreateParams from .custom_certificate_edit_response import CustomCertificateEditResponse as CustomCertificateEditResponse -from .dns_custom_nameservers_custom_ns import DNSCustomNameserversCustomNS as DNSCustomNameserversCustomNS -from .page_shield_update_zone_settings import PageShieldUpdateZoneSettings as PageShieldUpdateZoneSettings -from .bill_subs_api_available_rate_plan import BillSubsAPIAvailableRatePlan as BillSubsAPIAvailableRatePlan from .custom_nameserver_delete_response import CustomNameserverDeleteResponse as CustomNameserverDeleteResponse from .custom_nameserver_verify_response import CustomNameserverVerifyResponse as CustomNameserverVerifyResponse from .keyless_certificate_create_params import KeylessCertificateCreateParams as KeylessCertificateCreateParams @@ -182,7 +187,6 @@ from .origin_ca_certificate_create_params import OriginCACertificateCreateParams as OriginCACertificateCreateParams from .origin_ca_certificate_list_response import OriginCACertificateListResponse as OriginCACertificateListResponse from .origin_tls_client_auth_get_response import OriginTLSClientAuthGetResponse as OriginTLSClientAuthGetResponse -from .tls_certificates_and_hostnames_base import TLSCertificatesAndHostnamesBase as TLSCertificatesAndHostnamesBase from .origin_tls_client_auth_create_params import OriginTLSClientAuthCreateParams as OriginTLSClientAuthCreateParams from .origin_tls_client_auth_list_response import OriginTLSClientAuthListResponse as OriginTLSClientAuthListResponse from .origin_ca_certificate_create_response import ( @@ -209,15 +213,3 @@ from .origin_post_quantum_encryption_update_response import ( OriginPostQuantumEncryptionUpdateResponse as OriginPostQuantumEncryptionUpdateResponse, ) -from .tls_certificates_and_hostnames_client_certificate import ( - TLSCertificatesAndHostnamesClientCertificate as TLSCertificatesAndHostnamesClientCertificate, -) -from .tls_certificates_and_hostnames_custom_certificate import ( - TLSCertificatesAndHostnamesCustomCertificate as TLSCertificatesAndHostnamesCustomCertificate, -) -from .tls_certificates_and_hostnames_certificate_object_post import ( - TLSCertificatesAndHostnamesCertificateObjectPost as TLSCertificatesAndHostnamesCertificateObjectPost, -) -from .tls_certificates_and_hostnames_components_schemas_certificate_object import ( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject as TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, -) diff --git a/src/cloudflare/types/accounts/__init__.py b/src/cloudflare/types/accounts/__init__.py index 8674692aa7b..f642f617512 100644 --- a/src/cloudflare/types/accounts/__init__.py +++ b/src/cloudflare/types/accounts/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations +from .role import Role as Role from .account_member import AccountMember as AccountMember -from .iam_schemas_role import IamSchemasRole as IamSchemasRole from .role_get_response import RoleGetResponse as RoleGetResponse from .member_list_params import MemberListParams as MemberListParams from .role_list_response import RoleListResponse as RoleListResponse diff --git a/src/cloudflare/types/accounts/member_list_response.py b/src/cloudflare/types/accounts/member_list_response.py index fb7db5a437e..26182b74f97 100644 --- a/src/cloudflare/types/accounts/member_list_response.py +++ b/src/cloudflare/types/accounts/member_list_response.py @@ -3,8 +3,8 @@ from typing import List, Optional from typing_extensions import Literal +from .role import Role from ..._models import BaseModel -from .iam_schemas_role import IamSchemasRole __all__ = ["MemberListResponse"] @@ -19,7 +19,7 @@ class MemberListResponse(BaseModel): name: Optional[str] = None """Member Name.""" - roles: List[IamSchemasRole] + roles: List[Role] """Roles assigned to this Member.""" status: Literal["accepted", "invited"] diff --git a/src/cloudflare/types/accounts/iam_schemas_role.py b/src/cloudflare/types/accounts/role.py similarity index 85% rename from src/cloudflare/types/accounts/iam_schemas_role.py rename to src/cloudflare/types/accounts/role.py index acfedb98647..85afa978780 100644 --- a/src/cloudflare/types/accounts/iam_schemas_role.py +++ b/src/cloudflare/types/accounts/role.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["IamSchemasRole"] +__all__ = ["Role"] -class IamSchemasRole(BaseModel): +class Role(BaseModel): id: str """Role identifier tag.""" diff --git a/src/cloudflare/types/accounts/role_list_response.py b/src/cloudflare/types/accounts/role_list_response.py index 63883bc2a80..d68445c0957 100644 --- a/src/cloudflare/types/accounts/role_list_response.py +++ b/src/cloudflare/types/accounts/role_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .iam_schemas_role import IamSchemasRole +from .role import Role __all__ = ["RoleListResponse"] -RoleListResponse = List[IamSchemasRole] +RoleListResponse = List[Role] diff --git a/src/cloudflare/types/alerting/__init__.py b/src/cloudflare/types/alerting/__init__.py index bd56e8344fa..130bbca1356 100644 --- a/src/cloudflare/types/alerting/__init__.py +++ b/src/cloudflare/types/alerting/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations -from .aaa_history import AaaHistory as AaaHistory -from .aaa_policies import AaaPolicies as AaaPolicies +from .alerting_history import AlertingHistory as AlertingHistory +from .alerting_policies import AlertingPolicies as AlertingPolicies from .history_list_params import HistoryListParams as HistoryListParams from .policy_create_params import PolicyCreateParams as PolicyCreateParams from .policy_list_response import PolicyListResponse as PolicyListResponse diff --git a/src/cloudflare/types/alerting/aaa_history.py b/src/cloudflare/types/alerting/alerting_history.py similarity index 94% rename from src/cloudflare/types/alerting/aaa_history.py rename to src/cloudflare/types/alerting/alerting_history.py index 18dcdceb3eb..ad3d675fe48 100644 --- a/src/cloudflare/types/alerting/aaa_history.py +++ b/src/cloudflare/types/alerting/alerting_history.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["AaaHistory"] +__all__ = ["AlertingHistory"] -class AaaHistory(BaseModel): +class AlertingHistory(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/alerting/aaa_policies.py b/src/cloudflare/types/alerting/alerting_policies.py similarity index 98% rename from src/cloudflare/types/alerting/aaa_policies.py rename to src/cloudflare/types/alerting/alerting_policies.py index 90947862783..8c2ed617e3b 100644 --- a/src/cloudflare/types/alerting/aaa_policies.py +++ b/src/cloudflare/types/alerting/alerting_policies.py @@ -6,7 +6,7 @@ from ..._models import BaseModel -__all__ = ["AaaPolicies", "Filters", "Mechanisms"] +__all__ = ["AlertingPolicies", "Filters", "Mechanisms"] class Filters(BaseModel): @@ -145,7 +145,7 @@ class Mechanisms(BaseModel): """UUID""" -class AaaPolicies(BaseModel): +class AlertingPolicies(BaseModel): id: Optional[str] = None """The unique identifier of a notification policy""" diff --git a/src/cloudflare/types/alerting/destinations/__init__.py b/src/cloudflare/types/alerting/destinations/__init__.py index ee53ed8c79f..ec704abb4c0 100644 --- a/src/cloudflare/types/alerting/destinations/__init__.py +++ b/src/cloudflare/types/alerting/destinations/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations -from .aaa_webhooks import AaaWebhooks as AaaWebhooks -from .aaa_pagerduty import AaaPagerduty as AaaPagerduty +from .alerting_webhooks import AlertingWebhooks as AlertingWebhooks +from .alerting_pagerduty import AlertingPagerduty as AlertingPagerduty from .eligible_get_response import EligibleGetResponse as EligibleGetResponse from .webhook_create_params import WebhookCreateParams as WebhookCreateParams from .webhook_list_response import WebhookListResponse as WebhookListResponse diff --git a/src/cloudflare/types/alerting/destinations/aaa_pagerduty.py b/src/cloudflare/types/alerting/destinations/alerting_pagerduty.py similarity index 80% rename from src/cloudflare/types/alerting/destinations/aaa_pagerduty.py rename to src/cloudflare/types/alerting/destinations/alerting_pagerduty.py index 86f14c88d4c..bf3e2bed281 100644 --- a/src/cloudflare/types/alerting/destinations/aaa_pagerduty.py +++ b/src/cloudflare/types/alerting/destinations/alerting_pagerduty.py @@ -4,10 +4,10 @@ from ...._models import BaseModel -__all__ = ["AaaPagerduty"] +__all__ = ["AlertingPagerduty"] -class AaaPagerduty(BaseModel): +class AlertingPagerduty(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/alerting/destinations/aaa_webhooks.py b/src/cloudflare/types/alerting/destinations/alerting_webhooks.py similarity index 95% rename from src/cloudflare/types/alerting/destinations/aaa_webhooks.py rename to src/cloudflare/types/alerting/destinations/alerting_webhooks.py index 94ab6e5b9d6..a2dc5b27d59 100644 --- a/src/cloudflare/types/alerting/destinations/aaa_webhooks.py +++ b/src/cloudflare/types/alerting/destinations/alerting_webhooks.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["AaaWebhooks"] +__all__ = ["AlertingWebhooks"] -class AaaWebhooks(BaseModel): +class AlertingWebhooks(BaseModel): id: Optional[str] = None """The unique identifier of a webhook""" diff --git a/src/cloudflare/types/alerting/destinations/pagerduty_get_response.py b/src/cloudflare/types/alerting/destinations/pagerduty_get_response.py index e34ca54e35d..8069af80584 100644 --- a/src/cloudflare/types/alerting/destinations/pagerduty_get_response.py +++ b/src/cloudflare/types/alerting/destinations/pagerduty_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .aaa_pagerduty import AaaPagerduty +from .alerting_pagerduty import AlertingPagerduty __all__ = ["PagerdutyGetResponse"] -PagerdutyGetResponse = List[AaaPagerduty] +PagerdutyGetResponse = List[AlertingPagerduty] diff --git a/src/cloudflare/types/alerting/destinations/webhook_list_response.py b/src/cloudflare/types/alerting/destinations/webhook_list_response.py index 2a9c5ca2918..fbab0b11b17 100644 --- a/src/cloudflare/types/alerting/destinations/webhook_list_response.py +++ b/src/cloudflare/types/alerting/destinations/webhook_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .aaa_webhooks import AaaWebhooks +from .alerting_webhooks import AlertingWebhooks __all__ = ["WebhookListResponse"] -WebhookListResponse = List[AaaWebhooks] +WebhookListResponse = List[AlertingWebhooks] diff --git a/src/cloudflare/types/alerting/policy_list_response.py b/src/cloudflare/types/alerting/policy_list_response.py index dcd6c951453..ed8d3284838 100644 --- a/src/cloudflare/types/alerting/policy_list_response.py +++ b/src/cloudflare/types/alerting/policy_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .aaa_policies import AaaPolicies +from .alerting_policies import AlertingPolicies __all__ = ["PolicyListResponse"] -PolicyListResponse = List[AaaPolicies] +PolicyListResponse = List[AlertingPolicies] diff --git a/src/cloudflare/types/bill_subs_api_available_rate_plan.py b/src/cloudflare/types/available_rate_plan.py similarity index 92% rename from src/cloudflare/types/bill_subs_api_available_rate_plan.py rename to src/cloudflare/types/available_rate_plan.py index df2d1623c0b..be2c65e3f7c 100644 --- a/src/cloudflare/types/bill_subs_api_available_rate_plan.py +++ b/src/cloudflare/types/available_rate_plan.py @@ -5,10 +5,10 @@ from .._models import BaseModel -__all__ = ["BillSubsAPIAvailableRatePlan"] +__all__ = ["AvailableRatePlan"] -class BillSubsAPIAvailableRatePlan(BaseModel): +class AvailableRatePlan(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/certificate_authorities/__init__.py b/src/cloudflare/types/certificate_authorities/__init__.py index 8e6c6e03bbe..9f248f2ad9b 100644 --- a/src/cloudflare/types/certificate_authorities/__init__.py +++ b/src/cloudflare/types/certificate_authorities/__init__.py @@ -2,8 +2,6 @@ from __future__ import annotations +from .tls_hostname_association import TLSHostnameAssociation as TLSHostnameAssociation from .hostname_association_get_params import HostnameAssociationGetParams as HostnameAssociationGetParams from .hostname_association_update_params import HostnameAssociationUpdateParams as HostnameAssociationUpdateParams -from .tls_certificates_and_hostnames_hostname_association import ( - TLSCertificatesAndHostnamesHostnameAssociation as TLSCertificatesAndHostnamesHostnameAssociation, -) diff --git a/src/cloudflare/types/certificate_authorities/tls_certificates_and_hostnames_hostname_association.py b/src/cloudflare/types/certificate_authorities/tls_hostname_association.py similarity index 78% rename from src/cloudflare/types/certificate_authorities/tls_certificates_and_hostnames_hostname_association.py rename to src/cloudflare/types/certificate_authorities/tls_hostname_association.py index 94ccbe31cf3..ab1a832cb65 100644 --- a/src/cloudflare/types/certificate_authorities/tls_certificates_and_hostnames_hostname_association.py +++ b/src/cloudflare/types/certificate_authorities/tls_hostname_association.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesHostnameAssociation"] +__all__ = ["TLSHostnameAssociation"] -class TLSCertificatesAndHostnamesHostnameAssociation(BaseModel): +class TLSHostnameAssociation(BaseModel): hostnames: Optional[List[str]] = None mtls_certificate_id: Optional[str] = None diff --git a/src/cloudflare/types/tls_certificates_and_hostnames_client_certificate.py b/src/cloudflare/types/client_certificate.py similarity index 93% rename from src/cloudflare/types/tls_certificates_and_hostnames_client_certificate.py rename to src/cloudflare/types/client_certificate.py index 8cd3df5182f..3bdc1070a2e 100644 --- a/src/cloudflare/types/tls_certificates_and_hostnames_client_certificate.py +++ b/src/cloudflare/types/client_certificate.py @@ -5,7 +5,7 @@ from .._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesClientCertificate", "CertificateAuthority"] +__all__ = ["ClientCertificate", "CertificateAuthority"] class CertificateAuthority(BaseModel): @@ -14,7 +14,7 @@ class CertificateAuthority(BaseModel): name: Optional[str] = None -class TLSCertificatesAndHostnamesClientCertificate(BaseModel): +class ClientCertificate(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/tls_certificates_and_hostnames_custom_certificate.py b/src/cloudflare/types/custom_certificate.py similarity index 90% rename from src/cloudflare/types/tls_certificates_and_hostnames_custom_certificate.py rename to src/cloudflare/types/custom_certificate.py index 37dc121954d..ec5edeb63a9 100644 --- a/src/cloudflare/types/tls_certificates_and_hostnames_custom_certificate.py +++ b/src/cloudflare/types/custom_certificate.py @@ -5,16 +5,16 @@ from typing_extensions import Literal from .._models import BaseModel -from .tls_certificates_and_hostnames_base import TLSCertificatesAndHostnamesBase +from .keyless_certificate_hostname import KeylessCertificateHostname -__all__ = ["TLSCertificatesAndHostnamesCustomCertificate", "GeoRestrictions"] +__all__ = ["CustomCertificate", "GeoRestrictions"] class GeoRestrictions(BaseModel): label: Optional[Literal["us", "eu", "highest_security"]] = None -class TLSCertificatesAndHostnamesCustomCertificate(BaseModel): +class CustomCertificate(BaseModel): id: str """Identifier""" @@ -68,7 +68,7 @@ class TLSCertificatesAndHostnamesCustomCertificate(BaseModel): for optimal performance. """ - keyless_server: Optional[TLSCertificatesAndHostnamesBase] = None + keyless_server: Optional[KeylessCertificateHostname] = None policy: Optional[str] = None """ diff --git a/src/cloudflare/types/custom_certificates/prioritize_update_response.py b/src/cloudflare/types/custom_certificates/prioritize_update_response.py index 7952e0979c5..e2c917ce3ee 100644 --- a/src/cloudflare/types/custom_certificates/prioritize_update_response.py +++ b/src/cloudflare/types/custom_certificates/prioritize_update_response.py @@ -2,8 +2,8 @@ from typing import List -from ..tls_certificates_and_hostnames_custom_certificate import TLSCertificatesAndHostnamesCustomCertificate +from ..custom_certificate import CustomCertificate __all__ = ["PrioritizeUpdateResponse"] -PrioritizeUpdateResponse = List[TLSCertificatesAndHostnamesCustomCertificate] +PrioritizeUpdateResponse = List[CustomCertificate] diff --git a/src/cloudflare/types/dns_custom_nameservers_custom_ns.py b/src/cloudflare/types/custom_nameserver.py similarity index 88% rename from src/cloudflare/types/dns_custom_nameservers_custom_ns.py rename to src/cloudflare/types/custom_nameserver.py index e1a8568c276..9f2a309d04d 100644 --- a/src/cloudflare/types/dns_custom_nameservers_custom_ns.py +++ b/src/cloudflare/types/custom_nameserver.py @@ -5,7 +5,7 @@ from .._models import BaseModel -__all__ = ["DNSCustomNameserversCustomNS", "DNSRecord"] +__all__ = ["CustomNameserver", "DNSRecord"] class DNSRecord(BaseModel): @@ -16,7 +16,7 @@ class DNSRecord(BaseModel): """DNS record contents (an IPv4 or IPv6 address).""" -class DNSCustomNameserversCustomNS(BaseModel): +class CustomNameserver(BaseModel): dns_records: List[DNSRecord] """A and AAAA records associated with the nameserver.""" diff --git a/src/cloudflare/types/custom_nameserver_get_response.py b/src/cloudflare/types/custom_nameserver_get_response.py index 4c67176277e..52cccf43186 100644 --- a/src/cloudflare/types/custom_nameserver_get_response.py +++ b/src/cloudflare/types/custom_nameserver_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .dns_custom_nameservers_custom_ns import DNSCustomNameserversCustomNS +from .custom_nameserver import CustomNameserver __all__ = ["CustomNameserverGetResponse"] -CustomNameserverGetResponse = List[DNSCustomNameserversCustomNS] +CustomNameserverGetResponse = List[CustomNameserver] diff --git a/src/cloudflare/types/custom_nameserver_verify_response.py b/src/cloudflare/types/custom_nameserver_verify_response.py index b85117ec38d..2397a7bb05a 100644 --- a/src/cloudflare/types/custom_nameserver_verify_response.py +++ b/src/cloudflare/types/custom_nameserver_verify_response.py @@ -2,8 +2,8 @@ from typing import List -from .dns_custom_nameservers_custom_ns import DNSCustomNameserversCustomNS +from .custom_nameserver import CustomNameserver __all__ = ["CustomNameserverVerifyResponse"] -CustomNameserverVerifyResponse = List[DNSCustomNameserversCustomNS] +CustomNameserverVerifyResponse = List[CustomNameserver] diff --git a/src/cloudflare/types/dns/__init__.py b/src/cloudflare/types/dns/__init__.py index 05f3f8ddc0b..a73c010f685 100644 --- a/src/cloudflare/types/dns/__init__.py +++ b/src/cloudflare/types/dns/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .dns_record import DNSRecord as DNSRecord +from .dns_firewall import DNSFirewall as DNSFirewall from .record_edit_params import RecordEditParams as RecordEditParams from .record_list_params import RecordListParams as RecordListParams from .firewall_edit_params import FirewallEditParams as FirewallEditParams @@ -16,4 +17,3 @@ from .record_export_response import RecordExportResponse as RecordExportResponse from .record_import_response import RecordImportResponse as RecordImportResponse from .firewall_delete_response import FirewallDeleteResponse as FirewallDeleteResponse -from .dns_firewall_dns_firewall import DNSFirewallDNSFirewall as DNSFirewallDNSFirewall diff --git a/src/cloudflare/types/dns/analytics/__init__.py b/src/cloudflare/types/dns/analytics/__init__.py index a8e1c2d94e4..c738816d7fd 100644 --- a/src/cloudflare/types/dns/analytics/__init__.py +++ b/src/cloudflare/types/dns/analytics/__init__.py @@ -3,4 +3,4 @@ from __future__ import annotations from .report_get_params import ReportGetParams as ReportGetParams -from .dns_dns_analytics_api_report import DNSDNSAnalyticsAPIReport as DNSDNSAnalyticsAPIReport +from .dns_analytics_report import DNSAnalyticsReport as DNSAnalyticsReport diff --git a/src/cloudflare/types/dns/analytics/dns_dns_analytics_api_report.py b/src/cloudflare/types/dns/analytics/dns_analytics_report.py similarity index 95% rename from src/cloudflare/types/dns/analytics/dns_dns_analytics_api_report.py rename to src/cloudflare/types/dns/analytics/dns_analytics_report.py index 17e9ca38361..2dfde2775d2 100644 --- a/src/cloudflare/types/dns/analytics/dns_dns_analytics_api_report.py +++ b/src/cloudflare/types/dns/analytics/dns_analytics_report.py @@ -5,7 +5,7 @@ from ...._models import BaseModel -__all__ = ["DNSDNSAnalyticsAPIReport", "Data", "Query"] +__all__ = ["DNSAnalyticsReport", "Data", "Query"] class Data(BaseModel): @@ -45,7 +45,7 @@ class Query(BaseModel): """ -class DNSDNSAnalyticsAPIReport(BaseModel): +class DNSAnalyticsReport(BaseModel): data: List[Data] """Array with one row per combination of dimension values.""" diff --git a/src/cloudflare/types/dns/analytics/reports/__init__.py b/src/cloudflare/types/dns/analytics/reports/__init__.py index 8d0bea62f39..96ec042fabd 100644 --- a/src/cloudflare/types/dns/analytics/reports/__init__.py +++ b/src/cloudflare/types/dns/analytics/reports/__init__.py @@ -3,4 +3,4 @@ from __future__ import annotations from .bytime_get_params import BytimeGetParams as BytimeGetParams -from .dns_dns_analytics_api_report_bytime import DNSDNSAnalyticsAPIReportBytime as DNSDNSAnalyticsAPIReportBytime +from .dns_analytics_report_by_time import DNSAnalyticsReportByTime as DNSAnalyticsReportByTime diff --git a/src/cloudflare/types/dns/analytics/reports/dns_dns_analytics_api_report_bytime.py b/src/cloudflare/types/dns/analytics/reports/dns_analytics_report_by_time.py similarity index 95% rename from src/cloudflare/types/dns/analytics/reports/dns_dns_analytics_api_report_bytime.py rename to src/cloudflare/types/dns/analytics/reports/dns_analytics_report_by_time.py index 003873123d1..460a19f5ffe 100644 --- a/src/cloudflare/types/dns/analytics/reports/dns_dns_analytics_api_report_bytime.py +++ b/src/cloudflare/types/dns/analytics/reports/dns_analytics_report_by_time.py @@ -6,7 +6,7 @@ from ....._models import BaseModel -__all__ = ["DNSDNSAnalyticsAPIReportBytime", "Data", "Query"] +__all__ = ["DNSAnalyticsReportByTime", "Data", "Query"] class Data(BaseModel): @@ -52,7 +52,7 @@ class Query(BaseModel): """ -class DNSDNSAnalyticsAPIReportBytime(BaseModel): +class DNSAnalyticsReportByTime(BaseModel): data: List[Data] """Array with one row per combination of dimension values.""" diff --git a/src/cloudflare/types/dns/dns_firewall_dns_firewall.py b/src/cloudflare/types/dns/dns_firewall.py similarity index 94% rename from src/cloudflare/types/dns/dns_firewall_dns_firewall.py rename to src/cloudflare/types/dns/dns_firewall.py index 6babeda31fe..0b537b38884 100644 --- a/src/cloudflare/types/dns/dns_firewall_dns_firewall.py +++ b/src/cloudflare/types/dns/dns_firewall.py @@ -5,7 +5,7 @@ from ..._models import BaseModel -__all__ = ["DNSFirewallDNSFirewall", "AttackMitigation"] +__all__ = ["DNSFirewall", "AttackMitigation"] class AttackMitigation(BaseModel): @@ -22,7 +22,7 @@ class AttackMitigation(BaseModel): """Only mitigate attacks when upstream servers seem unhealthy.""" -class DNSFirewallDNSFirewall(BaseModel): +class DNSFirewall(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/dnssec_dnssec.py b/src/cloudflare/types/dnssec.py similarity index 97% rename from src/cloudflare/types/dnssec_dnssec.py rename to src/cloudflare/types/dnssec.py index f1bef9078d5..ae9788e6527 100644 --- a/src/cloudflare/types/dnssec_dnssec.py +++ b/src/cloudflare/types/dnssec.py @@ -6,10 +6,10 @@ from .._models import BaseModel -__all__ = ["DNSSECDNSSEC"] +__all__ = ["DNSSEC"] -class DNSSECDNSSEC(BaseModel): +class DNSSEC(BaseModel): algorithm: Optional[str] = None """Algorithm key code.""" diff --git a/src/cloudflare/types/durable_objects/__init__.py b/src/cloudflare/types/durable_objects/__init__.py index e2e349d9c2d..c300a66b56d 100644 --- a/src/cloudflare/types/durable_objects/__init__.py +++ b/src/cloudflare/types/durable_objects/__init__.py @@ -2,5 +2,5 @@ from __future__ import annotations -from .workers_namespace import WorkersNamespace as WorkersNamespace from .namespace_list_response import NamespaceListResponse as NamespaceListResponse +from .durable_object_namespace import DurableObjectNamespace as DurableObjectNamespace diff --git a/src/cloudflare/types/durable_objects/workers_namespace.py b/src/cloudflare/types/durable_objects/durable_object_namespace.py similarity index 82% rename from src/cloudflare/types/durable_objects/workers_namespace.py rename to src/cloudflare/types/durable_objects/durable_object_namespace.py index 520c9349706..689a67b66f6 100644 --- a/src/cloudflare/types/durable_objects/workers_namespace.py +++ b/src/cloudflare/types/durable_objects/durable_object_namespace.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["WorkersNamespace"] +__all__ = ["DurableObjectNamespace"] -class WorkersNamespace(BaseModel): +class DurableObjectNamespace(BaseModel): id: Optional[object] = None class_: Optional[object] = FieldInfo(alias="class", default=None) diff --git a/src/cloudflare/types/durable_objects/namespace_list_response.py b/src/cloudflare/types/durable_objects/namespace_list_response.py index f72ff4ec5f8..970cab661cd 100644 --- a/src/cloudflare/types/durable_objects/namespace_list_response.py +++ b/src/cloudflare/types/durable_objects/namespace_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .workers_namespace import WorkersNamespace +from .durable_object_namespace import DurableObjectNamespace __all__ = ["NamespaceListResponse"] -NamespaceListResponse = List[WorkersNamespace] +NamespaceListResponse = List[DurableObjectNamespace] diff --git a/src/cloudflare/types/durable_objects/namespaces/__init__.py b/src/cloudflare/types/durable_objects/namespaces/__init__.py index ea45479d443..0ea3e44562e 100644 --- a/src/cloudflare/types/durable_objects/namespaces/__init__.py +++ b/src/cloudflare/types/durable_objects/namespaces/__init__.py @@ -2,5 +2,5 @@ from __future__ import annotations -from .workers_object import WorkersObject as WorkersObject +from .durable_object import DurableObject as DurableObject from .object_list_params import ObjectListParams as ObjectListParams diff --git a/src/cloudflare/types/durable_objects/namespaces/workers_object.py b/src/cloudflare/types/durable_objects/namespaces/durable_object.py similarity index 86% rename from src/cloudflare/types/durable_objects/namespaces/workers_object.py rename to src/cloudflare/types/durable_objects/namespaces/durable_object.py index a50033e6490..53c1bead7fd 100644 --- a/src/cloudflare/types/durable_objects/namespaces/workers_object.py +++ b/src/cloudflare/types/durable_objects/namespaces/durable_object.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["WorkersObject"] +__all__ = ["DurableObject"] -class WorkersObject(BaseModel): +class DurableObject(BaseModel): id: Optional[str] = None """ID of the Durable Object.""" diff --git a/src/cloudflare/types/filter_create_response.py b/src/cloudflare/types/filter_create_response.py index 418c1c556a0..410ac59aed1 100644 --- a/src/cloudflare/types/filter_create_response.py +++ b/src/cloudflare/types/filter_create_response.py @@ -2,8 +2,8 @@ from typing import List -from .legacy_jhs_filter import LegacyJhsFilter +from .firewall_filter import FirewallFilter __all__ = ["FilterCreateResponse"] -FilterCreateResponse = List[LegacyJhsFilter] +FilterCreateResponse = List[FirewallFilter] diff --git a/src/cloudflare/types/firewall/__init__.py b/src/cloudflare/types/firewall/__init__.py index 0f04d2499f1..59a280461ab 100644 --- a/src/cloudflare/types/firewall/__init__.py +++ b/src/cloudflare/types/firewall/__init__.py @@ -9,18 +9,18 @@ from .rule_edit_response import RuleEditResponse as RuleEditResponse from .rule_update_params import RuleUpdateParams as RuleUpdateParams from .ua_rule_list_params import UARuleListParams as UARuleListParams +from .firewall_filter_rule import FirewallFilterRule as FirewallFilterRule from .lockdown_list_params import LockdownListParams as LockdownListParams from .rule_create_response import RuleCreateResponse as RuleCreateResponse from .ua_rule_get_response import UARuleGetResponse as UARuleGetResponse from .ua_rule_create_params import UARuleCreateParams as UARuleCreateParams from .ua_rule_list_response import UARuleListResponse as UARuleListResponse from .ua_rule_update_params import UARuleUpdateParams as UARuleUpdateParams -from .legacy_jhs_filter_rule import LegacyJhsFilterRule as LegacyJhsFilterRule +from .firewall_zone_lockdown import FirewallZoneLockdown as FirewallZoneLockdown from .lockdown_create_params import LockdownCreateParams as LockdownCreateParams from .lockdown_update_params import LockdownUpdateParams as LockdownUpdateParams from .access_rule_edit_params import AccessRuleEditParams as AccessRuleEditParams from .access_rule_list_params import AccessRuleListParams as AccessRuleListParams -from .legacy_jhs_zonelockdown import LegacyJhsZonelockdown as LegacyJhsZonelockdown from .ua_rule_create_response import UARuleCreateResponse as UARuleCreateResponse from .ua_rule_delete_response import UARuleDeleteResponse as UARuleDeleteResponse from .ua_rule_update_response import UARuleUpdateResponse as UARuleUpdateResponse diff --git a/src/cloudflare/types/firewall/legacy_jhs_filter_rule.py b/src/cloudflare/types/firewall/firewall_filter_rule.py similarity index 87% rename from src/cloudflare/types/firewall/legacy_jhs_filter_rule.py rename to src/cloudflare/types/firewall/firewall_filter_rule.py index d76a4d5f90a..6c08cb85929 100644 --- a/src/cloudflare/types/firewall/legacy_jhs_filter_rule.py +++ b/src/cloudflare/types/firewall/firewall_filter_rule.py @@ -4,9 +4,9 @@ from typing_extensions import Literal from ..._models import BaseModel -from ..legacy_jhs_filter import LegacyJhsFilter +from ..firewall_filter import FirewallFilter -__all__ = ["LegacyJhsFilterRule", "Filter", "FilterLegacyJhsDeletedFilter"] +__all__ = ["FirewallFilterRule", "Filter", "FilterLegacyJhsDeletedFilter"] class FilterLegacyJhsDeletedFilter(BaseModel): @@ -17,10 +17,10 @@ class FilterLegacyJhsDeletedFilter(BaseModel): """When true, indicates that the firewall rule was deleted.""" -Filter = Union[LegacyJhsFilter, FilterLegacyJhsDeletedFilter] +Filter = Union[FirewallFilter, FilterLegacyJhsDeletedFilter] -class LegacyJhsFilterRule(BaseModel): +class FirewallFilterRule(BaseModel): id: Optional[str] = None """The unique identifier of the firewall rule.""" diff --git a/src/cloudflare/types/firewall/legacy_jhs_zonelockdown.py b/src/cloudflare/types/firewall/firewall_zone_lockdown.py similarity index 96% rename from src/cloudflare/types/firewall/legacy_jhs_zonelockdown.py rename to src/cloudflare/types/firewall/firewall_zone_lockdown.py index c2c7df4c7f0..0beb83e03fa 100644 --- a/src/cloudflare/types/firewall/legacy_jhs_zonelockdown.py +++ b/src/cloudflare/types/firewall/firewall_zone_lockdown.py @@ -7,7 +7,7 @@ from ..._models import BaseModel __all__ = [ - "LegacyJhsZonelockdown", + "FirewallZoneLockdown", "Configurations", "ConfigurationsLegacyJhsSchemasIPConfiguration", "ConfigurationsLegacyJhsSchemasCIDRConfiguration", @@ -44,7 +44,7 @@ class ConfigurationsLegacyJhsSchemasCIDRConfiguration(BaseModel): Configurations = Union[ConfigurationsLegacyJhsSchemasIPConfiguration, ConfigurationsLegacyJhsSchemasCIDRConfiguration] -class LegacyJhsZonelockdown(BaseModel): +class FirewallZoneLockdown(BaseModel): id: str """The unique identifier of the Zone Lockdown rule.""" diff --git a/src/cloudflare/types/firewall/rule_create_response.py b/src/cloudflare/types/firewall/rule_create_response.py index 247c85c5b03..78a21420c26 100644 --- a/src/cloudflare/types/firewall/rule_create_response.py +++ b/src/cloudflare/types/firewall/rule_create_response.py @@ -2,8 +2,8 @@ from typing import List -from .legacy_jhs_filter_rule import LegacyJhsFilterRule +from .firewall_filter_rule import FirewallFilterRule __all__ = ["RuleCreateResponse"] -RuleCreateResponse = List[LegacyJhsFilterRule] +RuleCreateResponse = List[FirewallFilterRule] diff --git a/src/cloudflare/types/firewall/rule_edit_response.py b/src/cloudflare/types/firewall/rule_edit_response.py index e0a51282571..7fbd5ba92a9 100644 --- a/src/cloudflare/types/firewall/rule_edit_response.py +++ b/src/cloudflare/types/firewall/rule_edit_response.py @@ -2,8 +2,8 @@ from typing import List -from .legacy_jhs_filter_rule import LegacyJhsFilterRule +from .firewall_filter_rule import FirewallFilterRule __all__ = ["RuleEditResponse"] -RuleEditResponse = List[LegacyJhsFilterRule] +RuleEditResponse = List[FirewallFilterRule] diff --git a/src/cloudflare/types/firewall/waf/__init__.py b/src/cloudflare/types/firewall/waf/__init__.py index d0f3fe43e51..7e819835b14 100644 --- a/src/cloudflare/types/firewall/waf/__init__.py +++ b/src/cloudflare/types/firewall/waf/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from .legacy_jhs_override import LegacyJhsOverride as LegacyJhsOverride +from .waf_override import WAFOverride as WAFOverride from .package_list_params import PackageListParams as PackageListParams from .override_list_params import OverrideListParams as OverrideListParams from .package_get_response import PackageGetResponse as PackageGetResponse diff --git a/src/cloudflare/types/firewall/waf/packages/__init__.py b/src/cloudflare/types/firewall/waf/packages/__init__.py index 847b16ef5c6..91cbd984b75 100644 --- a/src/cloudflare/types/firewall/waf/packages/__init__.py +++ b/src/cloudflare/types/firewall/waf/packages/__init__.py @@ -11,4 +11,4 @@ from .rule_edit_response import RuleEditResponse as RuleEditResponse from .group_edit_response import GroupEditResponse as GroupEditResponse from .waf_managed_rules_rule import WAFManagedRulesRule as WAFManagedRulesRule -from .waf_managed_rules_schemas_group import WAFManagedRulesSchemasGroup as WAFManagedRulesSchemasGroup +from .waf_managed_rules_group import WAFManagedRulesGroup as WAFManagedRulesGroup diff --git a/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_schemas_group.py b/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_group.py similarity index 92% rename from src/cloudflare/types/firewall/waf/packages/waf_managed_rules_schemas_group.py rename to src/cloudflare/types/firewall/waf/packages/waf_managed_rules_group.py index 5fdecc2a323..66b01dffd10 100644 --- a/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_schemas_group.py +++ b/src/cloudflare/types/firewall/waf/packages/waf_managed_rules_group.py @@ -5,10 +5,10 @@ from ....._models import BaseModel -__all__ = ["WAFManagedRulesSchemasGroup"] +__all__ = ["WAFManagedRulesGroup"] -class WAFManagedRulesSchemasGroup(BaseModel): +class WAFManagedRulesGroup(BaseModel): id: str """The unique identifier of the rule group.""" diff --git a/src/cloudflare/types/firewall/waf/legacy_jhs_override.py b/src/cloudflare/types/firewall/waf/waf_override.py similarity index 96% rename from src/cloudflare/types/firewall/waf/legacy_jhs_override.py rename to src/cloudflare/types/firewall/waf/waf_override.py index 6d5208e8f02..528ee51f3b4 100644 --- a/src/cloudflare/types/firewall/waf/legacy_jhs_override.py +++ b/src/cloudflare/types/firewall/waf/waf_override.py @@ -5,7 +5,7 @@ from ...._models import BaseModel -__all__ = ["LegacyJhsOverride", "RewriteAction"] +__all__ = ["WAFOverride", "RewriteAction"] class RewriteAction(BaseModel): @@ -22,7 +22,7 @@ class RewriteAction(BaseModel): simulate: Optional[str] = None -class LegacyJhsOverride(BaseModel): +class WAFOverride(BaseModel): id: Optional[str] = None """The unique identifier of the WAF override.""" diff --git a/src/cloudflare/types/legacy_jhs_filter.py b/src/cloudflare/types/firewall_filter.py similarity index 91% rename from src/cloudflare/types/legacy_jhs_filter.py rename to src/cloudflare/types/firewall_filter.py index 4f0abe114da..5114c5f9346 100644 --- a/src/cloudflare/types/legacy_jhs_filter.py +++ b/src/cloudflare/types/firewall_filter.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["LegacyJhsFilter"] +__all__ = ["FirewallFilter"] -class LegacyJhsFilter(BaseModel): +class FirewallFilter(BaseModel): id: Optional[str] = None """The unique identifier of the filter.""" diff --git a/src/cloudflare/types/healthchecks_healthchecks.py b/src/cloudflare/types/healthcheck.py similarity index 97% rename from src/cloudflare/types/healthchecks_healthchecks.py rename to src/cloudflare/types/healthcheck.py index e7b80ce0dfd..6ababd4f7c4 100644 --- a/src/cloudflare/types/healthchecks_healthchecks.py +++ b/src/cloudflare/types/healthcheck.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["HealthchecksHealthchecks", "HTTPConfig", "TcpConfig"] +__all__ = ["Healthcheck", "HTTPConfig", "TcpConfig"] class HTTPConfig(BaseModel): @@ -57,7 +57,7 @@ class TcpConfig(BaseModel): """Port number to connect to for the health check. Defaults to 80.""" -class HealthchecksHealthchecks(BaseModel): +class Healthcheck(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/healthcheck_list_response.py b/src/cloudflare/types/healthcheck_list_response.py index d2bd7b377c0..1c5907a04b9 100644 --- a/src/cloudflare/types/healthcheck_list_response.py +++ b/src/cloudflare/types/healthcheck_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .healthchecks_healthchecks import HealthchecksHealthchecks +from .healthcheck import Healthcheck __all__ = ["HealthcheckListResponse"] -HealthcheckListResponse = List[HealthchecksHealthchecks] +HealthcheckListResponse = List[Healthcheck] diff --git a/src/cloudflare/types/images/__init__.py b/src/cloudflare/types/images/__init__.py index 9b9dcc7e1a0..82bb5061aac 100644 --- a/src/cloudflare/types/images/__init__.py +++ b/src/cloudflare/types/images/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from .images_image import ImagesImage as ImagesImage +from .image import Image as Image from .v1_edit_params import V1EditParams as V1EditParams from .v1_list_params import V1ListParams as V1ListParams from .v2_list_params import V2ListParams as V2ListParams diff --git a/src/cloudflare/types/images/images_image.py b/src/cloudflare/types/images/image.py similarity index 94% rename from src/cloudflare/types/images/images_image.py rename to src/cloudflare/types/images/image.py index 2b455a5245a..9be5724c4f0 100644 --- a/src/cloudflare/types/images/images_image.py +++ b/src/cloudflare/types/images/image.py @@ -7,10 +7,10 @@ from ..._models import BaseModel -__all__ = ["ImagesImage"] +__all__ = ["Image"] -class ImagesImage(BaseModel): +class Image(BaseModel): id: Optional[str] = None """Image unique identifier.""" diff --git a/src/cloudflare/types/images/v1_list_response.py b/src/cloudflare/types/images/v1_list_response.py index db798f0791f..249b4c9523d 100644 --- a/src/cloudflare/types/images/v1_list_response.py +++ b/src/cloudflare/types/images/v1_list_response.py @@ -3,8 +3,8 @@ from typing import List, Optional from typing_extensions import Literal +from .image import Image from ..._models import BaseModel -from .images_image import ImagesImage __all__ = ["V1ListResponse", "Error", "Message", "Result"] @@ -22,7 +22,7 @@ class Message(BaseModel): class Result(BaseModel): - images: Optional[List[ImagesImage]] = None + images: Optional[List[Image]] = None class V1ListResponse(BaseModel): diff --git a/src/cloudflare/types/images/v2_list_response.py b/src/cloudflare/types/images/v2_list_response.py index 9f4f4e23576..9a6cc5e22c0 100644 --- a/src/cloudflare/types/images/v2_list_response.py +++ b/src/cloudflare/types/images/v2_list_response.py @@ -2,8 +2,8 @@ from typing import List, Optional +from .image import Image from ..._models import BaseModel -from .images_image import ImagesImage __all__ = ["V2ListResponse"] @@ -15,4 +15,4 @@ class V2ListResponse(BaseModel): Passed as a query param when requesting List V2 api endpoint. """ - images: Optional[List[ImagesImage]] = None + images: Optional[List[Image]] = None diff --git a/src/cloudflare/types/intel/__init__.py b/src/cloudflare/types/intel/__init__.py index 617ad899335..3749dbb5139 100644 --- a/src/cloudflare/types/intel/__init__.py +++ b/src/cloudflare/types/intel/__init__.py @@ -12,6 +12,7 @@ from .intel_schemas_ip import IntelSchemasIP as IntelSchemasIP from .whois_get_params import WhoisGetParams as WhoisGetParams from .domain_get_params import DomainGetParams as DomainGetParams +from .intel_sinkhole_item import IntelSinkholeItem as IntelSinkholeItem from .intel_domain_history import IntelDomainHistory as IntelDomainHistory from .ip_list_get_response import IPListGetResponse as IPListGetResponse from .sinkhole_list_response import SinkholeListResponse as SinkholeListResponse @@ -23,7 +24,6 @@ from .indicator_feed_data_response import IndicatorFeedDataResponse as IndicatorFeedDataResponse from .indicator_feed_list_response import IndicatorFeedListResponse as IndicatorFeedListResponse from .indicator_feed_update_params import IndicatorFeedUpdateParams as IndicatorFeedUpdateParams -from .intel_sinkholes_sinkhole_item import IntelSinkholesSinkholeItem as IntelSinkholesSinkholeItem from .indicator_feed_create_response import IndicatorFeedCreateResponse as IndicatorFeedCreateResponse from .indicator_feed_update_response import IndicatorFeedUpdateResponse as IndicatorFeedUpdateResponse from .miscategorization_create_params import MiscategorizationCreateParams as MiscategorizationCreateParams diff --git a/src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py b/src/cloudflare/types/intel/intel_sinkhole_item.py similarity index 90% rename from src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py rename to src/cloudflare/types/intel/intel_sinkhole_item.py index ca758a310b9..98ddc704596 100644 --- a/src/cloudflare/types/intel/intel_sinkholes_sinkhole_item.py +++ b/src/cloudflare/types/intel/intel_sinkhole_item.py @@ -5,10 +5,10 @@ from ..._models import BaseModel -__all__ = ["IntelSinkholesSinkholeItem"] +__all__ = ["IntelSinkholeItem"] -class IntelSinkholesSinkholeItem(BaseModel): +class IntelSinkholeItem(BaseModel): id: Optional[int] = None """The unique identifier for the sinkhole""" diff --git a/src/cloudflare/types/intel/sinkhole_list_response.py b/src/cloudflare/types/intel/sinkhole_list_response.py index 1de11685875..f6032dcc8a5 100644 --- a/src/cloudflare/types/intel/sinkhole_list_response.py +++ b/src/cloudflare/types/intel/sinkhole_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .intel_sinkholes_sinkhole_item import IntelSinkholesSinkholeItem +from .intel_sinkhole_item import IntelSinkholeItem __all__ = ["SinkholeListResponse"] -SinkholeListResponse = List[IntelSinkholesSinkholeItem] +SinkholeListResponse = List[IntelSinkholeItem] diff --git a/src/cloudflare/types/tls_certificates_and_hostnames_base.py b/src/cloudflare/types/keyless_certificate_hostname.py similarity index 92% rename from src/cloudflare/types/tls_certificates_and_hostnames_base.py rename to src/cloudflare/types/keyless_certificate_hostname.py index e42099bac96..588c0e76e5a 100644 --- a/src/cloudflare/types/tls_certificates_and_hostnames_base.py +++ b/src/cloudflare/types/keyless_certificate_hostname.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesBase", "Tunnel"] +__all__ = ["KeylessCertificateHostname", "Tunnel"] class Tunnel(BaseModel): @@ -17,7 +17,7 @@ class Tunnel(BaseModel): """Cloudflare Tunnel Virtual Network ID""" -class TLSCertificatesAndHostnamesBase(BaseModel): +class KeylessCertificateHostname(BaseModel): id: str """Keyless certificate identifier tag.""" diff --git a/src/cloudflare/types/keyless_certificate_list_response.py b/src/cloudflare/types/keyless_certificate_list_response.py index b96ec4ee789..d2830796083 100644 --- a/src/cloudflare/types/keyless_certificate_list_response.py +++ b/src/cloudflare/types/keyless_certificate_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .tls_certificates_and_hostnames_base import TLSCertificatesAndHostnamesBase +from .keyless_certificate_hostname import KeylessCertificateHostname __all__ = ["KeylessCertificateListResponse"] -KeylessCertificateListResponse = List[TLSCertificatesAndHostnamesBase] +KeylessCertificateListResponse = List[KeylessCertificateHostname] diff --git a/src/cloudflare/types/logpush/__init__.py b/src/cloudflare/types/logpush/__init__.py index 088cd1af0f1..9e659c00d63 100644 --- a/src/cloudflare/types/logpush/__init__.py +++ b/src/cloudflare/types/logpush/__init__.py @@ -7,10 +7,10 @@ from .job_list_response import JobListResponse as JobListResponse from .job_update_params import JobUpdateParams as JobUpdateParams from .edge_create_params import EdgeCreateParams as EdgeCreateParams +from .instant_logpush_job import InstantLogpushJob as InstantLogpushJob from .job_delete_response import JobDeleteResponse as JobDeleteResponse from .validate_origin_params import ValidateOriginParams as ValidateOriginParams from .ownership_create_params import OwnershipCreateParams as OwnershipCreateParams -from .logpush_instant_logs_job import LogpushInstantLogsJob as LogpushInstantLogsJob from .validate_origin_response import ValidateOriginResponse as ValidateOriginResponse from .ownership_create_response import OwnershipCreateResponse as OwnershipCreateResponse from .ownership_validate_params import OwnershipValidateParams as OwnershipValidateParams diff --git a/src/cloudflare/types/logpush/datasets/__init__.py b/src/cloudflare/types/logpush/datasets/__init__.py index ddb417833d8..10c20406e0b 100644 --- a/src/cloudflare/types/logpush/datasets/__init__.py +++ b/src/cloudflare/types/logpush/datasets/__init__.py @@ -2,5 +2,5 @@ from __future__ import annotations +from .logpush_job import LogpushJob as LogpushJob from .job_get_response import JobGetResponse as JobGetResponse -from .logpush_logpush_job import LogpushLogpushJob as LogpushLogpushJob diff --git a/src/cloudflare/types/logpush/datasets/job_get_response.py b/src/cloudflare/types/logpush/datasets/job_get_response.py index 603fda62783..c95c7edd4a7 100644 --- a/src/cloudflare/types/logpush/datasets/job_get_response.py +++ b/src/cloudflare/types/logpush/datasets/job_get_response.py @@ -2,8 +2,8 @@ from typing import List, Optional -from .logpush_logpush_job import LogpushLogpushJob +from .logpush_job import LogpushJob __all__ = ["JobGetResponse"] -JobGetResponse = List[Optional[LogpushLogpushJob]] +JobGetResponse = List[Optional[LogpushJob]] diff --git a/src/cloudflare/types/logpush/datasets/logpush_logpush_job.py b/src/cloudflare/types/logpush/datasets/logpush_job.py similarity index 98% rename from src/cloudflare/types/logpush/datasets/logpush_logpush_job.py rename to src/cloudflare/types/logpush/datasets/logpush_job.py index 8f9a73c2756..4693a27c56d 100644 --- a/src/cloudflare/types/logpush/datasets/logpush_logpush_job.py +++ b/src/cloudflare/types/logpush/datasets/logpush_job.py @@ -8,7 +8,7 @@ from ...._models import BaseModel -__all__ = ["LogpushLogpushJob", "OutputOptions"] +__all__ = ["LogpushJob", "OutputOptions"] class OutputOptions(BaseModel): @@ -73,7 +73,7 @@ class OutputOptions(BaseModel): """ -class LogpushLogpushJob(BaseModel): +class LogpushJob(BaseModel): id: Optional[int] = None """Unique id of the job.""" diff --git a/src/cloudflare/types/logpush/edge_get_response.py b/src/cloudflare/types/logpush/edge_get_response.py index da2fa36b44f..b7f061196c9 100644 --- a/src/cloudflare/types/logpush/edge_get_response.py +++ b/src/cloudflare/types/logpush/edge_get_response.py @@ -2,8 +2,8 @@ from typing import List, Optional -from .logpush_instant_logs_job import LogpushInstantLogsJob +from .instant_logpush_job import InstantLogpushJob __all__ = ["EdgeGetResponse"] -EdgeGetResponse = List[Optional[LogpushInstantLogsJob]] +EdgeGetResponse = List[Optional[InstantLogpushJob]] diff --git a/src/cloudflare/types/logpush/logpush_instant_logs_job.py b/src/cloudflare/types/logpush/instant_logpush_job.py similarity index 90% rename from src/cloudflare/types/logpush/logpush_instant_logs_job.py rename to src/cloudflare/types/logpush/instant_logpush_job.py index 446c5055718..42396966abd 100644 --- a/src/cloudflare/types/logpush/logpush_instant_logs_job.py +++ b/src/cloudflare/types/logpush/instant_logpush_job.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["LogpushInstantLogsJob"] +__all__ = ["InstantLogpushJob"] -class LogpushInstantLogsJob(BaseModel): +class InstantLogpushJob(BaseModel): destination_conf: Optional[str] = None """Unique WebSocket address that will receive messages from Cloudflare’s edge.""" diff --git a/src/cloudflare/types/logpush/job_list_response.py b/src/cloudflare/types/logpush/job_list_response.py index 9874f6b70e3..e30f65b2620 100644 --- a/src/cloudflare/types/logpush/job_list_response.py +++ b/src/cloudflare/types/logpush/job_list_response.py @@ -2,8 +2,8 @@ from typing import List, Optional -from .datasets import LogpushLogpushJob +from .datasets import LogpushJob __all__ = ["JobListResponse"] -JobListResponse = List[Optional[LogpushLogpushJob]] +JobListResponse = List[Optional[LogpushJob]] diff --git a/src/cloudflare/types/logs/control/cmb/__init__.py b/src/cloudflare/types/logs/control/cmb/__init__.py index 73109235d4b..1cfbc76cf33 100644 --- a/src/cloudflare/types/logs/control/cmb/__init__.py +++ b/src/cloudflare/types/logs/control/cmb/__init__.py @@ -2,6 +2,6 @@ from __future__ import annotations +from .cmb_config import CmbConfig as CmbConfig from .config_create_params import ConfigCreateParams as ConfigCreateParams -from .logcontrol_cmb_config import LogcontrolCmbConfig as LogcontrolCmbConfig from .config_delete_response import ConfigDeleteResponse as ConfigDeleteResponse diff --git a/src/cloudflare/types/logs/control/cmb/logcontrol_cmb_config.py b/src/cloudflare/types/logs/control/cmb/cmb_config.py similarity index 76% rename from src/cloudflare/types/logs/control/cmb/logcontrol_cmb_config.py rename to src/cloudflare/types/logs/control/cmb/cmb_config.py index 317f24fd393..cf1f90f7437 100644 --- a/src/cloudflare/types/logs/control/cmb/logcontrol_cmb_config.py +++ b/src/cloudflare/types/logs/control/cmb/cmb_config.py @@ -4,9 +4,9 @@ from ....._models import BaseModel -__all__ = ["LogcontrolCmbConfig"] +__all__ = ["CmbConfig"] -class LogcontrolCmbConfig(BaseModel): +class CmbConfig(BaseModel): regions: Optional[str] = None """Comma-separated list of regions.""" diff --git a/src/cloudflare/types/magic_network_monitoring/__init__.py b/src/cloudflare/types/magic_network_monitoring/__init__.py index 855cef74221..1cef197ce1b 100644 --- a/src/cloudflare/types/magic_network_monitoring/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/__init__.py @@ -3,5 +3,5 @@ from __future__ import annotations from .rule_list_response import RuleListResponse as RuleListResponse -from .magic_visibility_mnm_rule import MagicVisibilityMNMRule as MagicVisibilityMNMRule -from .magic_visibility_mnm_config import MagicVisibilityMNMConfig as MagicVisibilityMNMConfig +from .magic_network_monitoring_rule import MagicNetworkMonitoringRule as MagicNetworkMonitoringRule +from .magic_network_monitoring_config import MagicNetworkMonitoringConfig as MagicNetworkMonitoringConfig diff --git a/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_config.py b/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_config.py similarity index 81% rename from src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_config.py rename to src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_config.py index 3e0c2dd03b1..a4ca28cadd3 100644 --- a/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_config.py +++ b/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_config.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["MagicVisibilityMNMConfig"] +__all__ = ["MagicNetworkMonitoringConfig"] -class MagicVisibilityMNMConfig(BaseModel): +class MagicNetworkMonitoringConfig(BaseModel): default_sampling: float """Fallback sampling rate of flow messages being sent in packets per second. diff --git a/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_rule.py b/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py similarity index 94% rename from src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_rule.py rename to src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py index 16ec2c47ae0..8421ef7df0d 100644 --- a/src/cloudflare/types/magic_network_monitoring/magic_visibility_mnm_rule.py +++ b/src/cloudflare/types/magic_network_monitoring/magic_network_monitoring_rule.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["MagicVisibilityMNMRule"] +__all__ = ["MagicNetworkMonitoringRule"] -class MagicVisibilityMNMRule(BaseModel): +class MagicNetworkMonitoringRule(BaseModel): automatic_advertisement: Optional[bool] = None """ Toggle on if you would like Cloudflare to automatically advertise the IP diff --git a/src/cloudflare/types/magic_network_monitoring/rule_list_response.py b/src/cloudflare/types/magic_network_monitoring/rule_list_response.py index 26b9278a876..29929a92adc 100644 --- a/src/cloudflare/types/magic_network_monitoring/rule_list_response.py +++ b/src/cloudflare/types/magic_network_monitoring/rule_list_response.py @@ -2,8 +2,8 @@ from typing import List, Optional -from .magic_visibility_mnm_rule import MagicVisibilityMNMRule +from .magic_network_monitoring_rule import MagicNetworkMonitoringRule __all__ = ["RuleListResponse"] -RuleListResponse = List[Optional[MagicVisibilityMNMRule]] +RuleListResponse = List[Optional[MagicNetworkMonitoringRule]] diff --git a/src/cloudflare/types/magic_network_monitoring/rules/__init__.py b/src/cloudflare/types/magic_network_monitoring/rules/__init__.py index 23421e7b707..32939a9af6e 100644 --- a/src/cloudflare/types/magic_network_monitoring/rules/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/rules/__init__.py @@ -2,6 +2,6 @@ from __future__ import annotations -from .magic_visibility_mnm_rule_advertisable import ( - MagicVisibilityMNMRuleAdvertisable as MagicVisibilityMNMRuleAdvertisable, +from .magic_network_monitoring_rule_advertisable import ( + MagicNetworkMonitoringRuleAdvertisable as MagicNetworkMonitoringRuleAdvertisable, ) diff --git a/src/cloudflare/types/magic_network_monitoring/rules/magic_visibility_mnm_rule_advertisable.py b/src/cloudflare/types/magic_network_monitoring/rules/magic_network_monitoring_rule_advertisable.py similarity index 79% rename from src/cloudflare/types/magic_network_monitoring/rules/magic_visibility_mnm_rule_advertisable.py rename to src/cloudflare/types/magic_network_monitoring/rules/magic_network_monitoring_rule_advertisable.py index bfb67487939..c672e0dbe6d 100644 --- a/src/cloudflare/types/magic_network_monitoring/rules/magic_visibility_mnm_rule_advertisable.py +++ b/src/cloudflare/types/magic_network_monitoring/rules/magic_network_monitoring_rule_advertisable.py @@ -4,10 +4,10 @@ from ...._models import BaseModel -__all__ = ["MagicVisibilityMNMRuleAdvertisable"] +__all__ = ["MagicNetworkMonitoringRuleAdvertisable"] -class MagicVisibilityMNMRuleAdvertisable(BaseModel): +class MagicNetworkMonitoringRuleAdvertisable(BaseModel): automatic_advertisement: Optional[bool] = None """ Toggle on if you would like Cloudflare to automatically advertise the IP diff --git a/src/cloudflare/types/tls_certificates_and_hostnames_components_schemas_certificate_object.py b/src/cloudflare/types/mtls_certificate.py similarity index 86% rename from src/cloudflare/types/tls_certificates_and_hostnames_components_schemas_certificate_object.py rename to src/cloudflare/types/mtls_certificate.py index cf331cc0dce..c710efe811b 100644 --- a/src/cloudflare/types/tls_certificates_and_hostnames_components_schemas_certificate_object.py +++ b/src/cloudflare/types/mtls_certificate.py @@ -5,10 +5,10 @@ from .._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesComponentsSchemasCertificateObject"] +__all__ = ["MTLSCertificate"] -class TLSCertificatesAndHostnamesComponentsSchemasCertificateObject(BaseModel): +class MTLSCertificate(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/mtls_certificate_list_response.py b/src/cloudflare/types/mtls_certificate_list_response.py index afd0bcc6497..a4dc4610fd2 100644 --- a/src/cloudflare/types/mtls_certificate_list_response.py +++ b/src/cloudflare/types/mtls_certificate_list_response.py @@ -2,10 +2,8 @@ from typing import List -from .tls_certificates_and_hostnames_components_schemas_certificate_object import ( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, -) +from .mtls_certificate import MTLSCertificate __all__ = ["MTLSCertificateListResponse"] -MTLSCertificateListResponse = List[TLSCertificatesAndHostnamesComponentsSchemasCertificateObject] +MTLSCertificateListResponse = List[MTLSCertificate] diff --git a/src/cloudflare/types/tls_certificates_and_hostnames_certificate_object_post.py b/src/cloudflare/types/mtls_certificate_update.py similarity index 89% rename from src/cloudflare/types/tls_certificates_and_hostnames_certificate_object_post.py rename to src/cloudflare/types/mtls_certificate_update.py index 8c8f953bac3..47561988572 100644 --- a/src/cloudflare/types/tls_certificates_and_hostnames_certificate_object_post.py +++ b/src/cloudflare/types/mtls_certificate_update.py @@ -5,10 +5,10 @@ from .._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesCertificateObjectPost"] +__all__ = ["MTLSCertificateUpdate"] -class TLSCertificatesAndHostnamesCertificateObjectPost(BaseModel): +class MTLSCertificateUpdate(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/mtls_certificates/__init__.py b/src/cloudflare/types/mtls_certificates/__init__.py index 502ec1e94b4..7ccb696e0db 100644 --- a/src/cloudflare/types/mtls_certificates/__init__.py +++ b/src/cloudflare/types/mtls_certificates/__init__.py @@ -3,6 +3,4 @@ from __future__ import annotations from .association_get_response import AssociationGetResponse as AssociationGetResponse -from .tls_certificates_and_hostnames_association_object import ( - TLSCertificatesAndHostnamesAssociationObject as TLSCertificatesAndHostnamesAssociationObject, -) +from .mtls_certificate_asssociation import MTLSCertificateAsssociation as MTLSCertificateAsssociation diff --git a/src/cloudflare/types/mtls_certificates/association_get_response.py b/src/cloudflare/types/mtls_certificates/association_get_response.py index e2fb0059427..c2b31a396fe 100644 --- a/src/cloudflare/types/mtls_certificates/association_get_response.py +++ b/src/cloudflare/types/mtls_certificates/association_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .tls_certificates_and_hostnames_association_object import TLSCertificatesAndHostnamesAssociationObject +from .mtls_certificate_asssociation import MTLSCertificateAsssociation __all__ = ["AssociationGetResponse"] -AssociationGetResponse = List[TLSCertificatesAndHostnamesAssociationObject] +AssociationGetResponse = List[MTLSCertificateAsssociation] diff --git a/src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py b/src/cloudflare/types/mtls_certificates/mtls_certificate_asssociation.py similarity index 72% rename from src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py rename to src/cloudflare/types/mtls_certificates/mtls_certificate_asssociation.py index 970ce3449af..80f6c8444a8 100644 --- a/src/cloudflare/types/mtls_certificates/tls_certificates_and_hostnames_association_object.py +++ b/src/cloudflare/types/mtls_certificates/mtls_certificate_asssociation.py @@ -4,10 +4,10 @@ from ..._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesAssociationObject"] +__all__ = ["MTLSCertificateAsssociation"] -class TLSCertificatesAndHostnamesAssociationObject(BaseModel): +class MTLSCertificateAsssociation(BaseModel): service: Optional[str] = None """The service using the certificate.""" diff --git a/src/cloudflare/types/origin_tls_client_auth/__init__.py b/src/cloudflare/types/origin_tls_client_auth/__init__.py index 5b4bdef2db5..18468c84971 100644 --- a/src/cloudflare/types/origin_tls_client_auth/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/__init__.py @@ -7,6 +7,4 @@ from .hostname_update_params import HostnameUpdateParams as HostnameUpdateParams from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse from .hostname_update_response import HostnameUpdateResponse as HostnameUpdateResponse -from .tls_certificates_and_hostnames_hostname_certid_object import ( - TLSCertificatesAndHostnamesHostnameCertidObject as TLSCertificatesAndHostnamesHostnameCertidObject, -) +from .origin_tls_client_certificate_id import OriginTLSClientCertificateID as OriginTLSClientCertificateID diff --git a/src/cloudflare/types/origin_tls_client_auth/hostname_update_response.py b/src/cloudflare/types/origin_tls_client_auth/hostname_update_response.py index 58f6decdb25..f2bcb7c8e29 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostname_update_response.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostname_update_response.py @@ -2,8 +2,8 @@ from typing import List -from .tls_certificates_and_hostnames_hostname_certid_object import TLSCertificatesAndHostnamesHostnameCertidObject +from .origin_tls_client_certificate_id import OriginTLSClientCertificateID __all__ = ["HostnameUpdateResponse"] -HostnameUpdateResponse = List[TLSCertificatesAndHostnamesHostnameCertidObject] +HostnameUpdateResponse = List[OriginTLSClientCertificateID] diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py index 9f9f6e1c8e1..11cf99a6c82 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py @@ -4,6 +4,4 @@ from .certificate_create_params import CertificateCreateParams as CertificateCreateParams from .certificate_list_response import CertificateListResponse as CertificateListResponse -from .tls_certificates_and_hostnames_schemas_certificate_object import ( - TLSCertificatesAndHostnamesSchemasCertificateObject as TLSCertificatesAndHostnamesSchemasCertificateObject, -) +from .origin_tls_client_certificate import OriginTLSClientCertificate as OriginTLSClientCertificate diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py index 03cfd670af8..5dcb437b4d6 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py @@ -2,8 +2,8 @@ from typing import List -from ..tls_certificates_and_hostnames_hostname_certid_object import TLSCertificatesAndHostnamesHostnameCertidObject +from ..origin_tls_client_certificate_id import OriginTLSClientCertificateID __all__ = ["CertificateListResponse"] -CertificateListResponse = List[TLSCertificatesAndHostnamesHostnameCertidObject] +CertificateListResponse = List[OriginTLSClientCertificateID] diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/tls_certificates_and_hostnames_schemas_certificate_object.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/origin_tls_client_certificate.py similarity index 89% rename from src/cloudflare/types/origin_tls_client_auth/hostnames/tls_certificates_and_hostnames_schemas_certificate_object.py rename to src/cloudflare/types/origin_tls_client_auth/hostnames/origin_tls_client_certificate.py index 47dad3fdb9e..da2f2cdabd2 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/tls_certificates_and_hostnames_schemas_certificate_object.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/origin_tls_client_certificate.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesSchemasCertificateObject"] +__all__ = ["OriginTLSClientCertificate"] -class TLSCertificatesAndHostnamesSchemasCertificateObject(BaseModel): +class OriginTLSClientCertificate(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/origin_tls_client_auth/tls_certificates_and_hostnames_hostname_certid_object.py b/src/cloudflare/types/origin_tls_client_auth/origin_tls_client_certificate_id.py similarity index 94% rename from src/cloudflare/types/origin_tls_client_auth/tls_certificates_and_hostnames_hostname_certid_object.py rename to src/cloudflare/types/origin_tls_client_auth/origin_tls_client_certificate_id.py index 151ddbcaeb0..192cccdcc2c 100644 --- a/src/cloudflare/types/origin_tls_client_auth/tls_certificates_and_hostnames_hostname_certid_object.py +++ b/src/cloudflare/types/origin_tls_client_auth/origin_tls_client_certificate_id.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesHostnameCertidObject"] +__all__ = ["OriginTLSClientCertificateID"] -class TLSCertificatesAndHostnamesHostnameCertidObject(BaseModel): +class OriginTLSClientCertificateID(BaseModel): cert_id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/page_shield/__init__.py b/src/cloudflare/types/page_shield/__init__.py index c009f2ca0ea..ecd67c57457 100644 --- a/src/cloudflare/types/page_shield/__init__.py +++ b/src/cloudflare/types/page_shield/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .page_shield_policy import PageShieldPolicy as PageShieldPolicy from .page_shield_script import PageShieldScript as PageShieldScript from .script_list_params import ScriptListParams as ScriptListParams from .script_get_response import ScriptGetResponse as ScriptGetResponse @@ -12,4 +13,3 @@ from .connection_list_params import ConnectionListParams as ConnectionListParams from .page_shield_connection import PageShieldConnection as PageShieldConnection from .connection_list_response import ConnectionListResponse as ConnectionListResponse -from .page_shield_pageshield_policy import PageShieldPageshieldPolicy as PageShieldPageshieldPolicy diff --git a/src/cloudflare/types/page_shield/page_shield_pageshield_policy.py b/src/cloudflare/types/page_shield/page_shield_policy.py similarity index 89% rename from src/cloudflare/types/page_shield/page_shield_pageshield_policy.py rename to src/cloudflare/types/page_shield/page_shield_policy.py index 5c021cce924..fccbaf01403 100644 --- a/src/cloudflare/types/page_shield/page_shield_pageshield_policy.py +++ b/src/cloudflare/types/page_shield/page_shield_policy.py @@ -5,10 +5,10 @@ from ..._models import BaseModel -__all__ = ["PageShieldPageshieldPolicy"] +__all__ = ["PageShieldPolicy"] -class PageShieldPageshieldPolicy(BaseModel): +class PageShieldPolicy(BaseModel): id: Optional[str] = None """The ID of the policy""" diff --git a/src/cloudflare/types/page_shield/policy_list_response.py b/src/cloudflare/types/page_shield/policy_list_response.py index 0d91d61f032..ba303df61e0 100644 --- a/src/cloudflare/types/page_shield/policy_list_response.py +++ b/src/cloudflare/types/page_shield/policy_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .page_shield_pageshield_policy import PageShieldPageshieldPolicy +from .page_shield_policy import PageShieldPolicy __all__ = ["PolicyListResponse"] -PolicyListResponse = List[PageShieldPageshieldPolicy] +PolicyListResponse = List[PageShieldPolicy] diff --git a/src/cloudflare/types/page_shield_get_zone_settings.py b/src/cloudflare/types/page_shield_setting.py similarity index 88% rename from src/cloudflare/types/page_shield_get_zone_settings.py rename to src/cloudflare/types/page_shield_setting.py index 1c42b40e350..4fd8f319791 100644 --- a/src/cloudflare/types/page_shield_get_zone_settings.py +++ b/src/cloudflare/types/page_shield_setting.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["PageShieldGetZoneSettings"] +__all__ = ["PageShieldSetting"] -class PageShieldGetZoneSettings(BaseModel): +class PageShieldSetting(BaseModel): enabled: Optional[bool] = None """When true, indicates that Page Shield is enabled.""" diff --git a/src/cloudflare/types/page_shield_update_zone_settings.py b/src/cloudflare/types/page_shield_update_response.py similarity index 88% rename from src/cloudflare/types/page_shield_update_zone_settings.py rename to src/cloudflare/types/page_shield_update_response.py index 035dc8e8d4c..02a8f02ce62 100644 --- a/src/cloudflare/types/page_shield_update_zone_settings.py +++ b/src/cloudflare/types/page_shield_update_response.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["PageShieldUpdateZoneSettings"] +__all__ = ["PageShieldUpdateResponse"] -class PageShieldUpdateZoneSettings(BaseModel): +class PageShieldUpdateResponse(BaseModel): enabled: Optional[bool] = None """When true, indicates that Page Shield is enabled.""" diff --git a/src/cloudflare/types/pagerule_list_response.py b/src/cloudflare/types/pagerule_list_response.py index 85f08a4081a..f4d462fc10e 100644 --- a/src/cloudflare/types/pagerule_list_response.py +++ b/src/cloudflare/types/pagerule_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .zones_page_rule import ZonesPageRule +from .zones_pagerule import ZonesPagerule __all__ = ["PageruleListResponse"] -PageruleListResponse = List[ZonesPageRule] +PageruleListResponse = List[ZonesPagerule] diff --git a/src/cloudflare/types/pagerules/__init__.py b/src/cloudflare/types/pagerules/__init__.py index 120e6e155df..b6c34e2640a 100644 --- a/src/cloudflare/types/pagerules/__init__.py +++ b/src/cloudflare/types/pagerules/__init__.py @@ -2,4 +2,4 @@ from __future__ import annotations -from .zones_settings import ZonesSettings as ZonesSettings +from .zone_pagerule_settings import ZonePageruleSettings as ZonePageruleSettings diff --git a/src/cloudflare/types/pagerules/zones_settings.py b/src/cloudflare/types/pagerules/zone_pagerule_settings.py similarity index 61% rename from src/cloudflare/types/pagerules/zones_settings.py rename to src/cloudflare/types/pagerules/zone_pagerule_settings.py index 458e68a653e..d7c22fbd6ed 100644 --- a/src/cloudflare/types/pagerules/zones_settings.py +++ b/src/cloudflare/types/pagerules/zone_pagerule_settings.py @@ -2,6 +2,6 @@ from typing import List -__all__ = ["ZonesSettings"] +__all__ = ["ZonePageruleSettings"] -ZonesSettings = List[object] +ZonePageruleSettings = List[object] diff --git a/src/cloudflare/types/plan_list_response.py b/src/cloudflare/types/plan_list_response.py index 349d1a5843c..0b3bfce127b 100644 --- a/src/cloudflare/types/plan_list_response.py +++ b/src/cloudflare/types/plan_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .bill_subs_api_available_rate_plan import BillSubsAPIAvailableRatePlan +from .available_rate_plan import AvailableRatePlan __all__ = ["PlanListResponse"] -PlanListResponse = List[BillSubsAPIAvailableRatePlan] +PlanListResponse = List[AvailableRatePlan] diff --git a/src/cloudflare/types/request_tracers/__init__.py b/src/cloudflare/types/request_tracers/__init__.py index fb3abea3227..27e1d8c7f50 100644 --- a/src/cloudflare/types/request_tracers/__init__.py +++ b/src/cloudflare/types/request_tracers/__init__.py @@ -2,6 +2,6 @@ from __future__ import annotations +from .request_trace import RequestTrace as RequestTrace from .trace_create_params import TraceCreateParams as TraceCreateParams -from .request_tracer_trace import RequestTracerTrace as RequestTracerTrace from .trace_create_response import TraceCreateResponse as TraceCreateResponse diff --git a/src/cloudflare/types/request_tracers/request_tracer_trace.py b/src/cloudflare/types/request_tracers/request_trace.py similarity index 78% rename from src/cloudflare/types/request_tracers/request_tracer_trace.py rename to src/cloudflare/types/request_tracers/request_trace.py index e98038cc66d..e93324669fa 100644 --- a/src/cloudflare/types/request_tracers/request_tracer_trace.py +++ b/src/cloudflare/types/request_tracers/request_trace.py @@ -7,10 +7,10 @@ from ..._compat import PYDANTIC_V2 from ..._models import BaseModel -__all__ = ["RequestTracerTrace", "RequestTracerTraceItem"] +__all__ = ["RequestTrace", "RequestTraceItem"] -class RequestTracerTraceItem(BaseModel): +class RequestTraceItem(BaseModel): action: Optional[str] = None """If step type is rule, then action performed by this rule""" @@ -35,15 +35,15 @@ class RequestTracerTraceItem(BaseModel): step_name: Optional[str] = None """Tracing step identifying name""" - trace: Optional[RequestTracerTrace] = None + trace: Optional[RequestTrace] = None type: Optional[str] = None """Tracing step type""" -RequestTracerTrace = List[RequestTracerTraceItem] +RequestTrace = List[RequestTraceItem] if PYDANTIC_V2: - RequestTracerTraceItem.model_rebuild() + RequestTraceItem.model_rebuild() else: - RequestTracerTraceItem.update_forward_refs() # type: ignore + RequestTraceItem.update_forward_refs() # type: ignore diff --git a/src/cloudflare/types/request_tracers/trace_create_response.py b/src/cloudflare/types/request_tracers/trace_create_response.py index 2738569266b..95f03348589 100644 --- a/src/cloudflare/types/request_tracers/trace_create_response.py +++ b/src/cloudflare/types/request_tracers/trace_create_response.py @@ -14,10 +14,10 @@ class TraceCreateResponse(BaseModel): status_code: Optional[int] = None """HTTP Status code of zone response""" - trace: Optional["RequestTracerTrace"] = None + trace: Optional["RequestTrace"] = None -from .request_tracer_trace import RequestTracerTrace +from .request_trace import RequestTrace if PYDANTIC_V2: TraceCreateResponse.model_rebuild() diff --git a/src/cloudflare/types/secondary_dns/__init__.py b/src/cloudflare/types/secondary_dns/__init__.py index e944c03733c..69b24dee5eb 100644 --- a/src/cloudflare/types/secondary_dns/__init__.py +++ b/src/cloudflare/types/secondary_dns/__init__.py @@ -15,6 +15,7 @@ from .tsig_list_response import TSIGListResponse as TSIGListResponse from .tsig_update_params import TSIGUpdateParams as TSIGUpdateParams from .acl_delete_response import ACLDeleteResponse as ACLDeleteResponse +from .secondary_dns_force import SecondaryDNSForce as SecondaryDNSForce from .peer_delete_response import PeerDeleteResponse as PeerDeleteResponse from .tsig_delete_response import TSIGDeleteResponse as TSIGDeleteResponse from .incoming_get_response import IncomingGetResponse as IncomingGetResponse @@ -29,9 +30,5 @@ from .outgoing_create_response import OutgoingCreateResponse as OutgoingCreateResponse from .outgoing_delete_response import OutgoingDeleteResponse as OutgoingDeleteResponse from .outgoing_update_response import OutgoingUpdateResponse as OutgoingUpdateResponse -from .secondary_dns_force_result import SecondaryDNSForceResult as SecondaryDNSForceResult -from .secondary_dns_schemas_force_result import SecondaryDNSSchemasForceResult as SecondaryDNSSchemasForceResult -from .secondary_dns_enable_transfer_result import SecondaryDNSEnableTransferResult as SecondaryDNSEnableTransferResult -from .secondary_dns_disable_transfer_result import ( - SecondaryDNSDisableTransferResult as SecondaryDNSDisableTransferResult, -) +from .secondary_dns_enable_transfer import SecondaryDNSEnableTransfer as SecondaryDNSEnableTransfer +from .secondary_dns_disable_transfer import SecondaryDNSDisableTransfer as SecondaryDNSDisableTransfer diff --git a/src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py b/src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer.py similarity index 52% rename from src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py rename to src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer.py index 5d3c0aa114b..cca54ddc05b 100644 --- a/src/cloudflare/types/secondary_dns/secondary_dns_schemas_force_result.py +++ b/src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["SecondaryDNSSchemasForceResult"] +__all__ = ["SecondaryDNSDisableTransfer"] -SecondaryDNSSchemasForceResult = str +SecondaryDNSDisableTransfer = str diff --git a/src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer_result.py b/src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer_result.py deleted file mode 100644 index adb8f8a4bc6..00000000000 --- a/src/cloudflare/types/secondary_dns/secondary_dns_disable_transfer_result.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["SecondaryDNSDisableTransferResult"] - -SecondaryDNSDisableTransferResult = str diff --git a/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer.py b/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer.py new file mode 100644 index 00000000000..2faf7d71613 --- /dev/null +++ b/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer.py @@ -0,0 +1,6 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + +__all__ = ["SecondaryDNSEnableTransfer"] + +SecondaryDNSEnableTransfer = str diff --git a/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer_result.py b/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer_result.py deleted file mode 100644 index 9032ba4697f..00000000000 --- a/src/cloudflare/types/secondary_dns/secondary_dns_enable_transfer_result.py +++ /dev/null @@ -1,6 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - - -__all__ = ["SecondaryDNSEnableTransferResult"] - -SecondaryDNSEnableTransferResult = str diff --git a/src/cloudflare/types/secondary_dns/secondary_dns_force_result.py b/src/cloudflare/types/secondary_dns/secondary_dns_force.py similarity index 56% rename from src/cloudflare/types/secondary_dns/secondary_dns_force_result.py rename to src/cloudflare/types/secondary_dns/secondary_dns_force.py index ad1aae99d47..7b693b2feb6 100644 --- a/src/cloudflare/types/secondary_dns/secondary_dns_force_result.py +++ b/src/cloudflare/types/secondary_dns/secondary_dns_force.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["SecondaryDNSForceResult"] +__all__ = ["SecondaryDNSForce"] -SecondaryDNSForceResult = str +SecondaryDNSForce = str diff --git a/src/cloudflare/types/ssl/__init__.py b/src/cloudflare/types/ssl/__init__.py index f9008ea8aaa..1d4a5253625 100644 --- a/src/cloudflare/types/ssl/__init__.py +++ b/src/cloudflare/types/ssl/__init__.py @@ -5,6 +5,7 @@ from .analyze_create_params import AnalyzeCreateParams as AnalyzeCreateParams from .analyze_create_response import AnalyzeCreateResponse as AnalyzeCreateResponse from .verification_get_params import VerificationGetParams as VerificationGetParams +from .tls_verification_setting import TLSVerificationSetting as TLSVerificationSetting from .verification_edit_params import VerificationEditParams as VerificationEditParams from .verification_get_response import VerificationGetResponse as VerificationGetResponse from .verification_edit_response import VerificationEditResponse as VerificationEditResponse @@ -14,6 +15,3 @@ from .certificate_pack_edit_response import CertificatePackEditResponse as CertificatePackEditResponse from .certificate_pack_list_response import CertificatePackListResponse as CertificatePackListResponse from .certificate_pack_delete_response import CertificatePackDeleteResponse as CertificatePackDeleteResponse -from .tls_certificates_and_hostnames_verification import ( - TLSCertificatesAndHostnamesVerification as TLSCertificatesAndHostnamesVerification, -) diff --git a/src/cloudflare/types/ssl/tls_certificates_and_hostnames_verification.py b/src/cloudflare/types/ssl/tls_verification_setting.py similarity index 91% rename from src/cloudflare/types/ssl/tls_certificates_and_hostnames_verification.py rename to src/cloudflare/types/ssl/tls_verification_setting.py index 4dbdc403dd1..0435f6f6e22 100644 --- a/src/cloudflare/types/ssl/tls_certificates_and_hostnames_verification.py +++ b/src/cloudflare/types/ssl/tls_verification_setting.py @@ -5,7 +5,7 @@ from ..._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesVerification", "VerificationInfo"] +__all__ = ["TLSVerificationSetting", "VerificationInfo"] class VerificationInfo(BaseModel): @@ -16,7 +16,7 @@ class VerificationInfo(BaseModel): """Target of CNAME record.""" -class TLSCertificatesAndHostnamesVerification(BaseModel): +class TLSVerificationSetting(BaseModel): certificate_status: Literal[ "initializing", "authorizing", "active", "expired", "issuing", "timing_out", "pending_deployment" ] diff --git a/src/cloudflare/types/ssl/universal/__init__.py b/src/cloudflare/types/ssl/universal/__init__.py index 87806a7971e..5fd261ecd39 100644 --- a/src/cloudflare/types/ssl/universal/__init__.py +++ b/src/cloudflare/types/ssl/universal/__init__.py @@ -3,6 +3,4 @@ from __future__ import annotations from .setting_edit_params import SettingEditParams as SettingEditParams -from .tls_certificates_and_hostnames_universal import ( - TLSCertificatesAndHostnamesUniversal as TLSCertificatesAndHostnamesUniversal, -) +from .universal_ssl_settings import UniversalSSLSettings as UniversalSSLSettings diff --git a/src/cloudflare/types/ssl/universal/tls_certificates_and_hostnames_universal.py b/src/cloudflare/types/ssl/universal/universal_ssl_settings.py similarity index 93% rename from src/cloudflare/types/ssl/universal/tls_certificates_and_hostnames_universal.py rename to src/cloudflare/types/ssl/universal/universal_ssl_settings.py index 4c5936bf13b..c75187758c4 100644 --- a/src/cloudflare/types/ssl/universal/tls_certificates_and_hostnames_universal.py +++ b/src/cloudflare/types/ssl/universal/universal_ssl_settings.py @@ -4,10 +4,10 @@ from ...._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesUniversal"] +__all__ = ["UniversalSSLSettings"] -class TLSCertificatesAndHostnamesUniversal(BaseModel): +class UniversalSSLSettings(BaseModel): enabled: Optional[bool] = None """ Disabling Universal SSL removes any currently active Universal SSL certificates diff --git a/src/cloudflare/types/ssl/verification_get_response.py b/src/cloudflare/types/ssl/verification_get_response.py index 2276ae5f47a..7d6fe83cab4 100644 --- a/src/cloudflare/types/ssl/verification_get_response.py +++ b/src/cloudflare/types/ssl/verification_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .tls_certificates_and_hostnames_verification import TLSCertificatesAndHostnamesVerification +from .tls_verification_setting import TLSVerificationSetting __all__ = ["VerificationGetResponse"] -VerificationGetResponse = List[TLSCertificatesAndHostnamesVerification] +VerificationGetResponse = List[TLSVerificationSetting] diff --git a/src/cloudflare/types/stream/__init__.py b/src/cloudflare/types/stream/__init__.py index 6ad163c5b72..532bacd0826 100644 --- a/src/cloudflare/types/stream/__init__.py +++ b/src/cloudflare/types/stream/__init__.py @@ -3,6 +3,7 @@ from __future__ import annotations from .stream_keys import StreamKeys as StreamKeys +from .stream_audio import StreamAudio as StreamAudio from .stream_captions import StreamCaptions as StreamCaptions from .stream_clipping import StreamClipping as StreamClipping from .key_get_response import KeyGetResponse as KeyGetResponse @@ -25,7 +26,6 @@ from .audio_track_edit_params import AudioTrackEditParams as AudioTrackEditParams from .caption_delete_response import CaptionDeleteResponse as CaptionDeleteResponse from .caption_update_response import CaptionUpdateResponse as CaptionUpdateResponse -from .stream_additional_audio import StreamAdditionalAudio as StreamAdditionalAudio from .watermark_create_params import WatermarkCreateParams as WatermarkCreateParams from .watermark_list_response import WatermarkListResponse as WatermarkListResponse from .webhook_delete_response import WebhookDeleteResponse as WebhookDeleteResponse diff --git a/src/cloudflare/types/stream/audio_track_get_response.py b/src/cloudflare/types/stream/audio_track_get_response.py index c5bc3ec83ef..893a4995463 100644 --- a/src/cloudflare/types/stream/audio_track_get_response.py +++ b/src/cloudflare/types/stream/audio_track_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .stream_additional_audio import StreamAdditionalAudio +from .stream_audio import StreamAudio __all__ = ["AudioTrackGetResponse"] -AudioTrackGetResponse = List[StreamAdditionalAudio] +AudioTrackGetResponse = List[StreamAudio] diff --git a/src/cloudflare/types/stream/stream_additional_audio.py b/src/cloudflare/types/stream/stream_audio.py similarity index 89% rename from src/cloudflare/types/stream/stream_additional_audio.py rename to src/cloudflare/types/stream/stream_audio.py index 44b4406e9df..2b90d9a8d8e 100644 --- a/src/cloudflare/types/stream/stream_additional_audio.py +++ b/src/cloudflare/types/stream/stream_audio.py @@ -5,10 +5,10 @@ from ..._models import BaseModel -__all__ = ["StreamAdditionalAudio"] +__all__ = ["StreamAudio"] -class StreamAdditionalAudio(BaseModel): +class StreamAudio(BaseModel): default: Optional[bool] = None """Denotes whether the audio track will be played by default in a player.""" diff --git a/src/cloudflare/types/user/__init__.py b/src/cloudflare/types/user/__init__.py index a87afe5461e..5281439e432 100644 --- a/src/cloudflare/types/user/__init__.py +++ b/src/cloudflare/types/user/__init__.py @@ -3,7 +3,7 @@ from __future__ import annotations from .user import User as User -from .iam_organization import IamOrganization as IamOrganization +from .organization import Organization as Organization from .token_list_params import TokenListParams as TokenListParams from .invite_edit_params import InviteEditParams as InviteEditParams from .token_get_response import TokenGetResponse as TokenGetResponse diff --git a/src/cloudflare/types/user/billing/__init__.py b/src/cloudflare/types/user/billing/__init__.py index 8731b17ffc5..e8ddc3e1d28 100644 --- a/src/cloudflare/types/user/billing/__init__.py +++ b/src/cloudflare/types/user/billing/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations +from .billing_history import BillingHistory as BillingHistory from .history_get_params import HistoryGetParams as HistoryGetParams from .history_get_response import HistoryGetResponse as HistoryGetResponse from .profile_get_response import ProfileGetResponse as ProfileGetResponse -from .bill_subs_api_billing_history import BillSubsAPIBillingHistory as BillSubsAPIBillingHistory diff --git a/src/cloudflare/types/user/billing/bill_subs_api_billing_history.py b/src/cloudflare/types/user/billing/billing_history.py similarity index 88% rename from src/cloudflare/types/user/billing/bill_subs_api_billing_history.py rename to src/cloudflare/types/user/billing/billing_history.py index c1976d68d7e..443be2603c1 100644 --- a/src/cloudflare/types/user/billing/bill_subs_api_billing_history.py +++ b/src/cloudflare/types/user/billing/billing_history.py @@ -5,14 +5,14 @@ from ...._models import BaseModel -__all__ = ["BillSubsAPIBillingHistory", "Zone"] +__all__ = ["BillingHistory", "Zone"] class Zone(BaseModel): name: Optional[object] = None -class BillSubsAPIBillingHistory(BaseModel): +class BillingHistory(BaseModel): id: str """Billing item identifier tag.""" diff --git a/src/cloudflare/types/user/billing/history_get_response.py b/src/cloudflare/types/user/billing/history_get_response.py index 3c0233009c9..a3679cab400 100644 --- a/src/cloudflare/types/user/billing/history_get_response.py +++ b/src/cloudflare/types/user/billing/history_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .bill_subs_api_billing_history import BillSubsAPIBillingHistory +from .billing_history import BillingHistory __all__ = ["HistoryGetResponse"] -HistoryGetResponse = List[BillSubsAPIBillingHistory] +HistoryGetResponse = List[BillingHistory] diff --git a/src/cloudflare/types/user/firewall/__init__.py b/src/cloudflare/types/user/firewall/__init__.py index 2cc2bd128e3..252757e1979 100644 --- a/src/cloudflare/types/user/firewall/__init__.py +++ b/src/cloudflare/types/user/firewall/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from .legacy_jhs_rule import LegacyJhsRule as LegacyJhsRule +from .firewall_rule import FirewallRule as FirewallRule from .access_rule_edit_params import AccessRuleEditParams as AccessRuleEditParams from .access_rule_list_params import AccessRuleListParams as AccessRuleListParams from .access_rule_create_params import AccessRuleCreateParams as AccessRuleCreateParams diff --git a/src/cloudflare/types/user/firewall/legacy_jhs_rule.py b/src/cloudflare/types/user/firewall/firewall_rule.py similarity index 98% rename from src/cloudflare/types/user/firewall/legacy_jhs_rule.py rename to src/cloudflare/types/user/firewall/firewall_rule.py index 3e8efabdb07..f7bc7e5f602 100644 --- a/src/cloudflare/types/user/firewall/legacy_jhs_rule.py +++ b/src/cloudflare/types/user/firewall/firewall_rule.py @@ -7,7 +7,7 @@ from ...._models import BaseModel __all__ = [ - "LegacyJhsRule", + "FirewallRule", "Configuration", "ConfigurationLegacyJhsIPConfiguration", "ConfigurationLegacyJhsIPV6Configuration", @@ -94,7 +94,7 @@ class ConfigurationLegacyJhsCountryConfiguration(BaseModel): ] -class LegacyJhsRule(BaseModel): +class FirewallRule(BaseModel): id: str """The unique identifier of the IP Access rule.""" diff --git a/src/cloudflare/types/user/invite_list_response.py b/src/cloudflare/types/user/invite_list_response.py index aa13fb6c0fb..338d0f09636 100644 --- a/src/cloudflare/types/user/invite_list_response.py +++ b/src/cloudflare/types/user/invite_list_response.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from ..._models import BaseModel -from ..accounts import IamSchemasRole +from ..accounts import Role __all__ = ["InviteListResponse", "InviteListResponseItem"] @@ -35,7 +35,7 @@ class InviteListResponseItem(BaseModel): organization_name: Optional[str] = None """Organization name.""" - roles: Optional[List[IamSchemasRole]] = None + roles: Optional[List[Role]] = None """Roles to be assigned to this user.""" status: Optional[Literal["pending", "accepted", "rejected", "expired"]] = None diff --git a/src/cloudflare/types/user/load_balancers/__init__.py b/src/cloudflare/types/user/load_balancers/__init__.py index a6e39d9c4ba..650c5b7f348 100644 --- a/src/cloudflare/types/user/load_balancers/__init__.py +++ b/src/cloudflare/types/user/load_balancers/__init__.py @@ -17,9 +17,9 @@ from .monitor_update_params import MonitorUpdateParams as MonitorUpdateParams from .pool_preview_response import PoolPreviewResponse as PoolPreviewResponse from .load_balancing_monitor import LoadBalancingMonitor as LoadBalancingMonitor +from .load_balancing_preview import LoadBalancingPreview as LoadBalancingPreview from .monitor_preview_params import MonitorPreviewParams as MonitorPreviewParams from .monitor_delete_response import MonitorDeleteResponse as MonitorDeleteResponse from .monitor_preview_response import MonitorPreviewResponse as MonitorPreviewResponse from .pool_references_response import PoolReferencesResponse as PoolReferencesResponse from .monitor_references_response import MonitorReferencesResponse as MonitorReferencesResponse -from .load_balancing_preview_result import LoadBalancingPreviewResult as LoadBalancingPreviewResult diff --git a/src/cloudflare/types/user/load_balancers/load_balancing_preview.py b/src/cloudflare/types/user/load_balancers/load_balancing_preview.py new file mode 100644 index 00000000000..6ab9378796f --- /dev/null +++ b/src/cloudflare/types/user/load_balancers/load_balancing_preview.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional + +from ...._models import BaseModel + +__all__ = [ + "LoadBalancingPreview", + "LoadBalancingPreviewItem", + "LoadBalancingPreviewItemOriginLoadBalancingPreviewItemOriginItem", +] + + +class LoadBalancingPreviewItemOriginLoadBalancingPreviewItemOriginItem(BaseModel): + failure_reason: Optional[str] = None + + healthy: Optional[bool] = None + + response_code: Optional[float] = None + + rtt: Optional[str] = None + + +class LoadBalancingPreviewItem(BaseModel): + healthy: Optional[bool] = None + + origins: Optional[List[Dict[str, LoadBalancingPreviewItemOriginLoadBalancingPreviewItemOriginItem]]] = None + + +LoadBalancingPreview = Dict[str, LoadBalancingPreviewItem] diff --git a/src/cloudflare/types/user/load_balancers/load_balancing_preview_result.py b/src/cloudflare/types/user/load_balancers/load_balancing_preview_result.py deleted file mode 100644 index 36b9caff1f9..00000000000 --- a/src/cloudflare/types/user/load_balancers/load_balancing_preview_result.py +++ /dev/null @@ -1,32 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Dict, List, Optional - -from ...._models import BaseModel - -__all__ = [ - "LoadBalancingPreviewResult", - "LoadBalancingPreviewResultItem", - "LoadBalancingPreviewResultItemOriginLoadBalancingPreviewResultItemOriginItem", -] - - -class LoadBalancingPreviewResultItemOriginLoadBalancingPreviewResultItemOriginItem(BaseModel): - failure_reason: Optional[str] = None - - healthy: Optional[bool] = None - - response_code: Optional[float] = None - - rtt: Optional[str] = None - - -class LoadBalancingPreviewResultItem(BaseModel): - healthy: Optional[bool] = None - - origins: Optional[ - List[Dict[str, LoadBalancingPreviewResultItemOriginLoadBalancingPreviewResultItemOriginItem]] - ] = None - - -LoadBalancingPreviewResult = Dict[str, LoadBalancingPreviewResultItem] diff --git a/src/cloudflare/types/user/iam_organization.py b/src/cloudflare/types/user/organization.py similarity index 91% rename from src/cloudflare/types/user/iam_organization.py rename to src/cloudflare/types/user/organization.py index 1b19119847e..bd59f71e4b1 100644 --- a/src/cloudflare/types/user/iam_organization.py +++ b/src/cloudflare/types/user/organization.py @@ -5,10 +5,10 @@ from ..._models import BaseModel -__all__ = ["IamOrganization"] +__all__ = ["Organization"] -class IamOrganization(BaseModel): +class Organization(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/user/token_create_response.py b/src/cloudflare/types/user/token_create_response.py index ad048da9a38..45701a4c3f1 100644 --- a/src/cloudflare/types/user/token_create_response.py +++ b/src/cloudflare/types/user/token_create_response.py @@ -2,12 +2,12 @@ from typing import Optional -from .tokens import IamValue +from .tokens import TokenValue from ..._models import BaseModel __all__ = ["TokenCreateResponse"] class TokenCreateResponse(BaseModel): - value: Optional[IamValue] = None + value: Optional[TokenValue] = None """The token value.""" diff --git a/src/cloudflare/types/user/tokens/__init__.py b/src/cloudflare/types/user/tokens/__init__.py index 2a774675112..e8c83a2d8f5 100644 --- a/src/cloudflare/types/user/tokens/__init__.py +++ b/src/cloudflare/types/user/tokens/__init__.py @@ -2,6 +2,6 @@ from __future__ import annotations -from .iam_value import IamValue as IamValue +from .token_value import TokenValue as TokenValue from .value_update_params import ValueUpdateParams as ValueUpdateParams from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse diff --git a/src/cloudflare/types/user/tokens/iam_value.py b/src/cloudflare/types/user/tokens/token_value.py similarity index 67% rename from src/cloudflare/types/user/tokens/iam_value.py rename to src/cloudflare/types/user/tokens/token_value.py index ddfef5ce2fd..8087bf31b1e 100644 --- a/src/cloudflare/types/user/tokens/iam_value.py +++ b/src/cloudflare/types/user/tokens/token_value.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__all__ = ["IamValue"] +__all__ = ["TokenValue"] -IamValue = str +TokenValue = str diff --git a/src/cloudflare/types/waitingroom_waitingroom.py b/src/cloudflare/types/waiting_room.py similarity index 99% rename from src/cloudflare/types/waitingroom_waitingroom.py rename to src/cloudflare/types/waiting_room.py index 536b83b7bd6..7c45f1f0099 100644 --- a/src/cloudflare/types/waitingroom_waitingroom.py +++ b/src/cloudflare/types/waiting_room.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["WaitingroomWaitingroom", "AdditionalRoute", "CookieAttributes"] +__all__ = ["WaitingRoom", "AdditionalRoute", "CookieAttributes"] class AdditionalRoute(BaseModel): @@ -45,7 +45,7 @@ class CookieAttributes(BaseModel): """ -class WaitingroomWaitingroom(BaseModel): +class WaitingRoom(BaseModel): id: Optional[str] = None additional_routes: Optional[List[AdditionalRoute]] = None diff --git a/src/cloudflare/types/waiting_room_list_response.py b/src/cloudflare/types/waiting_room_list_response.py index daa10e8d86e..45a85780e8a 100644 --- a/src/cloudflare/types/waiting_room_list_response.py +++ b/src/cloudflare/types/waiting_room_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_waitingroom import WaitingroomWaitingroom +from .waiting_room import WaitingRoom __all__ = ["WaitingRoomListResponse"] -WaitingRoomListResponse = List[WaitingroomWaitingroom] +WaitingRoomListResponse = List[WaitingRoom] diff --git a/src/cloudflare/types/waiting_rooms/__init__.py b/src/cloudflare/types/waiting_rooms/__init__.py index 72609c243c3..0175c121a21 100644 --- a/src/cloudflare/types/waiting_rooms/__init__.py +++ b/src/cloudflare/types/waiting_rooms/__init__.py @@ -3,7 +3,9 @@ from __future__ import annotations from .rule_edit_params import RuleEditParams as RuleEditParams +from .waitingroom_rule import WaitingroomRule as WaitingroomRule from .event_edit_params import EventEditParams as EventEditParams +from .waitingroom_event import WaitingroomEvent as WaitingroomEvent from .rule_create_params import RuleCreateParams as RuleCreateParams from .rule_edit_response import RuleEditResponse as RuleEditResponse from .rule_list_response import RuleListResponse as RuleListResponse @@ -23,5 +25,3 @@ from .setting_edit_response import SettingEditResponse as SettingEditResponse from .setting_update_params import SettingUpdateParams as SettingUpdateParams from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse -from .waitingroom_rule_result import WaitingroomRuleResult as WaitingroomRuleResult -from .waitingroom_event_result import WaitingroomEventResult as WaitingroomEventResult diff --git a/src/cloudflare/types/waiting_rooms/event_list_response.py b/src/cloudflare/types/waiting_rooms/event_list_response.py index 19f8c01b4d9..1aae0ee87eb 100644 --- a/src/cloudflare/types/waiting_rooms/event_list_response.py +++ b/src/cloudflare/types/waiting_rooms/event_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_event_result import WaitingroomEventResult +from .waitingroom_event import WaitingroomEvent __all__ = ["EventListResponse"] -EventListResponse = List[WaitingroomEventResult] +EventListResponse = List[WaitingroomEvent] diff --git a/src/cloudflare/types/waiting_rooms/events/__init__.py b/src/cloudflare/types/waiting_rooms/events/__init__.py index fbada12d976..cbaf1d11ff9 100644 --- a/src/cloudflare/types/waiting_rooms/events/__init__.py +++ b/src/cloudflare/types/waiting_rooms/events/__init__.py @@ -2,4 +2,4 @@ from __future__ import annotations -from .waitingroom_event_details_result import WaitingroomEventDetailsResult as WaitingroomEventDetailsResult +from .waitingroom_event_details import WaitingroomEventDetails as WaitingroomEventDetails diff --git a/src/cloudflare/types/waiting_rooms/events/waitingroom_event_details_result.py b/src/cloudflare/types/waiting_rooms/events/waitingroom_event_details.py similarity index 95% rename from src/cloudflare/types/waiting_rooms/events/waitingroom_event_details_result.py rename to src/cloudflare/types/waiting_rooms/events/waitingroom_event_details.py index 4ddc57b358b..c366a49bc46 100644 --- a/src/cloudflare/types/waiting_rooms/events/waitingroom_event_details_result.py +++ b/src/cloudflare/types/waiting_rooms/events/waitingroom_event_details.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["WaitingroomEventDetailsResult"] +__all__ = ["WaitingroomEventDetails"] -class WaitingroomEventDetailsResult(BaseModel): +class WaitingroomEventDetails(BaseModel): id: Optional[str] = None created_on: Optional[datetime] = None diff --git a/src/cloudflare/types/waiting_rooms/rule_create_response.py b/src/cloudflare/types/waiting_rooms/rule_create_response.py index 1fbe888f362..0b669b7e5da 100644 --- a/src/cloudflare/types/waiting_rooms/rule_create_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_create_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_rule_result import WaitingroomRuleResult +from .waitingroom_rule import WaitingroomRule __all__ = ["RuleCreateResponse"] -RuleCreateResponse = List[WaitingroomRuleResult] +RuleCreateResponse = List[WaitingroomRule] diff --git a/src/cloudflare/types/waiting_rooms/rule_delete_response.py b/src/cloudflare/types/waiting_rooms/rule_delete_response.py index 2cdef8d6daa..6c5de05a3fe 100644 --- a/src/cloudflare/types/waiting_rooms/rule_delete_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_delete_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_rule_result import WaitingroomRuleResult +from .waitingroom_rule import WaitingroomRule __all__ = ["RuleDeleteResponse"] -RuleDeleteResponse = List[WaitingroomRuleResult] +RuleDeleteResponse = List[WaitingroomRule] diff --git a/src/cloudflare/types/waiting_rooms/rule_edit_response.py b/src/cloudflare/types/waiting_rooms/rule_edit_response.py index fb87c112337..326fed99592 100644 --- a/src/cloudflare/types/waiting_rooms/rule_edit_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_edit_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_rule_result import WaitingroomRuleResult +from .waitingroom_rule import WaitingroomRule __all__ = ["RuleEditResponse"] -RuleEditResponse = List[WaitingroomRuleResult] +RuleEditResponse = List[WaitingroomRule] diff --git a/src/cloudflare/types/waiting_rooms/rule_list_response.py b/src/cloudflare/types/waiting_rooms/rule_list_response.py index fbe306759ac..7b1cf806b3b 100644 --- a/src/cloudflare/types/waiting_rooms/rule_list_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_rule_result import WaitingroomRuleResult +from .waitingroom_rule import WaitingroomRule __all__ = ["RuleListResponse"] -RuleListResponse = List[WaitingroomRuleResult] +RuleListResponse = List[WaitingroomRule] diff --git a/src/cloudflare/types/waiting_rooms/rule_update_response.py b/src/cloudflare/types/waiting_rooms/rule_update_response.py index b16c2f6ba48..e3fb52ec9c0 100644 --- a/src/cloudflare/types/waiting_rooms/rule_update_response.py +++ b/src/cloudflare/types/waiting_rooms/rule_update_response.py @@ -2,8 +2,8 @@ from typing import List -from .waitingroom_rule_result import WaitingroomRuleResult +from .waitingroom_rule import WaitingroomRule __all__ = ["RuleUpdateResponse"] -RuleUpdateResponse = List[WaitingroomRuleResult] +RuleUpdateResponse = List[WaitingroomRule] diff --git a/src/cloudflare/types/waiting_rooms/waitingroom_event_result.py b/src/cloudflare/types/waiting_rooms/waitingroom_event.py similarity index 97% rename from src/cloudflare/types/waiting_rooms/waitingroom_event_result.py rename to src/cloudflare/types/waiting_rooms/waitingroom_event.py index bcd88b2ccbd..d44568e4b15 100644 --- a/src/cloudflare/types/waiting_rooms/waitingroom_event_result.py +++ b/src/cloudflare/types/waiting_rooms/waitingroom_event.py @@ -5,10 +5,10 @@ from ..._models import BaseModel -__all__ = ["WaitingroomEventResult"] +__all__ = ["WaitingroomEvent"] -class WaitingroomEventResult(BaseModel): +class WaitingroomEvent(BaseModel): id: Optional[str] = None created_on: Optional[datetime] = None diff --git a/src/cloudflare/types/waiting_rooms/waitingroom_rule_result.py b/src/cloudflare/types/waiting_rooms/waitingroom_rule.py similarity index 91% rename from src/cloudflare/types/waiting_rooms/waitingroom_rule_result.py rename to src/cloudflare/types/waiting_rooms/waitingroom_rule.py index 0109a1424e3..1d5a191aad7 100644 --- a/src/cloudflare/types/waiting_rooms/waitingroom_rule_result.py +++ b/src/cloudflare/types/waiting_rooms/waitingroom_rule.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["WaitingroomRuleResult"] +__all__ = ["WaitingroomRule"] -class WaitingroomRuleResult(BaseModel): +class WaitingroomRule(BaseModel): id: Optional[str] = None """The ID of the rule.""" diff --git a/src/cloudflare/types/web3/__init__.py b/src/cloudflare/types/web3/__init__.py index 82a69ca2b59..4e579bfc0e9 100644 --- a/src/cloudflare/types/web3/__init__.py +++ b/src/cloudflare/types/web3/__init__.py @@ -5,5 +5,5 @@ from .hostname_edit_params import HostnameEditParams as HostnameEditParams from .hostname_create_params import HostnameCreateParams as HostnameCreateParams from .hostname_list_response import HostnameListResponse as HostnameListResponse +from .distributed_web_hostname import DistributedWebHostname as DistributedWebHostname from .hostname_delete_response import HostnameDeleteResponse as HostnameDeleteResponse -from .dweb_config_web3_hostname import DwebConfigWeb3Hostname as DwebConfigWeb3Hostname diff --git a/src/cloudflare/types/web3/dweb_config_web3_hostname.py b/src/cloudflare/types/web3/distributed_web_hostname.py similarity index 91% rename from src/cloudflare/types/web3/dweb_config_web3_hostname.py rename to src/cloudflare/types/web3/distributed_web_hostname.py index 200263b8f0c..b52e645215e 100644 --- a/src/cloudflare/types/web3/dweb_config_web3_hostname.py +++ b/src/cloudflare/types/web3/distributed_web_hostname.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["DwebConfigWeb3Hostname"] +__all__ = ["DistributedWebHostname"] -class DwebConfigWeb3Hostname(BaseModel): +class DistributedWebHostname(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/web3/hostname_list_response.py b/src/cloudflare/types/web3/hostname_list_response.py index 83939e454b6..37188d53ac7 100644 --- a/src/cloudflare/types/web3/hostname_list_response.py +++ b/src/cloudflare/types/web3/hostname_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .dweb_config_web3_hostname import DwebConfigWeb3Hostname +from .distributed_web_hostname import DistributedWebHostname __all__ = ["HostnameListResponse"] -HostnameListResponse = List[DwebConfigWeb3Hostname] +HostnameListResponse = List[DistributedWebHostname] diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/__init__.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/__init__.py index d16e7c88bdf..d04e7354b66 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/__init__.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/__init__.py @@ -3,4 +3,4 @@ from __future__ import annotations from .content_list_update_params import ContentListUpdateParams as ContentListUpdateParams -from .dweb_config_content_list_details import DwebConfigContentListDetails as DwebConfigContentListDetails +from .distributed_web_config_content_list import DistributedWebConfigContentList as DistributedWebConfigContentList diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_params.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_params.py index d54f4145807..3f3fa96834b 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_params.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_list_update_params.py @@ -5,7 +5,7 @@ from typing import Iterable from typing_extensions import Literal, Required, TypedDict -from .content_lists import DwebConfigContentListEntryParam +from .content_lists import DistributedWebConfigContentListEntryParam __all__ = ["ContentListUpdateParams"] @@ -17,5 +17,5 @@ class ContentListUpdateParams(TypedDict, total=False): action: Required[Literal["block"]] """Behavior of the content list.""" - entries: Required[Iterable[DwebConfigContentListEntryParam]] + entries: Required[Iterable[DistributedWebConfigContentListEntryParam]] """Content list entries.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py index be10086a01f..45265480334 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/__init__.py @@ -6,5 +6,9 @@ from .entry_list_response import EntryListResponse as EntryListResponse from .entry_update_params import EntryUpdateParams as EntryUpdateParams from .entry_delete_response import EntryDeleteResponse as EntryDeleteResponse -from .dweb_config_content_list_entry import DwebConfigContentListEntry as DwebConfigContentListEntry -from .dweb_config_content_list_entry_param import DwebConfigContentListEntryParam as DwebConfigContentListEntryParam +from .distributed_web_config_content_list_entry import ( + DistributedWebConfigContentListEntry as DistributedWebConfigContentListEntry, +) +from .distributed_web_config_content_list_entry_param import ( + DistributedWebConfigContentListEntryParam as DistributedWebConfigContentListEntryParam, +) diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/distributed_web_config_content_list_entry.py similarity index 86% rename from src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry.py rename to src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/distributed_web_config_content_list_entry.py index 5f98311bb1d..c5fce5cb602 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/distributed_web_config_content_list_entry.py @@ -6,10 +6,10 @@ from ......_models import BaseModel -__all__ = ["DwebConfigContentListEntry"] +__all__ = ["DistributedWebConfigContentListEntry"] -class DwebConfigContentListEntry(BaseModel): +class DistributedWebConfigContentListEntry(BaseModel): id: Optional[str] = None """Identifier""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry_param.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/distributed_web_config_content_list_entry_param.py similarity index 76% rename from src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry_param.py rename to src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/distributed_web_config_content_list_entry_param.py index 998f0c4b478..807e005c31a 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/dweb_config_content_list_entry_param.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/distributed_web_config_content_list_entry_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, TypedDict -__all__ = ["DwebConfigContentListEntryParam"] +__all__ = ["DistributedWebConfigContentListEntryParam"] -class DwebConfigContentListEntryParam(TypedDict, total=False): +class DistributedWebConfigContentListEntryParam(TypedDict, total=False): content: str """CID or content path of content to block.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_list_response.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_list_response.py index 3ee9cb52b02..d7b9953cb39 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_list_response.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/content_lists/entry_list_response.py @@ -3,11 +3,11 @@ from typing import List, Optional from ......_models import BaseModel -from .dweb_config_content_list_entry import DwebConfigContentListEntry +from .distributed_web_config_content_list_entry import DistributedWebConfigContentListEntry __all__ = ["EntryListResponse"] class EntryListResponse(BaseModel): - entries: Optional[List[DwebConfigContentListEntry]] = None + entries: Optional[List[DistributedWebConfigContentListEntry]] = None """Content list entries.""" diff --git a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/dweb_config_content_list_details.py b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/distributed_web_config_content_list.py similarity index 74% rename from src/cloudflare/types/web3/hostnames/ipfs_universal_paths/dweb_config_content_list_details.py rename to src/cloudflare/types/web3/hostnames/ipfs_universal_paths/distributed_web_config_content_list.py index f342aec144c..8151db7cbce 100644 --- a/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/dweb_config_content_list_details.py +++ b/src/cloudflare/types/web3/hostnames/ipfs_universal_paths/distributed_web_config_content_list.py @@ -5,9 +5,9 @@ from ....._models import BaseModel -__all__ = ["DwebConfigContentListDetails"] +__all__ = ["DistributedWebConfigContentList"] -class DwebConfigContentListDetails(BaseModel): +class DistributedWebConfigContentList(BaseModel): action: Optional[Literal["block"]] = None """Behavior of the content list.""" diff --git a/src/cloudflare/types/workers/__init__.py b/src/cloudflare/types/workers/__init__.py index 1a8ac730f71..48267c12bb4 100644 --- a/src/cloudflare/types/workers/__init__.py +++ b/src/cloudflare/types/workers/__init__.py @@ -3,11 +3,11 @@ from __future__ import annotations from .ai_run_params import AIRunParams as AIRunParams +from .workers_route import WorkersRoute as WorkersRoute from .workers_domain import WorkersDomain as WorkersDomain -from .workers_routes import WorkersRoutes as WorkersRoutes +from .workers_filter import WorkersFilter as WorkersFilter from .workers_script import WorkersScript as WorkersScript from .ai_run_response import AIRunResponse as AIRunResponse -from .workers_filters import WorkersFilters as WorkersFilters from .domain_list_params import DomainListParams as DomainListParams from .route_create_params import RouteCreateParams as RouteCreateParams from .route_list_response import RouteListResponse as RouteListResponse diff --git a/src/cloudflare/types/workers/filter_list_response.py b/src/cloudflare/types/workers/filter_list_response.py index 318bfb24e34..e01ef8e5a05 100644 --- a/src/cloudflare/types/workers/filter_list_response.py +++ b/src/cloudflare/types/workers/filter_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .workers_filters import WorkersFilters +from .workers_filter import WorkersFilter __all__ = ["FilterListResponse"] -FilterListResponse = List[WorkersFilters] +FilterListResponse = List[WorkersFilter] diff --git a/src/cloudflare/types/workers/route_list_response.py b/src/cloudflare/types/workers/route_list_response.py index f34910d9fd1..0c238e3bfff 100644 --- a/src/cloudflare/types/workers/route_list_response.py +++ b/src/cloudflare/types/workers/route_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .workers_routes import WorkersRoutes +from .workers_route import WorkersRoute __all__ = ["RouteListResponse"] -RouteListResponse = List[WorkersRoutes] +RouteListResponse = List[WorkersRoute] diff --git a/src/cloudflare/types/workers/scripts/__init__.py b/src/cloudflare/types/workers/scripts/__init__.py index 34546806ebb..cff0ed258aa 100644 --- a/src/cloudflare/types/workers/scripts/__init__.py +++ b/src/cloudflare/types/workers/scripts/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .workers_binding import WorkersBinding as WorkersBinding from .tail_get_response import TailGetResponse as TailGetResponse from .setting_edit_params import SettingEditParams as SettingEditParams from .binding_get_response import BindingGetResponse as BindingGetResponse @@ -12,7 +13,6 @@ from .schedule_get_response import ScheduleGetResponse as ScheduleGetResponse from .setting_edit_response import SettingEditResponse as SettingEditResponse from .schedule_update_params import ScheduleUpdateParams as ScheduleUpdateParams -from .workers_schemas_binding import WorkersSchemasBinding as WorkersSchemasBinding from .schedule_update_response import ScheduleUpdateResponse as ScheduleUpdateResponse from .usage_model_get_response import UsageModelGetResponse as UsageModelGetResponse from .usage_model_update_params import UsageModelUpdateParams as UsageModelUpdateParams diff --git a/src/cloudflare/types/workers/scripts/binding_get_response.py b/src/cloudflare/types/workers/scripts/binding_get_response.py index 6dc77ce61b0..92532801f20 100644 --- a/src/cloudflare/types/workers/scripts/binding_get_response.py +++ b/src/cloudflare/types/workers/scripts/binding_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .workers_schemas_binding import WorkersSchemasBinding +from .workers_binding import WorkersBinding __all__ = ["BindingGetResponse"] -BindingGetResponse = List[WorkersSchemasBinding] +BindingGetResponse = List[WorkersBinding] diff --git a/src/cloudflare/types/workers/scripts/workers_schemas_binding.py b/src/cloudflare/types/workers/scripts/workers_binding.py similarity index 78% rename from src/cloudflare/types/workers/scripts/workers_schemas_binding.py rename to src/cloudflare/types/workers/scripts/workers_binding.py index 5ccc786c84b..f14b3ffbd68 100644 --- a/src/cloudflare/types/workers/scripts/workers_schemas_binding.py +++ b/src/cloudflare/types/workers/scripts/workers_binding.py @@ -5,7 +5,7 @@ from ...._models import BaseModel -__all__ = ["WorkersSchemasBinding", "WorkersKVNamespaceBinding", "WorkersWasmModuleBinding"] +__all__ = ["WorkersBinding", "WorkersKVNamespaceBinding", "WorkersWasmModuleBinding"] class WorkersKVNamespaceBinding(BaseModel): @@ -27,4 +27,4 @@ class WorkersWasmModuleBinding(BaseModel): """The class of resource that the binding provides.""" -WorkersSchemasBinding = Union[WorkersKVNamespaceBinding, WorkersWasmModuleBinding] +WorkersBinding = Union[WorkersKVNamespaceBinding, WorkersWasmModuleBinding] diff --git a/src/cloudflare/types/workers/workers_filters.py b/src/cloudflare/types/workers/workers_filter.py similarity index 75% rename from src/cloudflare/types/workers/workers_filters.py rename to src/cloudflare/types/workers/workers_filter.py index c007324c792..9d2862df88c 100644 --- a/src/cloudflare/types/workers/workers_filters.py +++ b/src/cloudflare/types/workers/workers_filter.py @@ -2,10 +2,10 @@ from ..._models import BaseModel -__all__ = ["WorkersFilters"] +__all__ = ["WorkersFilter"] -class WorkersFilters(BaseModel): +class WorkersFilter(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/workers/workers_routes.py b/src/cloudflare/types/workers/workers_route.py similarity index 81% rename from src/cloudflare/types/workers/workers_routes.py rename to src/cloudflare/types/workers/workers_route.py index 3b33cf0d6b3..85b33f5124c 100644 --- a/src/cloudflare/types/workers/workers_routes.py +++ b/src/cloudflare/types/workers/workers_route.py @@ -2,10 +2,10 @@ from ..._models import BaseModel -__all__ = ["WorkersRoutes"] +__all__ = ["WorkersRoute"] -class WorkersRoutes(BaseModel): +class WorkersRoute(BaseModel): id: str """Identifier""" diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/__init__.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/__init__.py index 7e1b5b4a22a..e80f466f64f 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/__init__.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/__init__.py @@ -4,4 +4,6 @@ from .script_delete_params import ScriptDeleteParams as ScriptDeleteParams from .script_update_params import ScriptUpdateParams as ScriptUpdateParams -from .workers_namespace_script import WorkersNamespaceScript as WorkersNamespaceScript +from .workers_for_platforms_namespace_script import ( + WorkersForPlatformsNamespaceScript as WorkersForPlatformsNamespaceScript, +) diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_namespace_script.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py similarity index 84% rename from src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_namespace_script.py rename to src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py index e14b023f9e0..0b9fcd58016 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_namespace_script.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespaces/workers_for_platforms_namespace_script.py @@ -6,10 +6,10 @@ from ....workers import WorkersScript from ....._models import BaseModel -__all__ = ["WorkersNamespaceScript"] +__all__ = ["WorkersForPlatformsNamespaceScript"] -class WorkersNamespaceScript(BaseModel): +class WorkersForPlatformsNamespaceScript(BaseModel): created_on: Optional[datetime] = None """When the script was created.""" diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py index 5fea2a58132..ee029326e27 100644 --- a/src/cloudflare/types/zero_trust/__init__.py +++ b/src/cloudflare/types/zero_trust/__init__.py @@ -2,25 +2,25 @@ from __future__ import annotations -from .access_seats import AccessSeats as AccessSeats from .seat_edit_params import SeatEditParams as SeatEditParams +from .zero_trust_seats import ZeroTrustSeats as ZeroTrustSeats from .seat_edit_response import SeatEditResponse as SeatEditResponse from .tunnel_argo_tunnel import TunnelArgoTunnel as TunnelArgoTunnel from .tunnel_edit_params import TunnelEditParams as TunnelEditParams from .tunnel_list_params import TunnelListParams as TunnelListParams +from .zero_trust_devices import ZeroTrustDevices as ZeroTrustDevices from .device_get_response import DeviceGetResponse as DeviceGetResponse -from .access_organizations import AccessOrganizations as AccessOrganizations from .device_list_response import DeviceListResponse as DeviceListResponse from .tunnel_create_params import TunnelCreateParams as TunnelCreateParams from .tunnel_delete_params import TunnelDeleteParams as TunnelDeleteParams from .tunnel_edit_response import TunnelEditResponse as TunnelEditResponse from .tunnel_list_response import TunnelListResponse as TunnelListResponse from .gateway_list_response import GatewayListResponse as GatewayListResponse -from .teams_devices_devices import TeamsDevicesDevices as TeamsDevicesDevices from .gateway_create_response import GatewayCreateResponse as GatewayCreateResponse -from .access_identity_providers import AccessIdentityProviders as AccessIdentityProviders +from .zero_trust_organizations import ZeroTrustOrganizations as ZeroTrustOrganizations from .organization_create_params import OrganizationCreateParams as OrganizationCreateParams from .organization_update_params import OrganizationUpdateParams as OrganizationUpdateParams +from .zero_trust_identity_providers import ZeroTrustIdentityProviders as ZeroTrustIdentityProviders from .identity_provider_create_params import IdentityProviderCreateParams as IdentityProviderCreateParams from .identity_provider_list_response import IdentityProviderListResponse as IdentityProviderListResponse from .identity_provider_update_params import IdentityProviderUpdateParams as IdentityProviderUpdateParams diff --git a/src/cloudflare/types/zero_trust/access/__init__.py b/src/cloudflare/types/zero_trust/access/__init__.py index dea6ed1be1a..7f01f1a80df 100644 --- a/src/cloudflare/types/zero_trust/access/__init__.py +++ b/src/cloudflare/types/zero_trust/access/__init__.py @@ -2,28 +2,27 @@ from __future__ import annotations -from .access_tag import AccessTag as AccessTag -from .access_apps import AccessApps as AccessApps -from .access_users import AccessUsers as AccessUsers -from .access_groups import AccessGroups as AccessGroups -from .access_bookmarks import AccessBookmarks as AccessBookmarks +from .zero_trust_tag import ZeroTrustTag as ZeroTrustTag +from .zero_trust_apps import ZeroTrustApps as ZeroTrustApps from .key_get_response import KeyGetResponse as KeyGetResponse +from .zero_trust_users import ZeroTrustUsers as ZeroTrustUsers from .key_update_params import KeyUpdateParams as KeyUpdateParams from .tag_create_params import TagCreateParams as TagCreateParams from .tag_list_response import TagListResponse as TagListResponse from .tag_update_params import TagUpdateParams as TagUpdateParams -from .access_custom_page import AccessCustomPage as AccessCustomPage +from .zero_trust_groups import ZeroTrustGroups as ZeroTrustGroups from .user_list_response import UserListResponse as UserListResponse -from .access_certificates import AccessCertificates as AccessCertificates from .group_create_params import GroupCreateParams as GroupCreateParams from .group_list_response import GroupListResponse as GroupListResponse from .group_update_params import GroupUpdateParams as GroupUpdateParams from .key_rotate_response import KeyRotateResponse as KeyRotateResponse from .key_update_response import KeyUpdateResponse as KeyUpdateResponse from .tag_delete_response import TagDeleteResponse as TagDeleteResponse -from .access_service_tokens import AccessServiceTokens as AccessServiceTokens +from .zero_trust_bookmarks import ZeroTrustBookmarks as ZeroTrustBookmarks from .group_delete_response import GroupDeleteResponse as GroupDeleteResponse from .bookmark_list_response import BookmarkListResponse as BookmarkListResponse +from .zero_trust_custom_page import ZeroTrustCustomPage as ZeroTrustCustomPage +from .zero_trust_certificates import ZeroTrustCertificates as ZeroTrustCertificates from .bookmark_delete_response import BookmarkDeleteResponse as BookmarkDeleteResponse from .application_create_params import ApplicationCreateParams as ApplicationCreateParams from .application_list_response import ApplicationListResponse as ApplicationListResponse @@ -34,6 +33,7 @@ from .custom_page_create_params import CustomPageCreateParams as CustomPageCreateParams from .custom_page_list_response import CustomPageListResponse as CustomPageListResponse from .custom_page_update_params import CustomPageUpdateParams as CustomPageUpdateParams +from .zero_trust_service_tokens import ZeroTrustServiceTokens as ZeroTrustServiceTokens from .application_delete_response import ApplicationDeleteResponse as ApplicationDeleteResponse from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse from .custom_page_delete_response import CustomPageDeleteResponse as CustomPageDeleteResponse @@ -42,4 +42,4 @@ from .service_token_update_params import ServiceTokenUpdateParams as ServiceTokenUpdateParams from .service_token_create_response import ServiceTokenCreateResponse as ServiceTokenCreateResponse from .service_token_rotate_response import ServiceTokenRotateResponse as ServiceTokenRotateResponse -from .access_custom_page_without_html import AccessCustomPageWithoutHTML as AccessCustomPageWithoutHTML +from .zero_trust_custom_page_without_html import ZeroTrustCustomPageWithoutHTML as ZeroTrustCustomPageWithoutHTML diff --git a/src/cloudflare/types/zero_trust/access/application_list_response.py b/src/cloudflare/types/zero_trust/access/application_list_response.py index 7df1894f21e..910868ea87c 100644 --- a/src/cloudflare/types/zero_trust/access/application_list_response.py +++ b/src/cloudflare/types/zero_trust/access/application_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_apps import AccessApps +from .zero_trust_apps import ZeroTrustApps __all__ = ["ApplicationListResponse"] -ApplicationListResponse = List[AccessApps] +ApplicationListResponse = List[ZeroTrustApps] diff --git a/src/cloudflare/types/zero_trust/access/applications/__init__.py b/src/cloudflare/types/zero_trust/access/applications/__init__.py index 2271b1d1f0a..a4ca1c2cdb4 100644 --- a/src/cloudflare/types/zero_trust/access/applications/__init__.py +++ b/src/cloudflare/types/zero_trust/access/applications/__init__.py @@ -2,12 +2,12 @@ from __future__ import annotations -from .access_ca import AccessCA as AccessCA -from .access_policies import AccessPolicies as AccessPolicies +from .zero_trust_ca import ZeroTrustCA as ZeroTrustCA from .ca_get_response import CAGetResponse as CAGetResponse from .ca_list_response import CAListResponse as CAListResponse from .ca_create_response import CACreateResponse as CACreateResponse from .ca_delete_response import CADeleteResponse as CADeleteResponse +from .zero_trust_policies import ZeroTrustPolicies as ZeroTrustPolicies from .policy_create_params import PolicyCreateParams as PolicyCreateParams from .policy_list_response import PolicyListResponse as PolicyListResponse from .policy_update_params import PolicyUpdateParams as PolicyUpdateParams diff --git a/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py b/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py index a0e37efd9cb..9c1eb6e62bc 100644 --- a/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py +++ b/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_ca import AccessCA +from .zero_trust_ca import ZeroTrustCA __all__ = ["CAListResponse"] -CAListResponse = List[AccessCA] +CAListResponse = List[ZeroTrustCA] diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py b/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py index 63e1b835286..8413c1af279 100644 --- a/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py +++ b/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_policies import AccessPolicies +from .zero_trust_policies import ZeroTrustPolicies __all__ = ["PolicyListResponse"] -PolicyListResponse = List[AccessPolicies] +PolicyListResponse = List[ZeroTrustPolicies] diff --git a/src/cloudflare/types/zero_trust/access/applications/access_ca.py b/src/cloudflare/types/zero_trust/access/applications/zero_trust_ca.py similarity index 88% rename from src/cloudflare/types/zero_trust/access/applications/access_ca.py rename to src/cloudflare/types/zero_trust/access/applications/zero_trust_ca.py index 249bc64a2df..ab676fbdc23 100644 --- a/src/cloudflare/types/zero_trust/access/applications/access_ca.py +++ b/src/cloudflare/types/zero_trust/access/applications/zero_trust_ca.py @@ -4,10 +4,10 @@ from ....._models import BaseModel -__all__ = ["AccessCA"] +__all__ = ["ZeroTrustCA"] -class AccessCA(BaseModel): +class ZeroTrustCA(BaseModel): id: Optional[str] = None """The ID of the CA.""" diff --git a/src/cloudflare/types/zero_trust/access/applications/access_policies.py b/src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py similarity index 99% rename from src/cloudflare/types/zero_trust/access/applications/access_policies.py rename to src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py index 12c88668269..ff50f127132 100644 --- a/src/cloudflare/types/zero_trust/access/applications/access_policies.py +++ b/src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py @@ -9,7 +9,7 @@ from ....._models import BaseModel __all__ = [ - "AccessPolicies", + "ZeroTrustPolicies", "ApprovalGroup", "Exclude", "ExcludeAccessEmailRule", @@ -745,7 +745,7 @@ class RequireAccessDevicePostureRule(BaseModel): ] -class AccessPolicies(BaseModel): +class ZeroTrustPolicies(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/zero_trust/access/bookmark_list_response.py b/src/cloudflare/types/zero_trust/access/bookmark_list_response.py index 0b0603c5b7f..50bdaeafc83 100644 --- a/src/cloudflare/types/zero_trust/access/bookmark_list_response.py +++ b/src/cloudflare/types/zero_trust/access/bookmark_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_bookmarks import AccessBookmarks +from .zero_trust_bookmarks import ZeroTrustBookmarks __all__ = ["BookmarkListResponse"] -BookmarkListResponse = List[AccessBookmarks] +BookmarkListResponse = List[ZeroTrustBookmarks] diff --git a/src/cloudflare/types/zero_trust/access/certificate_list_response.py b/src/cloudflare/types/zero_trust/access/certificate_list_response.py index 2af2ca789fe..4366d11dd0b 100644 --- a/src/cloudflare/types/zero_trust/access/certificate_list_response.py +++ b/src/cloudflare/types/zero_trust/access/certificate_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_certificates import AccessCertificates +from .zero_trust_certificates import ZeroTrustCertificates __all__ = ["CertificateListResponse"] -CertificateListResponse = List[AccessCertificates] +CertificateListResponse = List[ZeroTrustCertificates] diff --git a/src/cloudflare/types/zero_trust/access/certificates/__init__.py b/src/cloudflare/types/zero_trust/access/certificates/__init__.py index 6ddb639a7f7..24e86cca8a5 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/__init__.py +++ b/src/cloudflare/types/zero_trust/access/certificates/__init__.py @@ -2,8 +2,8 @@ from __future__ import annotations -from .access_settings import AccessSettings as AccessSettings +from .zero_trust_settings import ZeroTrustSettings as ZeroTrustSettings from .setting_get_response import SettingGetResponse as SettingGetResponse -from .access_settings_param import AccessSettingsParam as AccessSettingsParam from .setting_update_params import SettingUpdateParams as SettingUpdateParams from .setting_update_response import SettingUpdateResponse as SettingUpdateResponse +from .zero_trust_settings_param import ZeroTrustSettingsParam as ZeroTrustSettingsParam diff --git a/src/cloudflare/types/zero_trust/access/certificates/setting_get_response.py b/src/cloudflare/types/zero_trust/access/certificates/setting_get_response.py index dab55db879f..ff1630df053 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/setting_get_response.py +++ b/src/cloudflare/types/zero_trust/access/certificates/setting_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_settings import AccessSettings +from .zero_trust_settings import ZeroTrustSettings __all__ = ["SettingGetResponse"] -SettingGetResponse = List[AccessSettings] +SettingGetResponse = List[ZeroTrustSettings] diff --git a/src/cloudflare/types/zero_trust/access/certificates/setting_update_params.py b/src/cloudflare/types/zero_trust/access/certificates/setting_update_params.py index 058e03f2112..47e314677b8 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/setting_update_params.py +++ b/src/cloudflare/types/zero_trust/access/certificates/setting_update_params.py @@ -5,13 +5,13 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .access_settings_param import AccessSettingsParam +from .zero_trust_settings_param import ZeroTrustSettingsParam __all__ = ["SettingUpdateParams"] class SettingUpdateParams(TypedDict, total=False): - settings: Required[Iterable[AccessSettingsParam]] + settings: Required[Iterable[ZeroTrustSettingsParam]] account_id: str """The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.""" diff --git a/src/cloudflare/types/zero_trust/access/certificates/setting_update_response.py b/src/cloudflare/types/zero_trust/access/certificates/setting_update_response.py index 211bdb95b6e..c13e095df93 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/setting_update_response.py +++ b/src/cloudflare/types/zero_trust/access/certificates/setting_update_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_settings import AccessSettings +from .zero_trust_settings import ZeroTrustSettings __all__ = ["SettingUpdateResponse"] -SettingUpdateResponse = List[AccessSettings] +SettingUpdateResponse = List[ZeroTrustSettings] diff --git a/src/cloudflare/types/zero_trust/access/certificates/access_settings.py b/src/cloudflare/types/zero_trust/access/certificates/zero_trust_settings.py similarity index 90% rename from src/cloudflare/types/zero_trust/access/certificates/access_settings.py rename to src/cloudflare/types/zero_trust/access/certificates/zero_trust_settings.py index d47c4191b09..76f7bf04f6a 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/access_settings.py +++ b/src/cloudflare/types/zero_trust/access/certificates/zero_trust_settings.py @@ -2,10 +2,10 @@ from ....._models import BaseModel -__all__ = ["AccessSettings"] +__all__ = ["ZeroTrustSettings"] -class AccessSettings(BaseModel): +class ZeroTrustSettings(BaseModel): china_network: bool """Request client certificates for this hostname in China. diff --git a/src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py b/src/cloudflare/types/zero_trust/access/certificates/zero_trust_settings_param.py similarity index 88% rename from src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py rename to src/cloudflare/types/zero_trust/access/certificates/zero_trust_settings_param.py index baaa389ded8..c435a987681 100644 --- a/src/cloudflare/types/zero_trust/access/certificates/access_settings_param.py +++ b/src/cloudflare/types/zero_trust/access/certificates/zero_trust_settings_param.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["AccessSettingsParam"] +__all__ = ["ZeroTrustSettingsParam"] -class AccessSettingsParam(TypedDict, total=False): +class ZeroTrustSettingsParam(TypedDict, total=False): china_network: Required[bool] """Request client certificates for this hostname in China. diff --git a/src/cloudflare/types/zero_trust/access/custom_page_list_response.py b/src/cloudflare/types/zero_trust/access/custom_page_list_response.py index 1916ec53e64..2f7128ef608 100644 --- a/src/cloudflare/types/zero_trust/access/custom_page_list_response.py +++ b/src/cloudflare/types/zero_trust/access/custom_page_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_custom_page_without_html import AccessCustomPageWithoutHTML +from .zero_trust_custom_page_without_html import ZeroTrustCustomPageWithoutHTML __all__ = ["CustomPageListResponse"] -CustomPageListResponse = List[AccessCustomPageWithoutHTML] +CustomPageListResponse = List[ZeroTrustCustomPageWithoutHTML] diff --git a/src/cloudflare/types/zero_trust/access/group_list_response.py b/src/cloudflare/types/zero_trust/access/group_list_response.py index 843d41e50f7..75d9ddeea05 100644 --- a/src/cloudflare/types/zero_trust/access/group_list_response.py +++ b/src/cloudflare/types/zero_trust/access/group_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_groups import AccessGroups +from .zero_trust_groups import ZeroTrustGroups __all__ = ["GroupListResponse"] -GroupListResponse = List[AccessGroups] +GroupListResponse = List[ZeroTrustGroups] diff --git a/src/cloudflare/types/zero_trust/access/logs/__init__.py b/src/cloudflare/types/zero_trust/access/logs/__init__.py index 0bcd61f9486..3877a88828f 100644 --- a/src/cloudflare/types/zero_trust/access/logs/__init__.py +++ b/src/cloudflare/types/zero_trust/access/logs/__init__.py @@ -2,5 +2,5 @@ from __future__ import annotations -from .access_access_requests import AccessAccessRequests as AccessAccessRequests +from .zero_trust_access_requests import ZeroTrustAccessRequests as ZeroTrustAccessRequests from .access_request_list_response import AccessRequestListResponse as AccessRequestListResponse diff --git a/src/cloudflare/types/zero_trust/access/logs/access_request_list_response.py b/src/cloudflare/types/zero_trust/access/logs/access_request_list_response.py index 131ad38b0b7..698535e88d5 100644 --- a/src/cloudflare/types/zero_trust/access/logs/access_request_list_response.py +++ b/src/cloudflare/types/zero_trust/access/logs/access_request_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_access_requests import AccessAccessRequests +from .zero_trust_access_requests import ZeroTrustAccessRequests __all__ = ["AccessRequestListResponse"] -AccessRequestListResponse = List[AccessAccessRequests] +AccessRequestListResponse = List[ZeroTrustAccessRequests] diff --git a/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py b/src/cloudflare/types/zero_trust/access/logs/zero_trust_access_requests.py similarity index 92% rename from src/cloudflare/types/zero_trust/access/logs/access_access_requests.py rename to src/cloudflare/types/zero_trust/access/logs/zero_trust_access_requests.py index 2bd62237d42..f3467107fc2 100644 --- a/src/cloudflare/types/zero_trust/access/logs/access_access_requests.py +++ b/src/cloudflare/types/zero_trust/access/logs/zero_trust_access_requests.py @@ -7,10 +7,10 @@ from ....._models import BaseModel -__all__ = ["AccessAccessRequests"] +__all__ = ["ZeroTrustAccessRequests"] -class AccessAccessRequests(BaseModel): +class ZeroTrustAccessRequests(BaseModel): action: Optional[str] = None """The event that occurred, such as a login attempt.""" diff --git a/src/cloudflare/types/zero_trust/access/service_token_list_response.py b/src/cloudflare/types/zero_trust/access/service_token_list_response.py index 074e0dafdf4..ec616ff266b 100644 --- a/src/cloudflare/types/zero_trust/access/service_token_list_response.py +++ b/src/cloudflare/types/zero_trust/access/service_token_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_service_tokens import AccessServiceTokens +from .zero_trust_service_tokens import ZeroTrustServiceTokens __all__ = ["ServiceTokenListResponse"] -ServiceTokenListResponse = List[AccessServiceTokens] +ServiceTokenListResponse = List[ZeroTrustServiceTokens] diff --git a/src/cloudflare/types/zero_trust/access/tag_list_response.py b/src/cloudflare/types/zero_trust/access/tag_list_response.py index 4a505781d40..727b975fce5 100644 --- a/src/cloudflare/types/zero_trust/access/tag_list_response.py +++ b/src/cloudflare/types/zero_trust/access/tag_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_tag import AccessTag +from .zero_trust_tag import ZeroTrustTag __all__ = ["TagListResponse"] -TagListResponse = List[AccessTag] +TagListResponse = List[ZeroTrustTag] diff --git a/src/cloudflare/types/zero_trust/access/user_list_response.py b/src/cloudflare/types/zero_trust/access/user_list_response.py index f3388c0c938..255083b287b 100644 --- a/src/cloudflare/types/zero_trust/access/user_list_response.py +++ b/src/cloudflare/types/zero_trust/access/user_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_users import AccessUsers +from .zero_trust_users import ZeroTrustUsers __all__ = ["UserListResponse"] -UserListResponse = List[AccessUsers] +UserListResponse = List[ZeroTrustUsers] diff --git a/src/cloudflare/types/zero_trust/access/users/__init__.py b/src/cloudflare/types/zero_trust/access/users/__init__.py index 4927319efba..5d2c3738998 100644 --- a/src/cloudflare/types/zero_trust/access/users/__init__.py +++ b/src/cloudflare/types/zero_trust/access/users/__init__.py @@ -2,7 +2,7 @@ from __future__ import annotations -from .access_identity import AccessIdentity as AccessIdentity +from .zero_trust_identity import ZeroTrustIdentity as ZeroTrustIdentity from .failed_login_list_response import FailedLoginListResponse as FailedLoginListResponse from .active_session_get_response import ActiveSessionGetResponse as ActiveSessionGetResponse from .active_session_list_response import ActiveSessionListResponse as ActiveSessionListResponse diff --git a/src/cloudflare/types/zero_trust/access/users/access_identity.py b/src/cloudflare/types/zero_trust/access/users/zero_trust_identity.py similarity index 92% rename from src/cloudflare/types/zero_trust/access/users/access_identity.py rename to src/cloudflare/types/zero_trust/access/users/zero_trust_identity.py index 52d88843015..8411f8fe6dd 100644 --- a/src/cloudflare/types/zero_trust/access/users/access_identity.py +++ b/src/cloudflare/types/zero_trust/access/users/zero_trust_identity.py @@ -6,7 +6,7 @@ from ....._models import BaseModel -__all__ = ["AccessIdentity", "DeviceSessions", "DevicePosture", "DevicePostureCheck", "Geo", "IDP", "MTLSAuth"] +__all__ = ["ZeroTrustIdentity", "DeviceSessions", "DevicePosture", "DevicePostureCheck", "Geo", "IDP", "MTLSAuth"] class DeviceSessions(BaseModel): @@ -61,7 +61,7 @@ class MTLSAuth(BaseModel): cert_serial: Optional[str] = None -class AccessIdentity(BaseModel): +class ZeroTrustIdentity(BaseModel): account_id: Optional[str] = None auth_status: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/access/access_apps.py b/src/cloudflare/types/zero_trust/access/zero_trust_apps.py similarity index 99% rename from src/cloudflare/types/zero_trust/access/access_apps.py rename to src/cloudflare/types/zero_trust/access/zero_trust_apps.py index 80c738b59a7..b0160e4ce25 100644 --- a/src/cloudflare/types/zero_trust/access/access_apps.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_apps.py @@ -7,7 +7,7 @@ from ...._models import BaseModel __all__ = [ - "AccessApps", + "ZeroTrustApps", "SelfHostedApplication", "SelfHostedApplicationCorsHeaders", "SaaSApplication", @@ -827,7 +827,7 @@ class BookmarkApplication(BaseModel): updated_at: Optional[datetime] = None -AccessApps = Union[ +ZeroTrustApps = Union[ SelfHostedApplication, SaaSApplication, BrowserSSHApplication, diff --git a/src/cloudflare/types/zero_trust/access/access_bookmarks.py b/src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py similarity index 91% rename from src/cloudflare/types/zero_trust/access/access_bookmarks.py rename to src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py index d648d178647..4d760428841 100644 --- a/src/cloudflare/types/zero_trust/access/access_bookmarks.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["AccessBookmarks"] +__all__ = ["ZeroTrustBookmarks"] -class AccessBookmarks(BaseModel): +class ZeroTrustBookmarks(BaseModel): id: Optional[object] = None """The unique identifier for the Bookmark application.""" diff --git a/src/cloudflare/types/zero_trust/access/access_certificates.py b/src/cloudflare/types/zero_trust/access/zero_trust_certificates.py similarity index 90% rename from src/cloudflare/types/zero_trust/access/access_certificates.py rename to src/cloudflare/types/zero_trust/access/zero_trust_certificates.py index 49f5b5729c9..94eeacc0530 100644 --- a/src/cloudflare/types/zero_trust/access/access_certificates.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_certificates.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["AccessCertificates"] +__all__ = ["ZeroTrustCertificates"] -class AccessCertificates(BaseModel): +class ZeroTrustCertificates(BaseModel): id: Optional[object] = None """The ID of the application that will use this certificate.""" diff --git a/src/cloudflare/types/zero_trust/access/access_custom_page.py b/src/cloudflare/types/zero_trust/access/zero_trust_custom_page.py similarity index 89% rename from src/cloudflare/types/zero_trust/access/access_custom_page.py rename to src/cloudflare/types/zero_trust/access/zero_trust_custom_page.py index 4b7b0ab4688..cb9da69fd4b 100644 --- a/src/cloudflare/types/zero_trust/access/access_custom_page.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_custom_page.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["AccessCustomPage"] +__all__ = ["ZeroTrustCustomPage"] -class AccessCustomPage(BaseModel): +class ZeroTrustCustomPage(BaseModel): custom_html: str """Custom page HTML.""" diff --git a/src/cloudflare/types/zero_trust/access/access_custom_page_without_html.py b/src/cloudflare/types/zero_trust/access/zero_trust_custom_page_without_html.py similarity index 85% rename from src/cloudflare/types/zero_trust/access/access_custom_page_without_html.py rename to src/cloudflare/types/zero_trust/access/zero_trust_custom_page_without_html.py index b64e460a9aa..3bd6d73efa2 100644 --- a/src/cloudflare/types/zero_trust/access/access_custom_page_without_html.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_custom_page_without_html.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["AccessCustomPageWithoutHTML"] +__all__ = ["ZeroTrustCustomPageWithoutHTML"] -class AccessCustomPageWithoutHTML(BaseModel): +class ZeroTrustCustomPageWithoutHTML(BaseModel): name: str """Custom page name.""" diff --git a/src/cloudflare/types/zero_trust/access/access_groups.py b/src/cloudflare/types/zero_trust/access/zero_trust_groups.py similarity index 99% rename from src/cloudflare/types/zero_trust/access/access_groups.py rename to src/cloudflare/types/zero_trust/access/zero_trust_groups.py index 17883bcbb58..f7cde2ccddb 100644 --- a/src/cloudflare/types/zero_trust/access/access_groups.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_groups.py @@ -8,7 +8,7 @@ from ...._models import BaseModel __all__ = [ - "AccessGroups", + "ZeroTrustGroups", "Exclude", "ExcludeAccessEmailRule", "ExcludeAccessEmailRuleEmail", @@ -974,7 +974,7 @@ class RequireAccessDevicePostureRule(BaseModel): ] -class AccessGroups(BaseModel): +class ZeroTrustGroups(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/zero_trust/access/access_service_tokens.py b/src/cloudflare/types/zero_trust/access/zero_trust_service_tokens.py similarity index 91% rename from src/cloudflare/types/zero_trust/access/access_service_tokens.py rename to src/cloudflare/types/zero_trust/access/zero_trust_service_tokens.py index 5b2eb82df57..7a521c84758 100644 --- a/src/cloudflare/types/zero_trust/access/access_service_tokens.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_service_tokens.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["AccessServiceTokens"] +__all__ = ["ZeroTrustServiceTokens"] -class AccessServiceTokens(BaseModel): +class ZeroTrustServiceTokens(BaseModel): id: Optional[object] = None """The ID of the service token.""" diff --git a/src/cloudflare/types/zero_trust/access/access_tag.py b/src/cloudflare/types/zero_trust/access/zero_trust_tag.py similarity index 87% rename from src/cloudflare/types/zero_trust/access/access_tag.py rename to src/cloudflare/types/zero_trust/access/zero_trust_tag.py index e5de0f5a2dd..0c6838a56ae 100644 --- a/src/cloudflare/types/zero_trust/access/access_tag.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_tag.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["AccessTag"] +__all__ = ["ZeroTrustTag"] -class AccessTag(BaseModel): +class ZeroTrustTag(BaseModel): name: str """The name of the tag""" diff --git a/src/cloudflare/types/zero_trust/access/access_users.py b/src/cloudflare/types/zero_trust/access/zero_trust_users.py similarity index 94% rename from src/cloudflare/types/zero_trust/access/access_users.py rename to src/cloudflare/types/zero_trust/access/zero_trust_users.py index 77d28273de7..dc771a52d92 100644 --- a/src/cloudflare/types/zero_trust/access/access_users.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_users.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["AccessUsers"] +__all__ = ["ZeroTrustUsers"] -class AccessUsers(BaseModel): +class ZeroTrustUsers(BaseModel): id: Optional[str] = None """UUID""" diff --git a/src/cloudflare/types/zero_trust/device_list_response.py b/src/cloudflare/types/zero_trust/device_list_response.py index 401849a0f91..6d4470567bd 100644 --- a/src/cloudflare/types/zero_trust/device_list_response.py +++ b/src/cloudflare/types/zero_trust/device_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_devices import TeamsDevicesDevices +from .zero_trust_devices import ZeroTrustDevices __all__ = ["DeviceListResponse"] -DeviceListResponse = List[TeamsDevicesDevices] +DeviceListResponse = List[ZeroTrustDevices] diff --git a/src/cloudflare/types/zero_trust/devices/__init__.py b/src/cloudflare/types/zero_trust/devices/__init__.py index dafac0cab78..e2c73206405 100644 --- a/src/cloudflare/types/zero_trust/devices/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/__init__.py @@ -3,9 +3,11 @@ from __future__ import annotations from .policy_edit_params import PolicyEditParams as PolicyEditParams +from .device_posture_rules import DevicePostureRules as DevicePostureRules from .policy_create_params import PolicyCreateParams as PolicyCreateParams from .policy_list_response import PolicyListResponse as PolicyListResponse from .revoke_create_params import RevokeCreateParams as RevokeCreateParams +from .dex_test_schemas_http import DEXTestSchemasHTTP as DEXTestSchemasHTTP from .network_create_params import NetworkCreateParams as NetworkCreateParams from .network_list_response import NetworkListResponse as NetworkListResponse from .network_update_params import NetworkUpdateParams as NetworkUpdateParams @@ -19,19 +21,11 @@ from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse from .revoke_create_response import RevokeCreateResponse as RevokeCreateResponse from .unrevoke_create_params import UnrevokeCreateParams as UnrevokeCreateParams +from .device_managed_networks import DeviceManagedNetworks as DeviceManagedNetworks from .network_delete_response import NetworkDeleteResponse as NetworkDeleteResponse from .posture_delete_response import PostureDeleteResponse as PostureDeleteResponse from .dex_test_delete_response import DEXTestDeleteResponse as DEXTestDeleteResponse from .unrevoke_create_response import UnrevokeCreateResponse as UnrevokeCreateResponse from .override_code_list_response import OverrideCodeListResponse as OverrideCodeListResponse -from .teams_devices_device_posture_rules import TeamsDevicesDevicePostureRules as TeamsDevicesDevicePostureRules -from .teams_devices_device_settings_policy import TeamsDevicesDeviceSettingsPolicy as TeamsDevicesDeviceSettingsPolicy -from .teams_devices_device_managed_networks import ( - TeamsDevicesDeviceManagedNetworks as TeamsDevicesDeviceManagedNetworks, -) -from .teams_devices_device_dex_test_schemas_http import ( - TeamsDevicesDeviceDEXTestSchemasHTTP as TeamsDevicesDeviceDEXTestSchemasHTTP, -) -from .teams_devices_zero_trust_account_device_settings import ( - TeamsDevicesZeroTrustAccountDeviceSettings as TeamsDevicesZeroTrustAccountDeviceSettings, -) +from .devices_device_settings_policy import DevicesDeviceSettingsPolicy as DevicesDeviceSettingsPolicy +from .zero_trust_account_device_settings import ZeroTrustAccountDeviceSettings as ZeroTrustAccountDeviceSettings diff --git a/src/cloudflare/types/zero_trust/devices/teams_devices_device_managed_networks.py b/src/cloudflare/types/zero_trust/devices/device_managed_networks.py similarity index 90% rename from src/cloudflare/types/zero_trust/devices/teams_devices_device_managed_networks.py rename to src/cloudflare/types/zero_trust/devices/device_managed_networks.py index f16e421d16b..b0d21f88d0b 100644 --- a/src/cloudflare/types/zero_trust/devices/teams_devices_device_managed_networks.py +++ b/src/cloudflare/types/zero_trust/devices/device_managed_networks.py @@ -5,7 +5,7 @@ from ...._models import BaseModel -__all__ = ["TeamsDevicesDeviceManagedNetworks", "Config"] +__all__ = ["DeviceManagedNetworks", "Config"] class Config(BaseModel): @@ -23,7 +23,7 @@ class Config(BaseModel): """ -class TeamsDevicesDeviceManagedNetworks(BaseModel): +class DeviceManagedNetworks(BaseModel): config: Optional[Config] = None """ The configuration object containing information for the WARP client to detect diff --git a/src/cloudflare/types/zero_trust/devices/teams_devices_device_posture_rules.py b/src/cloudflare/types/zero_trust/devices/device_posture_rules.py similarity index 99% rename from src/cloudflare/types/zero_trust/devices/teams_devices_device_posture_rules.py rename to src/cloudflare/types/zero_trust/devices/device_posture_rules.py index 4fa55f8a6ed..0ec5ff47a90 100644 --- a/src/cloudflare/types/zero_trust/devices/teams_devices_device_posture_rules.py +++ b/src/cloudflare/types/zero_trust/devices/device_posture_rules.py @@ -8,7 +8,7 @@ from ...._models import BaseModel __all__ = [ - "TeamsDevicesDevicePostureRules", + "DevicePostureRules", "Input", "InputTeamsDevicesFileInputRequest", "InputTeamsDevicesUniqueClientIDInputRequest", @@ -273,7 +273,7 @@ class Match(BaseModel): platform: Optional[Literal["windows", "mac", "linux", "android", "ios"]] = None -class TeamsDevicesDevicePostureRules(BaseModel): +class DevicePostureRules(BaseModel): id: Optional[str] = None """API UUID.""" diff --git a/src/cloudflare/types/zero_trust/devices/teams_devices_device_settings_policy.py b/src/cloudflare/types/zero_trust/devices/devices_device_settings_policy.py similarity index 87% rename from src/cloudflare/types/zero_trust/devices/teams_devices_device_settings_policy.py rename to src/cloudflare/types/zero_trust/devices/devices_device_settings_policy.py index 1d853b73687..ddad4b60b9d 100644 --- a/src/cloudflare/types/zero_trust/devices/teams_devices_device_settings_policy.py +++ b/src/cloudflare/types/zero_trust/devices/devices_device_settings_policy.py @@ -2,10 +2,10 @@ from typing import List, Optional -from .policies import TeamsDevicesSplitTunnel, TeamsDevicesFallbackDomain, TeamsDevicesSplitTunnelInclude +from .policies import DevicesSplitTunnel, DevicesFallbackDomain, DevicesSplitTunnelInclude from ...._models import BaseModel -__all__ = ["TeamsDevicesDeviceSettingsPolicy", "ServiceModeV2"] +__all__ = ["DevicesDeviceSettingsPolicy", "ServiceModeV2"] class ServiceModeV2(BaseModel): @@ -16,7 +16,7 @@ class ServiceModeV2(BaseModel): """The port number when used with proxy mode.""" -class TeamsDevicesDeviceSettingsPolicy(BaseModel): +class DevicesDeviceSettingsPolicy(BaseModel): allow_mode_switch: Optional[bool] = None """Whether to allow the user to switch WARP between modes.""" @@ -51,16 +51,16 @@ class TeamsDevicesDeviceSettingsPolicy(BaseModel): enabled: Optional[bool] = None """Whether the policy will be applied to matching devices.""" - exclude: Optional[List[TeamsDevicesSplitTunnel]] = None + exclude: Optional[List[DevicesSplitTunnel]] = None exclude_office_ips: Optional[bool] = None """Whether to add Microsoft IPs to Split Tunnel exclusions.""" - fallback_domains: Optional[List[TeamsDevicesFallbackDomain]] = None + fallback_domains: Optional[List[DevicesFallbackDomain]] = None gateway_unique_id: Optional[str] = None - include: Optional[List[TeamsDevicesSplitTunnelInclude]] = None + include: Optional[List[DevicesSplitTunnelInclude]] = None lan_allow_minutes: Optional[float] = None """The amount of time in minutes a user is allowed access to their LAN. diff --git a/src/cloudflare/types/zero_trust/devices/dex_test_delete_response.py b/src/cloudflare/types/zero_trust/devices/dex_test_delete_response.py index 701b388b105..66f2f3fbb27 100644 --- a/src/cloudflare/types/zero_trust/devices/dex_test_delete_response.py +++ b/src/cloudflare/types/zero_trust/devices/dex_test_delete_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_dex_test_schemas_http import TeamsDevicesDeviceDEXTestSchemasHTTP +from .dex_test_schemas_http import DEXTestSchemasHTTP __all__ = ["DEXTestDeleteResponse"] -DEXTestDeleteResponse = List[TeamsDevicesDeviceDEXTestSchemasHTTP] +DEXTestDeleteResponse = List[DEXTestSchemasHTTP] diff --git a/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py b/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py index 81ce5b5e914..2dc36bc019f 100644 --- a/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_dex_test_schemas_http import TeamsDevicesDeviceDEXTestSchemasHTTP +from .dex_test_schemas_http import DEXTestSchemasHTTP __all__ = ["DEXTestListResponse"] -DEXTestListResponse = List[TeamsDevicesDeviceDEXTestSchemasHTTP] +DEXTestListResponse = List[DEXTestSchemasHTTP] diff --git a/src/cloudflare/types/zero_trust/devices/teams_devices_device_dex_test_schemas_http.py b/src/cloudflare/types/zero_trust/devices/dex_test_schemas_http.py similarity index 87% rename from src/cloudflare/types/zero_trust/devices/teams_devices_device_dex_test_schemas_http.py rename to src/cloudflare/types/zero_trust/devices/dex_test_schemas_http.py index cb7dafa7a30..263ec67f9b3 100644 --- a/src/cloudflare/types/zero_trust/devices/teams_devices_device_dex_test_schemas_http.py +++ b/src/cloudflare/types/zero_trust/devices/dex_test_schemas_http.py @@ -4,7 +4,7 @@ from ...._models import BaseModel -__all__ = ["TeamsDevicesDeviceDEXTestSchemasHTTP", "Data"] +__all__ = ["DEXTestSchemasHTTP", "Data"] class Data(BaseModel): @@ -18,7 +18,7 @@ class Data(BaseModel): """The HTTP request method type.""" -class TeamsDevicesDeviceDEXTestSchemasHTTP(BaseModel): +class DEXTestSchemasHTTP(BaseModel): data: Data """ The configuration object which contains the details for the WARP client to diff --git a/src/cloudflare/types/zero_trust/devices/network_delete_response.py b/src/cloudflare/types/zero_trust/devices/network_delete_response.py index c7026fb9996..33c32453dee 100644 --- a/src/cloudflare/types/zero_trust/devices/network_delete_response.py +++ b/src/cloudflare/types/zero_trust/devices/network_delete_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_managed_networks import TeamsDevicesDeviceManagedNetworks +from .device_managed_networks import DeviceManagedNetworks __all__ = ["NetworkDeleteResponse"] -NetworkDeleteResponse = List[TeamsDevicesDeviceManagedNetworks] +NetworkDeleteResponse = List[DeviceManagedNetworks] diff --git a/src/cloudflare/types/zero_trust/devices/network_list_response.py b/src/cloudflare/types/zero_trust/devices/network_list_response.py index c9bbce9212f..6a6ace56b12 100644 --- a/src/cloudflare/types/zero_trust/devices/network_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/network_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_managed_networks import TeamsDevicesDeviceManagedNetworks +from .device_managed_networks import DeviceManagedNetworks __all__ = ["NetworkListResponse"] -NetworkListResponse = List[TeamsDevicesDeviceManagedNetworks] +NetworkListResponse = List[DeviceManagedNetworks] diff --git a/src/cloudflare/types/zero_trust/devices/policies/__init__.py b/src/cloudflare/types/zero_trust/devices/policies/__init__.py index 3f04ad2fb26..36cd5be2b66 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/policies/__init__.py @@ -2,24 +2,22 @@ from __future__ import annotations +from .devices_split_tunnel import DevicesSplitTunnel as DevicesSplitTunnel from .exclude_get_response import ExcludeGetResponse as ExcludeGetResponse from .include_get_response import IncludeGetResponse as IncludeGetResponse from .exclude_list_response import ExcludeListResponse as ExcludeListResponse from .exclude_update_params import ExcludeUpdateParams as ExcludeUpdateParams from .include_list_response import IncludeListResponse as IncludeListResponse from .include_update_params import IncludeUpdateParams as IncludeUpdateParams +from .devices_fallback_domain import DevicesFallbackDomain as DevicesFallbackDomain from .exclude_update_response import ExcludeUpdateResponse as ExcludeUpdateResponse from .include_update_response import IncludeUpdateResponse as IncludeUpdateResponse -from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel as TeamsDevicesSplitTunnel +from .devices_split_tunnel_param import DevicesSplitTunnelParam as DevicesSplitTunnelParam from .default_policy_get_response import DefaultPolicyGetResponse as DefaultPolicyGetResponse +from .devices_split_tunnel_include import DevicesSplitTunnelInclude as DevicesSplitTunnelInclude from .fallback_domain_get_response import FallbackDomainGetResponse as FallbackDomainGetResponse +from .devices_fallback_domain_param import DevicesFallbackDomainParam as DevicesFallbackDomainParam from .fallback_domain_list_response import FallbackDomainListResponse as FallbackDomainListResponse from .fallback_domain_update_params import FallbackDomainUpdateParams as FallbackDomainUpdateParams -from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain as TeamsDevicesFallbackDomain from .fallback_domain_update_response import FallbackDomainUpdateResponse as FallbackDomainUpdateResponse -from .teams_devices_split_tunnel_param import TeamsDevicesSplitTunnelParam as TeamsDevicesSplitTunnelParam -from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude as TeamsDevicesSplitTunnelInclude -from .teams_devices_fallback_domain_param import TeamsDevicesFallbackDomainParam as TeamsDevicesFallbackDomainParam -from .teams_devices_split_tunnel_include_param import ( - TeamsDevicesSplitTunnelIncludeParam as TeamsDevicesSplitTunnelIncludeParam, -) +from .devices_split_tunnel_include_param import DevicesSplitTunnelIncludeParam as DevicesSplitTunnelIncludeParam diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py b/src/cloudflare/types/zero_trust/devices/policies/devices_fallback_domain.py similarity index 84% rename from src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py rename to src/cloudflare/types/zero_trust/devices/policies/devices_fallback_domain.py index 9a9bd16535d..b8779327e4f 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain.py +++ b/src/cloudflare/types/zero_trust/devices/policies/devices_fallback_domain.py @@ -4,10 +4,10 @@ from ....._models import BaseModel -__all__ = ["TeamsDevicesFallbackDomain"] +__all__ = ["DevicesFallbackDomain"] -class TeamsDevicesFallbackDomain(BaseModel): +class DevicesFallbackDomain(BaseModel): suffix: str """The domain suffix to match when resolving locally.""" diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py b/src/cloudflare/types/zero_trust/devices/policies/devices_fallback_domain_param.py similarity index 81% rename from src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py rename to src/cloudflare/types/zero_trust/devices/policies/devices_fallback_domain_param.py index ec5b2eea447..41f28722cb5 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_fallback_domain_param.py +++ b/src/cloudflare/types/zero_trust/devices/policies/devices_fallback_domain_param.py @@ -5,10 +5,10 @@ from typing import Iterable from typing_extensions import Required, TypedDict -__all__ = ["TeamsDevicesFallbackDomainParam"] +__all__ = ["DevicesFallbackDomainParam"] -class TeamsDevicesFallbackDomainParam(TypedDict, total=False): +class DevicesFallbackDomainParam(TypedDict, total=False): suffix: Required[str] """The domain suffix to match when resolving locally.""" diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel.py similarity index 87% rename from src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py rename to src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel.py index 8cff7f46b93..6644d40583c 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel.py +++ b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel.py @@ -4,10 +4,10 @@ from ....._models import BaseModel -__all__ = ["TeamsDevicesSplitTunnel"] +__all__ = ["DevicesSplitTunnel"] -class TeamsDevicesSplitTunnel(BaseModel): +class DevicesSplitTunnel(BaseModel): address: str """The address in CIDR format to exclude from the tunnel. diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_include.py similarity index 85% rename from src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py rename to src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_include.py index 7dc7506ba33..c067eafb1ad 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include.py +++ b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_include.py @@ -4,10 +4,10 @@ from ....._models import BaseModel -__all__ = ["TeamsDevicesSplitTunnelInclude"] +__all__ = ["DevicesSplitTunnelInclude"] -class TeamsDevicesSplitTunnelInclude(BaseModel): +class DevicesSplitTunnelInclude(BaseModel): address: str """The address in CIDR format to include in the tunnel. diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include_param.py b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_include_param.py similarity index 82% rename from src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include_param.py rename to src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_include_param.py index 7d1a3f3fa79..85707e7270e 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_include_param.py +++ b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_include_param.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["TeamsDevicesSplitTunnelIncludeParam"] +__all__ = ["DevicesSplitTunnelIncludeParam"] -class TeamsDevicesSplitTunnelIncludeParam(TypedDict, total=False): +class DevicesSplitTunnelIncludeParam(TypedDict, total=False): address: Required[str] """The address in CIDR format to include in the tunnel. diff --git a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_param.py similarity index 84% rename from src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py rename to src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_param.py index fde0bc9fd41..4e506e978fa 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/teams_devices_split_tunnel_param.py +++ b/src/cloudflare/types/zero_trust/devices/policies/devices_split_tunnel_param.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["TeamsDevicesSplitTunnelParam"] +__all__ = ["DevicesSplitTunnelParam"] -class TeamsDevicesSplitTunnelParam(TypedDict, total=False): +class DevicesSplitTunnelParam(TypedDict, total=False): address: Required[str] """The address in CIDR format to exclude from the tunnel. diff --git a/src/cloudflare/types/zero_trust/devices/policies/exclude_get_response.py b/src/cloudflare/types/zero_trust/devices/policies/exclude_get_response.py index 02f93a0567f..824f866d464 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/exclude_get_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/exclude_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel +from .devices_split_tunnel import DevicesSplitTunnel __all__ = ["ExcludeGetResponse"] -ExcludeGetResponse = List[TeamsDevicesSplitTunnel] +ExcludeGetResponse = List[DevicesSplitTunnel] diff --git a/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py b/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py index 61ad1411ddf..b8ed64891e5 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel +from .devices_split_tunnel import DevicesSplitTunnel __all__ = ["ExcludeListResponse"] -ExcludeListResponse = List[TeamsDevicesSplitTunnel] +ExcludeListResponse = List[DevicesSplitTunnel] diff --git a/src/cloudflare/types/zero_trust/devices/policies/exclude_update_params.py b/src/cloudflare/types/zero_trust/devices/policies/exclude_update_params.py index 2c703b1137e..41121b97c0a 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/exclude_update_params.py +++ b/src/cloudflare/types/zero_trust/devices/policies/exclude_update_params.py @@ -5,7 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .teams_devices_split_tunnel_param import TeamsDevicesSplitTunnelParam +from .devices_split_tunnel_param import DevicesSplitTunnelParam __all__ = ["ExcludeUpdateParams"] @@ -13,4 +13,4 @@ class ExcludeUpdateParams(TypedDict, total=False): account_id: Required[str] - body: Required[Iterable[TeamsDevicesSplitTunnelParam]] + body: Required[Iterable[DevicesSplitTunnelParam]] diff --git a/src/cloudflare/types/zero_trust/devices/policies/exclude_update_response.py b/src/cloudflare/types/zero_trust/devices/policies/exclude_update_response.py index 6bae4cc0fa1..4aa7da541dd 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/exclude_update_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/exclude_update_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_split_tunnel import TeamsDevicesSplitTunnel +from .devices_split_tunnel import DevicesSplitTunnel __all__ = ["ExcludeUpdateResponse"] -ExcludeUpdateResponse = List[TeamsDevicesSplitTunnel] +ExcludeUpdateResponse = List[DevicesSplitTunnel] diff --git a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_get_response.py b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_get_response.py index e597089ae33..d71cd600688 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_get_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain +from .devices_fallback_domain import DevicesFallbackDomain __all__ = ["FallbackDomainGetResponse"] -FallbackDomainGetResponse = List[TeamsDevicesFallbackDomain] +FallbackDomainGetResponse = List[DevicesFallbackDomain] diff --git a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py index 9e10153c984..3a33387f983 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain +from .devices_fallback_domain import DevicesFallbackDomain __all__ = ["FallbackDomainListResponse"] -FallbackDomainListResponse = List[TeamsDevicesFallbackDomain] +FallbackDomainListResponse = List[DevicesFallbackDomain] diff --git a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_params.py b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_params.py index 19aa5690387..acd8bbb0eb9 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_params.py +++ b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_params.py @@ -5,7 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .teams_devices_fallback_domain_param import TeamsDevicesFallbackDomainParam +from .devices_fallback_domain_param import DevicesFallbackDomainParam __all__ = ["FallbackDomainUpdateParams"] @@ -13,4 +13,4 @@ class FallbackDomainUpdateParams(TypedDict, total=False): account_id: Required[str] - body: Required[Iterable[TeamsDevicesFallbackDomainParam]] + body: Required[Iterable[DevicesFallbackDomainParam]] diff --git a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_response.py b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_response.py index 695c7088fd0..3b2c8e5b25b 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_update_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_fallback_domain import TeamsDevicesFallbackDomain +from .devices_fallback_domain import DevicesFallbackDomain __all__ = ["FallbackDomainUpdateResponse"] -FallbackDomainUpdateResponse = List[TeamsDevicesFallbackDomain] +FallbackDomainUpdateResponse = List[DevicesFallbackDomain] diff --git a/src/cloudflare/types/zero_trust/devices/policies/include_get_response.py b/src/cloudflare/types/zero_trust/devices/policies/include_get_response.py index a81ab8e94a0..d7d9f61e972 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/include_get_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/include_get_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude +from .devices_split_tunnel_include import DevicesSplitTunnelInclude __all__ = ["IncludeGetResponse"] -IncludeGetResponse = List[TeamsDevicesSplitTunnelInclude] +IncludeGetResponse = List[DevicesSplitTunnelInclude] diff --git a/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py b/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py index 5f289a0f2b5..4173afcf096 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude +from .devices_split_tunnel_include import DevicesSplitTunnelInclude __all__ = ["IncludeListResponse"] -IncludeListResponse = List[TeamsDevicesSplitTunnelInclude] +IncludeListResponse = List[DevicesSplitTunnelInclude] diff --git a/src/cloudflare/types/zero_trust/devices/policies/include_update_params.py b/src/cloudflare/types/zero_trust/devices/policies/include_update_params.py index e8f92c7a40b..467152a8553 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/include_update_params.py +++ b/src/cloudflare/types/zero_trust/devices/policies/include_update_params.py @@ -5,7 +5,7 @@ from typing import Iterable from typing_extensions import Required, TypedDict -from .teams_devices_split_tunnel_include_param import TeamsDevicesSplitTunnelIncludeParam +from .devices_split_tunnel_include_param import DevicesSplitTunnelIncludeParam __all__ = ["IncludeUpdateParams"] @@ -13,4 +13,4 @@ class IncludeUpdateParams(TypedDict, total=False): account_id: Required[str] - body: Required[Iterable[TeamsDevicesSplitTunnelIncludeParam]] + body: Required[Iterable[DevicesSplitTunnelIncludeParam]] diff --git a/src/cloudflare/types/zero_trust/devices/policies/include_update_response.py b/src/cloudflare/types/zero_trust/devices/policies/include_update_response.py index 9da805f88b7..18529735936 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/include_update_response.py +++ b/src/cloudflare/types/zero_trust/devices/policies/include_update_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_split_tunnel_include import TeamsDevicesSplitTunnelInclude +from .devices_split_tunnel_include import DevicesSplitTunnelInclude __all__ = ["IncludeUpdateResponse"] -IncludeUpdateResponse = List[TeamsDevicesSplitTunnelInclude] +IncludeUpdateResponse = List[DevicesSplitTunnelInclude] diff --git a/src/cloudflare/types/zero_trust/devices/policy_delete_response.py b/src/cloudflare/types/zero_trust/devices/policy_delete_response.py index 3f13d045b3a..aecbb1e54ca 100644 --- a/src/cloudflare/types/zero_trust/devices/policy_delete_response.py +++ b/src/cloudflare/types/zero_trust/devices/policy_delete_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_settings_policy import TeamsDevicesDeviceSettingsPolicy +from .devices_device_settings_policy import DevicesDeviceSettingsPolicy __all__ = ["PolicyDeleteResponse"] -PolicyDeleteResponse = List[TeamsDevicesDeviceSettingsPolicy] +PolicyDeleteResponse = List[DevicesDeviceSettingsPolicy] diff --git a/src/cloudflare/types/zero_trust/devices/policy_list_response.py b/src/cloudflare/types/zero_trust/devices/policy_list_response.py index 5b0672c19be..95cadbca13b 100644 --- a/src/cloudflare/types/zero_trust/devices/policy_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/policy_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_settings_policy import TeamsDevicesDeviceSettingsPolicy +from .devices_device_settings_policy import DevicesDeviceSettingsPolicy __all__ = ["PolicyListResponse"] -PolicyListResponse = List[TeamsDevicesDeviceSettingsPolicy] +PolicyListResponse = List[DevicesDeviceSettingsPolicy] diff --git a/src/cloudflare/types/zero_trust/devices/posture/__init__.py b/src/cloudflare/types/zero_trust/devices/posture/__init__.py index 7ea8b62708a..666d6d134b2 100644 --- a/src/cloudflare/types/zero_trust/devices/posture/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/posture/__init__.py @@ -5,7 +5,5 @@ from .integration_edit_params import IntegrationEditParams as IntegrationEditParams from .integration_create_params import IntegrationCreateParams as IntegrationCreateParams from .integration_list_response import IntegrationListResponse as IntegrationListResponse +from .device_posture_integrations import DevicePostureIntegrations as DevicePostureIntegrations from .integration_delete_response import IntegrationDeleteResponse as IntegrationDeleteResponse -from .teams_devices_device_posture_integrations import ( - TeamsDevicesDevicePostureIntegrations as TeamsDevicesDevicePostureIntegrations, -) diff --git a/src/cloudflare/types/zero_trust/devices/posture/teams_devices_device_posture_integrations.py b/src/cloudflare/types/zero_trust/devices/posture/device_posture_integrations.py similarity index 90% rename from src/cloudflare/types/zero_trust/devices/posture/teams_devices_device_posture_integrations.py rename to src/cloudflare/types/zero_trust/devices/posture/device_posture_integrations.py index d2d51d460a7..7728e3f5d05 100644 --- a/src/cloudflare/types/zero_trust/devices/posture/teams_devices_device_posture_integrations.py +++ b/src/cloudflare/types/zero_trust/devices/posture/device_posture_integrations.py @@ -5,7 +5,7 @@ from ....._models import BaseModel -__all__ = ["TeamsDevicesDevicePostureIntegrations", "Config"] +__all__ = ["DevicePostureIntegrations", "Config"] class Config(BaseModel): @@ -19,7 +19,7 @@ class Config(BaseModel): """The Workspace One client ID provided in the Workspace One Admin Dashboard.""" -class TeamsDevicesDevicePostureIntegrations(BaseModel): +class DevicePostureIntegrations(BaseModel): id: Optional[str] = None """API UUID.""" diff --git a/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py b/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py index 81d229cb6ce..ffbb8633862 100644 --- a/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_posture_integrations import TeamsDevicesDevicePostureIntegrations +from .device_posture_integrations import DevicePostureIntegrations __all__ = ["IntegrationListResponse"] -IntegrationListResponse = List[TeamsDevicesDevicePostureIntegrations] +IntegrationListResponse = List[DevicePostureIntegrations] diff --git a/src/cloudflare/types/zero_trust/devices/posture_list_response.py b/src/cloudflare/types/zero_trust/devices/posture_list_response.py index 8870231ff02..c183e9cd3e9 100644 --- a/src/cloudflare/types/zero_trust/devices/posture_list_response.py +++ b/src/cloudflare/types/zero_trust/devices/posture_list_response.py @@ -2,8 +2,8 @@ from typing import List -from .teams_devices_device_posture_rules import TeamsDevicesDevicePostureRules +from .device_posture_rules import DevicePostureRules __all__ = ["PostureListResponse"] -PostureListResponse = List[TeamsDevicesDevicePostureRules] +PostureListResponse = List[DevicePostureRules] diff --git a/src/cloudflare/types/zero_trust/devices/teams_devices_zero_trust_account_device_settings.py b/src/cloudflare/types/zero_trust/devices/zero_trust_account_device_settings.py similarity index 83% rename from src/cloudflare/types/zero_trust/devices/teams_devices_zero_trust_account_device_settings.py rename to src/cloudflare/types/zero_trust/devices/zero_trust_account_device_settings.py index 86acc185cca..17535b12e09 100644 --- a/src/cloudflare/types/zero_trust/devices/teams_devices_zero_trust_account_device_settings.py +++ b/src/cloudflare/types/zero_trust/devices/zero_trust_account_device_settings.py @@ -4,10 +4,10 @@ from ...._models import BaseModel -__all__ = ["TeamsDevicesZeroTrustAccountDeviceSettings"] +__all__ = ["ZeroTrustAccountDeviceSettings"] -class TeamsDevicesZeroTrustAccountDeviceSettings(BaseModel): +class ZeroTrustAccountDeviceSettings(BaseModel): gateway_proxy_enabled: Optional[bool] = None """Enable gateway proxy filtering on TCP.""" diff --git a/src/cloudflare/types/zero_trust/seat_edit_response.py b/src/cloudflare/types/zero_trust/seat_edit_response.py index db48a8979ac..17305d6920b 100644 --- a/src/cloudflare/types/zero_trust/seat_edit_response.py +++ b/src/cloudflare/types/zero_trust/seat_edit_response.py @@ -2,8 +2,8 @@ from typing import List -from .access_seats import AccessSeats +from .zero_trust_seats import ZeroTrustSeats __all__ = ["SeatEditResponse"] -SeatEditResponse = List[AccessSeats] +SeatEditResponse = List[ZeroTrustSeats] diff --git a/src/cloudflare/types/zero_trust/teams_devices_devices.py b/src/cloudflare/types/zero_trust/zero_trust_devices.py similarity index 96% rename from src/cloudflare/types/zero_trust/teams_devices_devices.py rename to src/cloudflare/types/zero_trust/zero_trust_devices.py index 62ff1c77a1c..1be55deab17 100644 --- a/src/cloudflare/types/zero_trust/teams_devices_devices.py +++ b/src/cloudflare/types/zero_trust/zero_trust_devices.py @@ -6,7 +6,7 @@ from ..._models import BaseModel -__all__ = ["TeamsDevicesDevices", "User"] +__all__ = ["ZeroTrustDevices", "User"] class User(BaseModel): @@ -20,7 +20,7 @@ class User(BaseModel): """The enrolled device user's name.""" -class TeamsDevicesDevices(BaseModel): +class ZeroTrustDevices(BaseModel): id: Optional[str] = None """Device ID.""" diff --git a/src/cloudflare/types/zero_trust/access_identity_providers.py b/src/cloudflare/types/zero_trust/zero_trust_identity_providers.py similarity index 99% rename from src/cloudflare/types/zero_trust/access_identity_providers.py rename to src/cloudflare/types/zero_trust/zero_trust_identity_providers.py index 5b727ae3de0..d4d22daa810 100644 --- a/src/cloudflare/types/zero_trust/access_identity_providers.py +++ b/src/cloudflare/types/zero_trust/zero_trust_identity_providers.py @@ -6,7 +6,7 @@ from ..._models import BaseModel __all__ = [ - "AccessIdentityProviders", + "ZeroTrustIdentityProviders", "AccessAzureAd", "AccessAzureAdConfig", "AccessAzureAdScimConfig", @@ -1341,7 +1341,7 @@ class AccessOnetimepin(BaseModel): """ -AccessIdentityProviders = Union[ +ZeroTrustIdentityProviders = Union[ AccessAzureAd, AccessCentrify, AccessFacebook, diff --git a/src/cloudflare/types/zero_trust/access_organizations.py b/src/cloudflare/types/zero_trust/zero_trust_organizations.py similarity index 96% rename from src/cloudflare/types/zero_trust/access_organizations.py rename to src/cloudflare/types/zero_trust/zero_trust_organizations.py index c86b03926b2..b0bb2210663 100644 --- a/src/cloudflare/types/zero_trust/access_organizations.py +++ b/src/cloudflare/types/zero_trust/zero_trust_organizations.py @@ -5,7 +5,7 @@ from ..._models import BaseModel -__all__ = ["AccessOrganizations", "CustomPages", "LoginDesign"] +__all__ = ["ZeroTrustOrganizations", "CustomPages", "LoginDesign"] class CustomPages(BaseModel): @@ -36,7 +36,7 @@ class LoginDesign(BaseModel): """The text color on your login page.""" -class AccessOrganizations(BaseModel): +class ZeroTrustOrganizations(BaseModel): allow_authenticate_via_warp: Optional[bool] = None """ When set to true, users can authenticate via WARP for any application in your diff --git a/src/cloudflare/types/zero_trust/access_seats.py b/src/cloudflare/types/zero_trust/zero_trust_seats.py similarity index 88% rename from src/cloudflare/types/zero_trust/access_seats.py rename to src/cloudflare/types/zero_trust/zero_trust_seats.py index 31a8a89bebb..0800a49be50 100644 --- a/src/cloudflare/types/zero_trust/access_seats.py +++ b/src/cloudflare/types/zero_trust/zero_trust_seats.py @@ -5,10 +5,10 @@ from ..._models import BaseModel -__all__ = ["AccessSeats"] +__all__ = ["ZeroTrustSeats"] -class AccessSeats(BaseModel): +class ZeroTrustSeats(BaseModel): access_seat: Optional[bool] = None """True if the seat is part of Access.""" diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py index 0631453703c..48337d7b449 100644 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -6,55 +6,55 @@ from typing_extensions import Literal, Required, TypedDict from .settings import ( - ZonesNELParam, - ZonesSSLParam, - ZonesWAFParam, - Zones0rttParam, - ZonesIPV6Param, - ZonesWebPParam, - ZonesHTTP2Param, - ZonesHTTP3Param, - ZonesBrotliParam, - ZonesMinifyParam, - ZonesMirageParam, - ZonesPolishParam, - ZonesTLS1_3Param, - ZonesCiphersParam, - ZonesBufferingParam, - ZonesCacheLevelParam, - ZonesEarlyHintsParam, - ZonesPseudoIPV4Param, - ZonesWebsocketsParam, - ZonesAdvancedDDOSParam, - ZonesAlwaysOnlineParam, - ZonesBrowserCheckParam, - ZonesChallengeTTLParam, - ZonesRocketLoaderParam, - ZonesImageResizingParam, - ZonesIPGeolocationParam, - ZonesMinTLSVersionParam, - ZonesSecurityLevelParam, - ZonesTLSClientAuthParam, - ZonesAlwaysUseHTTPSParam, - ZonesMobileRedirectParam, - ZonesOrangeToOrangeParam, - ZonesSecurityHeaderParam, - ZonesSSLRecommenderParam, - ZonesBrowserCacheTTLParam, - ZonesDevelopmentModeParam, - ZonesPrefetchPreloadParam, - ZonesEmailObfuscationParam, - ZonesH2PrioritizationParam, - ZonesProxyReadTimeoutParam, - ZonesHotlinkProtectionParam, - ZonesServerSideExcludeParam, - ZonesOpportunisticOnionParam, - ZonesTrueClientIPHeaderParam, - ZonesAutomaticHTTPSRewritesParam, - ZonesOpportunisticEncryptionParam, - ZonesOriginErrorPagePassThruParam, - ZonesSortQueryStringForCacheParam, - ZonesAutomaticPlatformOptimizationParam, + ZoneSettingNELParam, + ZoneSettingSSLParam, + ZoneSettingWAFParam, + ZoneSetting0rttParam, + ZoneSettingIPV6Param, + ZoneSettingWebPParam, + ZoneSettingHTTP2Param, + ZoneSettingHTTP3Param, + ZoneSettingBrotliParam, + ZoneSettingMinifyParam, + ZoneSettingMirageParam, + ZoneSettingPolishParam, + ZoneSettingTLS1_3Param, + ZoneSettingCiphersParam, + ZoneSettingBufferingParam, + ZoneSettingCacheLevelParam, + ZoneSettingEarlyHintsParam, + ZoneSettingPseudoIPV4Param, + ZoneSettingWebsocketsParam, + ZoneSettingAdvancedDDOSParam, + ZoneSettingAlwaysOnlineParam, + ZoneSettingBrowserCheckParam, + ZoneSettingChallengeTTLParam, + ZoneSettingRocketLoaderParam, + ZoneSettingImageResizingParam, + ZoneSettingIPGeolocationParam, + ZoneSettingMinTLSVersionParam, + ZoneSettingSecurityLevelParam, + ZoneSettingTLSClientAuthParam, + ZoneSettingAlwaysUseHTTPSParam, + ZoneSettingMobileRedirectParam, + ZoneSettingOrangeToOrangeParam, + ZoneSettingSecurityHeaderParam, + ZoneSettingSSLRecommenderParam, + ZoneSettingBrowserCacheTTLParam, + ZoneSettingDevelopmentModeParam, + ZoneSettingPrefetchPreloadParam, + ZoneSettingEmailObfuscationParam, + ZoneSettingH2PrioritizationParam, + ZoneSettingProxyReadTimeoutParam, + ZoneSettingHotlinkProtectionParam, + ZoneSettingServerSideExcludeParam, + ZoneSettingOpportunisticOnionParam, + ZoneSettingTrueClientIPHeaderParam, + ZoneSettingAutomaticHTTPSRewritesParam, + ZoneSettingOpportunisticEncryptionParam, + ZoneSettingOriginErrorPagePassThruParam, + ZoneSettingSortQueryStringForCacheParam, + ZoneSettingAutomaticPlatformOptimizationParam, ) __all__ = [ @@ -129,7 +129,7 @@ class ItemZonesSchemasAutomaticPlatformOptimization(TypedDict, total=False): id: Required[Literal["automatic_platform_optimization"]] """ID of the zone setting.""" - value: Required[ZonesAutomaticPlatformOptimizationParam] + value: Required[ZoneSettingAutomaticPlatformOptimizationParam] """Current value of the zone setting.""" @@ -150,58 +150,58 @@ class ItemZonesTLS1_2Only(TypedDict, total=False): Item = Union[ - Zones0rttParam, - ZonesAdvancedDDOSParam, - ZonesAlwaysOnlineParam, - ZonesAlwaysUseHTTPSParam, - ZonesAutomaticHTTPSRewritesParam, - ZonesBrotliParam, - ZonesBrowserCacheTTLParam, - ZonesBrowserCheckParam, - ZonesCacheLevelParam, - ZonesChallengeTTLParam, - ZonesCiphersParam, + ZoneSetting0rttParam, + ZoneSettingAdvancedDDOSParam, + ZoneSettingAlwaysOnlineParam, + ZoneSettingAlwaysUseHTTPSParam, + ZoneSettingAutomaticHTTPSRewritesParam, + ZoneSettingBrotliParam, + ZoneSettingBrowserCacheTTLParam, + ZoneSettingBrowserCheckParam, + ZoneSettingCacheLevelParam, + ZoneSettingChallengeTTLParam, + ZoneSettingCiphersParam, ItemZonesCNAMEFlattening, - ZonesDevelopmentModeParam, - ZonesEarlyHintsParam, + ZoneSettingDevelopmentModeParam, + ZoneSettingEarlyHintsParam, ItemZonesEdgeCacheTTL, - ZonesEmailObfuscationParam, - ZonesH2PrioritizationParam, - ZonesHotlinkProtectionParam, - ZonesHTTP2Param, - ZonesHTTP3Param, - ZonesImageResizingParam, - ZonesIPGeolocationParam, - ZonesIPV6Param, + ZoneSettingEmailObfuscationParam, + ZoneSettingH2PrioritizationParam, + ZoneSettingHotlinkProtectionParam, + ZoneSettingHTTP2Param, + ZoneSettingHTTP3Param, + ZoneSettingImageResizingParam, + ZoneSettingIPGeolocationParam, + ZoneSettingIPV6Param, ItemZonesMaxUpload, - ZonesMinTLSVersionParam, - ZonesMinifyParam, - ZonesMirageParam, - ZonesMobileRedirectParam, - ZonesNELParam, - ZonesOpportunisticEncryptionParam, - ZonesOpportunisticOnionParam, - ZonesOrangeToOrangeParam, - ZonesOriginErrorPagePassThruParam, - ZonesPolishParam, - ZonesPrefetchPreloadParam, - ZonesProxyReadTimeoutParam, - ZonesPseudoIPV4Param, - ZonesBufferingParam, - ZonesRocketLoaderParam, + ZoneSettingMinTLSVersionParam, + ZoneSettingMinifyParam, + ZoneSettingMirageParam, + ZoneSettingMobileRedirectParam, + ZoneSettingNELParam, + ZoneSettingOpportunisticEncryptionParam, + ZoneSettingOpportunisticOnionParam, + ZoneSettingOrangeToOrangeParam, + ZoneSettingOriginErrorPagePassThruParam, + ZoneSettingPolishParam, + ZoneSettingPrefetchPreloadParam, + ZoneSettingProxyReadTimeoutParam, + ZoneSettingPseudoIPV4Param, + ZoneSettingBufferingParam, + ZoneSettingRocketLoaderParam, ItemZonesSchemasAutomaticPlatformOptimization, - ZonesSecurityHeaderParam, - ZonesSecurityLevelParam, - ZonesServerSideExcludeParam, + ZoneSettingSecurityHeaderParam, + ZoneSettingSecurityLevelParam, + ZoneSettingServerSideExcludeParam, ItemZonesSha1Support, - ZonesSortQueryStringForCacheParam, - ZonesSSLParam, - ZonesSSLRecommenderParam, + ZoneSettingSortQueryStringForCacheParam, + ZoneSettingSSLParam, + ZoneSettingSSLRecommenderParam, ItemZonesTLS1_2Only, - ZonesTLS1_3Param, - ZonesTLSClientAuthParam, - ZonesTrueClientIPHeaderParam, - ZonesWAFParam, - ZonesWebPParam, - ZonesWebsocketsParam, + ZoneSettingTLS1_3Param, + ZoneSettingTLSClientAuthParam, + ZoneSettingTrueClientIPHeaderParam, + ZoneSettingWAFParam, + ZoneSettingWebPParam, + ZoneSettingWebsocketsParam, ] diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py index d510b3accc0..b2935263c54 100644 --- a/src/cloudflare/types/zones/setting_edit_response.py +++ b/src/cloudflare/types/zones/setting_edit_response.py @@ -5,55 +5,55 @@ from typing_extensions import Literal from .settings import ( - ZonesNEL, - ZonesSSL, - ZonesWAF, - Zones0rtt, - ZonesIPV6, - ZonesWebP, - ZonesHTTP2, - ZonesHTTP3, - ZonesBrotli, - ZonesMinify, - ZonesMirage, - ZonesPolish, - ZonesTLS1_3, - ZonesCiphers, - ZonesBuffering, - ZonesCacheLevel, - ZonesEarlyHints, - ZonesPseudoIPV4, - ZonesWebsockets, - ZonesAdvancedDDOS, - ZonesAlwaysOnline, - ZonesBrowserCheck, - ZonesChallengeTTL, - ZonesRocketLoader, - ZonesImageResizing, - ZonesIPGeolocation, - ZonesMinTLSVersion, - ZonesSecurityLevel, - ZonesTLSClientAuth, - ZonesAlwaysUseHTTPS, - ZonesMobileRedirect, - ZonesOrangeToOrange, - ZonesSecurityHeader, - ZonesSSLRecommender, - ZonesBrowserCacheTTL, - ZonesDevelopmentMode, - ZonesPrefetchPreload, - ZonesEmailObfuscation, - ZonesH2Prioritization, - ZonesProxyReadTimeout, - ZonesHotlinkProtection, - ZonesServerSideExclude, - ZonesOpportunisticOnion, - ZonesTrueClientIPHeader, - ZonesAutomaticHTTPSRewrites, - ZonesOpportunisticEncryption, - ZonesOriginErrorPagePassThru, - ZonesSortQueryStringForCache, - ZonesAutomaticPlatformOptimization, + ZoneSettingNEL, + ZoneSettingSSL, + ZoneSettingWAF, + ZoneSetting0rtt, + ZoneSettingIPV6, + ZoneSettingWebP, + ZoneSettingHTTP2, + ZoneSettingHTTP3, + ZoneSettingBrotli, + ZoneSettingMinify, + ZoneSettingMirage, + ZoneSettingPolish, + ZoneSettingTLS1_3, + ZoneSettingCiphers, + ZoneSettingBuffering, + ZoneSettingCacheLevel, + ZoneSettingEarlyHints, + ZoneSettingPseudoIPV4, + ZoneSettingWebsockets, + ZoneSettingAdvancedDDOS, + ZoneSettingAlwaysOnline, + ZoneSettingBrowserCheck, + ZoneSettingChallengeTTL, + ZoneSettingRocketLoader, + ZoneSettingImageResizing, + ZoneSettingIPGeolocation, + ZoneSettingMinTLSVersion, + ZoneSettingSecurityLevel, + ZoneSettingTLSClientAuth, + ZoneSettingAlwaysUseHTTPS, + ZoneSettingMobileRedirect, + ZoneSettingOrangeToOrange, + ZoneSettingSecurityHeader, + ZoneSettingSSLRecommender, + ZoneSettingBrowserCacheTTL, + ZoneSettingDevelopmentMode, + ZoneSettingPrefetchPreload, + ZoneSettingEmailObfuscation, + ZoneSettingH2Prioritization, + ZoneSettingProxyReadTimeout, + ZoneSettingHotlinkProtection, + ZoneSettingServerSideExclude, + ZoneSettingOpportunisticOnion, + ZoneSettingTrueClientIPHeader, + ZoneSettingAutomaticHTTPSRewrites, + ZoneSettingOpportunisticEncryption, + ZoneSettingOriginErrorPagePassThru, + ZoneSettingSortQueryStringForCache, + ZoneSettingAutomaticPlatformOptimization, ) from ..._models import BaseModel @@ -146,7 +146,7 @@ class SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel id: Literal["automatic_platform_optimization"] """ID of the zone setting.""" - value: ZonesAutomaticPlatformOptimization + value: ZoneSettingAutomaticPlatformOptimization """Current value of the zone setting.""" editable: Optional[Literal[True, False]] = None @@ -194,60 +194,60 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): SettingEditResponseItem = Union[ - Zones0rtt, - ZonesAdvancedDDOS, - ZonesAlwaysOnline, - ZonesAlwaysUseHTTPS, - ZonesAutomaticHTTPSRewrites, - ZonesBrotli, - ZonesBrowserCacheTTL, - ZonesBrowserCheck, - ZonesCacheLevel, - ZonesChallengeTTL, - ZonesCiphers, + ZoneSetting0rtt, + ZoneSettingAdvancedDDOS, + ZoneSettingAlwaysOnline, + ZoneSettingAlwaysUseHTTPS, + ZoneSettingAutomaticHTTPSRewrites, + ZoneSettingBrotli, + ZoneSettingBrowserCacheTTL, + ZoneSettingBrowserCheck, + ZoneSettingCacheLevel, + ZoneSettingChallengeTTL, + ZoneSettingCiphers, SettingEditResponseItemZonesCNAMEFlattening, - ZonesDevelopmentMode, - ZonesEarlyHints, + ZoneSettingDevelopmentMode, + ZoneSettingEarlyHints, SettingEditResponseItemZonesEdgeCacheTTL, - ZonesEmailObfuscation, - ZonesH2Prioritization, - ZonesHotlinkProtection, - ZonesHTTP2, - ZonesHTTP3, - ZonesImageResizing, - ZonesIPGeolocation, - ZonesIPV6, + ZoneSettingEmailObfuscation, + ZoneSettingH2Prioritization, + ZoneSettingHotlinkProtection, + ZoneSettingHTTP2, + ZoneSettingHTTP3, + ZoneSettingImageResizing, + ZoneSettingIPGeolocation, + ZoneSettingIPV6, SettingEditResponseItemZonesMaxUpload, - ZonesMinTLSVersion, - ZonesMinify, - ZonesMirage, - ZonesMobileRedirect, - ZonesNEL, - ZonesOpportunisticEncryption, - ZonesOpportunisticOnion, - ZonesOrangeToOrange, - ZonesOriginErrorPagePassThru, - ZonesPolish, - ZonesPrefetchPreload, - ZonesProxyReadTimeout, - ZonesPseudoIPV4, - ZonesBuffering, - ZonesRocketLoader, + ZoneSettingMinTLSVersion, + ZoneSettingMinify, + ZoneSettingMirage, + ZoneSettingMobileRedirect, + ZoneSettingNEL, + ZoneSettingOpportunisticEncryption, + ZoneSettingOpportunisticOnion, + ZoneSettingOrangeToOrange, + ZoneSettingOriginErrorPagePassThru, + ZoneSettingPolish, + ZoneSettingPrefetchPreload, + ZoneSettingProxyReadTimeout, + ZoneSettingPseudoIPV4, + ZoneSettingBuffering, + ZoneSettingRocketLoader, SettingEditResponseItemZonesSchemasAutomaticPlatformOptimization, - ZonesSecurityHeader, - ZonesSecurityLevel, - ZonesServerSideExclude, + ZoneSettingSecurityHeader, + ZoneSettingSecurityLevel, + ZoneSettingServerSideExclude, SettingEditResponseItemZonesSha1Support, - ZonesSortQueryStringForCache, - ZonesSSL, - ZonesSSLRecommender, + ZoneSettingSortQueryStringForCache, + ZoneSettingSSL, + ZoneSettingSSLRecommender, SettingEditResponseItemZonesTLS1_2Only, - ZonesTLS1_3, - ZonesTLSClientAuth, - ZonesTrueClientIPHeader, - ZonesWAF, - ZonesWebP, - ZonesWebsockets, + ZoneSettingTLS1_3, + ZoneSettingTLSClientAuth, + ZoneSettingTrueClientIPHeader, + ZoneSettingWAF, + ZoneSettingWebP, + ZoneSettingWebsockets, ] SettingEditResponse = List[SettingEditResponseItem] diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py index 7dbd0072e8f..24a19873b63 100644 --- a/src/cloudflare/types/zones/setting_get_response.py +++ b/src/cloudflare/types/zones/setting_get_response.py @@ -5,55 +5,55 @@ from typing_extensions import Literal from .settings import ( - ZonesNEL, - ZonesSSL, - ZonesWAF, - Zones0rtt, - ZonesIPV6, - ZonesWebP, - ZonesHTTP2, - ZonesHTTP3, - ZonesBrotli, - ZonesMinify, - ZonesMirage, - ZonesPolish, - ZonesTLS1_3, - ZonesCiphers, - ZonesBuffering, - ZonesCacheLevel, - ZonesEarlyHints, - ZonesPseudoIPV4, - ZonesWebsockets, - ZonesAdvancedDDOS, - ZonesAlwaysOnline, - ZonesBrowserCheck, - ZonesChallengeTTL, - ZonesRocketLoader, - ZonesImageResizing, - ZonesIPGeolocation, - ZonesMinTLSVersion, - ZonesSecurityLevel, - ZonesTLSClientAuth, - ZonesAlwaysUseHTTPS, - ZonesMobileRedirect, - ZonesOrangeToOrange, - ZonesSecurityHeader, - ZonesSSLRecommender, - ZonesBrowserCacheTTL, - ZonesDevelopmentMode, - ZonesPrefetchPreload, - ZonesEmailObfuscation, - ZonesH2Prioritization, - ZonesProxyReadTimeout, - ZonesHotlinkProtection, - ZonesServerSideExclude, - ZonesOpportunisticOnion, - ZonesTrueClientIPHeader, - ZonesAutomaticHTTPSRewrites, - ZonesOpportunisticEncryption, - ZonesOriginErrorPagePassThru, - ZonesSortQueryStringForCache, - ZonesAutomaticPlatformOptimization, + ZoneSettingNEL, + ZoneSettingSSL, + ZoneSettingWAF, + ZoneSetting0rtt, + ZoneSettingIPV6, + ZoneSettingWebP, + ZoneSettingHTTP2, + ZoneSettingHTTP3, + ZoneSettingBrotli, + ZoneSettingMinify, + ZoneSettingMirage, + ZoneSettingPolish, + ZoneSettingTLS1_3, + ZoneSettingCiphers, + ZoneSettingBuffering, + ZoneSettingCacheLevel, + ZoneSettingEarlyHints, + ZoneSettingPseudoIPV4, + ZoneSettingWebsockets, + ZoneSettingAdvancedDDOS, + ZoneSettingAlwaysOnline, + ZoneSettingBrowserCheck, + ZoneSettingChallengeTTL, + ZoneSettingRocketLoader, + ZoneSettingImageResizing, + ZoneSettingIPGeolocation, + ZoneSettingMinTLSVersion, + ZoneSettingSecurityLevel, + ZoneSettingTLSClientAuth, + ZoneSettingAlwaysUseHTTPS, + ZoneSettingMobileRedirect, + ZoneSettingOrangeToOrange, + ZoneSettingSecurityHeader, + ZoneSettingSSLRecommender, + ZoneSettingBrowserCacheTTL, + ZoneSettingDevelopmentMode, + ZoneSettingPrefetchPreload, + ZoneSettingEmailObfuscation, + ZoneSettingH2Prioritization, + ZoneSettingProxyReadTimeout, + ZoneSettingHotlinkProtection, + ZoneSettingServerSideExclude, + ZoneSettingOpportunisticOnion, + ZoneSettingTrueClientIPHeader, + ZoneSettingAutomaticHTTPSRewrites, + ZoneSettingOpportunisticEncryption, + ZoneSettingOriginErrorPagePassThru, + ZoneSettingSortQueryStringForCache, + ZoneSettingAutomaticPlatformOptimization, ) from ..._models import BaseModel @@ -146,7 +146,7 @@ class SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization(BaseModel) id: Literal["automatic_platform_optimization"] """ID of the zone setting.""" - value: ZonesAutomaticPlatformOptimization + value: ZoneSettingAutomaticPlatformOptimization """Current value of the zone setting.""" editable: Optional[Literal[True, False]] = None @@ -194,60 +194,60 @@ class SettingGetResponseItemZonesTLS1_2Only(BaseModel): SettingGetResponseItem = Union[ - Zones0rtt, - ZonesAdvancedDDOS, - ZonesAlwaysOnline, - ZonesAlwaysUseHTTPS, - ZonesAutomaticHTTPSRewrites, - ZonesBrotli, - ZonesBrowserCacheTTL, - ZonesBrowserCheck, - ZonesCacheLevel, - ZonesChallengeTTL, - ZonesCiphers, + ZoneSetting0rtt, + ZoneSettingAdvancedDDOS, + ZoneSettingAlwaysOnline, + ZoneSettingAlwaysUseHTTPS, + ZoneSettingAutomaticHTTPSRewrites, + ZoneSettingBrotli, + ZoneSettingBrowserCacheTTL, + ZoneSettingBrowserCheck, + ZoneSettingCacheLevel, + ZoneSettingChallengeTTL, + ZoneSettingCiphers, SettingGetResponseItemZonesCNAMEFlattening, - ZonesDevelopmentMode, - ZonesEarlyHints, + ZoneSettingDevelopmentMode, + ZoneSettingEarlyHints, SettingGetResponseItemZonesEdgeCacheTTL, - ZonesEmailObfuscation, - ZonesH2Prioritization, - ZonesHotlinkProtection, - ZonesHTTP2, - ZonesHTTP3, - ZonesImageResizing, - ZonesIPGeolocation, - ZonesIPV6, + ZoneSettingEmailObfuscation, + ZoneSettingH2Prioritization, + ZoneSettingHotlinkProtection, + ZoneSettingHTTP2, + ZoneSettingHTTP3, + ZoneSettingImageResizing, + ZoneSettingIPGeolocation, + ZoneSettingIPV6, SettingGetResponseItemZonesMaxUpload, - ZonesMinTLSVersion, - ZonesMinify, - ZonesMirage, - ZonesMobileRedirect, - ZonesNEL, - ZonesOpportunisticEncryption, - ZonesOpportunisticOnion, - ZonesOrangeToOrange, - ZonesOriginErrorPagePassThru, - ZonesPolish, - ZonesPrefetchPreload, - ZonesProxyReadTimeout, - ZonesPseudoIPV4, - ZonesBuffering, - ZonesRocketLoader, + ZoneSettingMinTLSVersion, + ZoneSettingMinify, + ZoneSettingMirage, + ZoneSettingMobileRedirect, + ZoneSettingNEL, + ZoneSettingOpportunisticEncryption, + ZoneSettingOpportunisticOnion, + ZoneSettingOrangeToOrange, + ZoneSettingOriginErrorPagePassThru, + ZoneSettingPolish, + ZoneSettingPrefetchPreload, + ZoneSettingProxyReadTimeout, + ZoneSettingPseudoIPV4, + ZoneSettingBuffering, + ZoneSettingRocketLoader, SettingGetResponseItemZonesSchemasAutomaticPlatformOptimization, - ZonesSecurityHeader, - ZonesSecurityLevel, - ZonesServerSideExclude, + ZoneSettingSecurityHeader, + ZoneSettingSecurityLevel, + ZoneSettingServerSideExclude, SettingGetResponseItemZonesSha1Support, - ZonesSortQueryStringForCache, - ZonesSSL, - ZonesSSLRecommender, + ZoneSettingSortQueryStringForCache, + ZoneSettingSSL, + ZoneSettingSSLRecommender, SettingGetResponseItemZonesTLS1_2Only, - ZonesTLS1_3, - ZonesTLSClientAuth, - ZonesTrueClientIPHeader, - ZonesWAF, - ZonesWebP, - ZonesWebsockets, + ZoneSettingTLS1_3, + ZoneSettingTLSClientAuth, + ZoneSettingTrueClientIPHeader, + ZoneSettingWAF, + ZoneSettingWebP, + ZoneSettingWebsockets, ] SettingGetResponse = List[SettingGetResponseItem] diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py index 36b465364e7..8fb435e00d7 100644 --- a/src/cloudflare/types/zones/settings/__init__.py +++ b/src/cloudflare/types/zones/settings/__init__.py @@ -2,152 +2,154 @@ from __future__ import annotations -from .zones_nel import ZonesNEL as ZonesNEL -from .zones_ssl import ZonesSSL as ZonesSSL -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_http2 import ZonesHTTP2 as ZonesHTTP2 -from .zones_http3 import ZonesHTTP3 as ZonesHTTP3 -from .zones_brotli import ZonesBrotli as ZonesBrotli -from .zones_minify import ZonesMinify as ZonesMinify -from .zones_mirage import ZonesMirage as ZonesMirage -from .zones_polish import ZonesPolish as ZonesPolish -from .zones_ciphers import ZonesCiphers as ZonesCiphers -from .zones_tls_1_3 import ZonesTLS1_3 as ZonesTLS1_3 from .nel_edit_params import NELEditParams as NELEditParams from .ssl_edit_params import SSLEditParams as SSLEditParams from .waf_edit_params import WAFEditParams as WAFEditParams -from .zones_buffering import ZonesBuffering as ZonesBuffering -from .zones_nel_param import ZonesNELParam as ZonesNELParam -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 .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_websockets import ZonesWebsockets as ZonesWebsockets +from .zone_setting_nel import ZoneSettingNEL as ZoneSettingNEL +from .zone_setting_ssl import ZoneSettingSSL as ZoneSettingSSL +from .zone_setting_waf import ZoneSettingWAF as ZoneSettingWAF from .http2_edit_params import HTTP2EditParams as HTTP2EditParams from .http3_edit_params import HTTP3EditParams as HTTP3EditParams -from .zones_cache_level import ZonesCacheLevel as ZonesCacheLevel -from .zones_early_hints import ZonesEarlyHints as ZonesEarlyHints -from .zones_http2_param import ZonesHTTP2Param as ZonesHTTP2Param -from .zones_http3_param import ZonesHTTP3Param as ZonesHTTP3Param -from .zones_pseudo_ipv4 import ZonesPseudoIPV4 as ZonesPseudoIPV4 +from .zone_setting_0rtt import ZoneSetting0rtt as ZoneSetting0rtt +from .zone_setting_ipv6 import ZoneSettingIPV6 as ZoneSettingIPV6 +from .zone_setting_webp import ZoneSettingWebP as ZoneSettingWebP from .brotli_edit_params import BrotliEditParams as BrotliEditParams from .cipher_edit_params import CipherEditParams as CipherEditParams from .minify_edit_params import MinifyEditParams as MinifyEditParams from .mirage_edit_params import MirageEditParams as MirageEditParams from .polish_edit_params import PolishEditParams as PolishEditParams -from .zones_brotli_param import ZonesBrotliParam as ZonesBrotliParam -from .zones_minify_param import ZonesMinifyParam as ZonesMinifyParam -from .zones_mirage_param import ZonesMirageParam as ZonesMirageParam -from .zones_polish_param import ZonesPolishParam as ZonesPolishParam +from .zone_setting_fonts import ZoneSettingFonts as ZoneSettingFonts +from .zone_setting_http2 import ZoneSettingHTTP2 as ZoneSettingHTTP2 +from .zone_setting_http3 import ZoneSettingHTTP3 as ZoneSettingHTTP3 from .tls_1_3_edit_params import TLS1_3EditParams as TLS1_3EditParams -from .zones_advanced_ddos import ZonesAdvancedDDOS as ZonesAdvancedDDOS -from .zones_always_online import ZonesAlwaysOnline as ZonesAlwaysOnline -from .zones_browser_check import ZonesBrowserCheck as ZonesBrowserCheck -from .zones_challenge_ttl import ZonesChallengeTTL as ZonesChallengeTTL -from .zones_ciphers_param import ZonesCiphersParam as ZonesCiphersParam -from .zones_rocket_loader import ZonesRocketLoader as ZonesRocketLoader -from .zones_tls_1_3_param import ZonesTLS1_3Param as ZonesTLS1_3Param +from .zone_setting_brotli import ZoneSettingBrotli as ZoneSettingBrotli +from .zone_setting_minify import ZoneSettingMinify as ZoneSettingMinify +from .zone_setting_mirage import ZoneSettingMirage as ZoneSettingMirage +from .zone_setting_polish import ZoneSettingPolish as ZoneSettingPolish from .zero_rtt_edit_params import ZeroRTTEditParams as ZeroRTTEditParams -from .zones_image_resizing import ZonesImageResizing as ZonesImageResizing -from .zones_ip_geolocation import ZonesIPGeolocation as ZonesIPGeolocation -from .zones_security_level import ZonesSecurityLevel as ZonesSecurityLevel +from .zone_setting_ciphers import ZoneSettingCiphers as ZoneSettingCiphers +from .zone_setting_tls_1_3 import ZoneSettingTLS1_3 as ZoneSettingTLS1_3 from .websocket_edit_params import WebsocketEditParams as WebsocketEditParams -from .zones_buffering_param import ZonesBufferingParam as ZonesBufferingParam -from .zones_min_tls_version import ZonesMinTLSVersion as ZonesMinTLSVersion -from .zones_mobile_redirect import ZonesMobileRedirect as ZonesMobileRedirect -from .zones_security_header import ZonesSecurityHeader as ZonesSecurityHeader -from .zones_ssl_recommender import ZonesSSLRecommender as ZonesSSLRecommender -from .zones_tls_client_auth import ZonesTLSClientAuth as ZonesTLSClientAuth from .early_hint_edit_params import EarlyHintEditParams as EarlyHintEditParams -from .speed_cloudflare_fonts import SpeedCloudflareFonts as SpeedCloudflareFonts -from .zones_always_use_https import ZonesAlwaysUseHTTPS as ZonesAlwaysUseHTTPS -from .zones_development_mode import ZonesDevelopmentMode as ZonesDevelopmentMode -from .zones_orange_to_orange import ZonesOrangeToOrange as ZonesOrangeToOrange -from .zones_prefetch_preload import ZonesPrefetchPreload as ZonesPrefetchPreload -from .zones_websockets_param import ZonesWebsocketsParam as ZonesWebsocketsParam +from .zone_setting_buffering import ZoneSettingBuffering as ZoneSettingBuffering +from .zone_setting_nel_param import ZoneSettingNELParam as ZoneSettingNELParam +from .zone_setting_ssl_param import ZoneSettingSSLParam as ZoneSettingSSLParam +from .zone_setting_waf_param import ZoneSettingWAFParam as ZoneSettingWAFParam from .cache_level_edit_params import CacheLevelEditParams as CacheLevelEditParams from .pseudo_ipv4_edit_params import PseudoIPV4EditParams as PseudoIPV4EditParams -from .zones_browser_cache_ttl import ZonesBrowserCacheTTL as ZonesBrowserCacheTTL -from .zones_cache_level_param import ZonesCacheLevelParam as ZonesCacheLevelParam -from .zones_early_hints_param import ZonesEarlyHintsParam as ZonesEarlyHintsParam -from .zones_email_obfuscation import ZonesEmailObfuscation as ZonesEmailObfuscation -from .zones_h2_prioritization import ZonesH2Prioritization as ZonesH2Prioritization -from .zones_pseudo_ipv4_param import ZonesPseudoIPV4Param as ZonesPseudoIPV4Param +from .zone_setting_0rtt_param import ZoneSetting0rttParam as ZoneSetting0rttParam +from .zone_setting_ipv6_param import ZoneSettingIPV6Param as ZoneSettingIPV6Param +from .zone_setting_webp_param import ZoneSettingWebPParam as ZoneSettingWebPParam +from .zone_setting_websockets import ZoneSettingWebsockets as ZoneSettingWebsockets from .font_setting_edit_params import FontSettingEditParams as FontSettingEditParams -from .zones_hotlink_protection import ZonesHotlinkProtection as ZonesHotlinkProtection -from .zones_proxy_read_timeout import ZonesProxyReadTimeout as ZonesProxyReadTimeout +from .zone_setting_cache_level import ZoneSettingCacheLevel as ZoneSettingCacheLevel +from .zone_setting_early_hints import ZoneSettingEarlyHints as ZoneSettingEarlyHints +from .zone_setting_http2_param import ZoneSettingHTTP2Param as ZoneSettingHTTP2Param +from .zone_setting_http3_param import ZoneSettingHTTP3Param as ZoneSettingHTTP3Param +from .zone_setting_pseudo_ipv4 import ZoneSettingPseudoIPV4 as ZoneSettingPseudoIPV4 from .always_online_edit_params import AlwaysOnlineEditParams as AlwaysOnlineEditParams from .browser_check_edit_params import BrowserCheckEditParams as BrowserCheckEditParams from .challenge_ttl_edit_params import ChallengeTTLEditParams as ChallengeTTLEditParams from .rocket_loader_edit_params import RocketLoaderEditParams as RocketLoaderEditParams -from .zones_advanced_ddos_param import ZonesAdvancedDDOSParam as ZonesAdvancedDDOSParam -from .zones_always_online_param import ZonesAlwaysOnlineParam as ZonesAlwaysOnlineParam -from .zones_browser_check_param import ZonesBrowserCheckParam as ZonesBrowserCheckParam -from .zones_challenge_ttl_param import ZonesChallengeTTLParam as ZonesChallengeTTLParam -from .zones_opportunistic_onion import ZonesOpportunisticOnion as ZonesOpportunisticOnion -from .zones_rocket_loader_param import ZonesRocketLoaderParam as ZonesRocketLoaderParam -from .zones_server_side_exclude import ZonesServerSideExclude as ZonesServerSideExclude +from .zone_setting_brotli_param import ZoneSettingBrotliParam as ZoneSettingBrotliParam +from .zone_setting_minify_param import ZoneSettingMinifyParam as ZoneSettingMinifyParam +from .zone_setting_mirage_param import ZoneSettingMirageParam as ZoneSettingMirageParam +from .zone_setting_polish_param import ZoneSettingPolishParam as ZoneSettingPolishParam from .image_resizing_edit_params import ImageResizingEditParams as ImageResizingEditParams from .ip_geolocation_edit_params import IPGeolocationEditParams as IPGeolocationEditParams from .security_level_edit_params import SecurityLevelEditParams as SecurityLevelEditParams -from .zones_image_resizing_param import ZonesImageResizingParam as ZonesImageResizingParam -from .zones_ip_geolocation_param import ZonesIPGeolocationParam as ZonesIPGeolocationParam -from .zones_security_level_param import ZonesSecurityLevelParam as ZonesSecurityLevelParam +from .zone_setting_advanced_ddos import ZoneSettingAdvancedDDOS as ZoneSettingAdvancedDDOS +from .zone_setting_always_online import ZoneSettingAlwaysOnline as ZoneSettingAlwaysOnline +from .zone_setting_browser_check import ZoneSettingBrowserCheck as ZoneSettingBrowserCheck +from .zone_setting_challenge_ttl import ZoneSettingChallengeTTL as ZoneSettingChallengeTTL +from .zone_setting_ciphers_param import ZoneSettingCiphersParam as ZoneSettingCiphersParam +from .zone_setting_rocket_loader import ZoneSettingRocketLoader as ZoneSettingRocketLoader +from .zone_setting_tls_1_3_param import ZoneSettingTLS1_3Param as ZoneSettingTLS1_3Param from .min_tls_version_edit_params import MinTLSVersionEditParams as MinTLSVersionEditParams from .mobile_redirect_edit_params import MobileRedirectEditParams as MobileRedirectEditParams from .security_header_edit_params import SecurityHeaderEditParams as SecurityHeaderEditParams from .ssl_recommender_edit_params import SSLRecommenderEditParams as SSLRecommenderEditParams from .tls_client_auth_edit_params import TLSClientAuthEditParams as TLSClientAuthEditParams -from .zones_min_tls_version_param import ZonesMinTLSVersionParam as ZonesMinTLSVersionParam -from .zones_mobile_redirect_param import ZonesMobileRedirectParam as ZonesMobileRedirectParam -from .zones_security_header_param import ZonesSecurityHeaderParam as ZonesSecurityHeaderParam -from .zones_ssl_recommender_param import ZonesSSLRecommenderParam as ZonesSSLRecommenderParam -from .zones_tls_client_auth_param import ZonesTLSClientAuthParam as ZonesTLSClientAuthParam -from .zones_true_client_ip_header import ZonesTrueClientIPHeader as ZonesTrueClientIPHeader +from .zone_setting_image_resizing import ZoneSettingImageResizing as ZoneSettingImageResizing +from .zone_setting_ip_geolocation import ZoneSettingIPGeolocation as ZoneSettingIPGeolocation +from .zone_setting_security_level import ZoneSettingSecurityLevel as ZoneSettingSecurityLevel from .always_use_https_edit_params import AlwaysUseHTTPSEditParams as AlwaysUseHTTPSEditParams from .development_mode_edit_params import DevelopmentModeEditParams as DevelopmentModeEditParams from .orange_to_orange_edit_params import OrangeToOrangeEditParams as OrangeToOrangeEditParams from .prefetch_preload_edit_params import PrefetchPreloadEditParams as PrefetchPreloadEditParams -from .zones_always_use_https_param import ZonesAlwaysUseHTTPSParam as ZonesAlwaysUseHTTPSParam -from .zones_development_mode_param import ZonesDevelopmentModeParam as ZonesDevelopmentModeParam -from .zones_orange_to_orange_param import ZonesOrangeToOrangeParam as ZonesOrangeToOrangeParam -from .zones_prefetch_preload_param import ZonesPrefetchPreloadParam as ZonesPrefetchPreloadParam +from .zone_setting_buffering_param import ZoneSettingBufferingParam as ZoneSettingBufferingParam +from .zone_setting_min_tls_version import ZoneSettingMinTLSVersion as ZoneSettingMinTLSVersion +from .zone_setting_mobile_redirect import ZoneSettingMobileRedirect as ZoneSettingMobileRedirect +from .zone_setting_security_header import ZoneSettingSecurityHeader as ZoneSettingSecurityHeader +from .zone_setting_ssl_recommender import ZoneSettingSSLRecommender as ZoneSettingSSLRecommender +from .zone_setting_tls_client_auth import ZoneSettingTLSClientAuth as ZoneSettingTLSClientAuth from .browser_cache_ttl_edit_params import BrowserCacheTTLEditParams as BrowserCacheTTLEditParams from .email_obfuscation_edit_params import EmailObfuscationEditParams as EmailObfuscationEditParams from .h2_prioritization_edit_params import H2PrioritizationEditParams as H2PrioritizationEditParams -from .zones_browser_cache_ttl_param import ZonesBrowserCacheTTLParam as ZonesBrowserCacheTTLParam -from .zones_email_obfuscation_param import ZonesEmailObfuscationParam as ZonesEmailObfuscationParam -from .zones_h2_prioritization_param import ZonesH2PrioritizationParam as ZonesH2PrioritizationParam +from .zone_setting_always_use_https import ZoneSettingAlwaysUseHTTPS as ZoneSettingAlwaysUseHTTPS +from .zone_setting_development_mode import ZoneSettingDevelopmentMode as ZoneSettingDevelopmentMode +from .zone_setting_orange_to_orange import ZoneSettingOrangeToOrange as ZoneSettingOrangeToOrange +from .zone_setting_prefetch_preload import ZoneSettingPrefetchPreload as ZoneSettingPrefetchPreload +from .zone_setting_websockets_param import ZoneSettingWebsocketsParam as ZoneSettingWebsocketsParam from .hotlink_protection_edit_params import HotlinkProtectionEditParams as HotlinkProtectionEditParams from .proxy_read_timeout_edit_params import ProxyReadTimeoutEditParams as ProxyReadTimeoutEditParams from .response_buffering_edit_params import ResponseBufferingEditParams as ResponseBufferingEditParams -from .zones_automatic_https_rewrites import ZonesAutomaticHTTPSRewrites as ZonesAutomaticHTTPSRewrites -from .zones_hotlink_protection_param import ZonesHotlinkProtectionParam as ZonesHotlinkProtectionParam -from .zones_opportunistic_encryption import ZonesOpportunisticEncryption as ZonesOpportunisticEncryption -from .zones_proxy_read_timeout_param import ZonesProxyReadTimeoutParam as ZonesProxyReadTimeoutParam +from .zone_setting_browser_cache_ttl import ZoneSettingBrowserCacheTTL as ZoneSettingBrowserCacheTTL +from .zone_setting_cache_level_param import ZoneSettingCacheLevelParam as ZoneSettingCacheLevelParam +from .zone_setting_early_hints_param import ZoneSettingEarlyHintsParam as ZoneSettingEarlyHintsParam +from .zone_setting_email_obfuscation import ZoneSettingEmailObfuscation as ZoneSettingEmailObfuscation +from .zone_setting_h2_prioritization import ZoneSettingH2Prioritization as ZoneSettingH2Prioritization +from .zone_setting_pseudo_ipv4_param import ZoneSettingPseudoIPV4Param as ZoneSettingPseudoIPV4Param from .opportunistic_onion_edit_params import OpportunisticOnionEditParams as OpportunisticOnionEditParams from .server_side_exclude_edit_params import ServerSideExcludeEditParams as ServerSideExcludeEditParams -from .zones_opportunistic_onion_param import ZonesOpportunisticOnionParam as ZonesOpportunisticOnionParam -from .zones_server_side_exclude_param import ZonesServerSideExcludeParam as ZonesServerSideExcludeParam +from .zone_setting_hotlink_protection import ZoneSettingHotlinkProtection as ZoneSettingHotlinkProtection +from .zone_setting_proxy_read_timeout import ZoneSettingProxyReadTimeout as ZoneSettingProxyReadTimeout +from .zone_setting_advanced_ddos_param import ZoneSettingAdvancedDDOSParam as ZoneSettingAdvancedDDOSParam +from .zone_setting_always_online_param import ZoneSettingAlwaysOnlineParam as ZoneSettingAlwaysOnlineParam +from .zone_setting_browser_check_param import ZoneSettingBrowserCheckParam as ZoneSettingBrowserCheckParam +from .zone_setting_challenge_ttl_param import ZoneSettingChallengeTTLParam as ZoneSettingChallengeTTLParam +from .zone_setting_opportunistic_onion import ZoneSettingOpportunisticOnion as ZoneSettingOpportunisticOnion +from .zone_setting_rocket_loader_param import ZoneSettingRocketLoaderParam as ZoneSettingRocketLoaderParam +from .zone_setting_server_side_exclude import ZoneSettingServerSideExclude as ZoneSettingServerSideExclude from .true_client_ip_header_edit_params import TrueClientIPHeaderEditParams as TrueClientIPHeaderEditParams -from .zones_origin_error_page_pass_thru import ZonesOriginErrorPagePassThru as ZonesOriginErrorPagePassThru -from .zones_sort_query_string_for_cache import ZonesSortQueryStringForCache as ZonesSortQueryStringForCache -from .zones_true_client_ip_header_param import ZonesTrueClientIPHeaderParam as ZonesTrueClientIPHeaderParam +from .zone_setting_image_resizing_param import ZoneSettingImageResizingParam as ZoneSettingImageResizingParam +from .zone_setting_ip_geolocation_param import ZoneSettingIPGeolocationParam as ZoneSettingIPGeolocationParam +from .zone_setting_security_level_param import ZoneSettingSecurityLevelParam as ZoneSettingSecurityLevelParam +from .zone_setting_min_tls_version_param import ZoneSettingMinTLSVersionParam as ZoneSettingMinTLSVersionParam +from .zone_setting_mobile_redirect_param import ZoneSettingMobileRedirectParam as ZoneSettingMobileRedirectParam +from .zone_setting_security_header_param import ZoneSettingSecurityHeaderParam as ZoneSettingSecurityHeaderParam +from .zone_setting_ssl_recommender_param import ZoneSettingSSLRecommenderParam as ZoneSettingSSLRecommenderParam +from .zone_setting_tls_client_auth_param import ZoneSettingTLSClientAuthParam as ZoneSettingTLSClientAuthParam +from .zone_setting_true_client_ip_header import ZoneSettingTrueClientIPHeader as ZoneSettingTrueClientIPHeader from .automatic_https_rewrite_edit_params import AutomaticHTTPSRewriteEditParams as AutomaticHTTPSRewriteEditParams from .origin_max_http_version_edit_params import OriginMaxHTTPVersionEditParams as OriginMaxHTTPVersionEditParams +from .zone_setting_always_use_https_param import ZoneSettingAlwaysUseHTTPSParam as ZoneSettingAlwaysUseHTTPSParam +from .zone_setting_development_mode_param import ZoneSettingDevelopmentModeParam as ZoneSettingDevelopmentModeParam +from .zone_setting_orange_to_orange_param import ZoneSettingOrangeToOrangeParam as ZoneSettingOrangeToOrangeParam +from .zone_setting_prefetch_preload_param import ZoneSettingPrefetchPreloadParam as ZoneSettingPrefetchPreloadParam from .opportunistic_encryption_edit_params import OpportunisticEncryptionEditParams as OpportunisticEncryptionEditParams from .origin_max_http_version_get_response import OriginMaxHTTPVersionGetResponse as OriginMaxHTTPVersionGetResponse -from .zones_automatic_https_rewrites_param import ZonesAutomaticHTTPSRewritesParam as ZonesAutomaticHTTPSRewritesParam -from .zones_opportunistic_encryption_param import ZonesOpportunisticEncryptionParam as ZonesOpportunisticEncryptionParam +from .zone_setting_browser_cache_ttl_param import ZoneSettingBrowserCacheTTLParam as ZoneSettingBrowserCacheTTLParam +from .zone_setting_email_obfuscation_param import ZoneSettingEmailObfuscationParam as ZoneSettingEmailObfuscationParam +from .zone_setting_h2_prioritization_param import ZoneSettingH2PrioritizationParam as ZoneSettingH2PrioritizationParam from .origin_max_http_version_edit_response import OriginMaxHTTPVersionEditResponse as OriginMaxHTTPVersionEditResponse -from .zones_automatic_platform_optimization import ( - ZonesAutomaticPlatformOptimization as ZonesAutomaticPlatformOptimization, +from .zone_setting_automatic_https_rewrites import ( + ZoneSettingAutomaticHTTPSRewrites as ZoneSettingAutomaticHTTPSRewrites, +) +from .zone_setting_hotlink_protection_param import ( + ZoneSettingHotlinkProtectionParam as ZoneSettingHotlinkProtectionParam, +) +from .zone_setting_opportunistic_encryption import ( + ZoneSettingOpportunisticEncryption as ZoneSettingOpportunisticEncryption, +) +from .zone_setting_proxy_read_timeout_param import ZoneSettingProxyReadTimeoutParam as ZoneSettingProxyReadTimeoutParam +from .zone_setting_opportunistic_onion_param import ( + ZoneSettingOpportunisticOnionParam as ZoneSettingOpportunisticOnionParam, +) +from .zone_setting_server_side_exclude_param import ( + ZoneSettingServerSideExcludeParam as ZoneSettingServerSideExcludeParam, ) from .origin_error_page_pass_thru_edit_params import ( OriginErrorPagePassThruEditParams as OriginErrorPagePassThruEditParams, @@ -155,15 +157,33 @@ from .sort_query_string_for_cache_edit_params import ( SortQueryStringForCacheEditParams as SortQueryStringForCacheEditParams, ) -from .zones_origin_error_page_pass_thru_param import ( - ZonesOriginErrorPagePassThruParam as ZonesOriginErrorPagePassThruParam, +from .zone_setting_origin_error_page_pass_thru import ( + ZoneSettingOriginErrorPagePassThru as ZoneSettingOriginErrorPagePassThru, +) +from .zone_setting_sort_query_string_for_cache import ( + ZoneSettingSortQueryStringForCache as ZoneSettingSortQueryStringForCache, ) -from .zones_sort_query_string_for_cache_param import ( - ZonesSortQueryStringForCacheParam as ZonesSortQueryStringForCacheParam, +from .zone_setting_true_client_ip_header_param import ( + ZoneSettingTrueClientIPHeaderParam as ZoneSettingTrueClientIPHeaderParam, ) from .automatic_platform_optimization_edit_params import ( AutomaticPlatformOptimizationEditParams as AutomaticPlatformOptimizationEditParams, ) -from .zones_automatic_platform_optimization_param import ( - ZonesAutomaticPlatformOptimizationParam as ZonesAutomaticPlatformOptimizationParam, +from .zone_setting_automatic_https_rewrites_param import ( + ZoneSettingAutomaticHTTPSRewritesParam as ZoneSettingAutomaticHTTPSRewritesParam, +) +from .zone_setting_opportunistic_encryption_param import ( + ZoneSettingOpportunisticEncryptionParam as ZoneSettingOpportunisticEncryptionParam, +) +from .zone_setting_automatic_platform_optimization import ( + ZoneSettingAutomaticPlatformOptimization as ZoneSettingAutomaticPlatformOptimization, +) +from .zone_setting_origin_error_page_pass_thru_param import ( + ZoneSettingOriginErrorPagePassThruParam as ZoneSettingOriginErrorPagePassThruParam, +) +from .zone_setting_sort_query_string_for_cache_param import ( + ZoneSettingSortQueryStringForCacheParam as ZoneSettingSortQueryStringForCacheParam, +) +from .zone_setting_automatic_platform_optimization_param import ( + ZoneSettingAutomaticPlatformOptimizationParam as ZoneSettingAutomaticPlatformOptimizationParam, ) diff --git a/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py b/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py index d2cd26cda07..e7e7da4514e 100644 --- a/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py +++ b/src/cloudflare/types/zones/settings/automatic_platform_optimization_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_automatic_platform_optimization_param import ZonesAutomaticPlatformOptimizationParam +from .zone_setting_automatic_platform_optimization_param import ZoneSettingAutomaticPlatformOptimizationParam __all__ = ["AutomaticPlatformOptimizationEditParams"] @@ -13,4 +13,4 @@ class AutomaticPlatformOptimizationEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesAutomaticPlatformOptimizationParam] + value: Required[ZoneSettingAutomaticPlatformOptimizationParam] diff --git a/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py b/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py index 9164369178a..ac5feb84511 100644 --- a/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py +++ b/src/cloudflare/types/zones/settings/h2_prioritization_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_h2_prioritization_param import ZonesH2PrioritizationParam +from .zone_setting_h2_prioritization_param import ZoneSettingH2PrioritizationParam __all__ = ["H2PrioritizationEditParams"] @@ -13,7 +13,7 @@ class H2PrioritizationEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesH2PrioritizationParam] + value: Required[ZoneSettingH2PrioritizationParam] """ HTTP/2 Edge Prioritization optimises the delivery of resources served through HTTP/2 to improve page load performance. It also supports fine control of diff --git a/src/cloudflare/types/zones/settings/image_resizing_edit_params.py b/src/cloudflare/types/zones/settings/image_resizing_edit_params.py index e7c7a72b762..f36d9285cd3 100644 --- a/src/cloudflare/types/zones/settings/image_resizing_edit_params.py +++ b/src/cloudflare/types/zones/settings/image_resizing_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_image_resizing_param import ZonesImageResizingParam +from .zone_setting_image_resizing_param import ZoneSettingImageResizingParam __all__ = ["ImageResizingEditParams"] @@ -13,7 +13,7 @@ class ImageResizingEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesImageResizingParam] + value: Required[ZoneSettingImageResizingParam] """ Image Resizing provides on-demand resizing, conversion and optimisation for images served through Cloudflare's network. Refer to the diff --git a/src/cloudflare/types/zones/settings/nel_edit_params.py b/src/cloudflare/types/zones/settings/nel_edit_params.py index 7c70c02c129..1043d489c22 100644 --- a/src/cloudflare/types/zones/settings/nel_edit_params.py +++ b/src/cloudflare/types/zones/settings/nel_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_nel_param import ZonesNELParam +from .zone_setting_nel_param import ZoneSettingNELParam __all__ = ["NELEditParams"] @@ -13,5 +13,5 @@ class NELEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesNELParam] + value: Required[ZoneSettingNELParam] """Enable Network Error Logging reporting on your zone. (Beta)""" diff --git a/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py b/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py index 08b4c6791de..5758995a76e 100644 --- a/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py +++ b/src/cloudflare/types/zones/settings/orange_to_orange_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_orange_to_orange_param import ZonesOrangeToOrangeParam +from .zone_setting_orange_to_orange_param import ZoneSettingOrangeToOrangeParam __all__ = ["OrangeToOrangeEditParams"] @@ -13,7 +13,7 @@ class OrangeToOrangeEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesOrangeToOrangeParam] + value: Required[ZoneSettingOrangeToOrangeParam] """ Orange to Orange (O2O) allows zones on Cloudflare to CNAME to other zones also on Cloudflare. diff --git a/src/cloudflare/types/zones/settings/polish_edit_params.py b/src/cloudflare/types/zones/settings/polish_edit_params.py index dde5500407e..4612df87efa 100644 --- a/src/cloudflare/types/zones/settings/polish_edit_params.py +++ b/src/cloudflare/types/zones/settings/polish_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_polish_param import ZonesPolishParam +from .zone_setting_polish_param import ZoneSettingPolishParam __all__ = ["PolishEditParams"] @@ -13,7 +13,7 @@ class PolishEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesPolishParam] + value: Required[ZoneSettingPolishParam] """Removes metadata and compresses your images for faster page load times. Basic (Lossless): Reduce the size of PNG, JPEG, and GIF files - no impact on diff --git a/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py b/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py index 886d1231c7e..a01e1c1c05f 100644 --- a/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py +++ b/src/cloudflare/types/zones/settings/proxy_read_timeout_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_proxy_read_timeout_param import ZonesProxyReadTimeoutParam +from .zone_setting_proxy_read_timeout_param import ZoneSettingProxyReadTimeoutParam __all__ = ["ProxyReadTimeoutEditParams"] @@ -13,5 +13,5 @@ class ProxyReadTimeoutEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesProxyReadTimeoutParam] + value: Required[ZoneSettingProxyReadTimeoutParam] """Maximum time between two read operations from origin.""" diff --git a/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py b/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py index a47fb96b020..a1ac846330c 100644 --- a/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py +++ b/src/cloudflare/types/zones/settings/rocket_loader_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_rocket_loader_param import ZonesRocketLoaderParam +from .zone_setting_rocket_loader_param import ZoneSettingRocketLoaderParam __all__ = ["RocketLoaderEditParams"] @@ -13,7 +13,7 @@ class RocketLoaderEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesRocketLoaderParam] + value: Required[ZoneSettingRocketLoaderParam] """ Rocket Loader is a general-purpose asynchronous JavaScript optimisation that prioritises rendering your content while loading your site's Javascript diff --git a/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py b/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py index 5c85f3cc1fb..f2db5469144 100644 --- a/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py +++ b/src/cloudflare/types/zones/settings/ssl_recommender_edit_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -from .zones_ssl_recommender_param import ZonesSSLRecommenderParam +from .zone_setting_ssl_recommender_param import ZoneSettingSSLRecommenderParam __all__ = ["SSLRecommenderEditParams"] @@ -13,7 +13,7 @@ class SSLRecommenderEditParams(TypedDict, total=False): zone_id: Required[str] """Identifier""" - value: Required[ZonesSSLRecommenderParam] + value: Required[ZoneSettingSSLRecommenderParam] """ Enrollment in the SSL/TLS Recommender service which tries to detect and recommend (by sending periodic emails) the most secure SSL/TLS setting your diff --git a/src/cloudflare/types/zones/settings/zones_0rtt.py b/src/cloudflare/types/zones/settings/zone_setting_0rtt.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_0rtt.py rename to src/cloudflare/types/zones/settings/zone_setting_0rtt.py index 9c0dede6121..dbe59f9b50b 100644 --- a/src/cloudflare/types/zones/settings/zones_0rtt.py +++ b/src/cloudflare/types/zones/settings/zone_setting_0rtt.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["Zones0rtt"] +__all__ = ["ZoneSetting0rtt"] -class Zones0rtt(BaseModel): +class ZoneSetting0rtt(BaseModel): id: Literal["0rtt"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_0rtt_param.py b/src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_0rtt_param.py rename to src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py index 5b083d92941..784c92adabd 100644 --- a/src/cloudflare/types/zones/settings/zones_0rtt_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_0rtt_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["Zones0rttParam"] +__all__ = ["ZoneSetting0rttParam"] -class Zones0rttParam(TypedDict, total=False): +class ZoneSetting0rttParam(TypedDict, total=False): id: Required[Literal["0rtt"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_advanced_ddos.py b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_advanced_ddos.py rename to src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py index 5ec5b5e7a17..aaebab81f32 100644 --- a/src/cloudflare/types/zones/settings/zones_advanced_ddos.py +++ b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesAdvancedDDOS"] +__all__ = ["ZoneSettingAdvancedDDOS"] -class ZonesAdvancedDDOS(BaseModel): +class ZoneSettingAdvancedDDOS(BaseModel): id: Literal["advanced_ddos"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_advanced_ddos_param.py b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_advanced_ddos_param.py rename to src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py index 7577bb1257f..d928f35a454 100644 --- a/src/cloudflare/types/zones/settings/zones_advanced_ddos_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesAdvancedDDOSParam"] +__all__ = ["ZoneSettingAdvancedDDOSParam"] -class ZonesAdvancedDDOSParam(TypedDict, total=False): +class ZoneSettingAdvancedDDOSParam(TypedDict, total=False): id: Required[Literal["advanced_ddos"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_always_online.py b/src/cloudflare/types/zones/settings/zone_setting_always_online.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_always_online.py rename to src/cloudflare/types/zones/settings/zone_setting_always_online.py index 69e0beb2ced..2fb96c5f808 100644 --- a/src/cloudflare/types/zones/settings/zones_always_online.py +++ b/src/cloudflare/types/zones/settings/zone_setting_always_online.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesAlwaysOnline"] +__all__ = ["ZoneSettingAlwaysOnline"] -class ZonesAlwaysOnline(BaseModel): +class ZoneSettingAlwaysOnline(BaseModel): id: Literal["always_online"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_always_online_param.py b/src/cloudflare/types/zones/settings/zone_setting_always_online_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_always_online_param.py rename to src/cloudflare/types/zones/settings/zone_setting_always_online_param.py index 426cadf7a86..3691306d0a2 100644 --- a/src/cloudflare/types/zones/settings/zones_always_online_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_always_online_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesAlwaysOnlineParam"] +__all__ = ["ZoneSettingAlwaysOnlineParam"] -class ZonesAlwaysOnlineParam(TypedDict, total=False): +class ZoneSettingAlwaysOnlineParam(TypedDict, total=False): id: Required[Literal["always_online"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_always_use_https.py b/src/cloudflare/types/zones/settings/zone_setting_always_use_https.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_always_use_https.py rename to src/cloudflare/types/zones/settings/zone_setting_always_use_https.py index 7d1ad7d29b9..500d331ab02 100644 --- a/src/cloudflare/types/zones/settings/zones_always_use_https.py +++ b/src/cloudflare/types/zones/settings/zone_setting_always_use_https.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesAlwaysUseHTTPS"] +__all__ = ["ZoneSettingAlwaysUseHTTPS"] -class ZonesAlwaysUseHTTPS(BaseModel): +class ZoneSettingAlwaysUseHTTPS(BaseModel): id: Literal["always_use_https"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_always_use_https_param.py b/src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_always_use_https_param.py rename to src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py index 40b2bc45282..899c460b940 100644 --- a/src/cloudflare/types/zones/settings/zones_always_use_https_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_always_use_https_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesAlwaysUseHTTPSParam"] +__all__ = ["ZoneSettingAlwaysUseHTTPSParam"] -class ZonesAlwaysUseHTTPSParam(TypedDict, total=False): +class ZoneSettingAlwaysUseHTTPSParam(TypedDict, total=False): id: Required[Literal["always_use_https"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites.py b/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites.py similarity index 86% rename from src/cloudflare/types/zones/settings/zones_automatic_https_rewrites.py rename to src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites.py index 65d7a67244e..c6b14fb8df4 100644 --- a/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites.py +++ b/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesAutomaticHTTPSRewrites"] +__all__ = ["ZoneSettingAutomaticHTTPSRewrites"] -class ZonesAutomaticHTTPSRewrites(BaseModel): +class ZoneSettingAutomaticHTTPSRewrites(BaseModel): id: Literal["automatic_https_rewrites"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites_param.py b/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py similarity index 74% rename from src/cloudflare/types/zones/settings/zones_automatic_https_rewrites_param.py rename to src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py index 67d889ce6f2..dada4f53714 100644 --- a/src/cloudflare/types/zones/settings/zones_automatic_https_rewrites_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_automatic_https_rewrites_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesAutomaticHTTPSRewritesParam"] +__all__ = ["ZoneSettingAutomaticHTTPSRewritesParam"] -class ZonesAutomaticHTTPSRewritesParam(TypedDict, total=False): +class ZoneSettingAutomaticHTTPSRewritesParam(TypedDict, total=False): id: Required[Literal["automatic_https_rewrites"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization.py b/src/cloudflare/types/zones/settings/zone_setting_automatic_platform_optimization.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_automatic_platform_optimization.py rename to src/cloudflare/types/zones/settings/zone_setting_automatic_platform_optimization.py index 01bf45dadad..c36be435288 100644 --- a/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization.py +++ b/src/cloudflare/types/zones/settings/zone_setting_automatic_platform_optimization.py @@ -4,10 +4,10 @@ from ...._models import BaseModel -__all__ = ["ZonesAutomaticPlatformOptimization"] +__all__ = ["ZoneSettingAutomaticPlatformOptimization"] -class ZonesAutomaticPlatformOptimization(BaseModel): +class ZoneSettingAutomaticPlatformOptimization(BaseModel): cache_by_device_type: bool """ Indicates whether or not diff --git a/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization_param.py b/src/cloudflare/types/zones/settings/zone_setting_automatic_platform_optimization_param.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_automatic_platform_optimization_param.py rename to src/cloudflare/types/zones/settings/zone_setting_automatic_platform_optimization_param.py index 5299b7f026a..bcc686bc18d 100644 --- a/src/cloudflare/types/zones/settings/zones_automatic_platform_optimization_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_automatic_platform_optimization_param.py @@ -5,10 +5,10 @@ from typing import List from typing_extensions import Required, TypedDict -__all__ = ["ZonesAutomaticPlatformOptimizationParam"] +__all__ = ["ZoneSettingAutomaticPlatformOptimizationParam"] -class ZonesAutomaticPlatformOptimizationParam(TypedDict, total=False): +class ZoneSettingAutomaticPlatformOptimizationParam(TypedDict, total=False): cache_by_device_type: Required[bool] """ Indicates whether or not diff --git a/src/cloudflare/types/zones/settings/zones_brotli.py b/src/cloudflare/types/zones/settings/zone_setting_brotli.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_brotli.py rename to src/cloudflare/types/zones/settings/zone_setting_brotli.py index e7c8e8ec30c..6e9515ab6ef 100644 --- a/src/cloudflare/types/zones/settings/zones_brotli.py +++ b/src/cloudflare/types/zones/settings/zone_setting_brotli.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesBrotli"] +__all__ = ["ZoneSettingBrotli"] -class ZonesBrotli(BaseModel): +class ZoneSettingBrotli(BaseModel): id: Literal["brotli"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_brotli_param.py b/src/cloudflare/types/zones/settings/zone_setting_brotli_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_brotli_param.py rename to src/cloudflare/types/zones/settings/zone_setting_brotli_param.py index f969d95f43e..51031e0d3f5 100644 --- a/src/cloudflare/types/zones/settings/zones_brotli_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_brotli_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesBrotliParam"] +__all__ = ["ZoneSettingBrotliParam"] -class ZonesBrotliParam(TypedDict, total=False): +class ZoneSettingBrotliParam(TypedDict, total=False): id: Required[Literal["brotli"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_browser_cache_ttl.py b/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl.py similarity index 92% rename from src/cloudflare/types/zones/settings/zones_browser_cache_ttl.py rename to src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl.py index 4ed37d4cbe2..6240c2511d7 100644 --- a/src/cloudflare/types/zones/settings/zones_browser_cache_ttl.py +++ b/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesBrowserCacheTTL"] +__all__ = ["ZoneSettingBrowserCacheTTL"] -class ZonesBrowserCacheTTL(BaseModel): +class ZoneSettingBrowserCacheTTL(BaseModel): id: Literal["browser_cache_ttl"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_browser_cache_ttl_param.py b/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_browser_cache_ttl_param.py rename to src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py index 0329f3c3a6c..e88cc4cc66a 100644 --- a/src/cloudflare/types/zones/settings/zones_browser_cache_ttl_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_browser_cache_ttl_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesBrowserCacheTTLParam"] +__all__ = ["ZoneSettingBrowserCacheTTLParam"] -class ZonesBrowserCacheTTLParam(TypedDict, total=False): +class ZoneSettingBrowserCacheTTLParam(TypedDict, total=False): id: Required[Literal["browser_cache_ttl"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_browser_check.py b/src/cloudflare/types/zones/settings/zone_setting_browser_check.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_browser_check.py rename to src/cloudflare/types/zones/settings/zone_setting_browser_check.py index c11d1fd72c3..b02ced91ce1 100644 --- a/src/cloudflare/types/zones/settings/zones_browser_check.py +++ b/src/cloudflare/types/zones/settings/zone_setting_browser_check.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesBrowserCheck"] +__all__ = ["ZoneSettingBrowserCheck"] -class ZonesBrowserCheck(BaseModel): +class ZoneSettingBrowserCheck(BaseModel): id: Literal["browser_check"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_browser_check_param.py b/src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_browser_check_param.py rename to src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py index f86e1c56c96..5a6c5f3f209 100644 --- a/src/cloudflare/types/zones/settings/zones_browser_check_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_browser_check_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesBrowserCheckParam"] +__all__ = ["ZoneSettingBrowserCheckParam"] -class ZonesBrowserCheckParam(TypedDict, total=False): +class ZoneSettingBrowserCheckParam(TypedDict, total=False): id: Required[Literal["browser_check"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_buffering.py b/src/cloudflare/types/zones/settings/zone_setting_buffering.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_buffering.py rename to src/cloudflare/types/zones/settings/zone_setting_buffering.py index 91249cb1894..6f7ba2ca4ab 100644 --- a/src/cloudflare/types/zones/settings/zones_buffering.py +++ b/src/cloudflare/types/zones/settings/zone_setting_buffering.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesBuffering"] +__all__ = ["ZoneSettingBuffering"] -class ZonesBuffering(BaseModel): +class ZoneSettingBuffering(BaseModel): id: Literal["response_buffering"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_buffering_param.py b/src/cloudflare/types/zones/settings/zone_setting_buffering_param.py similarity index 78% rename from src/cloudflare/types/zones/settings/zones_buffering_param.py rename to src/cloudflare/types/zones/settings/zone_setting_buffering_param.py index 24396823911..17a385a19a4 100644 --- a/src/cloudflare/types/zones/settings/zones_buffering_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_buffering_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesBufferingParam"] +__all__ = ["ZoneSettingBufferingParam"] -class ZonesBufferingParam(TypedDict, total=False): +class ZoneSettingBufferingParam(TypedDict, total=False): id: Required[Literal["response_buffering"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_cache_level.py b/src/cloudflare/types/zones/settings/zone_setting_cache_level.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_cache_level.py rename to src/cloudflare/types/zones/settings/zone_setting_cache_level.py index 6d48f8edd4f..fd9f1bd0a14 100644 --- a/src/cloudflare/types/zones/settings/zones_cache_level.py +++ b/src/cloudflare/types/zones/settings/zone_setting_cache_level.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesCacheLevel"] +__all__ = ["ZoneSettingCacheLevel"] -class ZonesCacheLevel(BaseModel): +class ZoneSettingCacheLevel(BaseModel): id: Literal["cache_level"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_cache_level_param.py b/src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py similarity index 78% rename from src/cloudflare/types/zones/settings/zones_cache_level_param.py rename to src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py index 1f6fe4f1004..7261291c5cd 100644 --- a/src/cloudflare/types/zones/settings/zones_cache_level_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_cache_level_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesCacheLevelParam"] +__all__ = ["ZoneSettingCacheLevelParam"] -class ZonesCacheLevelParam(TypedDict, total=False): +class ZoneSettingCacheLevelParam(TypedDict, total=False): id: Required[Literal["cache_level"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_challenge_ttl.py b/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_challenge_ttl.py rename to src/cloudflare/types/zones/settings/zone_setting_challenge_ttl.py index 5c392dd4dc2..b803bef9eb8 100644 --- a/src/cloudflare/types/zones/settings/zones_challenge_ttl.py +++ b/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesChallengeTTL"] +__all__ = ["ZoneSettingChallengeTTL"] -class ZonesChallengeTTL(BaseModel): +class ZoneSettingChallengeTTL(BaseModel): id: Literal["challenge_ttl"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_challenge_ttl_param.py b/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py similarity index 81% rename from src/cloudflare/types/zones/settings/zones_challenge_ttl_param.py rename to src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py index ff22be6c3a7..0c04152a21d 100644 --- a/src/cloudflare/types/zones/settings/zones_challenge_ttl_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_challenge_ttl_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesChallengeTTLParam"] +__all__ = ["ZoneSettingChallengeTTLParam"] -class ZonesChallengeTTLParam(TypedDict, total=False): +class ZoneSettingChallengeTTLParam(TypedDict, total=False): id: Required[Literal["challenge_ttl"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ciphers.py b/src/cloudflare/types/zones/settings/zone_setting_ciphers.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_ciphers.py rename to src/cloudflare/types/zones/settings/zone_setting_ciphers.py index b95a21968cc..7c3d9c9f847 100644 --- a/src/cloudflare/types/zones/settings/zones_ciphers.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ciphers.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesCiphers"] +__all__ = ["ZoneSettingCiphers"] -class ZonesCiphers(BaseModel): +class ZoneSettingCiphers(BaseModel): id: Literal["ciphers"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ciphers_param.py b/src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_ciphers_param.py rename to src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py index 75f252e20a8..4e2c4b1dc5c 100644 --- a/src/cloudflare/types/zones/settings/zones_ciphers_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ciphers_param.py @@ -5,10 +5,10 @@ from typing import List from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesCiphersParam"] +__all__ = ["ZoneSettingCiphersParam"] -class ZonesCiphersParam(TypedDict, total=False): +class ZoneSettingCiphersParam(TypedDict, total=False): id: Required[Literal["ciphers"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_development_mode.py b/src/cloudflare/types/zones/settings/zone_setting_development_mode.py similarity index 91% rename from src/cloudflare/types/zones/settings/zones_development_mode.py rename to src/cloudflare/types/zones/settings/zone_setting_development_mode.py index 3677be06180..74e2376535d 100644 --- a/src/cloudflare/types/zones/settings/zones_development_mode.py +++ b/src/cloudflare/types/zones/settings/zone_setting_development_mode.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesDevelopmentMode"] +__all__ = ["ZoneSettingDevelopmentMode"] -class ZonesDevelopmentMode(BaseModel): +class ZoneSettingDevelopmentMode(BaseModel): id: Literal["development_mode"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_development_mode_param.py b/src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_development_mode_param.py rename to src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py index 5ec93e3bf66..d19a68448db 100644 --- a/src/cloudflare/types/zones/settings/zones_development_mode_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_development_mode_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesDevelopmentModeParam"] +__all__ = ["ZoneSettingDevelopmentModeParam"] -class ZonesDevelopmentModeParam(TypedDict, total=False): +class ZoneSettingDevelopmentModeParam(TypedDict, total=False): id: Required[Literal["development_mode"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_early_hints.py b/src/cloudflare/types/zones/settings/zone_setting_early_hints.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_early_hints.py rename to src/cloudflare/types/zones/settings/zone_setting_early_hints.py index dbde84c5c51..81ec9c31569 100644 --- a/src/cloudflare/types/zones/settings/zones_early_hints.py +++ b/src/cloudflare/types/zones/settings/zone_setting_early_hints.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesEarlyHints"] +__all__ = ["ZoneSettingEarlyHints"] -class ZonesEarlyHints(BaseModel): +class ZoneSettingEarlyHints(BaseModel): id: Literal["early_hints"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_early_hints_param.py b/src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_early_hints_param.py rename to src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py index 7eb1cb6f2d6..fef3800eda5 100644 --- a/src/cloudflare/types/zones/settings/zones_early_hints_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_early_hints_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesEarlyHintsParam"] +__all__ = ["ZoneSettingEarlyHintsParam"] -class ZonesEarlyHintsParam(TypedDict, total=False): +class ZoneSettingEarlyHintsParam(TypedDict, total=False): id: Required[Literal["early_hints"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_email_obfuscation.py b/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_email_obfuscation.py rename to src/cloudflare/types/zones/settings/zone_setting_email_obfuscation.py index 933ead7c01f..a30cea80c8f 100644 --- a/src/cloudflare/types/zones/settings/zones_email_obfuscation.py +++ b/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesEmailObfuscation"] +__all__ = ["ZoneSettingEmailObfuscation"] -class ZonesEmailObfuscation(BaseModel): +class ZoneSettingEmailObfuscation(BaseModel): id: Literal["email_obfuscation"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_email_obfuscation_param.py b/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_email_obfuscation_param.py rename to src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py index 61f4e1782ef..e8a3899b8ba 100644 --- a/src/cloudflare/types/zones/settings/zones_email_obfuscation_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_email_obfuscation_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesEmailObfuscationParam"] +__all__ = ["ZoneSettingEmailObfuscationParam"] -class ZonesEmailObfuscationParam(TypedDict, total=False): +class ZoneSettingEmailObfuscationParam(TypedDict, total=False): id: Required[Literal["email_obfuscation"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/speed_cloudflare_fonts.py b/src/cloudflare/types/zones/settings/zone_setting_fonts.py similarity index 89% rename from src/cloudflare/types/zones/settings/speed_cloudflare_fonts.py rename to src/cloudflare/types/zones/settings/zone_setting_fonts.py index f3eeac5c7fd..4463cc08a78 100644 --- a/src/cloudflare/types/zones/settings/speed_cloudflare_fonts.py +++ b/src/cloudflare/types/zones/settings/zone_setting_fonts.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["SpeedCloudflareFonts"] +__all__ = ["ZoneSettingFonts"] -class SpeedCloudflareFonts(BaseModel): +class ZoneSettingFonts(BaseModel): id: Literal["fonts"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_h2_prioritization.py b/src/cloudflare/types/zones/settings/zone_setting_h2_prioritization.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_h2_prioritization.py rename to src/cloudflare/types/zones/settings/zone_setting_h2_prioritization.py index 9c3e6dfade5..4c457096b37 100644 --- a/src/cloudflare/types/zones/settings/zones_h2_prioritization.py +++ b/src/cloudflare/types/zones/settings/zone_setting_h2_prioritization.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesH2Prioritization"] +__all__ = ["ZoneSettingH2Prioritization"] -class ZonesH2Prioritization(BaseModel): +class ZoneSettingH2Prioritization(BaseModel): id: Literal["h2_prioritization"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_h2_prioritization_param.py b/src/cloudflare/types/zones/settings/zone_setting_h2_prioritization_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_h2_prioritization_param.py rename to src/cloudflare/types/zones/settings/zone_setting_h2_prioritization_param.py index 7761b977355..5d20c404271 100644 --- a/src/cloudflare/types/zones/settings/zones_h2_prioritization_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_h2_prioritization_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesH2PrioritizationParam"] +__all__ = ["ZoneSettingH2PrioritizationParam"] -class ZonesH2PrioritizationParam(TypedDict, total=False): +class ZoneSettingH2PrioritizationParam(TypedDict, total=False): id: Required[Literal["h2_prioritization"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_hotlink_protection.py b/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_hotlink_protection.py rename to src/cloudflare/types/zones/settings/zone_setting_hotlink_protection.py index 7a3fa7e6158..1046ff6e793 100644 --- a/src/cloudflare/types/zones/settings/zones_hotlink_protection.py +++ b/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesHotlinkProtection"] +__all__ = ["ZoneSettingHotlinkProtection"] -class ZonesHotlinkProtection(BaseModel): +class ZoneSettingHotlinkProtection(BaseModel): id: Literal["hotlink_protection"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_hotlink_protection_param.py b/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py similarity index 75% rename from src/cloudflare/types/zones/settings/zones_hotlink_protection_param.py rename to src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py index 18e020ee77d..72c5f4d95a3 100644 --- a/src/cloudflare/types/zones/settings/zones_hotlink_protection_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_hotlink_protection_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesHotlinkProtectionParam"] +__all__ = ["ZoneSettingHotlinkProtectionParam"] -class ZonesHotlinkProtectionParam(TypedDict, total=False): +class ZoneSettingHotlinkProtectionParam(TypedDict, total=False): id: Required[Literal["hotlink_protection"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_http2.py b/src/cloudflare/types/zones/settings/zone_setting_http2.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_http2.py rename to src/cloudflare/types/zones/settings/zone_setting_http2.py index fd0987f0d58..5a5de9d13e8 100644 --- a/src/cloudflare/types/zones/settings/zones_http2.py +++ b/src/cloudflare/types/zones/settings/zone_setting_http2.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesHTTP2"] +__all__ = ["ZoneSettingHTTP2"] -class ZonesHTTP2(BaseModel): +class ZoneSettingHTTP2(BaseModel): id: Literal["http2"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_http2_param.py b/src/cloudflare/types/zones/settings/zone_setting_http2_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_http2_param.py rename to src/cloudflare/types/zones/settings/zone_setting_http2_param.py index b628398267d..d50fcd3b769 100644 --- a/src/cloudflare/types/zones/settings/zones_http2_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_http2_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesHTTP2Param"] +__all__ = ["ZoneSettingHTTP2Param"] -class ZonesHTTP2Param(TypedDict, total=False): +class ZoneSettingHTTP2Param(TypedDict, total=False): id: Required[Literal["http2"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_http3.py b/src/cloudflare/types/zones/settings/zone_setting_http3.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_http3.py rename to src/cloudflare/types/zones/settings/zone_setting_http3.py index 780b43baa72..2de87134547 100644 --- a/src/cloudflare/types/zones/settings/zones_http3.py +++ b/src/cloudflare/types/zones/settings/zone_setting_http3.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesHTTP3"] +__all__ = ["ZoneSettingHTTP3"] -class ZonesHTTP3(BaseModel): +class ZoneSettingHTTP3(BaseModel): id: Literal["http3"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_http3_param.py b/src/cloudflare/types/zones/settings/zone_setting_http3_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_http3_param.py rename to src/cloudflare/types/zones/settings/zone_setting_http3_param.py index 1e8f4a27888..04c78da68c7 100644 --- a/src/cloudflare/types/zones/settings/zones_http3_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_http3_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesHTTP3Param"] +__all__ = ["ZoneSettingHTTP3Param"] -class ZonesHTTP3Param(TypedDict, total=False): +class ZoneSettingHTTP3Param(TypedDict, total=False): id: Required[Literal["http3"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_image_resizing.py b/src/cloudflare/types/zones/settings/zone_setting_image_resizing.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_image_resizing.py rename to src/cloudflare/types/zones/settings/zone_setting_image_resizing.py index a8e0650a6cf..1454491319c 100644 --- a/src/cloudflare/types/zones/settings/zones_image_resizing.py +++ b/src/cloudflare/types/zones/settings/zone_setting_image_resizing.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesImageResizing"] +__all__ = ["ZoneSettingImageResizing"] -class ZonesImageResizing(BaseModel): +class ZoneSettingImageResizing(BaseModel): id: Literal["image_resizing"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_image_resizing_param.py b/src/cloudflare/types/zones/settings/zone_setting_image_resizing_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_image_resizing_param.py rename to src/cloudflare/types/zones/settings/zone_setting_image_resizing_param.py index 0efd7071120..6de5628ebda 100644 --- a/src/cloudflare/types/zones/settings/zones_image_resizing_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_image_resizing_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesImageResizingParam"] +__all__ = ["ZoneSettingImageResizingParam"] -class ZonesImageResizingParam(TypedDict, total=False): +class ZoneSettingImageResizingParam(TypedDict, total=False): id: Required[Literal["image_resizing"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ip_geolocation.py b/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_ip_geolocation.py rename to src/cloudflare/types/zones/settings/zone_setting_ip_geolocation.py index f8d11224270..f0d8e581b00 100644 --- a/src/cloudflare/types/zones/settings/zones_ip_geolocation.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesIPGeolocation"] +__all__ = ["ZoneSettingIPGeolocation"] -class ZonesIPGeolocation(BaseModel): +class ZoneSettingIPGeolocation(BaseModel): id: Literal["ip_geolocation"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ip_geolocation_param.py b/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_ip_geolocation_param.py rename to src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py index 088f1583c3c..083c1db940e 100644 --- a/src/cloudflare/types/zones/settings/zones_ip_geolocation_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ip_geolocation_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesIPGeolocationParam"] +__all__ = ["ZoneSettingIPGeolocationParam"] -class ZonesIPGeolocationParam(TypedDict, total=False): +class ZoneSettingIPGeolocationParam(TypedDict, total=False): id: Required[Literal["ip_geolocation"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ipv6.py b/src/cloudflare/types/zones/settings/zone_setting_ipv6.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_ipv6.py rename to src/cloudflare/types/zones/settings/zone_setting_ipv6.py index a9ce8f4157d..a2cf8a358b4 100644 --- a/src/cloudflare/types/zones/settings/zones_ipv6.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ipv6.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesIPV6"] +__all__ = ["ZoneSettingIPV6"] -class ZonesIPV6(BaseModel): +class ZoneSettingIPV6(BaseModel): id: Literal["ipv6"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ipv6_param.py b/src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_ipv6_param.py rename to src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py index 1afb5467e5f..4053b7bff06 100644 --- a/src/cloudflare/types/zones/settings/zones_ipv6_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ipv6_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesIPV6Param"] +__all__ = ["ZoneSettingIPV6Param"] -class ZonesIPV6Param(TypedDict, total=False): +class ZoneSettingIPV6Param(TypedDict, total=False): id: Required[Literal["ipv6"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_min_tls_version.py b/src/cloudflare/types/zones/settings/zone_setting_min_tls_version.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_min_tls_version.py rename to src/cloudflare/types/zones/settings/zone_setting_min_tls_version.py index 5d62002bb33..67facc86e08 100644 --- a/src/cloudflare/types/zones/settings/zones_min_tls_version.py +++ b/src/cloudflare/types/zones/settings/zone_setting_min_tls_version.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesMinTLSVersion"] +__all__ = ["ZoneSettingMinTLSVersion"] -class ZonesMinTLSVersion(BaseModel): +class ZoneSettingMinTLSVersion(BaseModel): id: Literal["min_tls_version"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_min_tls_version_param.py b/src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_min_tls_version_param.py rename to src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py index 8e7049348f2..e7cf1d38f71 100644 --- a/src/cloudflare/types/zones/settings/zones_min_tls_version_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_min_tls_version_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesMinTLSVersionParam"] +__all__ = ["ZoneSettingMinTLSVersionParam"] -class ZonesMinTLSVersionParam(TypedDict, total=False): +class ZoneSettingMinTLSVersionParam(TypedDict, total=False): id: Required[Literal["min_tls_version"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_minify.py b/src/cloudflare/types/zones/settings/zone_setting_minify.py similarity index 92% rename from src/cloudflare/types/zones/settings/zones_minify.py rename to src/cloudflare/types/zones/settings/zone_setting_minify.py index ff5e269a0a3..efb415b7712 100644 --- a/src/cloudflare/types/zones/settings/zones_minify.py +++ b/src/cloudflare/types/zones/settings/zone_setting_minify.py @@ -6,7 +6,7 @@ from ...._models import BaseModel -__all__ = ["ZonesMinify", "Value"] +__all__ = ["ZoneSettingMinify", "Value"] class Value(BaseModel): @@ -20,7 +20,7 @@ class Value(BaseModel): """Automatically minify all JavaScript files for your website.""" -class ZonesMinify(BaseModel): +class ZoneSettingMinify(BaseModel): id: Literal["minify"] """Zone setting identifier.""" diff --git a/src/cloudflare/types/zones/settings/zones_minify_param.py b/src/cloudflare/types/zones/settings/zone_setting_minify_param.py similarity index 86% rename from src/cloudflare/types/zones/settings/zones_minify_param.py rename to src/cloudflare/types/zones/settings/zone_setting_minify_param.py index 0479da834f8..f812a1d9ca4 100644 --- a/src/cloudflare/types/zones/settings/zones_minify_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_minify_param.py @@ -4,7 +4,7 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesMinifyParam", "Value"] +__all__ = ["ZoneSettingMinifyParam", "Value"] class Value(TypedDict, total=False): @@ -18,7 +18,7 @@ class Value(TypedDict, total=False): """Automatically minify all JavaScript files for your website.""" -class ZonesMinifyParam(TypedDict, total=False): +class ZoneSettingMinifyParam(TypedDict, total=False): id: Required[Literal["minify"]] """Zone setting identifier.""" diff --git a/src/cloudflare/types/zones/settings/zones_mirage.py b/src/cloudflare/types/zones/settings/zone_setting_mirage.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_mirage.py rename to src/cloudflare/types/zones/settings/zone_setting_mirage.py index d7b5f685ade..f6d62586f93 100644 --- a/src/cloudflare/types/zones/settings/zones_mirage.py +++ b/src/cloudflare/types/zones/settings/zone_setting_mirage.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesMirage"] +__all__ = ["ZoneSettingMirage"] -class ZonesMirage(BaseModel): +class ZoneSettingMirage(BaseModel): id: Literal["mirage"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_mirage_param.py b/src/cloudflare/types/zones/settings/zone_setting_mirage_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_mirage_param.py rename to src/cloudflare/types/zones/settings/zone_setting_mirage_param.py index 07d9e79bbc8..6a35c1a6510 100644 --- a/src/cloudflare/types/zones/settings/zones_mirage_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_mirage_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesMirageParam"] +__all__ = ["ZoneSettingMirageParam"] -class ZonesMirageParam(TypedDict, total=False): +class ZoneSettingMirageParam(TypedDict, total=False): id: Required[Literal["mirage"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_mobile_redirect.py b/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect.py similarity index 92% rename from src/cloudflare/types/zones/settings/zones_mobile_redirect.py rename to src/cloudflare/types/zones/settings/zone_setting_mobile_redirect.py index 139582c7810..0e2823aa806 100644 --- a/src/cloudflare/types/zones/settings/zones_mobile_redirect.py +++ b/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect.py @@ -6,7 +6,7 @@ from ...._models import BaseModel -__all__ = ["ZonesMobileRedirect", "Value"] +__all__ = ["ZoneSettingMobileRedirect", "Value"] class Value(BaseModel): @@ -26,7 +26,7 @@ class Value(BaseModel): """ -class ZonesMobileRedirect(BaseModel): +class ZoneSettingMobileRedirect(BaseModel): id: Literal["mobile_redirect"] """Identifier of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_mobile_redirect_param.py b/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_mobile_redirect_param.py rename to src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py index 4a7b0413803..dd412e92ad5 100644 --- a/src/cloudflare/types/zones/settings/zones_mobile_redirect_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_mobile_redirect_param.py @@ -5,7 +5,7 @@ from typing import Optional from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesMobileRedirectParam", "Value"] +__all__ = ["ZoneSettingMobileRedirectParam", "Value"] class Value(TypedDict, total=False): @@ -25,7 +25,7 @@ class Value(TypedDict, total=False): """ -class ZonesMobileRedirectParam(TypedDict, total=False): +class ZoneSettingMobileRedirectParam(TypedDict, total=False): id: Required[Literal["mobile_redirect"]] """Identifier of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_nel.py b/src/cloudflare/types/zones/settings/zone_setting_nel.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_nel.py rename to src/cloudflare/types/zones/settings/zone_setting_nel.py index de6ea5122c9..949c3684977 100644 --- a/src/cloudflare/types/zones/settings/zones_nel.py +++ b/src/cloudflare/types/zones/settings/zone_setting_nel.py @@ -6,14 +6,14 @@ from ...._models import BaseModel -__all__ = ["ZonesNEL", "Value"] +__all__ = ["ZoneSettingNEL", "Value"] class Value(BaseModel): enabled: Optional[bool] = None -class ZonesNEL(BaseModel): +class ZoneSettingNEL(BaseModel): id: Literal["nel"] """Zone setting identifier.""" diff --git a/src/cloudflare/types/zones/settings/zones_nel_param.py b/src/cloudflare/types/zones/settings/zone_setting_nel_param.py similarity index 80% rename from src/cloudflare/types/zones/settings/zones_nel_param.py rename to src/cloudflare/types/zones/settings/zone_setting_nel_param.py index 2ce99f4e797..863351497d8 100644 --- a/src/cloudflare/types/zones/settings/zones_nel_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_nel_param.py @@ -4,14 +4,14 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesNELParam", "Value"] +__all__ = ["ZoneSettingNELParam", "Value"] class Value(TypedDict, total=False): enabled: bool -class ZonesNELParam(TypedDict, total=False): +class ZoneSettingNELParam(TypedDict, total=False): id: Required[Literal["nel"]] """Zone setting identifier.""" diff --git a/src/cloudflare/types/zones/settings/zones_opportunistic_encryption.py b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption.py similarity index 86% rename from src/cloudflare/types/zones/settings/zones_opportunistic_encryption.py rename to src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption.py index 784988e5bea..2f3f067df9c 100644 --- a/src/cloudflare/types/zones/settings/zones_opportunistic_encryption.py +++ b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesOpportunisticEncryption"] +__all__ = ["ZoneSettingOpportunisticEncryption"] -class ZonesOpportunisticEncryption(BaseModel): +class ZoneSettingOpportunisticEncryption(BaseModel): id: Literal["opportunistic_encryption"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_opportunistic_encryption_param.py b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py similarity index 74% rename from src/cloudflare/types/zones/settings/zones_opportunistic_encryption_param.py rename to src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py index 33a68571fc2..5d54e34433c 100644 --- a/src/cloudflare/types/zones/settings/zones_opportunistic_encryption_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_encryption_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesOpportunisticEncryptionParam"] +__all__ = ["ZoneSettingOpportunisticEncryptionParam"] -class ZonesOpportunisticEncryptionParam(TypedDict, total=False): +class ZoneSettingOpportunisticEncryptionParam(TypedDict, total=False): id: Required[Literal["opportunistic_encryption"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_opportunistic_onion.py b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_opportunistic_onion.py rename to src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion.py index fa6f90dc006..224a12945cb 100644 --- a/src/cloudflare/types/zones/settings/zones_opportunistic_onion.py +++ b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesOpportunisticOnion"] +__all__ = ["ZoneSettingOpportunisticOnion"] -class ZonesOpportunisticOnion(BaseModel): +class ZoneSettingOpportunisticOnion(BaseModel): id: Literal["opportunistic_onion"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_opportunistic_onion_param.py b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py similarity index 75% rename from src/cloudflare/types/zones/settings/zones_opportunistic_onion_param.py rename to src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py index 01a208a4fde..4d20469de98 100644 --- a/src/cloudflare/types/zones/settings/zones_opportunistic_onion_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_opportunistic_onion_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesOpportunisticOnionParam"] +__all__ = ["ZoneSettingOpportunisticOnionParam"] -class ZonesOpportunisticOnionParam(TypedDict, total=False): +class ZoneSettingOpportunisticOnionParam(TypedDict, total=False): id: Required[Literal["opportunistic_onion"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_orange_to_orange.py b/src/cloudflare/types/zones/settings/zone_setting_orange_to_orange.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_orange_to_orange.py rename to src/cloudflare/types/zones/settings/zone_setting_orange_to_orange.py index 2ab0a43c88a..1f0912d04bd 100644 --- a/src/cloudflare/types/zones/settings/zones_orange_to_orange.py +++ b/src/cloudflare/types/zones/settings/zone_setting_orange_to_orange.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesOrangeToOrange"] +__all__ = ["ZoneSettingOrangeToOrange"] -class ZonesOrangeToOrange(BaseModel): +class ZoneSettingOrangeToOrange(BaseModel): id: Literal["orange_to_orange"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_orange_to_orange_param.py b/src/cloudflare/types/zones/settings/zone_setting_orange_to_orange_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_orange_to_orange_param.py rename to src/cloudflare/types/zones/settings/zone_setting_orange_to_orange_param.py index 17ebed4d031..4628db5b90d 100644 --- a/src/cloudflare/types/zones/settings/zones_orange_to_orange_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_orange_to_orange_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesOrangeToOrangeParam"] +__all__ = ["ZoneSettingOrangeToOrangeParam"] -class ZonesOrangeToOrangeParam(TypedDict, total=False): +class ZoneSettingOrangeToOrangeParam(TypedDict, total=False): id: Required[Literal["orange_to_orange"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru.py b/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru.py similarity index 86% rename from src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru.py rename to src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru.py index 493909a31b6..47751d84e3a 100644 --- a/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru.py +++ b/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesOriginErrorPagePassThru"] +__all__ = ["ZoneSettingOriginErrorPagePassThru"] -class ZonesOriginErrorPagePassThru(BaseModel): +class ZoneSettingOriginErrorPagePassThru(BaseModel): id: Literal["origin_error_page_pass_thru"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru_param.py b/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py similarity index 74% rename from src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru_param.py rename to src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py index bb10a5440df..b78f43e801a 100644 --- a/src/cloudflare/types/zones/settings/zones_origin_error_page_pass_thru_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_origin_error_page_pass_thru_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesOriginErrorPagePassThruParam"] +__all__ = ["ZoneSettingOriginErrorPagePassThruParam"] -class ZonesOriginErrorPagePassThruParam(TypedDict, total=False): +class ZoneSettingOriginErrorPagePassThruParam(TypedDict, total=False): id: Required[Literal["origin_error_page_pass_thru"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_polish.py b/src/cloudflare/types/zones/settings/zone_setting_polish.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_polish.py rename to src/cloudflare/types/zones/settings/zone_setting_polish.py index c774514fd7e..f3209e0bd7d 100644 --- a/src/cloudflare/types/zones/settings/zones_polish.py +++ b/src/cloudflare/types/zones/settings/zone_setting_polish.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesPolish"] +__all__ = ["ZoneSettingPolish"] -class ZonesPolish(BaseModel): +class ZoneSettingPolish(BaseModel): id: Literal["polish"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_polish_param.py b/src/cloudflare/types/zones/settings/zone_setting_polish_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_polish_param.py rename to src/cloudflare/types/zones/settings/zone_setting_polish_param.py index eea0a562af4..5b66bb60ac3 100644 --- a/src/cloudflare/types/zones/settings/zones_polish_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_polish_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesPolishParam"] +__all__ = ["ZoneSettingPolishParam"] -class ZonesPolishParam(TypedDict, total=False): +class ZoneSettingPolishParam(TypedDict, total=False): id: Required[Literal["polish"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_prefetch_preload.py b/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_prefetch_preload.py rename to src/cloudflare/types/zones/settings/zone_setting_prefetch_preload.py index 5d91d0ed562..a92fe806ecd 100644 --- a/src/cloudflare/types/zones/settings/zones_prefetch_preload.py +++ b/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesPrefetchPreload"] +__all__ = ["ZoneSettingPrefetchPreload"] -class ZonesPrefetchPreload(BaseModel): +class ZoneSettingPrefetchPreload(BaseModel): id: Literal["prefetch_preload"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_prefetch_preload_param.py b/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py similarity index 76% rename from src/cloudflare/types/zones/settings/zones_prefetch_preload_param.py rename to src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py index 69df9d466e9..4588c815a34 100644 --- a/src/cloudflare/types/zones/settings/zones_prefetch_preload_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_prefetch_preload_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesPrefetchPreloadParam"] +__all__ = ["ZoneSettingPrefetchPreloadParam"] -class ZonesPrefetchPreloadParam(TypedDict, total=False): +class ZoneSettingPrefetchPreloadParam(TypedDict, total=False): id: Required[Literal["prefetch_preload"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_proxy_read_timeout.py b/src/cloudflare/types/zones/settings/zone_setting_proxy_read_timeout.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_proxy_read_timeout.py rename to src/cloudflare/types/zones/settings/zone_setting_proxy_read_timeout.py index a2b5bddb243..ab9f562a168 100644 --- a/src/cloudflare/types/zones/settings/zones_proxy_read_timeout.py +++ b/src/cloudflare/types/zones/settings/zone_setting_proxy_read_timeout.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesProxyReadTimeout"] +__all__ = ["ZoneSettingProxyReadTimeout"] -class ZonesProxyReadTimeout(BaseModel): +class ZoneSettingProxyReadTimeout(BaseModel): id: Literal["proxy_read_timeout"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_proxy_read_timeout_param.py b/src/cloudflare/types/zones/settings/zone_setting_proxy_read_timeout_param.py similarity index 75% rename from src/cloudflare/types/zones/settings/zones_proxy_read_timeout_param.py rename to src/cloudflare/types/zones/settings/zone_setting_proxy_read_timeout_param.py index 57eb6ca02e9..a555a87da22 100644 --- a/src/cloudflare/types/zones/settings/zones_proxy_read_timeout_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_proxy_read_timeout_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesProxyReadTimeoutParam"] +__all__ = ["ZoneSettingProxyReadTimeoutParam"] -class ZonesProxyReadTimeoutParam(TypedDict, total=False): +class ZoneSettingProxyReadTimeoutParam(TypedDict, total=False): id: Required[Literal["proxy_read_timeout"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_pseudo_ipv4.py b/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_pseudo_ipv4.py rename to src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4.py index 8ee14b2c64b..81e5172f55a 100644 --- a/src/cloudflare/types/zones/settings/zones_pseudo_ipv4.py +++ b/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesPseudoIPV4"] +__all__ = ["ZoneSettingPseudoIPV4"] -class ZonesPseudoIPV4(BaseModel): +class ZoneSettingPseudoIPV4(BaseModel): id: Literal["pseudo_ipv4"] """Value of the Pseudo IPv4 setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_pseudo_ipv4_param.py b/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_pseudo_ipv4_param.py rename to src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py index 79f6a2d4831..947aa8bfa5d 100644 --- a/src/cloudflare/types/zones/settings/zones_pseudo_ipv4_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_pseudo_ipv4_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesPseudoIPV4Param"] +__all__ = ["ZoneSettingPseudoIPV4Param"] -class ZonesPseudoIPV4Param(TypedDict, total=False): +class ZoneSettingPseudoIPV4Param(TypedDict, total=False): id: Required[Literal["pseudo_ipv4"]] """Value of the Pseudo IPv4 setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_rocket_loader.py b/src/cloudflare/types/zones/settings/zone_setting_rocket_loader.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_rocket_loader.py rename to src/cloudflare/types/zones/settings/zone_setting_rocket_loader.py index 192e1bd7487..4d0d5404a77 100644 --- a/src/cloudflare/types/zones/settings/zones_rocket_loader.py +++ b/src/cloudflare/types/zones/settings/zone_setting_rocket_loader.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesRocketLoader"] +__all__ = ["ZoneSettingRocketLoader"] -class ZonesRocketLoader(BaseModel): +class ZoneSettingRocketLoader(BaseModel): id: Literal["rocket_loader"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_rocket_loader_param.py b/src/cloudflare/types/zones/settings/zone_setting_rocket_loader_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_rocket_loader_param.py rename to src/cloudflare/types/zones/settings/zone_setting_rocket_loader_param.py index b228859c2f2..deed2713e41 100644 --- a/src/cloudflare/types/zones/settings/zones_rocket_loader_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_rocket_loader_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesRocketLoaderParam"] +__all__ = ["ZoneSettingRocketLoaderParam"] -class ZonesRocketLoaderParam(TypedDict, total=False): +class ZoneSettingRocketLoaderParam(TypedDict, total=False): id: Required[Literal["rocket_loader"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_security_header.py b/src/cloudflare/types/zones/settings/zone_setting_security_header.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_security_header.py rename to src/cloudflare/types/zones/settings/zone_setting_security_header.py index 8d2a1008ec2..5da19ea926a 100644 --- a/src/cloudflare/types/zones/settings/zones_security_header.py +++ b/src/cloudflare/types/zones/settings/zone_setting_security_header.py @@ -6,7 +6,7 @@ from ...._models import BaseModel -__all__ = ["ZonesSecurityHeader", "Value", "ValueStrictTransportSecurity"] +__all__ = ["ZoneSettingSecurityHeader", "Value", "ValueStrictTransportSecurity"] class ValueStrictTransportSecurity(BaseModel): @@ -28,7 +28,7 @@ class Value(BaseModel): """Strict Transport Security.""" -class ZonesSecurityHeader(BaseModel): +class ZoneSettingSecurityHeader(BaseModel): id: Literal["security_header"] """ID of the zone's security header.""" diff --git a/src/cloudflare/types/zones/settings/zones_security_header_param.py b/src/cloudflare/types/zones/settings/zone_setting_security_header_param.py similarity index 85% rename from src/cloudflare/types/zones/settings/zones_security_header_param.py rename to src/cloudflare/types/zones/settings/zone_setting_security_header_param.py index e915fcf9cd1..f3ae4d8ddfc 100644 --- a/src/cloudflare/types/zones/settings/zones_security_header_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_security_header_param.py @@ -4,7 +4,7 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesSecurityHeaderParam", "Value", "ValueStrictTransportSecurity"] +__all__ = ["ZoneSettingSecurityHeaderParam", "Value", "ValueStrictTransportSecurity"] class ValueStrictTransportSecurity(TypedDict, total=False): @@ -26,7 +26,7 @@ class Value(TypedDict, total=False): """Strict Transport Security.""" -class ZonesSecurityHeaderParam(TypedDict, total=False): +class ZoneSettingSecurityHeaderParam(TypedDict, total=False): id: Required[Literal["security_header"]] """ID of the zone's security header.""" diff --git a/src/cloudflare/types/zones/settings/zones_security_level.py b/src/cloudflare/types/zones/settings/zone_setting_security_level.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_security_level.py rename to src/cloudflare/types/zones/settings/zone_setting_security_level.py index 9fa92a34731..23079ae5b14 100644 --- a/src/cloudflare/types/zones/settings/zones_security_level.py +++ b/src/cloudflare/types/zones/settings/zone_setting_security_level.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesSecurityLevel"] +__all__ = ["ZoneSettingSecurityLevel"] -class ZonesSecurityLevel(BaseModel): +class ZoneSettingSecurityLevel(BaseModel): id: Literal["security_level"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_security_level_param.py b/src/cloudflare/types/zones/settings/zone_setting_security_level_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_security_level_param.py rename to src/cloudflare/types/zones/settings/zone_setting_security_level_param.py index e4388ef4b71..fae5fca9c08 100644 --- a/src/cloudflare/types/zones/settings/zones_security_level_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_security_level_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesSecurityLevelParam"] +__all__ = ["ZoneSettingSecurityLevelParam"] -class ZonesSecurityLevelParam(TypedDict, total=False): +class ZoneSettingSecurityLevelParam(TypedDict, total=False): id: Required[Literal["security_level"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_server_side_exclude.py b/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_server_side_exclude.py rename to src/cloudflare/types/zones/settings/zone_setting_server_side_exclude.py index aa58413d5a9..afcb204ae3d 100644 --- a/src/cloudflare/types/zones/settings/zones_server_side_exclude.py +++ b/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesServerSideExclude"] +__all__ = ["ZoneSettingServerSideExclude"] -class ZonesServerSideExclude(BaseModel): +class ZoneSettingServerSideExclude(BaseModel): id: Literal["server_side_exclude"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_server_side_exclude_param.py b/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py similarity index 75% rename from src/cloudflare/types/zones/settings/zones_server_side_exclude_param.py rename to src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py index f80f793b883..6a95d138f5a 100644 --- a/src/cloudflare/types/zones/settings/zones_server_side_exclude_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_server_side_exclude_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesServerSideExcludeParam"] +__all__ = ["ZoneSettingServerSideExcludeParam"] -class ZonesServerSideExcludeParam(TypedDict, total=False): +class ZoneSettingServerSideExcludeParam(TypedDict, total=False): id: Required[Literal["server_side_exclude"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache.py b/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache.py similarity index 86% rename from src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache.py rename to src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache.py index 219edc47940..cd70a12f554 100644 --- a/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache.py +++ b/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesSortQueryStringForCache"] +__all__ = ["ZoneSettingSortQueryStringForCache"] -class ZonesSortQueryStringForCache(BaseModel): +class ZoneSettingSortQueryStringForCache(BaseModel): id: Literal["sort_query_string_for_cache"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache_param.py b/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py similarity index 74% rename from src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache_param.py rename to src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py index da0e7d9d768..212bdcdffb4 100644 --- a/src/cloudflare/types/zones/settings/zones_sort_query_string_for_cache_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_sort_query_string_for_cache_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesSortQueryStringForCacheParam"] +__all__ = ["ZoneSettingSortQueryStringForCacheParam"] -class ZonesSortQueryStringForCacheParam(TypedDict, total=False): +class ZoneSettingSortQueryStringForCacheParam(TypedDict, total=False): id: Required[Literal["sort_query_string_for_cache"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ssl.py b/src/cloudflare/types/zones/settings/zone_setting_ssl.py similarity index 91% rename from src/cloudflare/types/zones/settings/zones_ssl.py rename to src/cloudflare/types/zones/settings/zone_setting_ssl.py index 1d68aae4728..59fde7f0bb3 100644 --- a/src/cloudflare/types/zones/settings/zones_ssl.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ssl.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesSSL"] +__all__ = ["ZoneSettingSSL"] -class ZonesSSL(BaseModel): +class ZoneSettingSSL(BaseModel): id: Literal["ssl"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ssl_param.py b/src/cloudflare/types/zones/settings/zone_setting_ssl_param.py similarity index 81% rename from src/cloudflare/types/zones/settings/zones_ssl_param.py rename to src/cloudflare/types/zones/settings/zone_setting_ssl_param.py index d8d92e96bc7..3737c7ee4c8 100644 --- a/src/cloudflare/types/zones/settings/zones_ssl_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ssl_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesSSLParam"] +__all__ = ["ZoneSettingSSLParam"] -class ZonesSSLParam(TypedDict, total=False): +class ZoneSettingSSLParam(TypedDict, total=False): id: Required[Literal["ssl"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_ssl_recommender.py b/src/cloudflare/types/zones/settings/zone_setting_ssl_recommender.py similarity index 81% rename from src/cloudflare/types/zones/settings/zones_ssl_recommender.py rename to src/cloudflare/types/zones/settings/zone_setting_ssl_recommender.py index 70c02196f38..f6daa585189 100644 --- a/src/cloudflare/types/zones/settings/zones_ssl_recommender.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ssl_recommender.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["ZonesSSLRecommender"] +__all__ = ["ZoneSettingSSLRecommender"] -class ZonesSSLRecommender(BaseModel): +class ZoneSettingSSLRecommender(BaseModel): id: Optional[Literal["ssl_recommender"]] = None """Enrollment value for SSL/TLS Recommender.""" diff --git a/src/cloudflare/types/zones/settings/zones_ssl_recommender_param.py b/src/cloudflare/types/zones/settings/zone_setting_ssl_recommender_param.py similarity index 75% rename from src/cloudflare/types/zones/settings/zones_ssl_recommender_param.py rename to src/cloudflare/types/zones/settings/zone_setting_ssl_recommender_param.py index c0d083b35cd..7be93660ca4 100644 --- a/src/cloudflare/types/zones/settings/zones_ssl_recommender_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_ssl_recommender_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, TypedDict -__all__ = ["ZonesSSLRecommenderParam"] +__all__ = ["ZoneSettingSSLRecommenderParam"] -class ZonesSSLRecommenderParam(TypedDict, total=False): +class ZoneSettingSSLRecommenderParam(TypedDict, total=False): id: Literal["ssl_recommender"] """Enrollment value for SSL/TLS Recommender.""" diff --git a/src/cloudflare/types/zones/settings/zones_tls_1_3.py b/src/cloudflare/types/zones/settings/zone_setting_tls_1_3.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_tls_1_3.py rename to src/cloudflare/types/zones/settings/zone_setting_tls_1_3.py index e1e5b455c01..358da89a923 100644 --- a/src/cloudflare/types/zones/settings/zones_tls_1_3.py +++ b/src/cloudflare/types/zones/settings/zone_setting_tls_1_3.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesTLS1_3"] +__all__ = ["ZoneSettingTLS1_3"] -class ZonesTLS1_3(BaseModel): +class ZoneSettingTLS1_3(BaseModel): id: Literal["tls_1_3"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_tls_1_3_param.py b/src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_tls_1_3_param.py rename to src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py index fe04f5f4d4a..d20c15d5bfb 100644 --- a/src/cloudflare/types/zones/settings/zones_tls_1_3_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_tls_1_3_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesTLS1_3Param"] +__all__ = ["ZoneSettingTLS1_3Param"] -class ZonesTLS1_3Param(TypedDict, total=False): +class ZoneSettingTLS1_3Param(TypedDict, total=False): id: Required[Literal["tls_1_3"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_tls_client_auth.py b/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth.py similarity index 88% rename from src/cloudflare/types/zones/settings/zones_tls_client_auth.py rename to src/cloudflare/types/zones/settings/zone_setting_tls_client_auth.py index 5427c2cad17..f0e6b95ec4c 100644 --- a/src/cloudflare/types/zones/settings/zones_tls_client_auth.py +++ b/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesTLSClientAuth"] +__all__ = ["ZoneSettingTLSClientAuth"] -class ZonesTLSClientAuth(BaseModel): +class ZoneSettingTLSClientAuth(BaseModel): id: Literal["tls_client_auth"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_tls_client_auth_param.py b/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_tls_client_auth_param.py rename to src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py index 9a8c7e289e0..289a202f08d 100644 --- a/src/cloudflare/types/zones/settings/zones_tls_client_auth_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_tls_client_auth_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesTLSClientAuthParam"] +__all__ = ["ZoneSettingTLSClientAuthParam"] -class ZonesTLSClientAuthParam(TypedDict, total=False): +class ZoneSettingTLSClientAuthParam(TypedDict, total=False): id: Required[Literal["tls_client_auth"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_true_client_ip_header.py b/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header.py similarity index 87% rename from src/cloudflare/types/zones/settings/zones_true_client_ip_header.py rename to src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header.py index 93f2443c07a..f9a885775b1 100644 --- a/src/cloudflare/types/zones/settings/zones_true_client_ip_header.py +++ b/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesTrueClientIPHeader"] +__all__ = ["ZoneSettingTrueClientIPHeader"] -class ZonesTrueClientIPHeader(BaseModel): +class ZoneSettingTrueClientIPHeader(BaseModel): id: Literal["true_client_ip_header"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_true_client_ip_header_param.py b/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py similarity index 75% rename from src/cloudflare/types/zones/settings/zones_true_client_ip_header_param.py rename to src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py index bc757fd777d..ea4ebe080bf 100644 --- a/src/cloudflare/types/zones/settings/zones_true_client_ip_header_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_true_client_ip_header_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesTrueClientIPHeaderParam"] +__all__ = ["ZoneSettingTrueClientIPHeaderParam"] -class ZonesTrueClientIPHeaderParam(TypedDict, total=False): +class ZoneSettingTrueClientIPHeaderParam(TypedDict, total=False): id: Required[Literal["true_client_ip_header"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_waf.py b/src/cloudflare/types/zones/settings/zone_setting_waf.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_waf.py rename to src/cloudflare/types/zones/settings/zone_setting_waf.py index 8901bffce8e..807977534a3 100644 --- a/src/cloudflare/types/zones/settings/zones_waf.py +++ b/src/cloudflare/types/zones/settings/zone_setting_waf.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesWAF"] +__all__ = ["ZoneSettingWAF"] -class ZonesWAF(BaseModel): +class ZoneSettingWAF(BaseModel): id: Literal["waf"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_waf_param.py b/src/cloudflare/types/zones/settings/zone_setting_waf_param.py similarity index 80% rename from src/cloudflare/types/zones/settings/zones_waf_param.py rename to src/cloudflare/types/zones/settings/zone_setting_waf_param.py index 12a1a702b43..bbd479b146d 100644 --- a/src/cloudflare/types/zones/settings/zones_waf_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_waf_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesWAFParam"] +__all__ = ["ZoneSettingWAFParam"] -class ZonesWAFParam(TypedDict, total=False): +class ZoneSettingWAFParam(TypedDict, total=False): id: Required[Literal["waf"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_webp.py b/src/cloudflare/types/zones/settings/zone_setting_webp.py similarity index 90% rename from src/cloudflare/types/zones/settings/zones_webp.py rename to src/cloudflare/types/zones/settings/zone_setting_webp.py index 9ee628fe0d8..35a3bb58b40 100644 --- a/src/cloudflare/types/zones/settings/zones_webp.py +++ b/src/cloudflare/types/zones/settings/zone_setting_webp.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesWebP"] +__all__ = ["ZoneSettingWebP"] -class ZonesWebP(BaseModel): +class ZoneSettingWebP(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/zone_setting_webp_param.py similarity index 79% rename from src/cloudflare/types/zones/settings/zones_webp_param.py rename to src/cloudflare/types/zones/settings/zone_setting_webp_param.py index 317f8483550..45147aa2f27 100644 --- a/src/cloudflare/types/zones/settings/zones_webp_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_webp_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesWebPParam"] +__all__ = ["ZoneSettingWebPParam"] -class ZonesWebPParam(TypedDict, total=False): +class ZoneSettingWebPParam(TypedDict, total=False): id: Required[Literal["webp"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_websockets.py b/src/cloudflare/types/zones/settings/zone_setting_websockets.py similarity index 89% rename from src/cloudflare/types/zones/settings/zones_websockets.py rename to src/cloudflare/types/zones/settings/zone_setting_websockets.py index 1b064d8cc26..6faa560ef95 100644 --- a/src/cloudflare/types/zones/settings/zones_websockets.py +++ b/src/cloudflare/types/zones/settings/zone_setting_websockets.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZonesWebsockets"] +__all__ = ["ZoneSettingWebsockets"] -class ZonesWebsockets(BaseModel): +class ZoneSettingWebsockets(BaseModel): id: Literal["websockets"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zones_websockets_param.py b/src/cloudflare/types/zones/settings/zone_setting_websockets_param.py similarity index 77% rename from src/cloudflare/types/zones/settings/zones_websockets_param.py rename to src/cloudflare/types/zones/settings/zone_setting_websockets_param.py index c7abe5e6c57..ab2fdbbc8ac 100644 --- a/src/cloudflare/types/zones/settings/zones_websockets_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_websockets_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZonesWebsocketsParam"] +__all__ = ["ZoneSettingWebsocketsParam"] -class ZonesWebsocketsParam(TypedDict, total=False): +class ZoneSettingWebsocketsParam(TypedDict, total=False): id: Required[Literal["websockets"]] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones_page_rule.py b/src/cloudflare/types/zones_pagerule.py similarity index 96% rename from src/cloudflare/types/zones_page_rule.py rename to src/cloudflare/types/zones_pagerule.py index 8c1e165543b..2a6f1eb0d64 100644 --- a/src/cloudflare/types/zones_page_rule.py +++ b/src/cloudflare/types/zones_pagerule.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["ZonesPageRule", "Action", "ActionValue", "Target", "TargetConstraint"] +__all__ = ["ZonesPagerule", "Action", "ActionValue", "Target", "TargetConstraint"] class ActionValue(BaseModel): @@ -51,7 +51,7 @@ class Target(BaseModel): """A target based on the URL of the request.""" -class ZonesPageRule(BaseModel): +class ZonesPagerule(BaseModel): id: str """Identifier""" diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index 2ea95891b4a..e6875cc2835 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.alerting.destinations import ( - AaaWebhooks, + AlertingWebhooks, WebhookListResponse, WebhookCreateResponse, WebhookDeleteResponse, @@ -259,7 +259,7 @@ def test_method_get(self, client: Cloudflare) -> None: "b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AaaWebhooks, webhook, path=["response"]) + assert_matches_type(AlertingWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -272,7 +272,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" webhook = response.parse() - assert_matches_type(AaaWebhooks, webhook, path=["response"]) + assert_matches_type(AlertingWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -285,7 +285,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = response.parse() - assert_matches_type(AaaWebhooks, webhook, path=["response"]) + assert_matches_type(AlertingWebhooks, webhook, path=["response"]) assert cast(Any, response.is_closed) is True @@ -544,7 +544,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "b115d5ec-15c6-41ee-8b76-92c449b5227b", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AaaWebhooks, webhook, path=["response"]) + assert_matches_type(AlertingWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -557,7 +557,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" webhook = await response.parse() - assert_matches_type(AaaWebhooks, webhook, path=["response"]) + assert_matches_type(AlertingWebhooks, webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -570,7 +570,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = await response.parse() - assert_matches_type(AaaWebhooks, webhook, path=["response"]) + assert_matches_type(AlertingWebhooks, webhook, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/test_history.py b/tests/api_resources/alerting/test_history.py index 56d0a52b905..7fe38ffcb56 100644 --- a/tests/api_resources/alerting/test_history.py +++ b/tests/api_resources/alerting/test_history.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray -from cloudflare.types.alerting import AaaHistory +from cloudflare.types.alerting import AlertingHistory base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: history = client.alerting.history.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: per_page=5, since=parse_datetime("2022-05-19T20:29:58.679897Z"), ) - assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,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" history = response.parse() - assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +61,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" history = response.parse() - assert_matches_type(SyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) assert cast(Any, response.is_closed) is True @@ -83,7 +83,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: history = await async_client.alerting.history.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -95,7 +95,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) per_page=5, since=parse_datetime("2022-05-19T20:29:58.679897Z"), ) - assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +107,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" history = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" history = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[AaaHistory], history, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[AlertingHistory], history, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index 1f130bb584f..a186b043a67 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.alerting import ( - AaaPolicies, + AlertingPolicies, PolicyListResponse, PolicyCreateResponse, PolicyDeleteResponse, @@ -369,7 +369,7 @@ def test_method_get(self, client: Cloudflare) -> None: "0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AaaPolicies, policy, path=["response"]) + assert_matches_type(AlertingPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -382,7 +382,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" policy = response.parse() - assert_matches_type(AaaPolicies, policy, path=["response"]) + assert_matches_type(AlertingPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +395,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(AaaPolicies, policy, path=["response"]) + assert_matches_type(AlertingPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -764,7 +764,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "0da2b59e-f118-439d-8097-bdfb215203c9", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AaaPolicies, policy, path=["response"]) + assert_matches_type(AlertingPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -777,7 +777,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" policy = await response.parse() - assert_matches_type(AaaPolicies, policy, path=["response"]) + assert_matches_type(AlertingPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -790,7 +790,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(AaaPolicies, policy, path=["response"]) + assert_matches_type(AlertingPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/certificate_authorities/test_hostname_associations.py b/tests/api_resources/certificate_authorities/test_hostname_associations.py index a705fec551e..58ba5b38106 100644 --- a/tests/api_resources/certificate_authorities/test_hostname_associations.py +++ b/tests/api_resources/certificate_authorities/test_hostname_associations.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.certificate_authorities import ( - TLSCertificatesAndHostnamesHostnameAssociation, + TLSHostnameAssociation, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_update(self, client: Cloudflare) -> None: hostname_association = client.certificate_authorities.hostname_associations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: hostnames=["api.example.com", "api.example.com", "api.example.com"], mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,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" hostname_association = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +59,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +77,7 @@ def test_method_get(self, client: Cloudflare) -> None: hostname_association = client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -86,7 +86,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", mtls_certificate_id="b2134436-2555-4acf-be5b-26c48136575e", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +98,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" hostname_association = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +110,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True @@ -132,7 +132,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: hostname_association = await async_client.certificate_authorities.hostname_associations.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare hostnames=["api.example.com", "api.example.com", "api.example.com"], mtls_certificate_id="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -154,7 +154,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" hostname_association = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -166,7 +166,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True @@ -184,7 +184,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: hostname_association = await async_client.certificate_authorities.hostname_associations.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -193,7 +193,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - zone_id="023e105f4ecef8ad9ca31a8372d0c353", mtls_certificate_id="b2134436-2555-4acf-be5b-26c48136575e", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +205,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" hostname_association = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname_association = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameAssociation, hostname_association, path=["response"]) + assert_matches_type(TLSHostnameAssociation, hostname_association, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/dns/analytics/reports/test_bytimes.py b/tests/api_resources/dns/analytics/reports/test_bytimes.py index 45e54b4766d..ddd7f707f9d 100644 --- a/tests/api_resources/dns/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/analytics/reports/test_bytimes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime +from cloudflare.types.dns.analytics.reports import DNSAnalyticsReportByTime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_get(self, client: Cloudflare) -> None: bytime = client.dns.analytics.reports.bytimes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +52,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" bytime = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) assert cast(Any, response.is_closed) is True @@ -86,7 +86,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: bytime = await async_client.dns.analytics.reports.bytimes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +102,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -114,7 +114,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" bytime = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/dns/analytics/test_reports.py b/tests/api_resources/dns/analytics/test_reports.py index 3f9b8ec4bd0..2667a082de7 100644 --- a/tests/api_resources/dns/analytics/test_reports.py +++ b/tests/api_resources/dns/analytics/test_reports.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics import DNSDNSAnalyticsAPIReport +from cloudflare.types.dns.analytics import DNSAnalyticsReport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_get(self, client: Cloudflare) -> None: report = client.dns.analytics.reports.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -51,7 +51,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" report = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) assert cast(Any, response.is_closed) is True @@ -85,7 +85,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: report = await async_client.dns.analytics.reports.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +112,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" report = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py index 7c748237dfb..a2d0f8a7b6d 100644 --- a/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py +++ b/tests/api_resources/dns/firewall/analytics/reports/test_bytimes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics.reports import DNSDNSAnalyticsAPIReportBytime +from cloudflare.types.dns.analytics.reports import DNSAnalyticsReportByTime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +42,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" bytime = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +68,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) assert cast(Any, response.is_closed) is True @@ -98,7 +98,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +115,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - time_delta="hour", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +128,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" bytime = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) @pytest.mark.skip() @parametrize @@ -141,7 +141,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" bytime = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReportBytime, bytime, path=["response"]) + assert_matches_type(DNSAnalyticsReportByTime, bytime, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/dns/firewall/analytics/test_reports.py b/tests/api_resources/dns/firewall/analytics/test_reports.py index 79fe457f9a6..e36cb3033ac 100644 --- a/tests/api_resources/dns/firewall/analytics/test_reports.py +++ b/tests/api_resources/dns/firewall/analytics/test_reports.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.dns.analytics import DNSDNSAnalyticsAPIReport +from cloudflare.types.dns.analytics import DNSAnalyticsReport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,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" report = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +67,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) assert cast(Any, response.is_closed) is True @@ -97,7 +97,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +113,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - sort="+responseCode,-queryName", until=parse_datetime("2023-11-11T13:00:00Z"), ) - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,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" report = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) @pytest.mark.skip() @parametrize @@ -139,7 +139,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" report = await response.parse() - assert_matches_type(DNSDNSAnalyticsAPIReport, report, path=["response"]) + assert_matches_type(DNSAnalyticsReport, report, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/dns/test_firewall.py b/tests/api_resources/dns/test_firewall.py index 9425fdff0f7..ccf77c74206 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.dns import ( - DNSFirewallDNSFirewall, + DNSFirewall, FirewallDeleteResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +52,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ratelimit=600, retries=2, ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +66,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" firewall = response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -80,7 +80,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -100,7 +100,7 @@ def test_method_list(self, client: Cloudflare) -> None: firewall = client.dns.firewall.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +110,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: page=1, per_page=1, ) - assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +122,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" firewall = response.parse() - assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +134,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(SyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -212,7 +212,7 @@ def test_method_edit(self, client: Cloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -237,7 +237,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: ratelimit=600, retries=2, ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -257,7 +257,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" firewall = response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -277,7 +277,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -317,7 +317,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -330,7 +330,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -343,7 +343,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -374,7 +374,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -397,7 +397,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ratelimit=600, retries=2, ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -411,7 +411,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" firewall = await response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -425,7 +425,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -445,7 +445,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: firewall = await async_client.dns.firewall.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -455,7 +455,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) page=1, per_page=1, ) - assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -467,7 +467,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" firewall = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -479,7 +479,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[DNSFirewallDNSFirewall], firewall, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[DNSFirewall], firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -557,7 +557,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: name="My Awesome DNS Firewall cluster", upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -582,7 +582,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) ratelimit=600, retries=2, ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +602,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" firewall = await response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -622,7 +622,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True @@ -662,7 +662,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -675,7 +675,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) @pytest.mark.skip() @parametrize @@ -688,7 +688,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" firewall = await response.parse() - assert_matches_type(DNSFirewallDNSFirewall, firewall, path=["response"]) + assert_matches_type(DNSFirewall, firewall, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/durable_objects/namespaces/test_objects.py b/tests/api_resources/durable_objects/namespaces/test_objects.py index fff7b92c91d..3273c4e5eda 100644 --- a/tests/api_resources/durable_objects/namespaces/test_objects.py +++ b/tests/api_resources/durable_objects/namespaces/test_objects.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.pagination import SyncCursorLimitPagination, AsyncCursorLimitPagination -from cloudflare.types.durable_objects.namespaces import WorkersObject +from cloudflare.types.durable_objects.namespaces import DurableObject base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: "5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) @pytest.mark.skip() @parametrize @@ -36,7 +36,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, ) - assert_matches_type(SyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,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" object = response.parse() - assert_matches_type(SyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" object = response.parse() - assert_matches_type(SyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(SyncCursorLimitPagination[DurableObject], object, path=["response"]) assert cast(Any, response.is_closed) is True @@ -92,7 +92,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "5fd1cafff895419c8bcc647fc64ab8f0", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) cursor="AAAAANuhDN7SjacTnSVsDu3WW1Lvst6dxJGTjRY5BhxPXdf6L6uTcpd_NVtjhn11OUYRsVEykxoUwF-JQU4dn6QylZSKTOJuG0indrdn_MlHpMRtsxgXjs-RPdHYIVm3odE_uvEQ_dTQGFm8oikZMohns34DLBgrQpc", limit=10, ) - assert_matches_type(AsyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) @pytest.mark.skip() @parametrize @@ -116,7 +116,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" object = await response.parse() - assert_matches_type(AsyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" object = await response.parse() - assert_matches_type(AsyncCursorLimitPagination[WorkersObject], object, path=["response"]) + assert_matches_type(AsyncCursorLimitPagination[DurableObject], object, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/firewall/test_lockdowns.py b/tests/api_resources/firewall/test_lockdowns.py index 8bd81557bd6..16e5b7909e4 100644 --- a/tests/api_resources/firewall/test_lockdowns.py +++ b/tests/api_resources/firewall/test_lockdowns.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.firewall import ( - LegacyJhsZonelockdown, + FirewallZoneLockdown, LockdownDeleteResponse, ) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,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" lockdown = response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -75,7 +75,7 @@ def test_method_update(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -130,7 +130,7 @@ def test_method_list(self, client: Cloudflare) -> None: lockdown = client.firewall.lockdowns.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +147,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: priority=5, uri_search="/some/path", ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +159,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" lockdown = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -242,7 +242,7 @@ def test_method_get(self, client: Cloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -255,7 +255,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" lockdown = response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +268,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -298,7 +298,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +311,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" lockdown = await response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -324,7 +324,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -345,7 +345,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -359,7 +359,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" lockdown = await response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -373,7 +373,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -400,7 +400,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: lockdown = await async_client.firewall.lockdowns.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,7 +417,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) priority=5, uri_search="/some/path", ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -429,7 +429,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" lockdown = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -441,7 +441,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True @@ -512,7 +512,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b59", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -525,7 +525,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" lockdown = await response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) @pytest.mark.skip() @parametrize @@ -538,7 +538,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockdown = await response.parse() - assert_matches_type(Optional[LegacyJhsZonelockdown], lockdown, path=["response"]) + assert_matches_type(Optional[FirewallZoneLockdown], lockdown, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/firewall/test_rules.py b/tests/api_resources/firewall/test_rules.py index 0a5d7bd3cc5..aefacf8cab2 100644 --- a/tests/api_resources/firewall/test_rules.py +++ b/tests/api_resources/firewall/test_rules.py @@ -12,8 +12,8 @@ from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.firewall import ( RuleEditResponse, + FirewallFilterRule, RuleCreateResponse, - LegacyJhsFilterRule, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -90,7 +90,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +104,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -131,7 +131,7 @@ def test_method_list(self, client: Cloudflare) -> None: rule = client.firewall.rules.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +144,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: paused=False, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +156,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,7 +187,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -197,7 +197,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", delete_filter_if_unused=True, ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -210,7 +210,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -223,7 +223,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -306,7 +306,7 @@ def test_method_get(self, client: Cloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +319,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, 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" rule = response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -409,7 +409,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +423,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +437,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -464,7 +464,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.firewall.rules.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -477,7 +477,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) paused=False, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -489,7 +489,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -501,7 +501,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -520,7 +520,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -530,7 +530,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", delete_filter_if_unused=True, ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -543,7 +543,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -556,7 +556,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -639,7 +639,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b60", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -652,7 +652,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -665,7 +665,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[LegacyJhsFilterRule], rule, path=["response"]) + assert_matches_type(Optional[FirewallFilterRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/firewall/waf/packages/test_groups.py b/tests/api_resources/firewall/waf/packages/test_groups.py index 02642236030..78d0a147146 100644 --- a/tests/api_resources/firewall/waf/packages/test_groups.py +++ b/tests/api_resources/firewall/waf/packages/test_groups.py @@ -13,7 +13,7 @@ from cloudflare.types.firewall.waf.packages import ( GroupGetResponse, GroupEditResponse, - WAFManagedRulesSchemasGroup, + WAFManagedRulesGroup, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +29,7 @@ def test_method_list(self, client: Cloudflare) -> None: "a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,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" group = response.parse() - assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +70,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -239,7 +239,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "a25a9a7e9c00afc1fb2e0245519d725b", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +254,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +267,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" group = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +280,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesSchemasGroup], group, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFManagedRulesGroup], group, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/firewall/waf/test_overrides.py b/tests/api_resources/firewall/waf/test_overrides.py index 8530c8f87ab..54cbdacc6d0 100644 --- a/tests/api_resources/firewall/waf/test_overrides.py +++ b/tests/api_resources/firewall/waf/test_overrides.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.firewall.waf import ( - LegacyJhsOverride, + WAFOverride, OverrideDeleteResponse, ) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,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" override = response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -75,7 +75,7 @@ def test_method_update(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -130,7 +130,7 @@ def test_method_list(self, client: Cloudflare) -> None: override = client.firewall.waf.overrides.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -140,7 +140,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -152,7 +152,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" override = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -164,7 +164,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -235,7 +235,7 @@ def test_method_get(self, client: Cloudflare) -> None: "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +248,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" override = response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +261,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -291,7 +291,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -304,7 +304,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" override = await response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -317,7 +317,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -338,7 +338,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -352,7 +352,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" override = await response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -366,7 +366,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -393,7 +393,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: override = await async_client.firewall.waf.overrides.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -403,7 +403,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -415,7 +415,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" override = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -427,7 +427,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True @@ -498,7 +498,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "de677e5818985db1285d0e80225f06e5", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -511,7 +511,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" override = await response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) @pytest.mark.skip() @parametrize @@ -524,7 +524,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" override = await response.parse() - assert_matches_type(Optional[LegacyJhsOverride], override, path=["response"]) + assert_matches_type(Optional[WAFOverride], override, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/healthchecks/test_previews.py b/tests/api_resources/healthchecks/test_previews.py index 6f97f8597e4..f6a16e32539 100644 --- a/tests/api_resources/healthchecks/test_previews.py +++ b/tests/api_resources/healthchecks/test_previews.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import HealthchecksHealthchecks +from cloudflare.types import Healthcheck from cloudflare.types.healthchecks import PreviewDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +76,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" preview = response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -90,7 +90,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -163,7 +163,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +176,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" preview = response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -189,7 +189,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -220,7 +220,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +256,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -270,7 +270,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" preview = await response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -284,7 +284,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -357,7 +357,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +370,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" preview = await response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -383,7 +383,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(HealthchecksHealthchecks, preview, path=["response"]) + assert_matches_type(Healthcheck, preview, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/images/test_v1.py b/tests/api_resources/images/test_v1.py index c46f71ba3f1..f3420a94005 100644 --- a/tests/api_resources/images/test_v1.py +++ b/tests/api_resources/images/test_v1.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePagination, AsyncV4PagePagination from cloudflare.types.images import ( - ImagesImage, + Image, V1ListResponse, V1DeleteResponse, ) @@ -29,7 +29,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", file={}, ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +42,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -75,7 +75,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://example.com/path/to/logo.png", ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +101,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -225,7 +225,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +236,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: metadata={}, require_signed_urls=True, ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -249,7 +249,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" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -262,7 +262,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -288,7 +288,7 @@ def test_method_get(self, client: Cloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -301,7 +301,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" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -314,7 +314,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -344,7 +344,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> account_id="023e105f4ecef8ad9ca31a8372d0c353", file={}, ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -357,7 +357,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +370,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -390,7 +390,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> account_id="023e105f4ecef8ad9ca31a8372d0c353", url="https://example.com/path/to/logo.png", ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -403,7 +403,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -416,7 +416,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -540,7 +540,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -551,7 +551,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) metadata={}, require_signed_urls=True, ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -564,7 +564,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" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -577,7 +577,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True @@ -603,7 +603,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -616,7 +616,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" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) @pytest.mark.skip() @parametrize @@ -629,7 +629,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" v1 = await response.parse() - assert_matches_type(ImagesImage, v1, path=["response"]) + assert_matches_type(Image, v1, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/load_balancers/test_previews.py b/tests/api_resources/load_balancers/test_previews.py index e8910746a8e..de8e142121c 100644 --- a/tests/api_resources/load_balancers/test_previews.py +++ b/tests/api_resources/load_balancers/test_previews.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.load_balancers import LoadBalancingPreviewResult +from cloudflare.types.user.load_balancers import LoadBalancingPreview base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_get(self, client: Cloudflare) -> None: "p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,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" preview = response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "p1aba936b94213e5b8dca0c0dbf1f9cc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,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" preview = await response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/logpush/test_edge.py b/tests/api_resources/logpush/test_edge.py index 3fc8d0b92ea..3c0826f48f8 100644 --- a/tests/api_resources/logpush/test_edge.py +++ b/tests/api_resources/logpush/test_edge.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush import EdgeGetResponse, LogpushInstantLogsJob +from cloudflare.types.logpush import EdgeGetResponse, InstantLogpushJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_create(self, client: Cloudflare) -> None: edge = client.logpush.edge.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: filter='{"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}}', sample=1, ) - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +46,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" edge = response.parse() - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" edge = response.parse() - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) assert cast(Any, response.is_closed) is True @@ -122,7 +122,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: edge = await async_client.logpush.edge.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare filter='{"where":{"and":[{"key":"ClientCountry","operator":"neq","value":"ca"}]}}', sample=1, ) - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +145,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" edge = await response.parse() - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +157,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" edge = await response.parse() - assert_matches_type(Optional[LogpushInstantLogsJob], edge, path=["response"]) + assert_matches_type(Optional[InstantLogpushJob], edge, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index e5332bbbc6d..d0d382b8fe1 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.logpush import JobListResponse, JobDeleteResponse -from cloudflare.types.logpush.datasets import LogpushLogpushJob +from cloudflare.types.logpush.datasets import LogpushJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -70,7 +70,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" job = response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +84,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -113,7 +113,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +156,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" job = response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -327,7 +327,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -337,7 +337,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -351,7 +351,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" job = response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -365,7 +365,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -398,7 +398,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -428,7 +428,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -442,7 +442,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" job = await response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -456,7 +456,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -485,7 +485,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -514,7 +514,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare }, ownership_challenge="00000000000000000000", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -528,7 +528,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" job = await response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -542,7 +542,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -699,7 +699,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -709,7 +709,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -723,7 +723,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" job = await response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -737,7 +737,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(Optional[LogpushLogpushJob], job, path=["response"]) + assert_matches_type(Optional[LogpushJob], job, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/logs/control/cmb/test_config.py b/tests/api_resources/logs/control/cmb/test_config.py index a5a8b7fd189..4792cc9ed77 100644 --- a/tests/api_resources/logs/control/cmb/test_config.py +++ b/tests/api_resources/logs/control/cmb/test_config.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logs.control.cmb import LogcontrolCmbConfig, ConfigDeleteResponse +from cloudflare.types.logs.control.cmb import CmbConfig, ConfigDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_create(self, client: Cloudflare) -> None: config = client.logs.control.cmb.config.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -32,7 +32,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", regions="eu", ) - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,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" config = response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ def test_method_get(self, client: Cloudflare) -> None: config = client.logs.control.cmb.config.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -128,7 +128,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" config = response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -140,7 +140,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -162,7 +162,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: config = await async_client.logs.control.cmb.config.create( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare account_id="023e105f4ecef8ad9ca31a8372d0c353", regions="eu", ) - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +183,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" config = await response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +195,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -255,7 +255,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.logs.control.cmb.config.get( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +267,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" config = await response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -279,7 +279,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(Optional[LogcontrolCmbConfig], config, path=["response"]) + assert_matches_type(Optional[CmbConfig], config, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/magic_network_monitoring/configs/test_full.py b/tests/api_resources/magic_network_monitoring/configs/test_full.py index 17677bd6624..79aa9f510d5 100644 --- a/tests/api_resources/magic_network_monitoring/configs/test_full.py +++ b/tests/api_resources/magic_network_monitoring/configs/test_full.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMConfig +from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringConfig base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: full = client.magic_network_monitoring.configs.full.get( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" full = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" full = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, full, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: full = await async_client.magic_network_monitoring.configs.full.get( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,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" full = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, full, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" full = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, full, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, full, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py index 4a065273aae..a1a24e48efe 100644 --- a/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py +++ b/tests/api_resources/magic_network_monitoring/rules/test_advertisements.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring.rules import MagicVisibilityMNMRuleAdvertisable +from cloudflare.types.magic_network_monitoring.rules import MagicNetworkMonitoringRuleAdvertisable base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRuleAdvertisable], advertisement, 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" advertisement = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRuleAdvertisable], advertisement, 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" advertisement = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRuleAdvertisable], advertisement, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +80,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRuleAdvertisable], advertisement, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,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" advertisement = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRuleAdvertisable], advertisement, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" advertisement = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRuleAdvertisable], advertisement, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRuleAdvertisable], advertisement, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/magic_network_monitoring/test_configs.py b/tests/api_resources/magic_network_monitoring/test_configs.py index 684b9811710..47cd42f94e8 100644 --- a/tests/api_resources/magic_network_monitoring/test_configs.py +++ b/tests/api_resources/magic_network_monitoring/test_configs.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring import MagicVisibilityMNMConfig +from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringConfig base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_create(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.create( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -65,7 +65,7 @@ def test_method_update(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.update( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -77,7 +77,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" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -107,7 +107,7 @@ def test_method_delete(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.delete( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,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" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -131,7 +131,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -149,7 +149,7 @@ def test_method_edit(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.edit( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +161,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" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -191,7 +191,7 @@ def test_method_get(self, client: Cloudflare) -> None: config = client.magic_network_monitoring.configs.get( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +203,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" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +215,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -237,7 +237,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.create( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -249,7 +249,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" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +261,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -279,7 +279,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.update( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +291,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" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -303,7 +303,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -321,7 +321,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.delete( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +333,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" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +345,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -363,7 +363,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.edit( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -375,7 +375,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" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -387,7 +387,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -405,7 +405,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: config = await async_client.magic_network_monitoring.configs.get( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,7 +417,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" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) @pytest.mark.skip() @parametrize @@ -429,7 +429,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(MagicVisibilityMNMConfig, config, path=["response"]) + assert_matches_type(MagicNetworkMonitoringConfig, config, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index 0e4b85296b0..fde54d8a3f9 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring import RuleListResponse, MagicVisibilityMNMRule +from cloudflare.types.magic_network_monitoring import RuleListResponse, MagicNetworkMonitoringRule base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_create(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.create( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -65,7 +65,7 @@ def test_method_update(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.update( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -77,7 +77,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -150,7 +150,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -163,7 +163,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +176,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -202,7 +202,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +215,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -228,7 +228,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -254,7 +254,7 @@ def test_method_get(self, client: Cloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +267,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +280,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -309,7 +309,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.create( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +321,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +333,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -351,7 +351,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.update( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,7 +363,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -375,7 +375,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -436,7 +436,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -449,7 +449,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -462,7 +462,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -488,7 +488,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -501,7 +501,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -514,7 +514,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -540,7 +540,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "2890e6fa406311ed9b5a23f70f6fb8cf", account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -553,7 +553,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -566,7 +566,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[MagicVisibilityMNMRule], rule, path=["response"]) + assert_matches_type(Optional[MagicNetworkMonitoringRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index 046e5613ffa..e4b70f13e45 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.types.origin_tls_client_auth.hostnames import ( CertificateListResponse, - TLSCertificatesAndHostnamesSchemasCertificateObject, + OriginTLSClientCertificate, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +42,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" certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -119,7 +119,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +132,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" certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +145,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -171,7 +171,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -184,7 +184,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" certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -197,7 +197,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -228,7 +228,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: certificate="-----BEGIN CERTIFICATE-----\nMIIDtTCCAp2gAwIBAgIJAMHAwfXZ5/PWMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBX\naWRnaXRzIFB0eSBMdGQwHhcNMTYwODI0MTY0MzAxWhcNMTYxMTIyMTY0MzAxWjBF\nMQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50\nZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB\nCgKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmGdtcGbg/1\nCGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKnabIRuGvB\nKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpidtnKX/a+5\n0GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+pyFxIXjbEI\ndZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pEewooaeO2\nizNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABo4GnMIGkMB0GA1UdDgQWBBT/LbE4\n9rWf288N6sJA5BRb6FJIGDB1BgNVHSMEbjBsgBT/LbE49rWf288N6sJA5BRb6FJI\nGKFJpEcwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNV\nBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZIIJAMHAwfXZ5/PWMAwGA1UdEwQF\nMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHFwl0tH0quUYZYO0dZYt4R7SJ0pCm2\n2satiyzHl4OnXcHDpekAo7/a09c6Lz6AU83cKy/+x3/djYHXWba7HpEu0dR3ugQP\nMlr4zrhd9xKZ0KZKiYmtJH+ak4OM4L3FbT0owUZPyjLSlhMtJVcoRp5CJsjAMBUG\nSvD8RX+T01wzox/Qb+lnnNnOlaWpqu8eoOenybxKp1a9ULzIVvN/LAcc+14vioFq\n2swRWtmocBAs8QR9n4uvbpiYvS8eYueDCWMM4fvFfBhaDZ3N9IbtySh3SpFdQDhw\nYbjM2rxXiyLGxB4Bol7QTv4zHif7Zt89FReT/NBy4rzaskDJY5L6xmY=\n-----END CERTIFICATE-----\n", private_key="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEAwQHoetcl9+5ikGzV6cMzWtWPJHqXT3wpbEkRU9Yz7lgvddmG\ndtcGbg/1CGZu0jJGkMoppoUo4c3dts3iwqRYmBikUP77wwY2QGmDZw2FvkJCJlKn\nabIRuGvBKwzESIXgKk2016aTP6/dAjEHyo6SeoK8lkIySUvK0fyOVlsiEsCmOpid\ntnKX/a+50GjB79CJH4ER2lLVZnhePFR/zUOyPxZQQ4naHf7yu/b5jhO0f8fwt+py\nFxIXjbEIdZliWRkRMtzrHOJIhrmJ2A1J7iOrirbbwillwjjNVUWPf3IJ3M12S9pE\newooaeO2izNTERcG9HzAacbVRn2Y2SWIyT/18QIDAQABAoIBACbhTYXBZYKmYPCb\nHBR1IBlCQA2nLGf0qRuJNJZg5iEzXows/6tc8YymZkQE7nolapWsQ+upk2y5Xdp/\naxiuprIs9JzkYK8Ox0r+dlwCG1kSW+UAbX0bQ/qUqlsTvU6muVuMP8vZYHxJ3wmb\n+ufRBKztPTQ/rYWaYQcgC0RWI20HTFBMxlTAyNxYNWzX7RKFkGVVyB9RsAtmcc8g\n+j4OdosbfNoJPS0HeIfNpAznDfHKdxDk2Yc1tV6RHBrC1ynyLE9+TaflIAdo2MVv\nKLMLq51GqYKtgJFIlBRPQqKoyXdz3fGvXrTkf/WY9QNq0J1Vk5ERePZ54mN8iZB7\n9lwy/AkCgYEA6FXzosxswaJ2wQLeoYc7ceaweX/SwTvxHgXzRyJIIT0eJWgx13Wo\n/WA3Iziimsjf6qE+SI/8laxPp2A86VMaIt3Z3mJN/CqSVGw8LK2AQst+OwdPyDMu\niacE8lj/IFGC8mwNUAb9CzGU3JpU4PxxGFjS/eMtGeRXCWkK4NE+G08CgYEA1Kp9\nN2JrVlqUz+gAX+LPmE9OEMAS9WQSQsfCHGogIFDGGcNf7+uwBM7GAaSJIP01zcoe\nVAgWdzXCv3FLhsaZoJ6RyLOLay5phbu1iaTr4UNYm5WtYTzMzqh8l1+MFFDl9xDB\nvULuCIIrglM5MeS/qnSg1uMoH2oVPj9TVst/ir8CgYEAxrI7Ws9Zc4Bt70N1As+U\nlySjaEVZCMkqvHJ6TCuVZFfQoE0r0whdLdRLU2PsLFP+q7qaeZQqgBaNSKeVcDYR\n9B+nY/jOmQoPewPVsp/vQTCnE/R81spu0mp0YI6cIheT1Z9zAy322svcc43JaWB7\nmEbeqyLOP4Z4qSOcmghZBSECgYACvR9Xs0DGn+wCsW4vze/2ei77MD4OQvepPIFX\ndFZtlBy5ADcgE9z0cuVB6CiL8DbdK5kwY9pGNr8HUCI03iHkW6Zs+0L0YmihfEVe\nPG19PSzK9CaDdhD9KFZSbLyVFmWfxOt50H7YRTTiPMgjyFpfi5j2q348yVT0tEQS\nfhRqaQKBgAcWPokmJ7EbYQGeMbS7HC8eWO/RyamlnSffdCdSc7ue3zdVJxpAkQ8W\nqu80pEIF6raIQfAf8MXiiZ7auFOSnHQTXUbhCpvDLKi0Mwq3G8Pl07l+2s6dQG6T\nlv6XTQaMyf6n1yjzL+fzDrH3qXMxHMO/b13EePXpDMpY7HQpoLDi\n-----END RSA PRIVATE KEY-----\n", ) - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -242,7 +242,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" certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +256,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -319,7 +319,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -332,7 +332,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" certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +345,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -371,7 +371,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,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" certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -397,7 +397,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSchemasCertificateObject, certificate, path=["response"]) + assert_matches_type(OriginTLSClientCertificate, certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/origin_tls_client_auth/test_hostnames.py b/tests/api_resources/origin_tls_client_auth/test_hostnames.py index a1aa0ef25ee..1cbcd2e6440 100644 --- a/tests/api_resources/origin_tls_client_auth/test_hostnames.py +++ b/tests/api_resources/origin_tls_client_auth/test_hostnames.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.types.origin_tls_client_auth import ( HostnameUpdateResponse, - TLSCertificatesAndHostnamesHostnameCertidObject, + OriginTLSClientCertificateID, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -73,7 +73,7 @@ def test_method_get(self, client: Cloudflare) -> None: "app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) + assert_matches_type(OriginTLSClientCertificateID, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -86,7 +86,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" hostname = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) + assert_matches_type(OriginTLSClientCertificateID, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) + assert_matches_type(OriginTLSClientCertificateID, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -175,7 +175,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "app.example.com", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) + assert_matches_type(OriginTLSClientCertificateID, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +188,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" hostname = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) + assert_matches_type(OriginTLSClientCertificateID, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -201,7 +201,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesHostnameCertidObject, hostname, path=["response"]) + assert_matches_type(OriginTLSClientCertificateID, hostname, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index ab8a6908786..c531d102cdf 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.page_shield import ( + PageShieldPolicy, PolicyListResponse, - PageShieldPageshieldPolicy, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: policy = client.page_shield.policies.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -51,7 +51,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" policy = response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -82,7 +82,7 @@ def test_method_update(self, client: Cloudflare) -> None: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +96,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +109,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" policy = response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +122,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -242,7 +242,7 @@ def test_method_get(self, client: Cloudflare) -> None: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -255,7 +255,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" policy = response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +268,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -297,7 +297,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.create( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -310,7 +310,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -322,7 +322,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" policy = await response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -334,7 +334,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -353,7 +353,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -367,7 +367,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare expression='ends_with(http.request.uri.path, "/checkout")', value="script-src 'none';", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -380,7 +380,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" policy = await response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -393,7 +393,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -513,7 +513,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "c9ef84a6bf5e47138c75d95e2f933e8f", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -526,7 +526,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" policy = await response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -539,7 +539,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(PageShieldPageshieldPolicy, policy, path=["response"]) + assert_matches_type(PageShieldPolicy, policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/pagerules/test_settings.py b/tests/api_resources/pagerules/test_settings.py index 0ce1835d63f..47bfe3f3456 100644 --- a/tests/api_resources/pagerules/test_settings.py +++ b/tests/api_resources/pagerules/test_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.pagerules import ZonesSettings +from cloudflare.types.pagerules import ZonePageruleSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_list(self, client: Cloudflare) -> None: setting = client.pagerules.settings.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ZonesSettings, setting, path=["response"]) + assert_matches_type(ZonePageruleSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" setting = response.parse() - assert_matches_type(ZonesSettings, setting, path=["response"]) + assert_matches_type(ZonePageruleSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(ZonesSettings, setting, path=["response"]) + assert_matches_type(ZonePageruleSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: setting = await async_client.pagerules.settings.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ZonesSettings, setting, path=["response"]) + assert_matches_type(ZonePageruleSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,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" setting = await response.parse() - assert_matches_type(ZonesSettings, setting, path=["response"]) + assert_matches_type(ZonePageruleSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(ZonesSettings, setting, path=["response"]) + assert_matches_type(ZonePageruleSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/ssl/universal/test_settings.py b/tests/api_resources/ssl/universal/test_settings.py index 755252038f5..027e556f715 100644 --- a/tests/api_resources/ssl/universal/test_settings.py +++ b/tests/api_resources/ssl/universal/test_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.ssl.universal import TLSCertificatesAndHostnamesUniversal +from cloudflare.types.ssl.universal import UniversalSSLSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_edit(self, client: Cloudflare) -> None: setting = client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -32,7 +32,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,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" setting = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -74,7 +74,7 @@ def test_method_get(self, client: Cloudflare) -> None: setting = client.ssl.universal.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -86,7 +86,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" setting = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +98,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -120,7 +120,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: setting = await async_client.ssl.universal.settings.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) zone_id="023e105f4ecef8ad9ca31a8372d0c353", enabled=True, ) - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -141,7 +141,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" setting = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -153,7 +153,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -171,7 +171,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: setting = await async_client.ssl.universal.settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +183,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" setting = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +195,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUniversal, setting, path=["response"]) + assert_matches_type(UniversalSSLSettings, setting, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/test_audio_tracks.py b/tests/api_resources/stream/test_audio_tracks.py index a344883e943..ed0b79fd777 100644 --- a/tests/api_resources/stream/test_audio_tracks.py +++ b/tests/api_resources/stream/test_audio_tracks.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.stream import ( + StreamAudio, AudioTrackGetResponse, - StreamAdditionalAudio, AudioTrackDeleteResponse, ) @@ -93,7 +93,7 @@ def test_method_copy(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +104,7 @@ def test_method_copy_with_all_params(self, client: Cloudflare) -> None: label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -118,7 +118,7 @@ def test_raw_response_copy(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -132,7 +132,7 @@ def test_streaming_response_copy(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ def test_method_edit(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: default=True, label="director commentary", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,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" audio_track = response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -201,7 +201,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True @@ -357,7 +357,7 @@ async def test_method_copy(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", label="director commentary", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -368,7 +368,7 @@ async def test_method_copy_with_all_params(self, async_client: AsyncCloudflare) label="director commentary", url="https://www.examplestorage.com/audio_file.mp3", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -382,7 +382,7 @@ async def test_raw_response_copy(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -396,7 +396,7 @@ async def test_streaming_response_copy(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True @@ -425,7 +425,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", identifier="ea95132c15732412d22c1476fa83f27a", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +437,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) default=True, label="director commentary", ) - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -451,7 +451,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" audio_track = await response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) @pytest.mark.skip() @parametrize @@ -465,7 +465,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" audio_track = await response.parse() - assert_matches_type(StreamAdditionalAudio, audio_track, path=["response"]) + assert_matches_type(StreamAudio, audio_track, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_client_certificates.py b/tests/api_resources/test_client_certificates.py index c4e871cc374..1f3fb7fbd8f 100644 --- a/tests/api_resources/test_client_certificates.py +++ b/tests/api_resources/test_client_certificates.py @@ -9,9 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import ( - TLSCertificatesAndHostnamesClientCertificate, -) +from cloudflare.types import ClientCertificate from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +26,7 @@ def test_method_create(self, client: Cloudflare) -> None: csr="-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----\n", validity_days=3650, ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +40,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,11 +74,7 @@ def test_method_list(self, client: Cloudflare) -> None: client_certificate = client.client_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,11 +87,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: per_page=5, status="all", ) - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,11 +99,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" client_certificate = response.parse() - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,11 +111,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -148,7 +130,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +143,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" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +156,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -200,7 +182,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -213,7 +195,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" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -226,7 +208,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -252,7 +234,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -265,7 +247,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" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -278,7 +260,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -309,7 +291,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: csr="-----BEGIN CERTIFICATE REQUEST-----\nMIICY....\n-----END CERTIFICATE REQUEST-----\n", validity_days=3650, ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -323,7 +305,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" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -337,7 +319,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -357,11 +339,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: client_certificate = await async_client.client_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -374,11 +352,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) per_page=5, status="all", ) - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -390,11 +364,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" client_certificate = await response.parse() - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,11 +376,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesClientCertificate], - client_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[ClientCertificate], client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -429,7 +395,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -442,7 +408,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" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -455,7 +421,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -481,7 +447,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -494,7 +460,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" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -507,7 +473,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -533,7 +499,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -546,7 +512,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" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -559,7 +525,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" client_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesClientCertificate, client_certificate, path=["response"]) + assert_matches_type(ClientCertificate, client_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_custom_certificates.py b/tests/api_resources/test_custom_certificates.py index e5c7d131965..139dc561d9a 100644 --- a/tests/api_resources/test_custom_certificates.py +++ b/tests/api_resources/test_custom_certificates.py @@ -10,11 +10,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + CustomCertificate, CustomCertificateGetResponse, CustomCertificateEditResponse, CustomCertificateCreateResponse, CustomCertificateDeleteResponse, - TLSCertificatesAndHostnamesCustomCertificate, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -94,11 +94,7 @@ def test_method_list(self, client: Cloudflare) -> None: custom_certificate = client.custom_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,11 +105,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: page=1, per_page=5, ) - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,11 +117,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" custom_certificate = response.parse() - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -141,11 +129,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = response.parse() - assert_matches_type( - SyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(SyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -401,11 +385,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: custom_certificate = await async_client.custom_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -416,11 +396,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) page=1, per_page=5, ) - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -432,11 +408,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" custom_certificate = await response.parse() - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -448,11 +420,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_certificate = await response.parse() - assert_matches_type( - AsyncV4PagePaginationArray[TLSCertificatesAndHostnamesCustomCertificate], - custom_certificate, - path=["response"], - ) + assert_matches_type(AsyncV4PagePaginationArray[CustomCertificate], custom_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_custom_nameservers.py b/tests/api_resources/test_custom_nameservers.py index d93759bde30..28b14dca1e2 100644 --- a/tests/api_resources/test_custom_nameservers.py +++ b/tests/api_resources/test_custom_nameservers.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + CustomNameserver, CustomNameserverGetResponse, - DNSCustomNameserversCustomNS, CustomNameserverDeleteResponse, CustomNameserverVerifyResponse, CustomNameserverAvailabiltyResponse, @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="372e67954025e0ba6aaa6d586b9e0b59", ns_name="ns1.example.com", ) - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ns_name="ns1.example.com", ns_set=1, ) - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,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" custom_nameserver = response.parse() - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = response.parse() - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) assert cast(Any, response.is_closed) is True @@ -268,7 +268,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="372e67954025e0ba6aaa6d586b9e0b59", ns_name="ns1.example.com", ) - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -278,7 +278,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ns_name="ns1.example.com", ns_set=1, ) - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +291,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" custom_nameserver = await response.parse() - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) @pytest.mark.skip() @parametrize @@ -304,7 +304,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_nameserver = await response.parse() - assert_matches_type(DNSCustomNameserversCustomNS, custom_nameserver, path=["response"]) + assert_matches_type(CustomNameserver, custom_nameserver, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_dnssec.py b/tests/api_resources/test_dnssec.py index 2e7b46d29d4..9e45b478ef2 100644 --- a/tests/api_resources/test_dnssec.py +++ b/tests/api_resources/test_dnssec.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import DNSSECDNSSEC, DNSSECDeleteResponse +from cloudflare.types import DNSSEC, DNSSECDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -65,7 +65,7 @@ def test_method_edit(self, client: Cloudflare) -> None: dnssec = client.dnssec.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -76,7 +76,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: dnssec_presigned=True, status="active", ) - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,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" dnssec = response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True @@ -118,7 +118,7 @@ def test_method_get(self, client: Cloudflare) -> None: dnssec = client.dnssec.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -130,7 +130,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" dnssec = response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True @@ -206,7 +206,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: dnssec = await async_client.dnssec.edit( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) dnssec_presigned=True, status="active", ) - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -229,7 +229,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" dnssec = await response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -241,7 +241,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = await response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True @@ -259,7 +259,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: dnssec = await async_client.dnssec.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -271,7 +271,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" dnssec = await response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) @pytest.mark.skip() @parametrize @@ -283,7 +283,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" dnssec = await response.parse() - assert_matches_type(DNSSECDNSSEC, dnssec, path=["response"]) + assert_matches_type(DNSSEC, dnssec, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_filters.py b/tests/api_resources/test_filters.py index b8ddc874a6e..dfd37057490 100644 --- a/tests/api_resources/test_filters.py +++ b/tests/api_resources/test_filters.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - LegacyJhsFilter, + FirewallFilter, FilterCreateResponse, ) from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray @@ -75,7 +75,7 @@ def test_method_update(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -130,7 +130,7 @@ def test_method_list(self, client: Cloudflare) -> None: filter = client.filters.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +144,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: per_page=5, ref="FIL-100", ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +156,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,7 +187,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -200,7 +200,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -213,7 +213,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -239,7 +239,7 @@ def test_method_get(self, client: Cloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -252,7 +252,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -265,7 +265,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -342,7 +342,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", body={}, ) - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -356,7 +356,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +370,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -397,7 +397,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: filter = await async_client.filters.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -411,7 +411,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) per_page=5, ref="FIL-100", ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +423,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +435,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -454,7 +454,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -467,7 +467,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -480,7 +480,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -506,7 +506,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "372e67954025e0ba6aaa6d586b9e0b61", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -519,7 +519,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -532,7 +532,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(Optional[LegacyJhsFilter], filter, path=["response"]) + assert_matches_type(Optional[FirewallFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index f6e27537930..15fff51ea85 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + Healthcheck, HealthcheckListResponse, - HealthchecksHealthchecks, HealthcheckDeleteResponse, ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +65,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +79,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" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ def test_method_update(self, client: Cloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -153,7 +153,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,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" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -183,7 +183,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -309,7 +309,7 @@ def test_method_edit(self, client: Cloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -346,7 +346,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -361,7 +361,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" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -376,7 +376,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -406,7 +406,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -419,7 +419,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" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -432,7 +432,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -463,7 +463,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -499,7 +499,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -513,7 +513,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" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +527,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -550,7 +550,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -587,7 +587,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +602,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" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -617,7 +617,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -743,7 +743,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: address="www.example.com", name="server-1", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -780,7 +780,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) healthcheck_timeout=0, type="HTTPS", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -795,7 +795,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" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -810,7 +810,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -840,7 +840,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -853,7 +853,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" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -866,7 +866,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(HealthchecksHealthchecks, healthcheck, path=["response"]) + assert_matches_type(Healthcheck, healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index 935738235ef..61398a313e3 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + KeylessCertificateHostname, KeylessCertificateListResponse, - TLSCertificatesAndHostnamesBase, KeylessCertificateDeleteResponse, ) @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: host="example.com", port=24008, ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,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" keyless_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -77,7 +77,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -195,7 +195,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -212,7 +212,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -225,7 +225,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" keyless_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -238,7 +238,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -266,7 +266,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -279,7 +279,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" keyless_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -292,7 +292,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -326,7 +326,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: host="example.com", port=24008, ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -343,7 +343,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -358,7 +358,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" keyless_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -373,7 +373,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -491,7 +491,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -508,7 +508,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "vnet_id": "7365377a-85a4-4390-9480-531ef7dc7a3c", }, ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -521,7 +521,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" keyless_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -534,7 +534,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -562,7 +562,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -575,7 +575,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" keyless_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -588,7 +588,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesBase, keyless_certificate, path=["response"]) + assert_matches_type(KeylessCertificateHostname, keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index 0f2bcab94d0..e3cdca8326b 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -10,9 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + MTLSCertificate, + MTLSCertificateUpdate, MTLSCertificateListResponse, - TLSCertificatesAndHostnamesCertificateObjectPost, - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: ca=True, certificates="-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----", ) - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="example_ca_cert", private_key="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDEXDkcICRU3XBv9hiiPnBWIjgTQyowmVFxDr11mONgZB/cMYjE/OvQjvnpwNcOaSK16MOpAjNbELKRx2lZiVJaLRDCccqCxXwP/CrdRChcqGzo7mbNksMlcidrErb0LlEBKLFC2QjRmRKqB+YOs4TD8WsZu2S667A2fZmjRlaqOxFi1h62ee0P+TLU628UC/nl41JifSt5Evt7hMDHakemdwZblNYr2p6T3NQjdhjYXTtP4UmOGJBhJ7i7Kicg3d3CIgdTMbggSeGWqjndr4ldVnD96FN3cVT5uDFsn2CJXTFgdeBWoUnMS4VnUZzPWGf4vSBXC8qV7Ls+w46yT7T1AgMBAAECggEAQZnp/oqCeNPOR6l5S2L+1tfx0gWjZ78hJVteUpZ0iHSK7F6kKeOxyOird7vUXV0kmo+cJq+0hp0Ke4eam640FCpwKfYoSQ4/R3vgujGWJnaihCN5tv5sMet0XeJPuz5qE7ALoKCvwI6aXLHs20aAeZIDTQJ9QbGSGnJVzOWn+JDTidIgZpN57RpXfSAwnJPTQK/PN8i5z108hsaDOdEgGmxYZ7kYqMqzX20KXmth58LDfPixs5JGtS60iiKC/wOcGzkB2/AdTSojR76oEU77cANP/3zO25NG//whUdYlW0t0d7PgXxIeJe+xgYnamDQJx3qonVyt4H77ha0ObRAj9QKBgQDicZr+VTwFMnELP3a+FXGnjehRiuS1i7MXGKxNweCD+dFlML0FplSQS8Ro2n+d8lu8BBXGx0qm6VXu8Rhn7TAUL6q+PCgfarzxfIhacb/TZCqfieIHsMlVBfhV5HCXnk+kis0tuC/PRArcWTwDHJUJXkBhvkUsNswvQzavDPI7KwKBgQDd/WgLkj7A3X5fgIHZH/GbDSBiXwzKb+rF4ZCT2XFgG/OAW7vapfcX/w+v+5lBLyrocmOAS3PGGAhM5T3HLnUCQfnK4qgps1Lqibkc9Tmnsn60LanUjuUMsYv/zSw70tozbzhJ0pioEpWfRxRZBztO2Rr8Ntm7h6Fk701EXGNAXwKBgQCD1xsjy2J3sCerIdcz0u5qXLAPkeuZW+34m4/ucdwTWwc0gEz9lhsULFj9p4G351zLuiEnq+7mAWLcDJlmIO3mQt6JhiLiL9Y0T4pgBmxmWqKKYtAsJB0EmMY+1BNN44mBRqMxZFTJu1cLdhT/xstrOeoIPqytknYNanfTMZlzIwKBgHrLXe5oq0XMP8dcMneEcAUwsaU4pr6kQd3L9EmUkl5zl7J9C+DaxWAEuwzBw/iGutlxzRB+rD/7szu14wJ29EqXbDGKRzMp+se5/yfBjm7xEZ1hVPw7PwBShfqt57X/4Ktq7lwHnmH6RcGhc+P7WBc5iO/S94YAdIp8xOT3pf9JAoGAE0QkqJUY+5Mgr+fBO0VNV72ZoPveGpW+De59uhKAOnu1zljQCUtk59m6+DXfm0tNYKtawa5n8iN71Zh+s62xXSt3pYi1Y5CCCmv8Y4BhwIcPwXKk3zEvLgSHVTpC0bayA9aSO4bbZgVXa5w+Z0w/vvfp9DWo1IS3EnQRrz6WMYA=\n-----END PRIVATE KEY-----", ) - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" mtls_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +69,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -132,9 +132,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,9 +145,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" mtls_certificate = response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -162,9 +158,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -190,9 +184,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,9 +197,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" mtls_certificate = response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -220,9 +210,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -253,7 +241,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: ca=True, certificates="-----BEGIN CERTIFICATE-----\nMIIDmDCCAoCgAwIBAgIUKTOAZNjcXVZRj4oQt0SHsl1c1vMwDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjAgFw0yMjExMjIxNjU5NDdaGA8yMTIyMTAyOTE2NTk0N1owUTELMAkGA1UEBhMCVVMxFjAUBgNVBAgMDVNhbiBGcmFuY2lzY28xEzARBgNVBAcMCkNhbGlmb3JuaWExFTATBgNVBAoMDEV4YW1wbGUgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMRcORwgJFTdcG/2GKI+cFYiOBNDKjCZUXEOvXWY42BkH9wxiMT869CO+enA1w5pIrXow6kCM1sQspHHaVmJUlotEMJxyoLFfA/8Kt1EKFyobOjuZs2SwyVyJ2sStvQuUQEosULZCNGZEqoH5g6zhMPxaxm7ZLrrsDZ9maNGVqo7EWLWHrZ57Q/5MtTrbxQL+eXjUmJ9K3kS+3uEwMdqR6Z3BluU1ivanpPc1CN2GNhdO0/hSY4YkGEnuLsqJyDd3cIiB1MxuCBJ4ZaqOd2viV1WcP3oU3dxVPm4MWyfYIldMWB14FahScxLhWdRnM9YZ/i9IFcLypXsuz7DjrJPtPUCAwEAAaNmMGQwHQYDVR0OBBYEFP5JzLUawNF+c3AXsYTEWHh7z2czMB8GA1UdIwQYMBaAFP5JzLUawNF+c3AXsYTEWHh7z2czMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEBMA0GCSqGSIb3DQEBCwUAA4IBAQBc+Be7NDhpE09y7hLPZGRPl1cSKBw4RI0XIv6rlbSTFs5EebpTGjhx/whNxwEZhB9HZ7111Oa1YlT8xkI9DshB78mjAHCKBAJ76moK8tkG0aqdYpJ4ZcJTVBB7l98Rvgc7zfTii7WemTy72deBbSeiEtXavm4EF0mWjHhQ5Nxpnp00Bqn5g1x8CyTDypgmugnep+xG+iFzNmTdsz7WI9T/7kDMXqB7M/FPWBORyS98OJqNDswCLF8bIZYwUBEe+bRHFomoShMzaC3tvim7WCb16noDkSTMlfKO4pnvKhpcVdSgwcruATV7y+W+Lvmz2OT/Gui4JhqeoTewsxndhDDE\n-----END CERTIFICATE-----", ) - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -265,7 +253,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="example_ca_cert", private_key="-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDEXDkcICRU3XBv9hiiPnBWIjgTQyowmVFxDr11mONgZB/cMYjE/OvQjvnpwNcOaSK16MOpAjNbELKRx2lZiVJaLRDCccqCxXwP/CrdRChcqGzo7mbNksMlcidrErb0LlEBKLFC2QjRmRKqB+YOs4TD8WsZu2S667A2fZmjRlaqOxFi1h62ee0P+TLU628UC/nl41JifSt5Evt7hMDHakemdwZblNYr2p6T3NQjdhjYXTtP4UmOGJBhJ7i7Kicg3d3CIgdTMbggSeGWqjndr4ldVnD96FN3cVT5uDFsn2CJXTFgdeBWoUnMS4VnUZzPWGf4vSBXC8qV7Ls+w46yT7T1AgMBAAECggEAQZnp/oqCeNPOR6l5S2L+1tfx0gWjZ78hJVteUpZ0iHSK7F6kKeOxyOird7vUXV0kmo+cJq+0hp0Ke4eam640FCpwKfYoSQ4/R3vgujGWJnaihCN5tv5sMet0XeJPuz5qE7ALoKCvwI6aXLHs20aAeZIDTQJ9QbGSGnJVzOWn+JDTidIgZpN57RpXfSAwnJPTQK/PN8i5z108hsaDOdEgGmxYZ7kYqMqzX20KXmth58LDfPixs5JGtS60iiKC/wOcGzkB2/AdTSojR76oEU77cANP/3zO25NG//whUdYlW0t0d7PgXxIeJe+xgYnamDQJx3qonVyt4H77ha0ObRAj9QKBgQDicZr+VTwFMnELP3a+FXGnjehRiuS1i7MXGKxNweCD+dFlML0FplSQS8Ro2n+d8lu8BBXGx0qm6VXu8Rhn7TAUL6q+PCgfarzxfIhacb/TZCqfieIHsMlVBfhV5HCXnk+kis0tuC/PRArcWTwDHJUJXkBhvkUsNswvQzavDPI7KwKBgQDd/WgLkj7A3X5fgIHZH/GbDSBiXwzKb+rF4ZCT2XFgG/OAW7vapfcX/w+v+5lBLyrocmOAS3PGGAhM5T3HLnUCQfnK4qgps1Lqibkc9Tmnsn60LanUjuUMsYv/zSw70tozbzhJ0pioEpWfRxRZBztO2Rr8Ntm7h6Fk701EXGNAXwKBgQCD1xsjy2J3sCerIdcz0u5qXLAPkeuZW+34m4/ucdwTWwc0gEz9lhsULFj9p4G351zLuiEnq+7mAWLcDJlmIO3mQt6JhiLiL9Y0T4pgBmxmWqKKYtAsJB0EmMY+1BNN44mBRqMxZFTJu1cLdhT/xstrOeoIPqytknYNanfTMZlzIwKBgHrLXe5oq0XMP8dcMneEcAUwsaU4pr6kQd3L9EmUkl5zl7J9C+DaxWAEuwzBw/iGutlxzRB+rD/7szu14wJ29EqXbDGKRzMp+se5/yfBjm7xEZ1hVPw7PwBShfqt57X/4Ktq7lwHnmH6RcGhc+P7WBc5iO/S94YAdIp8xOT3pf9JAoGAE0QkqJUY+5Mgr+fBO0VNV72ZoPveGpW+De59uhKAOnu1zljQCUtk59m6+DXfm0tNYKtawa5n8iN71Zh+s62xXSt3pYi1Y5CCCmv8Y4BhwIcPwXKk3zEvLgSHVTpC0bayA9aSO4bbZgVXa5w+Z0w/vvfp9DWo1IS3EnQRrz6WMYA=\n-----END PRIVATE KEY-----", ) - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -279,7 +267,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" mtls_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -293,7 +281,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesCertificateObjectPost, mtls_certificate, path=["response"]) + assert_matches_type(MTLSCertificateUpdate, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -356,9 +344,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -371,9 +357,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" mtls_certificate = await response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -386,9 +370,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -414,9 +396,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -429,9 +409,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" mtls_certificate = await response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -444,9 +422,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type( - TLSCertificatesAndHostnamesComponentsSchemasCertificateObject, mtls_certificate, path=["response"] - ) + assert_matches_type(MTLSCertificate, mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_page_shield.py b/tests/api_resources/test_page_shield.py index a6dd2b7fe2a..f8bbeaa1a85 100644 --- a/tests/api_resources/test_page_shield.py +++ b/tests/api_resources/test_page_shield.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import PageShieldGetZoneSettings, PageShieldUpdateZoneSettings +from cloudflare.types import PageShieldSetting, PageShieldUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_update(self, client: Cloudflare) -> None: page_shield = client.page_shield.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -34,7 +34,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: use_cloudflare_reporting_endpoint=True, use_connection_url_path=True, ) - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +46,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" page_shield = response.parse() - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = response.parse() - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,7 +76,7 @@ def test_method_get(self, client: Cloudflare) -> None: page_shield = client.page_shield.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldSetting, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,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" page_shield = response.parse() - assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldSetting, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = response.parse() - assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldSetting, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True @@ -122,7 +122,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: page_shield = await async_client.page_shield.update( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare use_cloudflare_reporting_endpoint=True, use_connection_url_path=True, ) - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +145,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" page_shield = await response.parse() - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +157,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = await response.parse() - assert_matches_type(PageShieldUpdateZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldUpdateResponse, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True @@ -175,7 +175,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: page_shield = await async_client.page_shield.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldSetting, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,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" page_shield = await response.parse() - assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldSetting, page_shield, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +199,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" page_shield = await response.parse() - assert_matches_type(PageShieldGetZoneSettings, page_shield, path=["response"]) + assert_matches_type(PageShieldSetting, page_shield, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 46e615a6e8a..06a9beb548f 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import PlanListResponse, BillSubsAPIAvailableRatePlan +from cloudflare.types import PlanListResponse, AvailableRatePlan base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -66,7 +66,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"]) + assert_matches_type(AvailableRatePlan, plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +79,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" plan = response.parse() - assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"]) + assert_matches_type(AvailableRatePlan, plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +92,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" plan = response.parse() - assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"]) + assert_matches_type(AvailableRatePlan, plan, path=["response"]) assert cast(Any, response.is_closed) is True @@ -164,7 +164,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"]) + assert_matches_type(AvailableRatePlan, plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -177,7 +177,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" plan = await response.parse() - assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"]) + assert_matches_type(AvailableRatePlan, plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" plan = await response.parse() - assert_matches_type(BillSubsAPIAvailableRatePlan, plan, path=["response"]) + assert_matches_type(AvailableRatePlan, plan, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 2630e4cca3f..610dd7a3ab8 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( - WaitingroomWaitingroom, + WaitingRoom, WaitingRoomListResponse, WaitingRoomDeleteResponse, ) @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: session_duration=1, suspended=True, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,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" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -132,7 +132,7 @@ def test_method_update(self, client: Cloudflare) -> None: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -175,7 +175,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: session_duration=1, suspended=True, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -192,7 +192,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" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -209,7 +209,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -341,7 +341,7 @@ def test_method_edit(self, client: Cloudflare) -> None: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: session_duration=1, suspended=True, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -401,7 +401,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" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -418,7 +418,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -452,7 +452,7 @@ def test_method_get(self, client: Cloudflare) -> None: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -465,7 +465,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" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -478,7 +478,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -511,7 +511,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -553,7 +553,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare session_duration=1, suspended=True, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -569,7 +569,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" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -585,7 +585,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -612,7 +612,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -655,7 +655,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare session_duration=1, suspended=True, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -672,7 +672,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" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -689,7 +689,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -821,7 +821,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: new_users_per_minute=200, total_active_users=200, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -864,7 +864,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) session_duration=1, suspended=True, ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -881,7 +881,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" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -898,7 +898,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -932,7 +932,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -945,7 +945,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" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -958,7 +958,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(WaitingroomWaitingroom, waiting_room, path=["response"]) + assert_matches_type(WaitingRoom, waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/firewall/test_access_rules.py b/tests/api_resources/user/firewall/test_access_rules.py index bab166c1867..a20ec3c2db9 100644 --- a/tests/api_resources/user/firewall/test_access_rules.py +++ b/tests/api_resources/user/firewall/test_access_rules.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.user.firewall import ( - LegacyJhsRule, + FirewallRule, AccessRuleDeleteResponse, ) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: configuration={}, mode="challenge", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,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" access_rule = response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +67,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -75,7 +75,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: access_rule = client.user.firewall.access_rules.list() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: page=1, per_page=20, ) - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +109,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" access_rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(SyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -171,7 +171,7 @@ def test_method_edit(self, client: Cloudflare) -> None: access_rule = client.user.firewall.access_rules.edit( "92f17202ed8bd63d69a66b86a49a8f6b", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -181,7 +181,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -193,7 +193,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" access_rule = response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +205,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -228,7 +228,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: configuration={}, mode="challenge", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -241,7 +241,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +254,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" access_rule = await response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -267,7 +267,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = await response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -275,7 +275,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.user.firewall.access_rules.list() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -299,7 +299,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) page=1, per_page=20, ) - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +309,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" access_rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +319,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[FirewallRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -371,7 +371,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: access_rule = await async_client.user.firewall.access_rules.edit( "92f17202ed8bd63d69a66b86a49a8f6b", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -381,7 +381,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) mode="challenge", notes="This rule is enabled because of an event that occurred on date X.", ) - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -393,7 +393,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" access_rule = await response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -405,7 +405,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" access_rule = await response.parse() - assert_matches_type(Optional[LegacyJhsRule], access_rule, path=["response"]) + assert_matches_type(Optional[FirewallRule], access_rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/load_balancers/test_preview.py b/tests/api_resources/user/load_balancers/test_preview.py index a91db725c8c..a5da3f9e2c9 100644 --- a/tests/api_resources/user/load_balancers/test_preview.py +++ b/tests/api_resources/user/load_balancers/test_preview.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.load_balancers import LoadBalancingPreviewResult +from cloudflare.types.user.load_balancers import LoadBalancingPreview base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: preview = client.user.load_balancers.preview.get( "f1aba936b94213e5b8dca0c0dbf1f9cc", ) - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" preview = response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: preview = await async_client.user.load_balancers.preview.get( "f1aba936b94213e5b8dca0c0dbf1f9cc", ) - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,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" preview = await response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" preview = await response.parse() - assert_matches_type(LoadBalancingPreviewResult, preview, path=["response"]) + assert_matches_type(LoadBalancingPreview, preview, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/test_organizations.py b/tests/api_resources/user/test_organizations.py index 8158bae1594..b0b008cc682 100644 --- a/tests/api_resources/user/test_organizations.py +++ b/tests/api_resources/user/test_organizations.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.user import ( - IamOrganization, + Organization, OrganizationGetResponse, OrganizationDeleteResponse, ) @@ -26,7 +26,7 @@ class TestOrganizations: @parametrize def test_method_list(self, client: Cloudflare) -> None: organization = client.user.organizations.list() - assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: per_page=5, status="member", ) - assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,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" organization = response.parse() - assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +60,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(SyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[Organization], organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -156,7 +156,7 @@ class TestAsyncOrganizations: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: organization = await async_client.user.organizations.list() - assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) per_page=5, status="member", ) - assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -180,7 +180,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" organization = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[IamOrganization], organization, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[Organization], organization, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/waiting_rooms/events/test_details.py b/tests/api_resources/waiting_rooms/events/test_details.py index 53a6bc6939d..0de30ba6d50 100644 --- a/tests/api_resources/waiting_rooms/events/test_details.py +++ b/tests/api_resources/waiting_rooms/events/test_details.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.waiting_rooms.events import WaitingroomEventDetailsResult +from cloudflare.types.waiting_rooms.events import WaitingroomEventDetails base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_get(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetails, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,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" detail = response.parse() - assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetails, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" detail = response.parse() - assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetails, detail, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetails, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -107,7 +107,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" detail = await response.parse() - assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetails, detail, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +121,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" detail = await response.parse() - assert_matches_type(WaitingroomEventDetailsResult, detail, path=["response"]) + assert_matches_type(WaitingroomEventDetails, detail, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index c72975b9a31..b74a62410d6 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -10,9 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.waiting_rooms import ( + WaitingroomEvent, EventListResponse, EventDeleteResponse, - WaitingroomEventResult, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: suspended=True, total_active_users=200, ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +69,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" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -85,7 +85,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -121,7 +121,7 @@ def test_method_update(self, client: Cloudflare) -> None: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +144,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: suspended=True, total_active_users=200, ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +161,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" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -178,7 +178,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -342,7 +342,7 @@ def test_method_edit(self, client: Cloudflare) -> None: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -365,7 +365,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: suspended=True, total_active_users=200, ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -382,7 +382,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" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +399,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -444,7 +444,7 @@ def test_method_get(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +458,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" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -472,7 +472,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -514,7 +514,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -536,7 +536,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare suspended=True, total_active_users=200, ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -552,7 +552,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" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -568,7 +568,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -604,7 +604,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -627,7 +627,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare suspended=True, total_active_users=200, ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -644,7 +644,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" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -661,7 +661,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -825,7 +825,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: event_start_time="2021-09-28T15:30:00.000Z", name="production_webinar_event", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -848,7 +848,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) suspended=True, total_active_users=200, ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -865,7 +865,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" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -882,7 +882,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -927,7 +927,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", waiting_room_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -941,7 +941,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" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) @pytest.mark.skip() @parametrize @@ -955,7 +955,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(WaitingroomEventResult, event, path=["response"]) + assert_matches_type(WaitingroomEvent, event, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py index e83f727f654..fea633985d2 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/content_lists/test_entries.py @@ -12,7 +12,7 @@ from cloudflare.types.web3.hostnames.ipfs_universal_paths.content_lists import ( EntryListResponse, EntryDeleteResponse, - DwebConfigContentListEntry, + DistributedWebConfigContentListEntry, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: type="cid", description="this is my content list entry", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,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" entry = response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -72,7 +72,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -105,7 +105,7 @@ def test_method_update(self, client: Cloudflare) -> None: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -118,7 +118,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: type="cid", description="this is my content list entry", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +134,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" entry = response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -150,7 +150,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -312,7 +312,7 @@ def test_method_get(self, client: Cloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -326,7 +326,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" entry = response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +340,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -383,7 +383,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +395,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare type="cid", description="this is my content list entry", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -412,7 +412,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" entry = await response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -427,7 +427,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -460,7 +460,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: content="QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB", type="cid", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -473,7 +473,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare type="cid", description="this is my content list entry", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -491,7 +491,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" entry = await response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -507,7 +507,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -671,7 +671,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -685,7 +685,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" entry = await response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) @pytest.mark.skip() @parametrize @@ -699,7 +699,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" entry = await response.parse() - assert_matches_type(DwebConfigContentListEntry, entry, path=["response"]) + assert_matches_type(DistributedWebConfigContentListEntry, entry, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py index 88971d819cb..62cab2a7d3a 100644 --- a/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py +++ b/tests/api_resources/web3/hostnames/ipfs_universal_paths/test_content_lists.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.web3.hostnames.ipfs_universal_paths import ( - DwebConfigContentListDetails, + DistributedWebConfigContentList, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +28,7 @@ def test_method_update(self, client: Cloudflare) -> None: action="block", entries=[{}, {}, {}], ) - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +43,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" content_list = response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -88,7 +88,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +101,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" content_list = response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -114,7 +114,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -146,7 +146,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: action="block", entries=[{}, {}, {}], ) - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +161,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" content_list = await response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +176,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = await response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -206,7 +206,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -219,7 +219,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" content_list = await response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +232,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" content_list = await response.parse() - assert_matches_type(DwebConfigContentListDetails, content_list, path=["response"]) + assert_matches_type(DistributedWebConfigContentList, content_list, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index 8bcd33047a8..ea1c6bc3f40 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.types.web3 import ( HostnameListResponse, - DwebConfigWeb3Hostname, + DistributedWebHostname, HostnameDeleteResponse, ) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -52,7 +52,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" hostname = response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -65,7 +65,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -179,7 +179,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -203,7 +203,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" hostname = response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -216,7 +216,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -242,7 +242,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -255,7 +255,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" hostname = response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +268,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -298,7 +298,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", target="ipfs", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +309,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -322,7 +322,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" hostname = await response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -335,7 +335,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -449,7 +449,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -460,7 +460,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) description="This is my IPFS gateway.", dnslink="/ipns/onboarding.ipfs.cloudflare.com", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -473,7 +473,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" hostname = await response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -486,7 +486,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -512,7 +512,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -525,7 +525,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" hostname = await response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -538,7 +538,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(DwebConfigWeb3Hostname, hostname, path=["response"]) + assert_matches_type(DistributedWebHostname, hostname, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/test_filters.py b/tests/api_resources/workers/test_filters.py index 8932ac5c98d..b8cc1e4144a 100644 --- a/tests/api_resources/workers/test_filters.py +++ b/tests/api_resources/workers/test_filters.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.workers import ( - WorkersFilters, + WorkersFilter, FilterListResponse, FilterCreateResponse, FilterDeleteResponse, @@ -81,7 +81,7 @@ def test_method_update(self, client: Cloudflare) -> None: enabled=True, pattern="example.net/*", ) - assert_matches_type(WorkersFilters, filter, path=["response"]) + assert_matches_type(WorkersFilter, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +96,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(WorkersFilters, filter, path=["response"]) + assert_matches_type(WorkersFilter, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(WorkersFilters, filter, path=["response"]) + assert_matches_type(WorkersFilter, filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -291,7 +291,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: enabled=True, pattern="example.net/*", ) - assert_matches_type(WorkersFilters, filter, path=["response"]) + assert_matches_type(WorkersFilter, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -306,7 +306,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(WorkersFilters, filter, path=["response"]) + assert_matches_type(WorkersFilter, filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +321,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(WorkersFilters, filter, path=["response"]) + assert_matches_type(WorkersFilter, filter, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/test_routes.py b/tests/api_resources/workers/test_routes.py index 370c18dd419..7fc7824e396 100644 --- a/tests/api_resources/workers/test_routes.py +++ b/tests/api_resources/workers/test_routes.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.workers import ( - WorkersRoutes, + WorkersRoute, RouteListResponse, RouteCreateResponse, RouteDeleteResponse, @@ -86,7 +86,7 @@ def test_method_update(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", pattern="example.net/*", ) - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +97,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: pattern="example.net/*", script="this-is_my_script-01", ) - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,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" route = response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +125,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -247,7 +247,7 @@ def test_method_get(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -260,7 +260,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" route = response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +273,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -360,7 +360,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", pattern="example.net/*", ) - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -371,7 +371,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare pattern="example.net/*", script="this-is_my_script-01", ) - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -385,7 +385,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" route = await response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +399,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -521,7 +521,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -534,7 +534,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" route = await response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) @pytest.mark.skip() @parametrize @@ -547,7 +547,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(WorkersRoutes, route, path=["response"]) + assert_matches_type(WorkersRoute, route, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py index 7e6c865df3c..6689db85892 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py +++ b/tests/api_resources/workers_for_platforms/dispatch/namespaces/test_scripts.py @@ -11,7 +11,7 @@ from tests.utils import assert_matches_type from cloudflare.types.workers import WorkersScript from cloudflare.types.workers_for_platforms.dispatch.namespaces import ( - WorkersNamespaceScript, + WorkersForPlatformsNamespaceScript, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -326,7 +326,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(WorkersNamespaceScript, script, path=["response"]) + assert_matches_type(WorkersForPlatformsNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +340,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" script = response.parse() - assert_matches_type(WorkersNamespaceScript, script, path=["response"]) + assert_matches_type(WorkersForPlatformsNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -354,7 +354,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(WorkersNamespaceScript, script, path=["response"]) + assert_matches_type(WorkersForPlatformsNamespaceScript, script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -692,7 +692,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", dispatch_namespace="my-dispatch-namespace", ) - assert_matches_type(WorkersNamespaceScript, script, path=["response"]) + assert_matches_type(WorkersForPlatformsNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -706,7 +706,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" script = await response.parse() - assert_matches_type(WorkersNamespaceScript, script, path=["response"]) + assert_matches_type(WorkersForPlatformsNamespaceScript, script, path=["response"]) @pytest.mark.skip() @parametrize @@ -720,7 +720,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(WorkersNamespaceScript, script, path=["response"]) + assert_matches_type(WorkersForPlatformsNamespaceScript, script, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index e5d3e901d42..a61a2e24960 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access.applications import ( - AccessPolicies, + ZeroTrustPolicies, PolicyListResponse, PolicyDeleteResponse, ) @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: ], session_duration="24h", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +102,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" policy = response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +123,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -188,7 +188,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -234,7 +234,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: ], session_duration="24h", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -256,7 +256,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" policy = response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -278,7 +278,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -517,7 +517,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -528,7 +528,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -543,7 +543,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" policy = response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -558,7 +558,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -616,7 +616,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -661,7 +661,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare ], session_duration="24h", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -682,7 +682,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" policy = await response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -703,7 +703,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -768,7 +768,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -814,7 +814,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare ], session_duration="24h", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -836,7 +836,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" policy = await response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -858,7 +858,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1097,7 +1097,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -1108,7 +1108,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -1123,7 +1123,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" policy = await response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -1138,7 +1138,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(AccessPolicies, policy, path=["response"]) + assert_matches_type(ZeroTrustPolicies, policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index edb66e5d907..cd481f558e1 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - AccessApps, + ZeroTrustApps, ApplicationListResponse, ApplicationDeleteResponse, ) @@ -30,7 +30,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -78,7 +78,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +108,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -138,7 +138,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -180,7 +180,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N tags=["engineers", "engineers", "engineers"], type="saas", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -193,7 +193,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +206,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -234,7 +234,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +282,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -297,7 +297,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -312,7 +312,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -344,7 +344,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -392,7 +392,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +407,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -422,7 +422,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -453,7 +453,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -470,7 +470,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -484,7 +484,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -498,7 +498,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -527,7 +527,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -544,7 +544,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -558,7 +558,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -572,7 +572,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -601,7 +601,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -618,7 +618,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -632,7 +632,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -646,7 +646,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -674,7 +674,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -689,7 +689,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -702,7 +702,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -715,7 +715,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -744,7 +744,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -793,7 +793,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -809,7 +809,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -825,7 +825,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -858,7 +858,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -901,7 +901,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N tags=["engineers", "engineers", "engineers"], type="saas", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -915,7 +915,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -929,7 +929,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -960,7 +960,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1009,7 +1009,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1025,7 +1025,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1041,7 +1041,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1076,7 +1076,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1125,7 +1125,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1141,7 +1141,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1157,7 +1157,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1191,7 +1191,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1209,7 +1209,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1224,7 +1224,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1239,7 +1239,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1271,7 +1271,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1289,7 +1289,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1304,7 +1304,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1319,7 +1319,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1351,7 +1351,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1369,7 +1369,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1384,7 +1384,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1399,7 +1399,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1430,7 +1430,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1446,7 +1446,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1460,7 +1460,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1474,7 +1474,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1631,7 +1631,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1641,7 +1641,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1655,7 +1655,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" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1669,7 +1669,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1770,7 +1770,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1818,7 +1818,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1833,7 +1833,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1848,7 +1848,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1878,7 +1878,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1920,7 +1920,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn tags=["engineers", "engineers", "engineers"], type="saas", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1933,7 +1933,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1946,7 +1946,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1974,7 +1974,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2022,7 +2022,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2037,7 +2037,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2052,7 +2052,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2084,7 +2084,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2132,7 +2132,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2147,7 +2147,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2162,7 +2162,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2193,7 +2193,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2210,7 +2210,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2224,7 +2224,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2238,7 +2238,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2267,7 +2267,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2284,7 +2284,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2298,7 +2298,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2312,7 +2312,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2341,7 +2341,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2358,7 +2358,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2372,7 +2372,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2386,7 +2386,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2414,7 +2414,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2429,7 +2429,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2442,7 +2442,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2455,7 +2455,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2484,7 +2484,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2533,7 +2533,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2549,7 +2549,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2565,7 +2565,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2598,7 +2598,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2641,7 +2641,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn tags=["engineers", "engineers", "engineers"], type="saas", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2655,7 +2655,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2669,7 +2669,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2700,7 +2700,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2749,7 +2749,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2765,7 +2765,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2781,7 +2781,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2816,7 +2816,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2865,7 +2865,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn skip_interstitial=True, tags=["engineers", "engineers", "engineers"], ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2881,7 +2881,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2897,7 +2897,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2931,7 +2931,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2949,7 +2949,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2964,7 +2964,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -2979,7 +2979,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3011,7 +3011,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3029,7 +3029,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3044,7 +3044,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3059,7 +3059,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3091,7 +3091,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3109,7 +3109,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn auto_redirect_to_identity=True, session_duration="24h", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3124,7 +3124,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3139,7 +3139,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3170,7 +3170,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3186,7 +3186,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn tags=["engineers", "engineers", "engineers"], type="bookmark", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3200,7 +3200,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3214,7 +3214,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3371,7 +3371,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3381,7 +3381,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3395,7 +3395,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" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3409,7 +3409,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(AccessApps, application, path=["response"]) + assert_matches_type(ZeroTrustApps, application, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index 6b59f35d527..af1d5cafa7f 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access import AccessBookmarks, BookmarkListResponse, BookmarkDeleteResponse +from cloudflare.types.zero_trust.access import ZeroTrustBookmarks, BookmarkListResponse, BookmarkDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_create(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,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" bookmark = response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -76,7 +76,7 @@ def test_method_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +102,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -222,7 +222,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +235,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" bookmark = response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +248,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -278,7 +278,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +291,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" bookmark = await response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -304,7 +304,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -330,7 +330,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -343,7 +343,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" bookmark = await response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -356,7 +356,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -476,7 +476,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -489,7 +489,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" bookmark = await response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -502,7 +502,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(AccessBookmarks, bookmark, path=["response"]) + assert_matches_type(ZeroTrustBookmarks, bookmark, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index 7aa9a0bd693..c60a9faf351 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - AccessCertificates, + ZeroTrustCertificates, CertificateListResponse, CertificateDeleteResponse, ) @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -57,7 +57,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" certificate = response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -72,7 +72,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -104,7 +104,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -116,7 +116,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: zone_id="string", name="Allow devs", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -131,7 +131,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" certificate = response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,7 +146,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -320,7 +320,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -330,7 +330,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -344,7 +344,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" certificate = response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -358,7 +358,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -399,7 +399,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -411,7 +411,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare zone_id="string", associated_hostnames=["admin.example.com", "admin.example.com", "admin.example.com"], ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -426,7 +426,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" certificate = await response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -441,7 +441,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -473,7 +473,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -485,7 +485,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare zone_id="string", name="Allow devs", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -500,7 +500,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" certificate = await response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -515,7 +515,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -689,7 +689,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -699,7 +699,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -713,7 +713,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" certificate = await response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -727,7 +727,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(AccessCertificates, certificate, path=["response"]) + assert_matches_type(ZeroTrustCertificates, certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index 01d4e6959e5..b3837e153f5 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -10,10 +10,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - AccessCustomPage, + ZeroTrustCustomPage, CustomPageListResponse, CustomPageDeleteResponse, - AccessCustomPageWithoutHTML, + ZeroTrustCustomPageWithoutHTML, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="string", type="identity_denied", ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: type="identity_denied", app_count=0, ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,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" custom_page = response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -98,7 +98,7 @@ def test_method_update(self, client: Cloudflare) -> None: name="string", type="identity_denied", ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: type="identity_denied", app_count=0, ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -127,7 +127,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" custom_page = response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +143,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -269,7 +269,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessCustomPage, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -282,7 +282,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" custom_page = response.parse() - assert_matches_type(AccessCustomPage, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -295,7 +295,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(AccessCustomPage, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPage, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -327,7 +327,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="string", type="identity_denied", ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -339,7 +339,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare type="identity_denied", app_count=0, ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -354,7 +354,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" custom_page = await response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +369,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -394,7 +394,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: name="string", type="identity_denied", ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +407,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare type="identity_denied", app_count=0, ) - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +423,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" custom_page = await response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -439,7 +439,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(AccessCustomPageWithoutHTML, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPageWithoutHTML, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -565,7 +565,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessCustomPage, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -578,7 +578,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" custom_page = await response.parse() - assert_matches_type(AccessCustomPage, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPage, custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -591,7 +591,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(AccessCustomPage, custom_page, path=["response"]) + assert_matches_type(ZeroTrustCustomPage, custom_page, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index b9b29edbdef..dfbd4b9ca0e 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - AccessGroups, + ZeroTrustGroups, GroupListResponse, GroupDeleteResponse, ) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +60,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +79,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" group = response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +98,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -190,7 +190,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" group = response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -210,7 +210,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -399,7 +399,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -409,7 +409,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +423,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" group = response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +437,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -482,7 +482,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -508,7 +508,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -527,7 +527,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" group = await response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -546,7 +546,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -591,7 +591,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -618,7 +618,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare {"email": {"email": "test@example.com"}}, ], ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -638,7 +638,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" group = await response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -658,7 +658,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -847,7 +847,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -857,7 +857,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -871,7 +871,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" group = await response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) @pytest.mark.skip() @parametrize @@ -885,7 +885,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(AccessGroups, group, path=["response"]) + assert_matches_type(ZeroTrustGroups, group, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index a9d1545197a..0d5090665c0 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - AccessServiceTokens, + ZeroTrustServiceTokens, ServiceTokenListResponse, ServiceTokenCreateResponse, ServiceTokenRotateResponse, @@ -98,7 +98,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +110,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: duration="60m", name="CI/CD token", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,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" service_token = response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -138,7 +138,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -235,7 +235,7 @@ def test_method_delete(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -245,7 +245,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -259,7 +259,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" service_token = response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +273,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -308,7 +308,7 @@ def test_method_refresh(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -321,7 +321,7 @@ def test_raw_response_refresh(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -334,7 +334,7 @@ def test_streaming_response_refresh(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -485,7 +485,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -497,7 +497,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare duration="60m", name="CI/CD token", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -511,7 +511,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" service_token = await response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -525,7 +525,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -622,7 +622,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -632,7 +632,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare account_id="string", zone_id="string", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -646,7 +646,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" service_token = await response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -660,7 +660,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -695,7 +695,7 @@ async def test_method_refresh(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -708,7 +708,7 @@ async def test_raw_response_refresh(self, async_client: AsyncCloudflare) -> None assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -721,7 +721,7 @@ async def test_streaming_response_refresh(self, async_client: AsyncCloudflare) - assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(AccessServiceTokens, service_token, path=["response"]) + assert_matches_type(ZeroTrustServiceTokens, service_token, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index cc0c3b79128..d8d355d0b29 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.access import ( - AccessTag, + ZeroTrustTag, TagListResponse, TagDeleteResponse, ) @@ -28,7 +28,7 @@ def test_method_create(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,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" tag = response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -75,7 +75,7 @@ def test_method_update(self, client: Cloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -225,7 +225,7 @@ def test_method_get(self, client: Cloudflare) -> None: "engineers", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -238,7 +238,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" tag = response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -251,7 +251,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -281,7 +281,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -294,7 +294,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" tag = await response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -307,7 +307,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -328,7 +328,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: identifier="023e105f4ecef8ad9ca31a8372d0c353", name="engineers", ) - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -342,7 +342,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" tag = await response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -356,7 +356,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -478,7 +478,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "engineers", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -491,7 +491,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" tag = await response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -504,7 +504,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(AccessTag, tag, path=["response"]) + assert_matches_type(ZeroTrustTag, tag, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py index 2f7683091e5..b721c3213cb 100644 --- a/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py +++ b/tests/api_resources/zero_trust/access/users/test_last_seen_identity.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access.users import AccessIdentity +from cloudflare.types.zero_trust.access.users import ZeroTrustIdentity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) + assert_matches_type(ZeroTrustIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,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" last_seen_identity = response.parse() - assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) + assert_matches_type(ZeroTrustIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" last_seen_identity = response.parse() - assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) + assert_matches_type(ZeroTrustIdentity, last_seen_identity, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +80,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) + assert_matches_type(ZeroTrustIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,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" last_seen_identity = await response.parse() - assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) + assert_matches_type(ZeroTrustIdentity, last_seen_identity, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" last_seen_identity = await response.parse() - assert_matches_type(AccessIdentity, last_seen_identity, path=["response"]) + assert_matches_type(ZeroTrustIdentity, last_seen_identity, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index 9dda68a16d0..fd4e734bc86 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices.posture import ( IntegrationListResponse, + DevicePostureIntegrations, IntegrationDeleteResponse, - TeamsDevicesDevicePostureIntegrations, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -36,7 +36,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +74,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" integration = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -95,7 +95,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -217,7 +217,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +235,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +248,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" integration = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +261,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -287,7 +287,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -300,7 +300,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" integration = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +313,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -351,7 +351,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -368,7 +368,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -389,7 +389,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" integration = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -410,7 +410,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -532,7 +532,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -550,7 +550,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) name="My Workspace One Integration", type="workspace_one", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -563,7 +563,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" integration = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -576,7 +576,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -602,7 +602,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -615,7 +615,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" integration = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -628,7 +628,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureIntegrations], integration, path=["response"]) + assert_matches_type(Optional[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index f7f43db5432..9e8ccfa5ead 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -10,9 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( + DEXTestSchemasHTTP, DEXTestListResponse, DEXTestDeleteResponse, - TeamsDevicesDeviceDEXTestSchemasHTTP, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -31,7 +31,7 @@ def test_method_create(self, client: Cloudflare) -> None: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,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" dex_test = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -80,7 +80,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -107,7 +107,7 @@ def test_method_update(self, client: Cloudflare) -> None: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +125,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,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" dex_test = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +159,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -287,7 +287,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -300,7 +300,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" dex_test = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +313,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -346,7 +346,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,7 +363,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -379,7 +379,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" dex_test = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +395,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -422,7 +422,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: interval="30m", name="HTTP dash health check", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -440,7 +440,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare name="HTTP dash health check", description="Checks the dash endpoint every 30 minutes", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -457,7 +457,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" dex_test = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -474,7 +474,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -602,7 +602,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -615,7 +615,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" dex_test = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -628,7 +628,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceDEXTestSchemasHTTP], dex_test, path=["response"]) + assert_matches_type(Optional[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index 4536cb5f799..dcff69ee7ba 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( NetworkListResponse, + DeviceManagedNetworks, NetworkDeleteResponse, - TeamsDevicesDeviceManagedNetworks, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +44,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +59,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" network = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -74,7 +74,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -96,7 +96,7 @@ def test_method_update(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +111,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,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" network = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +137,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -257,7 +257,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -270,7 +270,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" network = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -283,7 +283,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -315,7 +315,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="managed-network-1", type="tls", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -329,7 +329,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare name="managed-network-1", type="tls", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -344,7 +344,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -359,7 +359,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -381,7 +381,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -396,7 +396,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare name="managed-network-1", type="tls", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -409,7 +409,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" network = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -422,7 +422,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -542,7 +542,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -555,7 +555,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" network = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -568,7 +568,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceManagedNetworks], network, path=["response"]) + assert_matches_type(Optional[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_policies.py b/tests/api_resources/zero_trust/devices/test_policies.py index 1d16b75f2c8..9dd46518c65 100644 --- a/tests/api_resources/zero_trust/devices/test_policies.py +++ b/tests/api_resources/zero_trust/devices/test_policies.py @@ -12,7 +12,7 @@ from cloudflare.types.zero_trust.devices import ( PolicyListResponse, PolicyDeleteResponse, - TeamsDevicesDeviceSettingsPolicy, + DevicesDeviceSettingsPolicy, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="Allow Developers", precedence=100, ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -58,7 +58,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,7 +73,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" policy = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -204,7 +204,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -231,7 +231,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -244,7 +244,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" policy = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -257,7 +257,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -283,7 +283,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -296,7 +296,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" policy = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -309,7 +309,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -341,7 +341,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="Allow Developers", precedence=100, ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +369,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,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" policy = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +399,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -515,7 +515,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -542,7 +542,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) support_url="https://1.1.1.1/help", switch_locked=True, ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -555,7 +555,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" policy = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -568,7 +568,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -594,7 +594,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -607,7 +607,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" policy = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -620,7 +620,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[TeamsDevicesDeviceSettingsPolicy], policy, path=["response"]) + assert_matches_type(Optional[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 104cafc6bd3..01f053a9399 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -10,9 +10,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust.devices import ( + DevicePostureRules, PostureListResponse, PostureDeleteResponse, - TeamsDevicesDevicePostureRules, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,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" posture = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -78,7 +78,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -101,7 +101,7 @@ def test_method_update(self, client: Cloudflare) -> None: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +123,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, 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" posture = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -153,7 +153,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -277,7 +277,7 @@ def test_method_get(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -290,7 +290,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" posture = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -303,7 +303,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -334,7 +334,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -355,7 +355,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +369,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" posture = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -383,7 +383,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -406,7 +406,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: name="Admin Serial Numbers", type="file", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -428,7 +428,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare match=[{"platform": "windows"}, {"platform": "windows"}, {"platform": "windows"}], schedule="1h", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +443,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" posture = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +458,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -582,7 +582,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -595,7 +595,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" posture = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -608,7 +608,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[TeamsDevicesDevicePostureRules], posture, path=["response"]) + assert_matches_type(Optional[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_settings.py b/tests/api_resources/zero_trust/devices/test_settings.py index 34506294770..76fe07fda54 100644 --- a/tests/api_resources/zero_trust/devices/test_settings.py +++ b/tests/api_resources/zero_trust/devices/test_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.devices import TeamsDevicesZeroTrustAccountDeviceSettings +from cloudflare.types.zero_trust.devices import ZeroTrustAccountDeviceSettings base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_update(self, client: Cloudflare) -> None: setting = client.zero_trust.devices.settings.update( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: root_certificate_installation_enabled=True, use_zt_virtual_ip=True, ) - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,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" setting = response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +59,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -77,7 +77,7 @@ def test_method_list(self, client: Cloudflare) -> None: setting = client.zero_trust.devices.settings.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -89,7 +89,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" setting = response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +101,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -123,7 +123,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.devices.settings.update( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -135,7 +135,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare root_certificate_installation_enabled=True, use_zt_virtual_ip=True, ) - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +147,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" setting = await response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +159,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -177,7 +177,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: setting = await async_client.zero_trust.devices.settings.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -189,7 +189,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" setting = await response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) @pytest.mark.skip() @parametrize @@ -201,7 +201,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" setting = await response.parse() - assert_matches_type(Optional[TeamsDevicesZeroTrustAccountDeviceSettings], setting, path=["response"]) + assert_matches_type(Optional[ZeroTrustAccountDeviceSettings], setting, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index d7c5d1ee833..88f99fd5541 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust import ( - AccessIdentityProviders, + ZeroTrustIdentityProviders, IdentityProviderListResponse, IdentityProviderDeleteResponse, ) @@ -31,7 +31,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -59,7 +59,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -75,7 +75,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -91,7 +91,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -126,7 +126,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -152,7 +152,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -184,7 +184,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -219,7 +219,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -241,7 +241,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -257,7 +257,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +273,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -308,7 +308,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -330,7 +330,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -346,7 +346,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -362,7 +362,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -397,7 +397,7 @@ def test_method_create_overload_5(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -421,7 +421,7 @@ def test_method_create_with_all_params_overload_5(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -437,7 +437,7 @@ def test_raw_response_create_overload_5(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -453,7 +453,7 @@ def test_streaming_response_create_overload_5(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -488,7 +488,7 @@ def test_method_create_overload_6(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -513,7 +513,7 @@ def test_method_create_with_all_params_overload_6(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -529,7 +529,7 @@ def test_raw_response_create_overload_6(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -545,7 +545,7 @@ def test_streaming_response_create_overload_6(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -580,7 +580,7 @@ def test_method_create_overload_7(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +602,7 @@ def test_method_create_with_all_params_overload_7(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -618,7 +618,7 @@ def test_raw_response_create_overload_7(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -634,7 +634,7 @@ def test_streaming_response_create_overload_7(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -669,7 +669,7 @@ def test_method_create_overload_8(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -697,7 +697,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -713,7 +713,7 @@ def test_raw_response_create_overload_8(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -729,7 +729,7 @@ def test_streaming_response_create_overload_8(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -764,7 +764,7 @@ def test_method_create_overload_9(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -790,7 +790,7 @@ def test_method_create_with_all_params_overload_9(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -806,7 +806,7 @@ def test_raw_response_create_overload_9(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -822,7 +822,7 @@ def test_streaming_response_create_overload_9(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -857,7 +857,7 @@ def test_method_create_overload_10(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -882,7 +882,7 @@ def test_method_create_with_all_params_overload_10(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -898,7 +898,7 @@ def test_raw_response_create_overload_10(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -914,7 +914,7 @@ def test_streaming_response_create_overload_10(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -949,7 +949,7 @@ def test_method_create_overload_11(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -974,7 +974,7 @@ def test_method_create_with_all_params_overload_11(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -990,7 +990,7 @@ def test_raw_response_create_overload_11(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1006,7 +1006,7 @@ def test_streaming_response_create_overload_11(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1041,7 +1041,7 @@ def test_method_create_overload_12(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1081,7 +1081,7 @@ def test_method_create_with_all_params_overload_12(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1097,7 +1097,7 @@ def test_raw_response_create_overload_12(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1113,7 +1113,7 @@ def test_streaming_response_create_overload_12(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1148,7 +1148,7 @@ def test_method_create_overload_13(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1170,7 +1170,7 @@ def test_method_create_with_all_params_overload_13(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1186,7 +1186,7 @@ def test_raw_response_create_overload_13(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1202,7 +1202,7 @@ def test_streaming_response_create_overload_13(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1237,7 +1237,7 @@ def test_method_create_overload_14(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1256,7 +1256,7 @@ def test_method_create_with_all_params_overload_14(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1272,7 +1272,7 @@ def test_raw_response_create_overload_14(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1288,7 +1288,7 @@ def test_streaming_response_create_overload_14(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1324,7 +1324,7 @@ def test_method_update_overload_1(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1353,7 +1353,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1370,7 +1370,7 @@ def test_raw_response_update_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1387,7 +1387,7 @@ def test_streaming_response_update_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1435,7 +1435,7 @@ def test_method_update_overload_2(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1462,7 +1462,7 @@ def test_method_update_with_all_params_overload_2(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1479,7 +1479,7 @@ def test_raw_response_update_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1496,7 +1496,7 @@ def test_streaming_response_update_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1544,7 +1544,7 @@ def test_method_update_overload_3(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1567,7 +1567,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1584,7 +1584,7 @@ def test_raw_response_update_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1601,7 +1601,7 @@ def test_streaming_response_update_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1649,7 +1649,7 @@ def test_method_update_overload_4(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1672,7 +1672,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1689,7 +1689,7 @@ def test_raw_response_update_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1706,7 +1706,7 @@ def test_streaming_response_update_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1754,7 +1754,7 @@ def test_method_update_overload_5(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1779,7 +1779,7 @@ def test_method_update_with_all_params_overload_5(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1796,7 +1796,7 @@ def test_raw_response_update_overload_5(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1813,7 +1813,7 @@ def test_streaming_response_update_overload_5(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1861,7 +1861,7 @@ def test_method_update_overload_6(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1887,7 +1887,7 @@ def test_method_update_with_all_params_overload_6(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1904,7 +1904,7 @@ def test_raw_response_update_overload_6(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1921,7 +1921,7 @@ def test_streaming_response_update_overload_6(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1969,7 +1969,7 @@ def test_method_update_overload_7(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -1992,7 +1992,7 @@ def test_method_update_with_all_params_overload_7(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2009,7 +2009,7 @@ def test_raw_response_update_overload_7(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2026,7 +2026,7 @@ def test_streaming_response_update_overload_7(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2074,7 +2074,7 @@ def test_method_update_overload_8(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2103,7 +2103,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2120,7 +2120,7 @@ def test_raw_response_update_overload_8(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2137,7 +2137,7 @@ def test_streaming_response_update_overload_8(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2185,7 +2185,7 @@ def test_method_update_overload_9(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2212,7 +2212,7 @@ def test_method_update_with_all_params_overload_9(self, client: Cloudflare) -> N "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2229,7 +2229,7 @@ def test_raw_response_update_overload_9(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2246,7 +2246,7 @@ def test_streaming_response_update_overload_9(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2294,7 +2294,7 @@ def test_method_update_overload_10(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2320,7 +2320,7 @@ def test_method_update_with_all_params_overload_10(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2337,7 +2337,7 @@ def test_raw_response_update_overload_10(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2354,7 +2354,7 @@ def test_streaming_response_update_overload_10(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2402,7 +2402,7 @@ def test_method_update_overload_11(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2428,7 +2428,7 @@ def test_method_update_with_all_params_overload_11(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2445,7 +2445,7 @@ def test_raw_response_update_overload_11(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2462,7 +2462,7 @@ def test_streaming_response_update_overload_11(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2510,7 +2510,7 @@ def test_method_update_overload_12(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2551,7 +2551,7 @@ def test_method_update_with_all_params_overload_12(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2568,7 +2568,7 @@ def test_raw_response_update_overload_12(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2585,7 +2585,7 @@ def test_streaming_response_update_overload_12(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2633,7 +2633,7 @@ def test_method_update_overload_13(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2656,7 +2656,7 @@ def test_method_update_with_all_params_overload_13(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2673,7 +2673,7 @@ def test_raw_response_update_overload_13(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2690,7 +2690,7 @@ def test_streaming_response_update_overload_13(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2738,7 +2738,7 @@ def test_method_update_overload_14(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2758,7 +2758,7 @@ def test_method_update_with_all_params_overload_14(self, client: Cloudflare) -> "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2775,7 +2775,7 @@ def test_raw_response_update_overload_14(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2792,7 +2792,7 @@ def test_streaming_response_update_overload_14(self, client: Cloudflare) -> None assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -2972,7 +2972,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2982,7 +2982,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2996,7 +2996,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" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3010,7 +3010,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3052,7 +3052,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3080,7 +3080,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3096,7 +3096,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3112,7 +3112,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3147,7 +3147,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3173,7 +3173,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3189,7 +3189,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3205,7 +3205,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3240,7 +3240,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3262,7 +3262,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3278,7 +3278,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3294,7 +3294,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3329,7 +3329,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3351,7 +3351,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3367,7 +3367,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3383,7 +3383,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3418,7 +3418,7 @@ async def test_method_create_overload_5(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3442,7 +3442,7 @@ async def test_method_create_with_all_params_overload_5(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3458,7 +3458,7 @@ async def test_raw_response_create_overload_5(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3474,7 +3474,7 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3509,7 +3509,7 @@ async def test_method_create_overload_6(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3534,7 +3534,7 @@ async def test_method_create_with_all_params_overload_6(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3550,7 +3550,7 @@ async def test_raw_response_create_overload_6(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3566,7 +3566,7 @@ async def test_streaming_response_create_overload_6(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3601,7 +3601,7 @@ async def test_method_create_overload_7(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3623,7 +3623,7 @@ async def test_method_create_with_all_params_overload_7(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3639,7 +3639,7 @@ async def test_raw_response_create_overload_7(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3655,7 +3655,7 @@ async def test_streaming_response_create_overload_7(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3690,7 +3690,7 @@ async def test_method_create_overload_8(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3718,7 +3718,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3734,7 +3734,7 @@ async def test_raw_response_create_overload_8(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3750,7 +3750,7 @@ async def test_streaming_response_create_overload_8(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3785,7 +3785,7 @@ async def test_method_create_overload_9(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3811,7 +3811,7 @@ async def test_method_create_with_all_params_overload_9(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3827,7 +3827,7 @@ async def test_raw_response_create_overload_9(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3843,7 +3843,7 @@ async def test_streaming_response_create_overload_9(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3878,7 +3878,7 @@ async def test_method_create_overload_10(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3903,7 +3903,7 @@ async def test_method_create_with_all_params_overload_10(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3919,7 +3919,7 @@ async def test_raw_response_create_overload_10(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3935,7 +3935,7 @@ async def test_streaming_response_create_overload_10(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3970,7 +3970,7 @@ async def test_method_create_overload_11(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -3995,7 +3995,7 @@ async def test_method_create_with_all_params_overload_11(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4011,7 +4011,7 @@ async def test_raw_response_create_overload_11(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4027,7 +4027,7 @@ async def test_streaming_response_create_overload_11(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4062,7 +4062,7 @@ async def test_method_create_overload_12(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4102,7 +4102,7 @@ async def test_method_create_with_all_params_overload_12(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4118,7 +4118,7 @@ async def test_raw_response_create_overload_12(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4134,7 +4134,7 @@ async def test_streaming_response_create_overload_12(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4169,7 +4169,7 @@ async def test_method_create_overload_13(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4191,7 +4191,7 @@ async def test_method_create_with_all_params_overload_13(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4207,7 +4207,7 @@ async def test_raw_response_create_overload_13(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4223,7 +4223,7 @@ async def test_streaming_response_create_overload_13(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4258,7 +4258,7 @@ async def test_method_create_overload_14(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4277,7 +4277,7 @@ async def test_method_create_with_all_params_overload_14(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4293,7 +4293,7 @@ async def test_raw_response_create_overload_14(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4309,7 +4309,7 @@ async def test_streaming_response_create_overload_14(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4345,7 +4345,7 @@ async def test_method_update_overload_1(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4374,7 +4374,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4391,7 +4391,7 @@ async def test_raw_response_update_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4408,7 +4408,7 @@ async def test_streaming_response_update_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4456,7 +4456,7 @@ async def test_method_update_overload_2(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4483,7 +4483,7 @@ async def test_method_update_with_all_params_overload_2(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4500,7 +4500,7 @@ async def test_raw_response_update_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4517,7 +4517,7 @@ async def test_streaming_response_update_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4565,7 +4565,7 @@ async def test_method_update_overload_3(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4588,7 +4588,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4605,7 +4605,7 @@ async def test_raw_response_update_overload_3(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4622,7 +4622,7 @@ async def test_streaming_response_update_overload_3(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4670,7 +4670,7 @@ async def test_method_update_overload_4(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4693,7 +4693,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4710,7 +4710,7 @@ async def test_raw_response_update_overload_4(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4727,7 +4727,7 @@ async def test_streaming_response_update_overload_4(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4775,7 +4775,7 @@ async def test_method_update_overload_5(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4800,7 +4800,7 @@ async def test_method_update_with_all_params_overload_5(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4817,7 +4817,7 @@ async def test_raw_response_update_overload_5(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4834,7 +4834,7 @@ async def test_streaming_response_update_overload_5(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4882,7 +4882,7 @@ async def test_method_update_overload_6(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4908,7 +4908,7 @@ async def test_method_update_with_all_params_overload_6(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4925,7 +4925,7 @@ async def test_raw_response_update_overload_6(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -4942,7 +4942,7 @@ async def test_streaming_response_update_overload_6(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -4990,7 +4990,7 @@ async def test_method_update_overload_7(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5013,7 +5013,7 @@ async def test_method_update_with_all_params_overload_7(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5030,7 +5030,7 @@ async def test_raw_response_update_overload_7(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5047,7 +5047,7 @@ async def test_streaming_response_update_overload_7(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5095,7 +5095,7 @@ async def test_method_update_overload_8(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5124,7 +5124,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5141,7 +5141,7 @@ async def test_raw_response_update_overload_8(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5158,7 +5158,7 @@ async def test_streaming_response_update_overload_8(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5206,7 +5206,7 @@ async def test_method_update_overload_9(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5233,7 +5233,7 @@ async def test_method_update_with_all_params_overload_9(self, async_client: Asyn "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5250,7 +5250,7 @@ async def test_raw_response_update_overload_9(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5267,7 +5267,7 @@ async def test_streaming_response_update_overload_9(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5315,7 +5315,7 @@ async def test_method_update_overload_10(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5341,7 +5341,7 @@ async def test_method_update_with_all_params_overload_10(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5358,7 +5358,7 @@ async def test_raw_response_update_overload_10(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5375,7 +5375,7 @@ async def test_streaming_response_update_overload_10(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5423,7 +5423,7 @@ async def test_method_update_overload_11(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5449,7 +5449,7 @@ async def test_method_update_with_all_params_overload_11(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5466,7 +5466,7 @@ async def test_raw_response_update_overload_11(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5483,7 +5483,7 @@ async def test_streaming_response_update_overload_11(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5531,7 +5531,7 @@ async def test_method_update_overload_12(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5572,7 +5572,7 @@ async def test_method_update_with_all_params_overload_12(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5589,7 +5589,7 @@ async def test_raw_response_update_overload_12(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5606,7 +5606,7 @@ async def test_streaming_response_update_overload_12(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5654,7 +5654,7 @@ async def test_method_update_overload_13(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5677,7 +5677,7 @@ async def test_method_update_with_all_params_overload_13(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5694,7 +5694,7 @@ async def test_raw_response_update_overload_13(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5711,7 +5711,7 @@ async def test_streaming_response_update_overload_13(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5759,7 +5759,7 @@ async def test_method_update_overload_14(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5779,7 +5779,7 @@ async def test_method_update_with_all_params_overload_14(self, async_client: Asy "user_deprovision": True, }, ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5796,7 +5796,7 @@ async def test_raw_response_update_overload_14(self, async_client: AsyncCloudfla assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5813,7 +5813,7 @@ async def test_streaming_response_update_overload_14(self, async_client: AsyncCl assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5993,7 +5993,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -6003,7 +6003,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -6017,7 +6017,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" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -6031,7 +6031,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(AccessIdentityProviders, identity_provider, path=["response"]) + assert_matches_type(ZeroTrustIdentityProviders, identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/test_organizations.py b/tests/api_resources/zero_trust/test_organizations.py index dd5c07f0323..e0fee873f5f 100644 --- a/tests/api_resources/zero_trust/test_organizations.py +++ b/tests/api_resources/zero_trust/test_organizations.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zero_trust import ( - AccessOrganizations, + ZeroTrustOrganizations, OrganizationRevokeUsersResponse, ) @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -54,7 +54,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +69,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" organization = response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -84,7 +84,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -114,7 +114,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -143,7 +143,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +156,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" organization = response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -169,7 +169,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -195,7 +195,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -204,7 +204,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,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" organization = response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +230,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -329,7 +329,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -354,7 +354,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -369,7 +369,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" organization = await response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -414,7 +414,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +443,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare user_seat_expiration_inactive_time="720h", warp_auth_session_duration="24h", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -456,7 +456,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" organization = await response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -469,7 +469,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -495,7 +495,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -504,7 +504,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -517,7 +517,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" organization = await response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) @pytest.mark.skip() @parametrize @@ -530,7 +530,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" organization = await response.parse() - assert_matches_type(AccessOrganizations, organization, path=["response"]) + assert_matches_type(ZeroTrustOrganizations, organization, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_advanced_ddos.py b/tests/api_resources/zones/settings/test_advanced_ddos.py index e24a9056fc8..b2093a38e88 100644 --- a/tests/api_resources/zones/settings/test_advanced_ddos.py +++ b/tests/api_resources/zones/settings/test_advanced_ddos.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesAdvancedDDOS +from cloudflare.types.zones.settings import ZoneSettingAdvancedDDOS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: advanced_ddos = client.zones.settings.advanced_ddos.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" advanced_ddos = response.parse() - assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = response.parse() - assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: advanced_ddos = await async_client.zones.settings.advanced_ddos.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,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" advanced_ddos = await response.parse() - assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = await response.parse() - assert_matches_type(Optional[ZonesAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_always_online.py b/tests/api_resources/zones/settings/test_always_online.py index 3ddb8b6437e..a9bf66a4608 100644 --- a/tests/api_resources/zones/settings/test_always_online.py +++ b/tests/api_resources/zones/settings/test_always_online.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesAlwaysOnline +from cloudflare.types.zones.settings import ZoneSettingAlwaysOnline base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: always_online = client.zones.settings.always_online.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = await response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = await response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: always_online = await async_client.zones.settings.always_online.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = await response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, 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" always_online = await response.parse() - assert_matches_type(Optional[ZonesAlwaysOnline], always_online, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysOnline], always_online, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_always_use_https.py b/tests/api_resources/zones/settings/test_always_use_https.py index 684f210599a..6353ba32c8c 100644 --- a/tests/api_resources/zones/settings/test_always_use_https.py +++ b/tests/api_resources/zones/settings/test_always_use_https.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesAlwaysUseHTTPS +from cloudflare.types.zones.settings import ZoneSettingAlwaysUseHTTPS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: always_use_https = client.zones.settings.always_use_https.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = await response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = await response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: always_use_https = await async_client.zones.settings.always_use_https.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = await response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, 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" always_use_https = await response.parse() - assert_matches_type(Optional[ZonesAlwaysUseHTTPS], always_use_https, path=["response"]) + assert_matches_type(Optional[ZoneSettingAlwaysUseHTTPS], always_use_https, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py b/tests/api_resources/zones/settings/test_automatic_https_rewrites.py index 8d6249df9b0..4e952b6088d 100644 --- a/tests/api_resources/zones/settings/test_automatic_https_rewrites.py +++ b/tests/api_resources/zones/settings/test_automatic_https_rewrites.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesAutomaticHTTPSRewrites +from cloudflare.types.zones.settings import ZoneSettingAutomaticHTTPSRewrites base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: automatic_https_rewrite = client.zones.settings.automatic_https_rewrites.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: automatic_https_rewrite = await async_client.zones.settings.automatic_https_rewrites.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, 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" automatic_https_rewrite = await response.parse() - assert_matches_type(Optional[ZonesAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) + assert_matches_type(Optional[ZoneSettingAutomaticHTTPSRewrites], automatic_https_rewrite, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py b/tests/api_resources/zones/settings/test_automatic_platform_optimization.py index 5072eaa4263..70d171a60df 100644 --- a/tests/api_resources/zones/settings/test_automatic_platform_optimization.py +++ b/tests/api_resources/zones/settings/test_automatic_platform_optimization.py @@ -10,7 +10,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.zones.settings import ( - ZonesAutomaticPlatformOptimization, + ZoneSettingAutomaticPlatformOptimization, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -34,7 +34,7 @@ def test_method_edit(self, client: Cloudflare) -> None: }, ) assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -56,7 +56,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -78,7 +78,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: automatic_platform_optimization = response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -106,7 +106,7 @@ def test_method_get(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -120,7 +120,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -134,7 +134,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: automatic_platform_optimization = response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -166,7 +166,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: }, ) assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -188,7 +188,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -210,7 +210,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -238,7 +238,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -252,7 +252,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) @pytest.mark.skip() @@ -266,7 +266,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No automatic_platform_optimization = await response.parse() assert_matches_type( - Optional[ZonesAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] + Optional[ZoneSettingAutomaticPlatformOptimization], automatic_platform_optimization, path=["response"] ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_brotli.py b/tests/api_resources/zones/settings/test_brotli.py index 3347d4aea86..73766d4c64a 100644 --- a/tests/api_resources/zones/settings/test_brotli.py +++ b/tests/api_resources/zones/settings/test_brotli.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesBrotli +from cloudflare.types.zones.settings import ZoneSettingBrotli base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: brotli = client.zones.settings.brotli.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = await response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = await response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: brotli = await async_client.zones.settings.brotli.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = await response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, 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" brotli = await response.parse() - assert_matches_type(Optional[ZonesBrotli], brotli, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrotli], brotli, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_browser_cache_ttl.py b/tests/api_resources/zones/settings/test_browser_cache_ttl.py index d0a6b045cdd..8d268c3ef36 100644 --- a/tests/api_resources/zones/settings/test_browser_cache_ttl.py +++ b/tests/api_resources/zones/settings/test_browser_cache_ttl.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesBrowserCacheTTL +from cloudflare.types.zones.settings import ZoneSettingBrowserCacheTTL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=0, ) - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: browser_cache_ttl = client.zones.settings.browser_cache_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=0, ) - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = await response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = await response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_cache_ttl = await async_client.zones.settings.browser_cache_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = await response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, 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" browser_cache_ttl = await response.parse() - assert_matches_type(Optional[ZonesBrowserCacheTTL], browser_cache_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCacheTTL], browser_cache_ttl, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_browser_check.py b/tests/api_resources/zones/settings/test_browser_check.py index 080dd772308..61272e97eea 100644 --- a/tests/api_resources/zones/settings/test_browser_check.py +++ b/tests/api_resources/zones/settings/test_browser_check.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesBrowserCheck +from cloudflare.types.zones.settings import ZoneSettingBrowserCheck base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: browser_check = client.zones.settings.browser_check.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = await response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = await response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: browser_check = await async_client.zones.settings.browser_check.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = await response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, 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" browser_check = await response.parse() - assert_matches_type(Optional[ZonesBrowserCheck], browser_check, path=["response"]) + assert_matches_type(Optional[ZoneSettingBrowserCheck], browser_check, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_cache_level.py b/tests/api_resources/zones/settings/test_cache_level.py index ae2203b4d29..a0a28636295 100644 --- a/tests/api_resources/zones/settings/test_cache_level.py +++ b/tests/api_resources/zones/settings/test_cache_level.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesCacheLevel +from cloudflare.types.zones.settings import ZoneSettingCacheLevel base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="aggressive", ) - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: cache_level = client.zones.settings.cache_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="aggressive", ) - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = await response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = await response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: cache_level = await async_client.zones.settings.cache_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = await response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, 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" cache_level = await response.parse() - assert_matches_type(Optional[ZonesCacheLevel], cache_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingCacheLevel], cache_level, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_challenge_ttl.py b/tests/api_resources/zones/settings/test_challenge_ttl.py index 59632468cad..a65a5f5acc5 100644 --- a/tests/api_resources/zones/settings/test_challenge_ttl.py +++ b/tests/api_resources/zones/settings/test_challenge_ttl.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesChallengeTTL +from cloudflare.types.zones.settings import ZoneSettingChallengeTTL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=300, ) - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: challenge_ttl = client.zones.settings.challenge_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=300, ) - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = await response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = await response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: challenge_ttl = await async_client.zones.settings.challenge_ttl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = await response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, 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" challenge_ttl = await response.parse() - assert_matches_type(Optional[ZonesChallengeTTL], challenge_ttl, path=["response"]) + assert_matches_type(Optional[ZoneSettingChallengeTTL], challenge_ttl, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_ciphers.py b/tests/api_resources/zones/settings/test_ciphers.py index 1696421ef30..db8234f0cb0 100644 --- a/tests/api_resources/zones/settings/test_ciphers.py +++ b/tests/api_resources/zones/settings/test_ciphers.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesCiphers +from cloudflare.types.zones.settings import ZoneSettingCiphers base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], ) - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: cipher = client.zones.settings.ciphers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-SHA"], ) - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = await response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = await response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: cipher = await async_client.zones.settings.ciphers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = await response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, 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" cipher = await response.parse() - assert_matches_type(Optional[ZonesCiphers], cipher, path=["response"]) + assert_matches_type(Optional[ZoneSettingCiphers], cipher, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_development_mode.py b/tests/api_resources/zones/settings/test_development_mode.py index 51065a51653..da544ae4902 100644 --- a/tests/api_resources/zones/settings/test_development_mode.py +++ b/tests/api_resources/zones/settings/test_development_mode.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesDevelopmentMode +from cloudflare.types.zones.settings import ZoneSettingDevelopmentMode base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: development_mode = client.zones.settings.development_mode.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = await response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = await response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: development_mode = await async_client.zones.settings.development_mode.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = await response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, 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" development_mode = await response.parse() - assert_matches_type(Optional[ZonesDevelopmentMode], development_mode, path=["response"]) + assert_matches_type(Optional[ZoneSettingDevelopmentMode], development_mode, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_early_hints.py b/tests/api_resources/zones/settings/test_early_hints.py index 760edbad6b9..22f8fc291c6 100644 --- a/tests/api_resources/zones/settings/test_early_hints.py +++ b/tests/api_resources/zones/settings/test_early_hints.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesEarlyHints +from cloudflare.types.zones.settings import ZoneSettingEarlyHints base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: early_hint = client.zones.settings.early_hints.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = await response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = await response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: early_hint = await async_client.zones.settings.early_hints.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = await response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, 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" early_hint = await response.parse() - assert_matches_type(Optional[ZonesEarlyHints], early_hint, path=["response"]) + assert_matches_type(Optional[ZoneSettingEarlyHints], early_hint, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_email_obfuscation.py b/tests/api_resources/zones/settings/test_email_obfuscation.py index 0b6611b86cf..21e99a91238 100644 --- a/tests/api_resources/zones/settings/test_email_obfuscation.py +++ b/tests/api_resources/zones/settings/test_email_obfuscation.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesEmailObfuscation +from cloudflare.types.zones.settings import ZoneSettingEmailObfuscation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: email_obfuscation = client.zones.settings.email_obfuscation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = await response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = await response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: email_obfuscation = await async_client.zones.settings.email_obfuscation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = await response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, 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" email_obfuscation = await response.parse() - assert_matches_type(Optional[ZonesEmailObfuscation], email_obfuscation, path=["response"]) + assert_matches_type(Optional[ZoneSettingEmailObfuscation], email_obfuscation, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_font_settings.py b/tests/api_resources/zones/settings/test_font_settings.py index 6248e66165a..a67a18b8281 100644 --- a/tests/api_resources/zones/settings/test_font_settings.py +++ b/tests/api_resources/zones/settings/test_font_settings.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import SpeedCloudflareFonts +from cloudflare.types.zones.settings import ZoneSettingFonts base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: font_setting = client.zones.settings.font_settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = await response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = await response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: font_setting = await async_client.zones.settings.font_settings.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = await response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, 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" font_setting = await response.parse() - assert_matches_type(Optional[SpeedCloudflareFonts], font_setting, path=["response"]) + assert_matches_type(Optional[ZoneSettingFonts], font_setting, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_h2_prioritization.py b/tests/api_resources/zones/settings/test_h2_prioritization.py index 09549c525c1..b6d774deea1 100644 --- a/tests/api_resources/zones/settings/test_h2_prioritization.py +++ b/tests/api_resources/zones/settings/test_h2_prioritization.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesH2Prioritization +from cloudflare.types.zones.settings import ZoneSettingH2Prioritization base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" h2_prioritization = response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: h2_prioritization = client.zones.settings.h2_prioritization.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" h2_prioritization = response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": "on", }, ) - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" h2_prioritization = await response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = await response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: h2_prioritization = await async_client.zones.settings.h2_prioritization.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" h2_prioritization = await response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" h2_prioritization = await response.parse() - assert_matches_type(Optional[ZonesH2Prioritization], h2_prioritization, path=["response"]) + assert_matches_type(Optional[ZoneSettingH2Prioritization], h2_prioritization, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_hotlink_protection.py b/tests/api_resources/zones/settings/test_hotlink_protection.py index a72b8a08446..8373f4e3e14 100644 --- a/tests/api_resources/zones/settings/test_hotlink_protection.py +++ b/tests/api_resources/zones/settings/test_hotlink_protection.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesHotlinkProtection +from cloudflare.types.zones.settings import ZoneSettingHotlinkProtection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: hotlink_protection = client.zones.settings.hotlink_protection.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = await response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = await response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: hotlink_protection = await async_client.zones.settings.hotlink_protection.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = await response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, 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" hotlink_protection = await response.parse() - assert_matches_type(Optional[ZonesHotlinkProtection], hotlink_protection, path=["response"]) + assert_matches_type(Optional[ZoneSettingHotlinkProtection], hotlink_protection, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_http2.py b/tests/api_resources/zones/settings/test_http2.py index 0f4244cc4f8..d4158ff76db 100644 --- a/tests/api_resources/zones/settings/test_http2.py +++ b/tests/api_resources/zones/settings/test_http2.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesHTTP2 +from cloudflare.types.zones.settings import ZoneSettingHTTP2 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: http2 = client.zones.settings.http2.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = await response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = await response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: http2 = await async_client.zones.settings.http2.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = await response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, 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" http2 = await response.parse() - assert_matches_type(Optional[ZonesHTTP2], http2, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP2], http2, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_http3.py b/tests/api_resources/zones/settings/test_http3.py index b3d5a4a3070..9bf0e153a66 100644 --- a/tests/api_resources/zones/settings/test_http3.py +++ b/tests/api_resources/zones/settings/test_http3.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesHTTP3 +from cloudflare.types.zones.settings import ZoneSettingHTTP3 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: http3 = client.zones.settings.http3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = await response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = await response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: http3 = await async_client.zones.settings.http3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = await response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, 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" http3 = await response.parse() - assert_matches_type(Optional[ZonesHTTP3], http3, path=["response"]) + assert_matches_type(Optional[ZoneSettingHTTP3], http3, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_image_resizing.py b/tests/api_resources/zones/settings/test_image_resizing.py index 6d4b9c79567..14e1f4bdedb 100644 --- a/tests/api_resources/zones/settings/test_image_resizing.py +++ b/tests/api_resources/zones/settings/test_image_resizing.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesImageResizing +from cloudflare.types.zones.settings import ZoneSettingImageResizing base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" image_resizing = response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: image_resizing = client.zones.settings.image_resizing.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" image_resizing = response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": "on", }, ) - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" image_resizing = await response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = await response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: image_resizing = await async_client.zones.settings.image_resizing.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" image_resizing = await response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" image_resizing = await response.parse() - assert_matches_type(Optional[ZonesImageResizing], image_resizing, path=["response"]) + assert_matches_type(Optional[ZoneSettingImageResizing], image_resizing, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_ip_geolocation.py b/tests/api_resources/zones/settings/test_ip_geolocation.py index ea44bbab61d..3bd9a3caadf 100644 --- a/tests/api_resources/zones/settings/test_ip_geolocation.py +++ b/tests/api_resources/zones/settings/test_ip_geolocation.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesIPGeolocation +from cloudflare.types.zones.settings import ZoneSettingIPGeolocation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: ip_geolocation = client.zones.settings.ip_geolocation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = await response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = await response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ip_geolocation = await async_client.zones.settings.ip_geolocation.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = await response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, 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" ip_geolocation = await response.parse() - assert_matches_type(Optional[ZonesIPGeolocation], ip_geolocation, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPGeolocation], ip_geolocation, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_ipv6.py b/tests/api_resources/zones/settings/test_ipv6.py index 1b77fb23944..7022d02d058 100644 --- a/tests/api_resources/zones/settings/test_ipv6.py +++ b/tests/api_resources/zones/settings/test_ipv6.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesIPV6 +from cloudflare.types.zones.settings import ZoneSettingIPV6 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: ipv6 = client.zones.settings.ipv6.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = await response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = await response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ipv6 = await async_client.zones.settings.ipv6.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = await response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, 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" ipv6 = await response.parse() - assert_matches_type(Optional[ZonesIPV6], ipv6, path=["response"]) + assert_matches_type(Optional[ZoneSettingIPV6], ipv6, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_min_tls_version.py b/tests/api_resources/zones/settings/test_min_tls_version.py index 2374157f094..77dcffe9737 100644 --- a/tests/api_resources/zones/settings/test_min_tls_version.py +++ b/tests/api_resources/zones/settings/test_min_tls_version.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesMinTLSVersion +from cloudflare.types.zones.settings import ZoneSettingMinTLSVersion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="1.0", ) - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: min_tls_version = client.zones.settings.min_tls_version.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="1.0", ) - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = await response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = await response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: min_tls_version = await async_client.zones.settings.min_tls_version.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = await response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, 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" min_tls_version = await response.parse() - assert_matches_type(Optional[ZonesMinTLSVersion], min_tls_version, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinTLSVersion], min_tls_version, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_minify.py b/tests/api_resources/zones/settings/test_minify.py index e9fcb1ddfe4..ccd289fcaeb 100644 --- a/tests/api_resources/zones/settings/test_minify.py +++ b/tests/api_resources/zones/settings/test_minify.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesMinify +from cloudflare.types.zones.settings import ZoneSettingMinify base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "js": "on", }, ) - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,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" minify = response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True @@ -82,7 +82,7 @@ def test_method_get(self, client: Cloudflare) -> None: minify = client.zones.settings.minify.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -94,7 +94,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" minify = response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True @@ -129,7 +129,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "js": "on", }, ) - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,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" minify = await response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = await response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,7 +187,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: minify = await async_client.zones.settings.minify.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +199,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" minify = await response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +211,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" minify = await response.parse() - assert_matches_type(Optional[ZonesMinify], minify, path=["response"]) + assert_matches_type(Optional[ZoneSettingMinify], minify, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_mirage.py b/tests/api_resources/zones/settings/test_mirage.py index a5033413b8d..26681ffdbef 100644 --- a/tests/api_resources/zones/settings/test_mirage.py +++ b/tests/api_resources/zones/settings/test_mirage.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesMirage +from cloudflare.types.zones.settings import ZoneSettingMirage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: mirage = client.zones.settings.mirage.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = await response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = await response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: mirage = await async_client.zones.settings.mirage.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = await response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, 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" mirage = await response.parse() - assert_matches_type(Optional[ZonesMirage], mirage, path=["response"]) + assert_matches_type(Optional[ZoneSettingMirage], mirage, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_mobile_redirect.py b/tests/api_resources/zones/settings/test_mobile_redirect.py index 92ca6833ac8..dd3ddd992ac 100644 --- a/tests/api_resources/zones/settings/test_mobile_redirect.py +++ b/tests/api_resources/zones/settings/test_mobile_redirect.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesMobileRedirect +from cloudflare.types.zones.settings import ZoneSettingMobileRedirect base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "strip_uri": False, }, ) - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,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" mobile_redirect = response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True @@ -82,7 +82,7 @@ def test_method_get(self, client: Cloudflare) -> None: mobile_redirect = client.zones.settings.mobile_redirect.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -94,7 +94,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" mobile_redirect = response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True @@ -129,7 +129,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +142,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "strip_uri": False, }, ) - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,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" mobile_redirect = await response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +168,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = await response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True @@ -187,7 +187,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: mobile_redirect = await async_client.zones.settings.mobile_redirect.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -199,7 +199,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" mobile_redirect = await response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) @pytest.mark.skip() @parametrize @@ -211,7 +211,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" mobile_redirect = await response.parse() - assert_matches_type(Optional[ZonesMobileRedirect], mobile_redirect, path=["response"]) + assert_matches_type(Optional[ZoneSettingMobileRedirect], mobile_redirect, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_nel.py b/tests/api_resources/zones/settings/test_nel.py index 53482bbdffb..a15a85d9be0 100644 --- a/tests/api_resources/zones/settings/test_nel.py +++ b/tests/api_resources/zones/settings/test_nel.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesNEL +from cloudflare.types.zones.settings import ZoneSettingNEL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": {}, }, ) - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": {"enabled": False}, }, ) - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" nel = response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: nel = client.zones.settings.nel.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" nel = response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": {}, }, ) - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": {"enabled": False}, }, ) - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" nel = await response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = await response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: nel = await async_client.zones.settings.nel.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" nel = await response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" nel = await response.parse() - assert_matches_type(Optional[ZonesNEL], nel, path=["response"]) + assert_matches_type(Optional[ZoneSettingNEL], nel, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_opportunistic_encryption.py b/tests/api_resources/zones/settings/test_opportunistic_encryption.py index bbe296b515b..88126a49703 100644 --- a/tests/api_resources/zones/settings/test_opportunistic_encryption.py +++ b/tests/api_resources/zones/settings/test_opportunistic_encryption.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesOpportunisticEncryption +from cloudflare.types.zones.settings import ZoneSettingOpportunisticEncryption base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, 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" opportunistic_encryption = response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,9 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -69,7 +71,7 @@ def test_method_get(self, client: Cloudflare) -> None: opportunistic_encryption = client.zones.settings.opportunistic_encryption.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +83,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" opportunistic_encryption = response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +95,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -116,7 +120,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +133,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" opportunistic_encryption = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +146,9 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -161,7 +167,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: opportunistic_encryption = await async_client.zones.settings.opportunistic_encryption.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +179,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" opportunistic_encryption = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +191,9 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" opportunistic_encryption = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticEncryption], opportunistic_encryption, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOpportunisticEncryption], opportunistic_encryption, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_opportunistic_onion.py b/tests/api_resources/zones/settings/test_opportunistic_onion.py index e3e36fc68f0..da6a2844d4f 100644 --- a/tests/api_resources/zones/settings/test_opportunistic_onion.py +++ b/tests/api_resources/zones/settings/test_opportunistic_onion.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesOpportunisticOnion +from cloudflare.types.zones.settings import ZoneSettingOpportunisticOnion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: opportunistic_onion = client.zones.settings.opportunistic_onion.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: opportunistic_onion = await async_client.zones.settings.opportunistic_onion.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, 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" opportunistic_onion = await response.parse() - assert_matches_type(Optional[ZonesOpportunisticOnion], opportunistic_onion, path=["response"]) + assert_matches_type(Optional[ZoneSettingOpportunisticOnion], opportunistic_onion, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_orange_to_orange.py b/tests/api_resources/zones/settings/test_orange_to_orange.py index afab16b079c..1d4c32bd289 100644 --- a/tests/api_resources/zones/settings/test_orange_to_orange.py +++ b/tests/api_resources/zones/settings/test_orange_to_orange.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesOrangeToOrange +from cloudflare.types.zones.settings import ZoneSettingOrangeToOrange base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" orange_to_orange = response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: orange_to_orange = client.zones.settings.orange_to_orange.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" orange_to_orange = response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": "on", }, ) - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" orange_to_orange = await response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = await response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: orange_to_orange = await async_client.zones.settings.orange_to_orange.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" orange_to_orange = await response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" orange_to_orange = await response.parse() - assert_matches_type(Optional[ZonesOrangeToOrange], orange_to_orange, path=["response"]) + assert_matches_type(Optional[ZoneSettingOrangeToOrange], orange_to_orange, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py b/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py index 427d913c2c5..1a12caea70f 100644 --- a/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py +++ b/tests/api_resources/zones/settings/test_origin_error_page_pass_thru.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesOriginErrorPagePassThru +from cloudflare.types.zones.settings import ZoneSettingOriginErrorPagePassThru base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,9 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -37,7 +39,9 @@ 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" origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -50,7 +54,9 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -69,7 +75,9 @@ def test_method_get(self, client: Cloudflare) -> None: origin_error_page_pass_thru = client.zones.settings.origin_error_page_pass_thru.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -81,7 +89,9 @@ 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" origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -93,7 +103,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -116,7 +128,9 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -129,7 +143,9 @@ 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" origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -142,7 +158,9 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -161,7 +179,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: origin_error_page_pass_thru = await async_client.zones.settings.origin_error_page_pass_thru.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -173,7 +193,9 @@ 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" origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -185,7 +207,9 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_error_page_pass_thru = await response.parse() - assert_matches_type(Optional[ZonesOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"]) + assert_matches_type( + Optional[ZoneSettingOriginErrorPagePassThru], origin_error_page_pass_thru, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_polish.py b/tests/api_resources/zones/settings/test_polish.py index 0f150ea11c1..81c7e82e6ae 100644 --- a/tests/api_resources/zones/settings/test_polish.py +++ b/tests/api_resources/zones/settings/test_polish.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesPolish +from cloudflare.types.zones.settings import ZoneSettingPolish base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": "off", }, ) - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": "off", }, ) - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" polish = response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: polish = client.zones.settings.polish.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" polish = response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": "off", }, ) - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": "off", }, ) - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" polish = await response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = await response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: polish = await async_client.zones.settings.polish.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" polish = await response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" polish = await response.parse() - assert_matches_type(Optional[ZonesPolish], polish, path=["response"]) + assert_matches_type(Optional[ZoneSettingPolish], polish, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_prefetch_preload.py b/tests/api_resources/zones/settings/test_prefetch_preload.py index 4a73bb876e7..64ef352ed41 100644 --- a/tests/api_resources/zones/settings/test_prefetch_preload.py +++ b/tests/api_resources/zones/settings/test_prefetch_preload.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesPrefetchPreload +from cloudflare.types.zones.settings import ZoneSettingPrefetchPreload base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: prefetch_preload = client.zones.settings.prefetch_preload.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = await response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = await response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: prefetch_preload = await async_client.zones.settings.prefetch_preload.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = await response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, 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" prefetch_preload = await response.parse() - assert_matches_type(Optional[ZonesPrefetchPreload], prefetch_preload, path=["response"]) + assert_matches_type(Optional[ZoneSettingPrefetchPreload], prefetch_preload, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_proxy_read_timeout.py b/tests/api_resources/zones/settings/test_proxy_read_timeout.py index 1523c87b3ba..0741ea010da 100644 --- a/tests/api_resources/zones/settings/test_proxy_read_timeout.py +++ b/tests/api_resources/zones/settings/test_proxy_read_timeout.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesProxyReadTimeout +from cloudflare.types.zones.settings import ZoneSettingProxyReadTimeout base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": 0, }, ) - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": 0, }, ) - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" proxy_read_timeout = response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: proxy_read_timeout = client.zones.settings.proxy_read_timeout.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" proxy_read_timeout = response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": 0, }, ) - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": 0, }, ) - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: proxy_read_timeout = await async_client.zones.settings.proxy_read_timeout.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_read_timeout = await response.parse() - assert_matches_type(Optional[ZonesProxyReadTimeout], proxy_read_timeout, path=["response"]) + assert_matches_type(Optional[ZoneSettingProxyReadTimeout], proxy_read_timeout, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_pseudo_ipv4.py b/tests/api_resources/zones/settings/test_pseudo_ipv4.py index 63d82be5b13..e0528d56434 100644 --- a/tests/api_resources/zones/settings/test_pseudo_ipv4.py +++ b/tests/api_resources/zones/settings/test_pseudo_ipv4.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesPseudoIPV4 +from cloudflare.types.zones.settings import ZoneSettingPseudoIPV4 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: pseudo_ipv4 = client.zones.settings.pseudo_ipv4.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: pseudo_ipv4 = await async_client.zones.settings.pseudo_ipv4.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, 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" pseudo_ipv4 = await response.parse() - assert_matches_type(Optional[ZonesPseudoIPV4], pseudo_ipv4, path=["response"]) + assert_matches_type(Optional[ZoneSettingPseudoIPV4], pseudo_ipv4, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_response_buffering.py b/tests/api_resources/zones/settings/test_response_buffering.py index acda6a91b4d..5ffbb57322f 100644 --- a/tests/api_resources/zones/settings/test_response_buffering.py +++ b/tests/api_resources/zones/settings/test_response_buffering.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesBuffering +from cloudflare.types.zones.settings import ZoneSettingBuffering base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: response_buffering = client.zones.settings.response_buffering.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = await response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = await response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: response_buffering = await async_client.zones.settings.response_buffering.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = await response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, 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" response_buffering = await response.parse() - assert_matches_type(Optional[ZonesBuffering], response_buffering, path=["response"]) + assert_matches_type(Optional[ZoneSettingBuffering], response_buffering, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_rocket_loader.py b/tests/api_resources/zones/settings/test_rocket_loader.py index fa1369c91cf..0b3c8e8bac3 100644 --- a/tests/api_resources/zones/settings/test_rocket_loader.py +++ b/tests/api_resources/zones/settings/test_rocket_loader.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesRocketLoader +from cloudflare.types.zones.settings import ZoneSettingRocketLoader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -39,7 +39,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +55,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" rocket_loader = response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -71,7 +71,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True @@ -93,7 +93,7 @@ def test_method_get(self, client: Cloudflare) -> None: rocket_loader = client.zones.settings.rocket_loader.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,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" rocket_loader = response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +143,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "value": "on", }, ) - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -155,7 +155,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "value": "on", }, ) - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +171,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" rocket_loader = await response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +187,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = await response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +209,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: rocket_loader = await async_client.zones.settings.rocket_loader.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +221,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" rocket_loader = await response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +233,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" rocket_loader = await response.parse() - assert_matches_type(Optional[ZonesRocketLoader], rocket_loader, path=["response"]) + assert_matches_type(Optional[ZoneSettingRocketLoader], rocket_loader, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_security_headers.py b/tests/api_resources/zones/settings/test_security_headers.py index 49a7e7a0332..824e612c0e8 100644 --- a/tests/api_resources/zones/settings/test_security_headers.py +++ b/tests/api_resources/zones/settings/test_security_headers.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesSecurityHeader +from cloudflare.types.zones.settings import ZoneSettingSecurityHeader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -40,7 +40,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: } }, ) - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -53,7 +53,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" security_header = response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -66,7 +66,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -85,7 +85,7 @@ def test_method_get(self, client: Cloudflare) -> None: security_header = client.zones.settings.security_headers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +97,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" security_header = response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +109,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -132,7 +132,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +148,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) } }, ) - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +161,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" security_header = await response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +174,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = await response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -193,7 +193,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: security_header = await async_client.zones.settings.security_headers.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -205,7 +205,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" security_header = await response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" security_header = await response.parse() - assert_matches_type(Optional[ZonesSecurityHeader], security_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityHeader], security_header, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_security_level.py b/tests/api_resources/zones/settings/test_security_level.py index 71fcf116d56..9cb8a9aedc3 100644 --- a/tests/api_resources/zones/settings/test_security_level.py +++ b/tests/api_resources/zones/settings/test_security_level.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesSecurityLevel +from cloudflare.types.zones.settings import ZoneSettingSecurityLevel base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: security_level = client.zones.settings.security_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = await response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = await response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: security_level = await async_client.zones.settings.security_level.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = await response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, 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" security_level = await response.parse() - assert_matches_type(Optional[ZonesSecurityLevel], security_level, path=["response"]) + assert_matches_type(Optional[ZoneSettingSecurityLevel], security_level, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_server_side_excludes.py b/tests/api_resources/zones/settings/test_server_side_excludes.py index 86277b42302..dcaed8d2853 100644 --- a/tests/api_resources/zones/settings/test_server_side_excludes.py +++ b/tests/api_resources/zones/settings/test_server_side_excludes.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesServerSideExclude +from cloudflare.types.zones.settings import ZoneSettingServerSideExclude base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: server_side_exclude = client.zones.settings.server_side_excludes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = await response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = await response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: server_side_exclude = await async_client.zones.settings.server_side_excludes.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = await response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, 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" server_side_exclude = await response.parse() - assert_matches_type(Optional[ZonesServerSideExclude], server_side_exclude, path=["response"]) + assert_matches_type(Optional[ZoneSettingServerSideExclude], server_side_exclude, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py b/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py index 7b447e836b3..170d7bec92c 100644 --- a/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py +++ b/tests/api_resources/zones/settings/test_sort_query_string_for_cache.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesSortQueryStringForCache +from cloudflare.types.zones.settings import ZoneSettingSortQueryStringForCache base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,9 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -37,7 +39,9 @@ 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" sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -50,7 +54,9 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -69,7 +75,9 @@ def test_method_get(self, client: Cloudflare) -> None: sort_query_string_for_cache = client.zones.settings.sort_query_string_for_cache.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -81,7 +89,9 @@ 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" sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -93,7 +103,9 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -116,7 +128,9 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -129,7 +143,9 @@ 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" sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -142,7 +158,9 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -161,7 +179,9 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: sort_query_string_for_cache = await async_client.zones.settings.sort_query_string_for_cache.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -173,7 +193,9 @@ 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" sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) @pytest.mark.skip() @parametrize @@ -185,7 +207,9 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" sort_query_string_for_cache = await response.parse() - assert_matches_type(Optional[ZonesSortQueryStringForCache], sort_query_string_for_cache, path=["response"]) + assert_matches_type( + Optional[ZoneSettingSortQueryStringForCache], sort_query_string_for_cache, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_ssl.py b/tests/api_resources/zones/settings/test_ssl.py index 271ad8e6b62..1a22aa81a7a 100644 --- a/tests/api_resources/zones/settings/test_ssl.py +++ b/tests/api_resources/zones/settings/test_ssl.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesSSL +from cloudflare.types.zones.settings import ZoneSettingSSL base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: ssl = client.zones.settings.ssl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = await response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = await response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ssl = await async_client.zones.settings.ssl.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = await response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, 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" ssl = await response.parse() - assert_matches_type(Optional[ZonesSSL], ssl, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSL], ssl, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_ssl_recommender.py b/tests/api_resources/zones/settings/test_ssl_recommender.py index e9b7ee62f0a..5fb5afb20c0 100644 --- a/tests/api_resources/zones/settings/test_ssl_recommender.py +++ b/tests/api_resources/zones/settings/test_ssl_recommender.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesSSLRecommender +from cloudflare.types.zones.settings import ZoneSettingSSLRecommender base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -36,7 +36,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: "id": "ssl_recommender", }, ) - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,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" ssl_recommender = response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -62,7 +62,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True @@ -81,7 +81,7 @@ def test_method_get(self, client: Cloudflare) -> None: ssl_recommender = client.zones.settings.ssl_recommender.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,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" ssl_recommender = response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True @@ -128,7 +128,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value={}, ) - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -140,7 +140,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) "id": "ssl_recommender", }, ) - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -153,7 +153,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" ssl_recommender = await response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -166,7 +166,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = await response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True @@ -185,7 +185,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ssl_recommender = await async_client.zones.settings.ssl_recommender.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -197,7 +197,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" ssl_recommender = await response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) @pytest.mark.skip() @parametrize @@ -209,7 +209,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" ssl_recommender = await response.parse() - assert_matches_type(Optional[ZonesSSLRecommender], ssl_recommender, path=["response"]) + assert_matches_type(Optional[ZoneSettingSSLRecommender], ssl_recommender, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_tls_1_3.py b/tests/api_resources/zones/settings/test_tls_1_3.py index 210b95adaa2..4cf09b010a6 100644 --- a/tests/api_resources/zones/settings/test_tls_1_3.py +++ b/tests/api_resources/zones/settings/test_tls_1_3.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesTLS1_3 +from cloudflare.types.zones.settings import ZoneSettingTLS1_3 base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: tls_1_3 = client.zones.settings.tls_1_3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = await response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = await response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_1_3 = await async_client.zones.settings.tls_1_3.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = await response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, 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" tls_1_3 = await response.parse() - assert_matches_type(Optional[ZonesTLS1_3], tls_1_3, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLS1_3], tls_1_3, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_tls_client_auth.py b/tests/api_resources/zones/settings/test_tls_client_auth.py index 6d13ddbf08a..b29d5c2a6f6 100644 --- a/tests/api_resources/zones/settings/test_tls_client_auth.py +++ b/tests/api_resources/zones/settings/test_tls_client_auth.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesTLSClientAuth +from cloudflare.types.zones.settings import ZoneSettingTLSClientAuth base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: tls_client_auth = client.zones.settings.tls_client_auth.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = await response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = await response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: tls_client_auth = await async_client.zones.settings.tls_client_auth.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = await response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, 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" tls_client_auth = await response.parse() - assert_matches_type(Optional[ZonesTLSClientAuth], tls_client_auth, path=["response"]) + assert_matches_type(Optional[ZoneSettingTLSClientAuth], tls_client_auth, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_true_client_ip_header.py b/tests/api_resources/zones/settings/test_true_client_ip_header.py index 4d59db44462..11556f8be2d 100644 --- a/tests/api_resources/zones/settings/test_true_client_ip_header.py +++ b/tests/api_resources/zones/settings/test_true_client_ip_header.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesTrueClientIPHeader +from cloudflare.types.zones.settings import ZoneSettingTrueClientIPHeader base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: true_client_ip_header = client.zones.settings.true_client_ip_header.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = await response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = await response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: true_client_ip_header = await async_client.zones.settings.true_client_ip_header.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = await response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, 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" true_client_ip_header = await response.parse() - assert_matches_type(Optional[ZonesTrueClientIPHeader], true_client_ip_header, path=["response"]) + assert_matches_type(Optional[ZoneSettingTrueClientIPHeader], true_client_ip_header, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_waf.py b/tests/api_resources/zones/settings/test_waf.py index cd650dff8a1..e573fa58ab5 100644 --- a/tests/api_resources/zones/settings/test_waf.py +++ b/tests/api_resources/zones/settings/test_waf.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesWAF +from cloudflare.types.zones.settings import ZoneSettingWAF base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: waf = client.zones.settings.waf.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = await response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = await response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: waf = await async_client.zones.settings.waf.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = await response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, 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" waf = await response.parse() - assert_matches_type(Optional[ZonesWAF], waf, path=["response"]) + assert_matches_type(Optional[ZoneSettingWAF], waf, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_webp.py b/tests/api_resources/zones/settings/test_webp.py index 3c4c3bf82d1..d8230d7b497 100644 --- a/tests/api_resources/zones/settings/test_webp.py +++ b/tests/api_resources/zones/settings/test_webp.py @@ -9,7 +9,7 @@ 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 ZoneSettingWebP base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], webp, path=["response"]) assert cast(Any, response.is_closed) is True @@ -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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], 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[ZoneSettingWebP], webp, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_websocket.py b/tests/api_resources/zones/settings/test_websocket.py index 28ed4a5597b..7cac8f78a2c 100644 --- a/tests/api_resources/zones/settings/test_websocket.py +++ b/tests/api_resources/zones/settings/test_websocket.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZonesWebsockets +from cloudflare.types.zones.settings import ZoneSettingWebsockets base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: websocket = client.zones.settings.websocket.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="off", ) - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = await response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = await response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: websocket = await async_client.zones.settings.websocket.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = await response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, 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" websocket = await response.parse() - assert_matches_type(Optional[ZonesWebsockets], websocket, path=["response"]) + assert_matches_type(Optional[ZoneSettingWebsockets], websocket, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/settings/test_zero_rtt.py b/tests/api_resources/zones/settings/test_zero_rtt.py index 5103f2aa6fb..3e05091750a 100644 --- a/tests/api_resources/zones/settings/test_zero_rtt.py +++ b/tests/api_resources/zones/settings/test_zero_rtt.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import Zones0rtt +from cloudflare.types.zones.settings import ZoneSetting0rtt base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +24,7 @@ def test_method_edit(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ def test_method_get(self, client: Cloudflare) -> None: zero_rtt = client.zones.settings.zero_rtt.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True @@ -116,7 +116,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", value="on", ) - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = await response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = await response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True @@ -161,7 +161,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: zero_rtt = await async_client.zones.settings.zero_rtt.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = await response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, 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" zero_rtt = await response.parse() - assert_matches_type(Optional[Zones0rtt], zero_rtt, path=["response"]) + assert_matches_type(Optional[ZoneSetting0rtt], zero_rtt, path=["response"]) assert cast(Any, response.is_closed) is True From 1fecb6d96a53f2139d152e0374b08c2eb068592b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 04:24:22 +0000 Subject: [PATCH 03/16] feat(api): update via SDK Studio (#183) --- api.md | 28 +++--- src/cloudflare/pagination.py | 41 ++------- .../resources/challenges/widgets.py | 56 +++++------ .../resources/dcv_delegation/uuid.py | 14 +-- .../resources/hostnames/settings/tls.py | 33 ++----- src/cloudflare/types/challenges/__init__.py | 4 +- ..._widget_detail.py => challenges_widget.py} | 4 +- ...dget_list.py => challenges_widget_list.py} | 4 +- .../types/dcv_delegation/__init__.py | 4 +- ..._uuid_object.py => dcv_delegation_uuid.py} | 4 +- .../types/hostnames/settings/__init__.py | 8 +- ...t_delete.py => hostname_setting_delete.py} | 4 +- ...s_setting_object.py => hostname_stting.py} | 4 +- .../api_resources/challenges/test_widgets.py | 92 +++++++++---------- .../api_resources/dcv_delegation/test_uuid.py | 14 +-- .../hostnames/settings/test_tls.py | 30 +++--- 16 files changed, 146 insertions(+), 198 deletions(-) rename src/cloudflare/types/challenges/{nc_challenges_admin_widget_detail.py => challenges_widget.py} (93%) rename src/cloudflare/types/challenges/{nc_challenges_admin_widget_list.py => challenges_widget_list.py} (93%) rename src/cloudflare/types/dcv_delegation/{tls_certificates_and_hostnames_uuid_object.py => dcv_delegation_uuid.py} (68%) rename src/cloudflare/types/hostnames/settings/{tls_certificates_and_hostnames_setting_object_delete.py => hostname_setting_delete.py} (81%) rename src/cloudflare/types/hostnames/settings/{tls_certificates_and_hostnames_setting_object.py => hostname_stting.py} (85%) diff --git a/api.md b/api.md index 9c60a9851ae..8d63267f790 100644 --- a/api.md +++ b/api.md @@ -5842,17 +5842,17 @@ Methods: Types: ```python -from cloudflare.types.challenges import NcChallengesAdminWidgetDetail, NcChallengesAdminWidgetList +from cloudflare.types.challenges import ChallengesWidget, ChallengesWidgetList ``` Methods: -- client.challenges.widgets.create(\*, account_id, \*\*params) -> Optional -- client.challenges.widgets.update(sitekey, \*, account_id, \*\*params) -> Optional -- client.challenges.widgets.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[NcChallengesAdminWidgetList] -- client.challenges.widgets.delete(sitekey, \*, account_id) -> Optional -- client.challenges.widgets.get(sitekey, \*, account_id) -> Optional -- client.challenges.widgets.rotate_secret(sitekey, \*, account_id, \*\*params) -> Optional +- client.challenges.widgets.create(\*, account_id, \*\*params) -> Optional +- client.challenges.widgets.update(sitekey, \*, account_id, \*\*params) -> Optional +- client.challenges.widgets.list(\*, account_id, \*\*params) -> SyncV4PagePaginationArray[ChallengesWidgetList] +- client.challenges.widgets.delete(sitekey, \*, account_id) -> Optional +- client.challenges.widgets.get(sitekey, \*, account_id) -> Optional +- client.challenges.widgets.rotate_secret(sitekey, \*, account_id, \*\*params) -> Optional # Hyperdrive @@ -5862,7 +5862,7 @@ Types: ```python from cloudflare.types.hyperdrive import ( - HyperdriveHyperdriveWithIdentifier, + Hyperdrive, ConfigCreateResponse, ConfigUpdateResponse, ConfigListResponse, @@ -7115,12 +7115,12 @@ Methods: Types: ```python -from cloudflare.types.dcv_delegation import TLSCertificatesAndHostnamesUUIDObject +from cloudflare.types.dcv_delegation import DCVDelegationUUID ``` Methods: -- client.dcv_delegation.uuid.get(\*, zone_id) -> TLSCertificatesAndHostnamesUUIDObject +- client.dcv_delegation.uuid.get(\*, zone_id) -> DCVDelegationUUID # Hostnames @@ -7132,16 +7132,16 @@ Types: ```python from cloudflare.types.hostnames.settings import ( - TLSCertificatesAndHostnamesSettingObject, - TLSCertificatesAndHostnamesSettingObjectDelete, + HostnameSettingDelete, + HostnameStting, TLSGetResponse, ) ``` Methods: -- client.hostnames.settings.tls.update(hostname, \*, zone_id, setting_id, \*\*params) -> TLSCertificatesAndHostnamesSettingObject -- client.hostnames.settings.tls.delete(hostname, \*, zone_id, setting_id) -> TLSCertificatesAndHostnamesSettingObjectDelete +- client.hostnames.settings.tls.update(hostname, \*, zone_id, setting_id, \*\*params) -> HostnameStting +- client.hostnames.settings.tls.delete(hostname, \*, zone_id, setting_id) -> HostnameSettingDelete - client.hostnames.settings.tls.get(setting_id, \*, zone_id) -> Optional # Snippets diff --git a/src/cloudflare/pagination.py b/src/cloudflare/pagination.py index b6f4cc2cfc6..5f6aecf9f92 100644 --- a/src/cloudflare/pagination.py +++ b/src/cloudflare/pagination.py @@ -1,11 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Any, List, Type, Generic, Mapping, TypeVar, Optional, cast +from typing import List, Generic, TypeVar, Optional, cast from typing_extensions import override -from httpx import Response - -from ._utils import is_mapping from ._models import BaseModel, GenericModel from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage @@ -27,8 +24,6 @@ "AsyncSinglePage", ] -_BaseModelT = TypeVar("_BaseModelT", bound=BaseModel) - _T = TypeVar("_T") @@ -257,14 +252,14 @@ def next_page_info(self) -> Optional[PageInfo]: class SyncSinglePage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): - result: List[_T] + items: List[_T] @override def _get_page_items(self) -> List[_T]: - result = self.result - if not result: + items = self.items + if not items: return [] - return result + return items @override def next_page_info(self) -> None: @@ -274,25 +269,16 @@ def next_page_info(self) -> None: """ return None - @classmethod - def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 - return cls.construct( - None, - **{ - **(cast(Mapping[str, Any], data) if is_mapping(data) else {"result": data}), - }, - ) - class AsyncSinglePage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): - result: List[_T] + items: List[_T] @override def _get_page_items(self) -> List[_T]: - result = self.result - if not result: + items = self.items + if not items: return [] - return result + return items @override def next_page_info(self) -> None: @@ -301,12 +287,3 @@ def next_page_info(self) -> None: so there will never be a next page. """ return None - - @classmethod - def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 - return cls.construct( - None, - **{ - **(cast(Mapping[str, Any], data) if is_mapping(data) else {"result": data}), - }, - ) diff --git a/src/cloudflare/resources/challenges/widgets.py b/src/cloudflare/resources/challenges/widgets.py index 45f79b1e42a..5c9d1521e5b 100644 --- a/src/cloudflare/resources/challenges/widgets.py +++ b/src/cloudflare/resources/challenges/widgets.py @@ -27,8 +27,8 @@ make_request_options, ) from ...types.challenges import ( - NcChallengesAdminWidgetList, - NcChallengesAdminWidgetDetail, + ChallengesWidget, + ChallengesWidgetList, widget_list_params, widget_create_params, widget_update_params, @@ -68,7 +68,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Lists challenge widgets. @@ -139,7 +139,7 @@ def create( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) def update( @@ -159,7 +159,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Update the configuration of a widget. @@ -214,7 +214,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) def list( @@ -231,7 +231,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncV4PagePaginationArray[NcChallengesAdminWidgetList]: + ) -> SyncV4PagePaginationArray[ChallengesWidgetList]: """ Lists all turnstile widgets of an account. @@ -258,7 +258,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/challenges/widgets", - page=SyncV4PagePaginationArray[NcChallengesAdminWidgetList], + page=SyncV4PagePaginationArray[ChallengesWidgetList], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -274,7 +274,7 @@ def list( widget_list_params.WidgetListParams, ), ), - model=NcChallengesAdminWidgetList, + model=ChallengesWidgetList, ) def delete( @@ -288,7 +288,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Destroy a Turnstile Widget. @@ -318,7 +318,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) def get( @@ -332,7 +332,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Show a single challenge widget configuration. @@ -362,7 +362,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) def rotate_secret( @@ -377,7 +377,7 @@ def rotate_secret( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """Generate a new secret key for this widget. If `invalidate_immediately` is set to @@ -418,7 +418,7 @@ def rotate_secret( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) @@ -452,7 +452,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Lists challenge widgets. @@ -523,7 +523,7 @@ async def create( ), post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) async def update( @@ -543,7 +543,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Update the configuration of a widget. @@ -598,7 +598,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) def list( @@ -615,7 +615,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[NcChallengesAdminWidgetList, AsyncV4PagePaginationArray[NcChallengesAdminWidgetList]]: + ) -> AsyncPaginator[ChallengesWidgetList, AsyncV4PagePaginationArray[ChallengesWidgetList]]: """ Lists all turnstile widgets of an account. @@ -642,7 +642,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/challenges/widgets", - page=AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], + page=AsyncV4PagePaginationArray[ChallengesWidgetList], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -658,7 +658,7 @@ def list( widget_list_params.WidgetListParams, ), ), - model=NcChallengesAdminWidgetList, + model=ChallengesWidgetList, ) async def delete( @@ -672,7 +672,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Destroy a Turnstile Widget. @@ -702,7 +702,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) async def get( @@ -716,7 +716,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """ Show a single challenge widget configuration. @@ -746,7 +746,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) async def rotate_secret( @@ -761,7 +761,7 @@ async def rotate_secret( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NcChallengesAdminWidgetDetail]: + ) -> Optional[ChallengesWidget]: """Generate a new secret key for this widget. If `invalidate_immediately` is set to @@ -802,7 +802,7 @@ async def rotate_secret( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[NcChallengesAdminWidgetDetail]], ResultWrapper[NcChallengesAdminWidgetDetail]), + cast_to=cast(Type[Optional[ChallengesWidget]], ResultWrapper[ChallengesWidget]), ) diff --git a/src/cloudflare/resources/dcv_delegation/uuid.py b/src/cloudflare/resources/dcv_delegation/uuid.py index a56cb3629a9..c6460a75e22 100644 --- a/src/cloudflare/resources/dcv_delegation/uuid.py +++ b/src/cloudflare/resources/dcv_delegation/uuid.py @@ -19,7 +19,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.dcv_delegation import TLSCertificatesAndHostnamesUUIDObject +from ...types.dcv_delegation import DCVDelegationUUID __all__ = ["UUID", "AsyncUUID"] @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesUUIDObject: + ) -> DCVDelegationUUID: """ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation. @@ -70,9 +70,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesUUIDObject], ResultWrapper[TLSCertificatesAndHostnamesUUIDObject] - ), + cast_to=cast(Type[DCVDelegationUUID], ResultWrapper[DCVDelegationUUID]), ) @@ -95,7 +93,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesUUIDObject: + ) -> DCVDelegationUUID: """ Retrieve the account and zone specific unique identifier used as part of the CNAME target for DCV Delegation. @@ -122,9 +120,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesUUIDObject], ResultWrapper[TLSCertificatesAndHostnamesUUIDObject] - ), + cast_to=cast(Type[DCVDelegationUUID], ResultWrapper[DCVDelegationUUID]), ) diff --git a/src/cloudflare/resources/hostnames/settings/tls.py b/src/cloudflare/resources/hostnames/settings/tls.py index df9d4918347..9c58de5adde 100644 --- a/src/cloudflare/resources/hostnames/settings/tls.py +++ b/src/cloudflare/resources/hostnames/settings/tls.py @@ -24,12 +24,7 @@ from ...._base_client import ( make_request_options, ) -from ....types.hostnames.settings import ( - TLSGetResponse, - TLSCertificatesAndHostnamesSettingObject, - TLSCertificatesAndHostnamesSettingObjectDelete, - tls_update_params, -) +from ....types.hostnames.settings import HostnameStting, TLSGetResponse, HostnameSettingDelete, tls_update_params __all__ = ["TLS", "AsyncTLS"] @@ -56,7 +51,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSettingObject: + ) -> HostnameStting: """ Update the tls setting value for the hostname. @@ -93,9 +88,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSettingObject], ResultWrapper[TLSCertificatesAndHostnamesSettingObject] - ), + cast_to=cast(Type[HostnameStting], ResultWrapper[HostnameStting]), ) def delete( @@ -110,7 +103,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSettingObjectDelete: + ) -> HostnameSettingDelete: """ Delete the tls setting value for the hostname. @@ -144,10 +137,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSettingObjectDelete], - ResultWrapper[TLSCertificatesAndHostnamesSettingObjectDelete], - ), + cast_to=cast(Type[HostnameSettingDelete], ResultWrapper[HostnameSettingDelete]), ) def get( @@ -217,7 +207,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSettingObject: + ) -> HostnameStting: """ Update the tls setting value for the hostname. @@ -254,9 +244,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSettingObject], ResultWrapper[TLSCertificatesAndHostnamesSettingObject] - ), + cast_to=cast(Type[HostnameStting], ResultWrapper[HostnameStting]), ) async def delete( @@ -271,7 +259,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> TLSCertificatesAndHostnamesSettingObjectDelete: + ) -> HostnameSettingDelete: """ Delete the tls setting value for the hostname. @@ -305,10 +293,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast( - Type[TLSCertificatesAndHostnamesSettingObjectDelete], - ResultWrapper[TLSCertificatesAndHostnamesSettingObjectDelete], - ), + cast_to=cast(Type[HostnameSettingDelete], ResultWrapper[HostnameSettingDelete]), ) async def get( diff --git a/src/cloudflare/types/challenges/__init__.py b/src/cloudflare/types/challenges/__init__.py index dda7901b9ed..21538f16a7a 100644 --- a/src/cloudflare/types/challenges/__init__.py +++ b/src/cloudflare/types/challenges/__init__.py @@ -2,9 +2,9 @@ from __future__ import annotations +from .challenges_widget import ChallengesWidget as ChallengesWidget from .widget_list_params import WidgetListParams as WidgetListParams from .widget_create_params import WidgetCreateParams as WidgetCreateParams from .widget_update_params import WidgetUpdateParams as WidgetUpdateParams +from .challenges_widget_list import ChallengesWidgetList as ChallengesWidgetList from .widget_rotate_secret_params import WidgetRotateSecretParams as WidgetRotateSecretParams -from .nc_challenges_admin_widget_list import NcChallengesAdminWidgetList as NcChallengesAdminWidgetList -from .nc_challenges_admin_widget_detail import NcChallengesAdminWidgetDetail as NcChallengesAdminWidgetDetail diff --git a/src/cloudflare/types/challenges/nc_challenges_admin_widget_detail.py b/src/cloudflare/types/challenges/challenges_widget.py similarity index 93% rename from src/cloudflare/types/challenges/nc_challenges_admin_widget_detail.py rename to src/cloudflare/types/challenges/challenges_widget.py index f6c3b713595..25dd3a000ad 100644 --- a/src/cloudflare/types/challenges/nc_challenges_admin_widget_detail.py +++ b/src/cloudflare/types/challenges/challenges_widget.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["NcChallengesAdminWidgetDetail"] +__all__ = ["ChallengesWidget"] -class NcChallengesAdminWidgetDetail(BaseModel): +class ChallengesWidget(BaseModel): bot_fight_mode: bool """ If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive diff --git a/src/cloudflare/types/challenges/nc_challenges_admin_widget_list.py b/src/cloudflare/types/challenges/challenges_widget_list.py similarity index 93% rename from src/cloudflare/types/challenges/nc_challenges_admin_widget_list.py rename to src/cloudflare/types/challenges/challenges_widget_list.py index ebeeb4343f4..c7b05f2f592 100644 --- a/src/cloudflare/types/challenges/nc_challenges_admin_widget_list.py +++ b/src/cloudflare/types/challenges/challenges_widget_list.py @@ -6,10 +6,10 @@ from ..._models import BaseModel -__all__ = ["NcChallengesAdminWidgetList"] +__all__ = ["ChallengesWidgetList"] -class NcChallengesAdminWidgetList(BaseModel): +class ChallengesWidgetList(BaseModel): bot_fight_mode: bool """ If bot_fight_mode is set to `true`, Cloudflare issues computationally expensive diff --git a/src/cloudflare/types/dcv_delegation/__init__.py b/src/cloudflare/types/dcv_delegation/__init__.py index d1de3e6391e..9c1d5c3039b 100644 --- a/src/cloudflare/types/dcv_delegation/__init__.py +++ b/src/cloudflare/types/dcv_delegation/__init__.py @@ -2,6 +2,4 @@ from __future__ import annotations -from .tls_certificates_and_hostnames_uuid_object import ( - TLSCertificatesAndHostnamesUUIDObject as TLSCertificatesAndHostnamesUUIDObject, -) +from .dcv_delegation_uuid import DCVDelegationUUID as DCVDelegationUUID diff --git a/src/cloudflare/types/dcv_delegation/tls_certificates_and_hostnames_uuid_object.py b/src/cloudflare/types/dcv_delegation/dcv_delegation_uuid.py similarity index 68% rename from src/cloudflare/types/dcv_delegation/tls_certificates_and_hostnames_uuid_object.py rename to src/cloudflare/types/dcv_delegation/dcv_delegation_uuid.py index e4a04cde06b..43469f24d9c 100644 --- a/src/cloudflare/types/dcv_delegation/tls_certificates_and_hostnames_uuid_object.py +++ b/src/cloudflare/types/dcv_delegation/dcv_delegation_uuid.py @@ -4,9 +4,9 @@ from ..._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesUUIDObject"] +__all__ = ["DCVDelegationUUID"] -class TLSCertificatesAndHostnamesUUIDObject(BaseModel): +class DCVDelegationUUID(BaseModel): uuid: Optional[str] = None """The DCV Delegation unique identifier.""" diff --git a/src/cloudflare/types/hostnames/settings/__init__.py b/src/cloudflare/types/hostnames/settings/__init__.py index 9f307e5137b..d4d13ab9044 100644 --- a/src/cloudflare/types/hostnames/settings/__init__.py +++ b/src/cloudflare/types/hostnames/settings/__init__.py @@ -2,11 +2,7 @@ from __future__ import annotations +from .hostname_stting import HostnameStting as HostnameStting from .tls_get_response import TLSGetResponse as TLSGetResponse from .tls_update_params import TLSUpdateParams as TLSUpdateParams -from .tls_certificates_and_hostnames_setting_object import ( - TLSCertificatesAndHostnamesSettingObject as TLSCertificatesAndHostnamesSettingObject, -) -from .tls_certificates_and_hostnames_setting_object_delete import ( - TLSCertificatesAndHostnamesSettingObjectDelete as TLSCertificatesAndHostnamesSettingObjectDelete, -) +from .hostname_setting_delete import HostnameSettingDelete as HostnameSettingDelete diff --git a/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object_delete.py b/src/cloudflare/types/hostnames/settings/hostname_setting_delete.py similarity index 81% rename from src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object_delete.py rename to src/cloudflare/types/hostnames/settings/hostname_setting_delete.py index 8008b9ef4b7..5991fe4d96f 100644 --- a/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object_delete.py +++ b/src/cloudflare/types/hostnames/settings/hostname_setting_delete.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesSettingObjectDelete"] +__all__ = ["HostnameSettingDelete"] -class TLSCertificatesAndHostnamesSettingObjectDelete(BaseModel): +class HostnameSettingDelete(BaseModel): created_at: Optional[datetime] = None """This is the time the tls setting was originally created for this hostname.""" diff --git a/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object.py b/src/cloudflare/types/hostnames/settings/hostname_stting.py similarity index 85% rename from src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object.py rename to src/cloudflare/types/hostnames/settings/hostname_stting.py index 2ca745daf84..31d6932795e 100644 --- a/src/cloudflare/types/hostnames/settings/tls_certificates_and_hostnames_setting_object.py +++ b/src/cloudflare/types/hostnames/settings/hostname_stting.py @@ -5,10 +5,10 @@ from ...._models import BaseModel -__all__ = ["TLSCertificatesAndHostnamesSettingObject"] +__all__ = ["HostnameStting"] -class TLSCertificatesAndHostnamesSettingObject(BaseModel): +class HostnameStting(BaseModel): created_at: Optional[datetime] = None """This is the time the tls setting was originally created for this hostname.""" diff --git a/tests/api_resources/challenges/test_widgets.py b/tests/api_resources/challenges/test_widgets.py index 71cf53e33a0..9a6efa429ee 100644 --- a/tests/api_resources/challenges/test_widgets.py +++ b/tests/api_resources/challenges/test_widgets.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from cloudflare.pagination import SyncV4PagePaginationArray, AsyncV4PagePaginationArray from cloudflare.types.challenges import ( - NcChallengesAdminWidgetList, - NcChallengesAdminWidgetDetail, + ChallengesWidget, + ChallengesWidgetList, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: offlabel=False, region="world", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,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" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -79,7 +79,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -104,7 +104,7 @@ def test_method_update(self, client: Cloudflare) -> None: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +119,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: clearance_level="interactive", offlabel=False, ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -135,7 +135,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" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -151,7 +151,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -182,7 +182,7 @@ def test_method_list(self, client: Cloudflare) -> None: widget = client.challenges.widgets.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -194,7 +194,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: page=1, per_page=5, ) - assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +206,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" widget = response.parse() - assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +218,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(SyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(SyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -237,7 +237,7 @@ def test_method_delete(self, client: Cloudflare) -> None: "0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -250,7 +250,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" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -263,7 +263,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -289,7 +289,7 @@ def test_method_get(self, client: Cloudflare) -> None: "0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -302,7 +302,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" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -315,7 +315,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -341,7 +341,7 @@ def test_method_rotate_secret(self, client: Cloudflare) -> None: "0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -351,7 +351,7 @@ def test_method_rotate_secret_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -364,7 +364,7 @@ def test_raw_response_rotate_secret(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -377,7 +377,7 @@ def test_streaming_response_rotate_secret(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -409,7 +409,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -428,7 +428,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare offlabel=False, region="world", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +443,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" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +458,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -483,7 +483,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: mode="invisible", name="blog.cloudflare.com login form", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -498,7 +498,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare clearance_level="interactive", offlabel=False, ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -514,7 +514,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" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -530,7 +530,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -561,7 +561,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: widget = await async_client.challenges.widgets.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -573,7 +573,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) page=1, per_page=5, ) - assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -585,7 +585,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" widget = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -597,7 +597,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(AsyncV4PagePaginationArray[NcChallengesAdminWidgetList], widget, path=["response"]) + assert_matches_type(AsyncV4PagePaginationArray[ChallengesWidgetList], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -616,7 +616,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: "0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -629,7 +629,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" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -642,7 +642,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -668,7 +668,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -681,7 +681,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" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -694,7 +694,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True @@ -720,7 +720,7 @@ async def test_method_rotate_secret(self, async_client: AsyncCloudflare) -> None "0x4AAF00AAAABn0R22HWm-YUc", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -730,7 +730,7 @@ async def test_method_rotate_secret_with_all_params(self, async_client: AsyncClo account_id="023e105f4ecef8ad9ca31a8372d0c353", invalidate_immediately=True, ) - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -743,7 +743,7 @@ async def test_raw_response_rotate_secret(self, async_client: AsyncCloudflare) - assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) @pytest.mark.skip() @parametrize @@ -756,7 +756,7 @@ async def test_streaming_response_rotate_secret(self, async_client: AsyncCloudfl assert response.http_request.headers.get("X-Stainless-Lang") == "python" widget = await response.parse() - assert_matches_type(Optional[NcChallengesAdminWidgetDetail], widget, path=["response"]) + assert_matches_type(Optional[ChallengesWidget], widget, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/dcv_delegation/test_uuid.py b/tests/api_resources/dcv_delegation/test_uuid.py index 3f5e3b861a3..0bb10895bed 100644 --- a/tests/api_resources/dcv_delegation/test_uuid.py +++ b/tests/api_resources/dcv_delegation/test_uuid.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.dcv_delegation import TLSCertificatesAndHostnamesUUIDObject +from cloudflare.types.dcv_delegation import DCVDelegationUUID base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: uuid = client.dcv_delegation.uuid.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) + assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" uuid = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) + assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) + assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +69,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: uuid = await async_client.dcv_delegation.uuid.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) + assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,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" uuid = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) + assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" uuid = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesUUIDObject, uuid, path=["response"]) + assert_matches_type(DCVDelegationUUID, uuid, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/hostnames/settings/test_tls.py b/tests/api_resources/hostnames/settings/test_tls.py index 0d3a91ed60e..36b390abae3 100644 --- a/tests/api_resources/hostnames/settings/test_tls.py +++ b/tests/api_resources/hostnames/settings/test_tls.py @@ -9,11 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.hostnames.settings import ( - TLSGetResponse, - TLSCertificatesAndHostnamesSettingObject, - TLSCertificatesAndHostnamesSettingObjectDelete, -) +from cloudflare.types.hostnames.settings import HostnameStting, TLSGetResponse, HostnameSettingDelete base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,7 +26,7 @@ def test_method_update(self, client: Cloudflare) -> None: setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) + assert_matches_type(HostnameStting, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -45,7 +41,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" tls = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) + assert_matches_type(HostnameStting, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -60,7 +56,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) + assert_matches_type(HostnameStting, tls, path=["response"]) assert cast(Any, response.is_closed) is True @@ -91,7 +87,7 @@ def test_method_delete(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) - assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) + assert_matches_type(HostnameSettingDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +101,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" tls = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) + assert_matches_type(HostnameSettingDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +115,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) + assert_matches_type(HostnameSettingDelete, tls, path=["response"]) assert cast(Any, response.is_closed) is True @@ -199,7 +195,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: setting_id="ciphers", value=["ECDHE-RSA-AES128-GCM-SHA256", "AES128-GCM-SHA256"], ) - assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) + assert_matches_type(HostnameStting, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -214,7 +210,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" tls = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) + assert_matches_type(HostnameStting, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -229,7 +225,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObject, tls, path=["response"]) + assert_matches_type(HostnameStting, tls, path=["response"]) assert cast(Any, response.is_closed) is True @@ -260,7 +256,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", setting_id="ciphers", ) - assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) + assert_matches_type(HostnameSettingDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -274,7 +270,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" tls = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) + assert_matches_type(HostnameSettingDelete, tls, path=["response"]) @pytest.mark.skip() @parametrize @@ -288,7 +284,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" tls = await response.parse() - assert_matches_type(TLSCertificatesAndHostnamesSettingObjectDelete, tls, path=["response"]) + assert_matches_type(HostnameSettingDelete, tls, path=["response"]) assert cast(Any, response.is_closed) is True From f0b49831d42186dc6b187b274e23f2f03907070f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 04:39:35 +0000 Subject: [PATCH 04/16] feat(api): update via SDK Studio (#184) --- api.md | 16 ++--- .../resources/images/v1/variants.py | 36 +++++------ src/cloudflare/types/images/v1/__init__.py | 4 +- .../{image_variant.py => v1_image_variant.py} | 4 +- ...image_variants.py => v1_image_variants.py} | 4 +- .../types/request_tracers/__init__.py | 2 +- ...quest_trace.py => request_tracer_trace.py} | 12 ++-- .../request_tracers/trace_create_response.py | 4 +- .../types/secondary_dns/__init__.py | 1 + .../outgoing_force_notify_response.py | 6 ++ .../api_resources/images/v1/test_variants.py | 60 +++++++++---------- 11 files changed, 78 insertions(+), 71 deletions(-) rename src/cloudflare/types/images/v1/{image_variant.py => v1_image_variant.py} (92%) rename src/cloudflare/types/images/v1/{image_variants.py => v1_image_variants.py} (91%) rename src/cloudflare/types/request_tracers/{request_trace.py => request_tracer_trace.py} (78%) create mode 100644 src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py diff --git a/api.md b/api.md index 8d63267f790..89157bead09 100644 --- a/api.md +++ b/api.md @@ -2389,10 +2389,10 @@ Types: from cloudflare.types.secondary_dns import ( SecondaryDNSDisableTransfer, SecondaryDNSEnableTransfer, - SecondaryDNSForce, OutgoingCreateResponse, OutgoingUpdateResponse, OutgoingDeleteResponse, + OutgoingForceNotifyResponse, OutgoingGetResponse, ) ``` @@ -2404,7 +2404,7 @@ Methods: - client.secondary_dns.outgoing.delete(\*, zone_id) -> OutgoingDeleteResponse - client.secondary_dns.outgoing.disable(\*, zone_id) -> str - client.secondary_dns.outgoing.enable(\*, zone_id) -> str -- client.secondary_dns.outgoing.force_notify(\*, zone_id) -> str +- client.secondary_dns.outgoing.force_notify(\*, zone_id) -> str - client.secondary_dns.outgoing.get(\*, zone_id) -> OutgoingGetResponse ### Status @@ -3515,16 +3515,16 @@ Methods: Types: ```python -from cloudflare.types.images.v1 import ImageVariant, ImageVariants, VariantDeleteResponse +from cloudflare.types.images.v1 import V1ImageVariant, V1ImageVariants, VariantDeleteResponse ``` Methods: -- client.images.v1.variants.create(\*, account_id, \*\*params) -> ImageVariant -- client.images.v1.variants.list(\*, account_id) -> ImageVariants +- client.images.v1.variants.create(\*, account_id, \*\*params) -> V1ImageVariant +- client.images.v1.variants.list(\*, account_id) -> V1ImageVariants - client.images.v1.variants.delete(variant_id, \*, account_id) -> VariantDeleteResponse -- client.images.v1.variants.edit(variant_id, \*, account_id, \*\*params) -> ImageVariant -- client.images.v1.variants.get(variant_id, \*, account_id) -> ImageVariant +- client.images.v1.variants.edit(variant_id, \*, account_id, \*\*params) -> V1ImageVariant +- client.images.v1.variants.get(variant_id, \*, account_id) -> V1ImageVariant ### Blobs @@ -4167,7 +4167,7 @@ Methods: Types: ```python -from cloudflare.types.request_tracers import RequestTrace, TraceCreateResponse +from cloudflare.types.request_tracers import RequestTracerTrace, TraceCreateResponse ``` Methods: diff --git a/src/cloudflare/resources/images/v1/variants.py b/src/cloudflare/resources/images/v1/variants.py index 37e4b167dec..cca0fd68980 100644 --- a/src/cloudflare/resources/images/v1/variants.py +++ b/src/cloudflare/resources/images/v1/variants.py @@ -24,8 +24,8 @@ make_request_options, ) from ....types.images.v1 import ( - ImageVariant, - ImageVariants, + V1ImageVariant, + V1ImageVariants, VariantDeleteResponse, variant_edit_params, variant_create_params, @@ -56,7 +56,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariant: + ) -> V1ImageVariant: """ Specify variants that allow you to resize images for different use cases. @@ -95,7 +95,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), + cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]), ) def list( @@ -108,7 +108,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariants: + ) -> V1ImageVariants: """ Lists existing variants. @@ -134,7 +134,7 @@ def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariants], ResultWrapper[ImageVariants]), + cast_to=cast(Type[V1ImageVariants], ResultWrapper[V1ImageVariants]), ) def delete( @@ -197,7 +197,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariant: + ) -> V1ImageVariant: """ Updating a variant purges the cache for all images associated with the variant. @@ -237,7 +237,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), + cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]), ) def get( @@ -251,7 +251,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariant: + ) -> V1ImageVariant: """ Fetch details for a single variant. @@ -279,7 +279,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), + cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]), ) @@ -305,7 +305,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariant: + ) -> V1ImageVariant: """ Specify variants that allow you to resize images for different use cases. @@ -344,7 +344,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), + cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]), ) async def list( @@ -357,7 +357,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariants: + ) -> V1ImageVariants: """ Lists existing variants. @@ -383,7 +383,7 @@ async def list( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariants], ResultWrapper[ImageVariants]), + cast_to=cast(Type[V1ImageVariants], ResultWrapper[V1ImageVariants]), ) async def delete( @@ -446,7 +446,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ImageVariant: + ) -> V1ImageVariant: """ Updating a variant purges the cache for all images associated with the variant. @@ -486,7 +486,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), + cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]), ) 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, - ) -> ImageVariant: + ) -> V1ImageVariant: """ Fetch details for a single variant. @@ -528,7 +528,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[ImageVariant], ResultWrapper[ImageVariant]), + cast_to=cast(Type[V1ImageVariant], ResultWrapper[V1ImageVariant]), ) diff --git a/src/cloudflare/types/images/v1/__init__.py b/src/cloudflare/types/images/v1/__init__.py index 32d8ab558a2..88b88af4175 100644 --- a/src/cloudflare/types/images/v1/__init__.py +++ b/src/cloudflare/types/images/v1/__init__.py @@ -2,9 +2,9 @@ from __future__ import annotations -from .image_variant import ImageVariant as ImageVariant -from .image_variants import ImageVariants as ImageVariants +from .v1_image_variant import V1ImageVariant as V1ImageVariant from .images_image_keys import ImagesImageKeys as ImagesImageKeys +from .v1_image_variants import V1ImageVariants as V1ImageVariants from .images_images_stats import ImagesImagesStats as ImagesImagesStats from .variant_edit_params import VariantEditParams as VariantEditParams from .variant_create_params import VariantCreateParams as VariantCreateParams diff --git a/src/cloudflare/types/images/v1/image_variant.py b/src/cloudflare/types/images/v1/v1_image_variant.py similarity index 92% rename from src/cloudflare/types/images/v1/image_variant.py rename to src/cloudflare/types/images/v1/v1_image_variant.py index ae5430e6503..adcbc3dd87d 100644 --- a/src/cloudflare/types/images/v1/image_variant.py +++ b/src/cloudflare/types/images/v1/v1_image_variant.py @@ -7,7 +7,7 @@ from ...._models import BaseModel -__all__ = ["ImageVariant", "Variant", "VariantOptions"] +__all__ = ["V1ImageVariant", "Variant", "VariantOptions"] class VariantOptions(BaseModel): @@ -40,5 +40,5 @@ class Variant(BaseModel): """ -class ImageVariant(BaseModel): +class V1ImageVariant(BaseModel): variant: Optional[Variant] = None diff --git a/src/cloudflare/types/images/v1/image_variants.py b/src/cloudflare/types/images/v1/v1_image_variants.py similarity index 91% rename from src/cloudflare/types/images/v1/image_variants.py rename to src/cloudflare/types/images/v1/v1_image_variants.py index 1dc6f1f8573..6d19fc03cf9 100644 --- a/src/cloudflare/types/images/v1/image_variants.py +++ b/src/cloudflare/types/images/v1/v1_image_variants.py @@ -7,7 +7,7 @@ from ...._models import BaseModel -__all__ = ["ImageVariants", "Variants", "VariantsHero", "VariantsHeroOptions"] +__all__ = ["V1ImageVariants", "Variants", "VariantsHero", "VariantsHeroOptions"] class VariantsHeroOptions(BaseModel): @@ -44,5 +44,5 @@ class Variants(BaseModel): hero: Optional[VariantsHero] = None -class ImageVariants(BaseModel): +class V1ImageVariants(BaseModel): variants: Optional[Variants] = None diff --git a/src/cloudflare/types/request_tracers/__init__.py b/src/cloudflare/types/request_tracers/__init__.py index 27e1d8c7f50..fb3abea3227 100644 --- a/src/cloudflare/types/request_tracers/__init__.py +++ b/src/cloudflare/types/request_tracers/__init__.py @@ -2,6 +2,6 @@ from __future__ import annotations -from .request_trace import RequestTrace as RequestTrace from .trace_create_params import TraceCreateParams as TraceCreateParams +from .request_tracer_trace import RequestTracerTrace as RequestTracerTrace from .trace_create_response import TraceCreateResponse as TraceCreateResponse diff --git a/src/cloudflare/types/request_tracers/request_trace.py b/src/cloudflare/types/request_tracers/request_tracer_trace.py similarity index 78% rename from src/cloudflare/types/request_tracers/request_trace.py rename to src/cloudflare/types/request_tracers/request_tracer_trace.py index e93324669fa..e98038cc66d 100644 --- a/src/cloudflare/types/request_tracers/request_trace.py +++ b/src/cloudflare/types/request_tracers/request_tracer_trace.py @@ -7,10 +7,10 @@ from ..._compat import PYDANTIC_V2 from ..._models import BaseModel -__all__ = ["RequestTrace", "RequestTraceItem"] +__all__ = ["RequestTracerTrace", "RequestTracerTraceItem"] -class RequestTraceItem(BaseModel): +class RequestTracerTraceItem(BaseModel): action: Optional[str] = None """If step type is rule, then action performed by this rule""" @@ -35,15 +35,15 @@ class RequestTraceItem(BaseModel): step_name: Optional[str] = None """Tracing step identifying name""" - trace: Optional[RequestTrace] = None + trace: Optional[RequestTracerTrace] = None type: Optional[str] = None """Tracing step type""" -RequestTrace = List[RequestTraceItem] +RequestTracerTrace = List[RequestTracerTraceItem] if PYDANTIC_V2: - RequestTraceItem.model_rebuild() + RequestTracerTraceItem.model_rebuild() else: - RequestTraceItem.update_forward_refs() # type: ignore + RequestTracerTraceItem.update_forward_refs() # type: ignore diff --git a/src/cloudflare/types/request_tracers/trace_create_response.py b/src/cloudflare/types/request_tracers/trace_create_response.py index 95f03348589..2738569266b 100644 --- a/src/cloudflare/types/request_tracers/trace_create_response.py +++ b/src/cloudflare/types/request_tracers/trace_create_response.py @@ -14,10 +14,10 @@ class TraceCreateResponse(BaseModel): status_code: Optional[int] = None """HTTP Status code of zone response""" - trace: Optional["RequestTrace"] = None + trace: Optional["RequestTracerTrace"] = None -from .request_trace import RequestTrace +from .request_tracer_trace import RequestTracerTrace if PYDANTIC_V2: TraceCreateResponse.model_rebuild() diff --git a/src/cloudflare/types/secondary_dns/__init__.py b/src/cloudflare/types/secondary_dns/__init__.py index 69b24dee5eb..06ee64c3d7a 100644 --- a/src/cloudflare/types/secondary_dns/__init__.py +++ b/src/cloudflare/types/secondary_dns/__init__.py @@ -31,4 +31,5 @@ from .outgoing_delete_response import OutgoingDeleteResponse as OutgoingDeleteResponse from .outgoing_update_response import OutgoingUpdateResponse as OutgoingUpdateResponse from .secondary_dns_enable_transfer import SecondaryDNSEnableTransfer as SecondaryDNSEnableTransfer +from .outgoing_force_notify_response import OutgoingForceNotifyResponse as OutgoingForceNotifyResponse from .secondary_dns_disable_transfer import SecondaryDNSDisableTransfer as SecondaryDNSDisableTransfer diff --git a/src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py b/src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py new file mode 100644 index 00000000000..8604fc2e9ec --- /dev/null +++ b/src/cloudflare/types/secondary_dns/outgoing_force_notify_response.py @@ -0,0 +1,6 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + + +__all__ = ["OutgoingForceNotifyResponse"] + +OutgoingForceNotifyResponse = str diff --git a/tests/api_resources/images/v1/test_variants.py b/tests/api_resources/images/v1/test_variants.py index c326575dea3..c1635eadd07 100644 --- a/tests/api_resources/images/v1/test_variants.py +++ b/tests/api_resources/images/v1/test_variants.py @@ -10,8 +10,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types.images.v1 import ( - ImageVariant, - ImageVariants, + V1ImageVariant, + V1ImageVariants, VariantDeleteResponse, ) @@ -34,7 +34,7 @@ def test_method_create(self, client: Cloudflare) -> None: "width": 1366, }, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: }, never_require_signed_urls=True, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -69,7 +69,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" variant = response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +88,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -113,7 +113,7 @@ def test_method_list(self, client: Cloudflare) -> None: variant = client.images.v1.variants.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImageVariants, variant, path=["response"]) + assert_matches_type(V1ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +125,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" variant = response.parse() - assert_matches_type(ImageVariants, variant, path=["response"]) + assert_matches_type(V1ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +137,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(ImageVariants, variant, path=["response"]) + assert_matches_type(V1ImageVariants, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -214,7 +214,7 @@ def test_method_edit(self, client: Cloudflare) -> None: "width": 1366, }, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +230,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: }, never_require_signed_urls=True, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -249,7 +249,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" variant = response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +268,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -306,7 +306,7 @@ def test_method_get(self, client: Cloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +319,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" variant = response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, 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" variant = response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -368,7 +368,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: "width": 1366, }, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare }, never_require_signed_urls=True, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -403,7 +403,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" variant = await response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -422,7 +422,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -447,7 +447,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: variant = await async_client.images.v1.variants.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImageVariants, variant, path=["response"]) + assert_matches_type(V1ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -459,7 +459,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" variant = await response.parse() - assert_matches_type(ImageVariants, variant, path=["response"]) + assert_matches_type(V1ImageVariants, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -471,7 +471,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(ImageVariants, variant, path=["response"]) + assert_matches_type(V1ImageVariants, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -548,7 +548,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None: "width": 1366, }, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -564,7 +564,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) }, never_require_signed_urls=True, ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -583,7 +583,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" variant = await response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +602,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True @@ -640,7 +640,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -653,7 +653,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" variant = await response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) @pytest.mark.skip() @parametrize @@ -666,7 +666,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" variant = await response.parse() - assert_matches_type(ImageVariant, variant, path=["response"]) + assert_matches_type(V1ImageVariant, variant, path=["response"]) assert cast(Any, response.is_closed) is True From 2df49c12d18c610d41497c56013f4e4eb9e0124b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 04:44:47 +0000 Subject: [PATCH 05/16] feat(api): update via SDK Studio (#185) --- api.md | 2 +- src/cloudflare/pagination.py | 25 ++++++++++++++++++- .../types/request_tracers/__init__.py | 2 +- .../{request_tracer_trace.py => trace.py} | 12 ++++----- .../request_tracers/trace_create_response.py | 4 +-- 5 files changed, 34 insertions(+), 11 deletions(-) rename src/cloudflare/types/request_tracers/{request_tracer_trace.py => trace.py} (78%) diff --git a/api.md b/api.md index 89157bead09..40f7e23ef80 100644 --- a/api.md +++ b/api.md @@ -4167,7 +4167,7 @@ Methods: Types: ```python -from cloudflare.types.request_tracers import RequestTracerTrace, TraceCreateResponse +from cloudflare.types.request_tracers import Trace, TraceCreateResponse ``` Methods: diff --git a/src/cloudflare/pagination.py b/src/cloudflare/pagination.py index 5f6aecf9f92..7382cf23d68 100644 --- a/src/cloudflare/pagination.py +++ b/src/cloudflare/pagination.py @@ -1,8 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Generic, TypeVar, Optional, cast +from typing import Any, List, Type, Generic, Mapping, TypeVar, Optional, cast from typing_extensions import override +from httpx import Response + +from ._utils import is_mapping from ._models import BaseModel, GenericModel from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage @@ -24,6 +27,8 @@ "AsyncSinglePage", ] +_BaseModelT = TypeVar("_BaseModelT", bound=BaseModel) + _T = TypeVar("_T") @@ -269,6 +274,15 @@ def next_page_info(self) -> None: """ return None + @classmethod + def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 + return cls.construct( + None, + **{ + **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), + }, + ) + class AsyncSinglePage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): items: List[_T] @@ -287,3 +301,12 @@ def next_page_info(self) -> None: so there will never be a next page. """ return None + + @classmethod + def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 + return cls.construct( + None, + **{ + **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), + }, + ) diff --git a/src/cloudflare/types/request_tracers/__init__.py b/src/cloudflare/types/request_tracers/__init__.py index fb3abea3227..a1d489d78fa 100644 --- a/src/cloudflare/types/request_tracers/__init__.py +++ b/src/cloudflare/types/request_tracers/__init__.py @@ -2,6 +2,6 @@ from __future__ import annotations +from .trace import Trace as Trace from .trace_create_params import TraceCreateParams as TraceCreateParams -from .request_tracer_trace import RequestTracerTrace as RequestTracerTrace from .trace_create_response import TraceCreateResponse as TraceCreateResponse diff --git a/src/cloudflare/types/request_tracers/request_tracer_trace.py b/src/cloudflare/types/request_tracers/trace.py similarity index 78% rename from src/cloudflare/types/request_tracers/request_tracer_trace.py rename to src/cloudflare/types/request_tracers/trace.py index e98038cc66d..32e14ff128c 100644 --- a/src/cloudflare/types/request_tracers/request_tracer_trace.py +++ b/src/cloudflare/types/request_tracers/trace.py @@ -7,10 +7,10 @@ from ..._compat import PYDANTIC_V2 from ..._models import BaseModel -__all__ = ["RequestTracerTrace", "RequestTracerTraceItem"] +__all__ = ["Trace", "TraceItem"] -class RequestTracerTraceItem(BaseModel): +class TraceItem(BaseModel): action: Optional[str] = None """If step type is rule, then action performed by this rule""" @@ -35,15 +35,15 @@ class RequestTracerTraceItem(BaseModel): step_name: Optional[str] = None """Tracing step identifying name""" - trace: Optional[RequestTracerTrace] = None + trace: Optional[Trace] = None type: Optional[str] = None """Tracing step type""" -RequestTracerTrace = List[RequestTracerTraceItem] +Trace = List[TraceItem] if PYDANTIC_V2: - RequestTracerTraceItem.model_rebuild() + TraceItem.model_rebuild() else: - RequestTracerTraceItem.update_forward_refs() # type: ignore + TraceItem.update_forward_refs() # type: ignore diff --git a/src/cloudflare/types/request_tracers/trace_create_response.py b/src/cloudflare/types/request_tracers/trace_create_response.py index 2738569266b..3e72c080e9a 100644 --- a/src/cloudflare/types/request_tracers/trace_create_response.py +++ b/src/cloudflare/types/request_tracers/trace_create_response.py @@ -14,10 +14,10 @@ class TraceCreateResponse(BaseModel): status_code: Optional[int] = None """HTTP Status code of zone response""" - trace: Optional["RequestTracerTrace"] = None + trace: Optional["Trace"] = None -from .request_tracer_trace import RequestTracerTrace +from .trace import Trace if PYDANTIC_V2: TraceCreateResponse.model_rebuild() From c2435a8988667dbfb08810f26507cd2f21a7faf2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 05:01:35 +0000 Subject: [PATCH 06/16] feat(api): update via SDK Studio (#186) --- api.md | 4 +- .../resources/zones/settings/__init__.py | 24 +++++----- .../resources/zones/settings/advanced_ddos.py | 48 +++++++++---------- .../resources/zones/settings/settings.py | 36 +++++++------- .../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 | 4 +- .../settings/zone_setting_advanced_ddos.py | 4 +- .../zone_setting_advanced_ddos_param.py | 4 +- .../zones/settings/test_advanced_ddos.py | 18 +++---- 11 files changed, 77 insertions(+), 77 deletions(-) diff --git a/api.md b/api.md index 40f7e23ef80..c6ef7011bf4 100644 --- a/api.md +++ b/api.md @@ -422,12 +422,12 @@ Methods: - client.zones.settings.zero_rtt.edit(\*, zone_id, \*\*params) -> Optional - client.zones.settings.zero_rtt.get(\*, zone_id) -> Optional -### AdvancedDDOS +### AdvancedDDoS Types: ```python -from cloudflare.types.zones.settings import ZoneSettingAdvancedDDOS +from cloudflare.types.zones.settings import ZoneSettingAdvancedDDoS ``` Methods: diff --git a/src/cloudflare/resources/zones/settings/__init__.py b/src/cloudflare/resources/zones/settings/__init__.py index 2757eb7e695..95ca89ea01b 100644 --- a/src/cloudflare/resources/zones/settings/__init__.py +++ b/src/cloudflare/resources/zones/settings/__init__.py @@ -153,12 +153,12 @@ AsyncPseudoIPV4WithStreamingResponse, ) from .advanced_ddos import ( - AdvancedDDOS, - AsyncAdvancedDDOS, - AdvancedDDOSWithRawResponse, - AsyncAdvancedDDOSWithRawResponse, - AdvancedDDOSWithStreamingResponse, - AsyncAdvancedDDOSWithStreamingResponse, + AdvancedDDoS, + AsyncAdvancedDDoS, + AdvancedDDoSWithRawResponse, + AsyncAdvancedDDoSWithRawResponse, + AdvancedDDoSWithStreamingResponse, + AsyncAdvancedDDoSWithStreamingResponse, ) from .always_online import ( AlwaysOnline, @@ -424,12 +424,12 @@ "AsyncZeroRTTWithRawResponse", "ZeroRTTWithStreamingResponse", "AsyncZeroRTTWithStreamingResponse", - "AdvancedDDOS", - "AsyncAdvancedDDOS", - "AdvancedDDOSWithRawResponse", - "AsyncAdvancedDDOSWithRawResponse", - "AdvancedDDOSWithStreamingResponse", - "AsyncAdvancedDDOSWithStreamingResponse", + "AdvancedDDoS", + "AsyncAdvancedDDoS", + "AdvancedDDoSWithRawResponse", + "AsyncAdvancedDDoSWithRawResponse", + "AdvancedDDoSWithStreamingResponse", + "AsyncAdvancedDDoSWithStreamingResponse", "AlwaysOnline", "AsyncAlwaysOnline", "AlwaysOnlineWithRawResponse", diff --git a/src/cloudflare/resources/zones/settings/advanced_ddos.py b/src/cloudflare/resources/zones/settings/advanced_ddos.py index 132ee89a02b..824148d44d0 100644 --- a/src/cloudflare/resources/zones/settings/advanced_ddos.py +++ b/src/cloudflare/resources/zones/settings/advanced_ddos.py @@ -19,19 +19,19 @@ from ...._base_client import ( make_request_options, ) -from ....types.zones.settings import ZoneSettingAdvancedDDOS +from ....types.zones.settings import ZoneSettingAdvancedDDoS -__all__ = ["AdvancedDDOS", "AsyncAdvancedDDOS"] +__all__ = ["AdvancedDDoS", "AsyncAdvancedDDoS"] -class AdvancedDDOS(SyncAPIResource): +class AdvancedDDoS(SyncAPIResource): @cached_property - def with_raw_response(self) -> AdvancedDDOSWithRawResponse: - return AdvancedDDOSWithRawResponse(self) + def with_raw_response(self) -> AdvancedDDoSWithRawResponse: + return AdvancedDDoSWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AdvancedDDOSWithStreamingResponse: - return AdvancedDDOSWithStreamingResponse(self) + def with_streaming_response(self) -> AdvancedDDoSWithStreamingResponse: + return AdvancedDDoSWithStreamingResponse(self) def get( self, @@ -43,7 +43,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneSettingAdvancedDDOS]: + ) -> Optional[ZoneSettingAdvancedDDoS]: """ Advanced protection from Distributed Denial of Service (DDoS) attacks on your website. This is an uneditable value that is 'on' in the case of Business and @@ -71,18 +71,18 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneSettingAdvancedDDOS]], ResultWrapper[ZoneSettingAdvancedDDOS]), + cast_to=cast(Type[Optional[ZoneSettingAdvancedDDoS]], ResultWrapper[ZoneSettingAdvancedDDoS]), ) -class AsyncAdvancedDDOS(AsyncAPIResource): +class AsyncAdvancedDDoS(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAdvancedDDOSWithRawResponse: - return AsyncAdvancedDDOSWithRawResponse(self) + def with_raw_response(self) -> AsyncAdvancedDDoSWithRawResponse: + return AsyncAdvancedDDoSWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAdvancedDDOSWithStreamingResponse: - return AsyncAdvancedDDOSWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAdvancedDDoSWithStreamingResponse: + return AsyncAdvancedDDoSWithStreamingResponse(self) async def get( self, @@ -94,7 +94,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ZoneSettingAdvancedDDOS]: + ) -> Optional[ZoneSettingAdvancedDDoS]: """ Advanced protection from Distributed Denial of Service (DDoS) attacks on your website. This is an uneditable value that is 'on' in the case of Business and @@ -122,12 +122,12 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ZoneSettingAdvancedDDOS]], ResultWrapper[ZoneSettingAdvancedDDOS]), + cast_to=cast(Type[Optional[ZoneSettingAdvancedDDoS]], ResultWrapper[ZoneSettingAdvancedDDoS]), ) -class AdvancedDDOSWithRawResponse: - def __init__(self, advanced_ddos: AdvancedDDOS) -> None: +class AdvancedDDoSWithRawResponse: + def __init__(self, advanced_ddos: AdvancedDDoS) -> None: self._advanced_ddos = advanced_ddos self.get = to_raw_response_wrapper( @@ -135,8 +135,8 @@ def __init__(self, advanced_ddos: AdvancedDDOS) -> None: ) -class AsyncAdvancedDDOSWithRawResponse: - def __init__(self, advanced_ddos: AsyncAdvancedDDOS) -> None: +class AsyncAdvancedDDoSWithRawResponse: + def __init__(self, advanced_ddos: AsyncAdvancedDDoS) -> None: self._advanced_ddos = advanced_ddos self.get = async_to_raw_response_wrapper( @@ -144,8 +144,8 @@ def __init__(self, advanced_ddos: AsyncAdvancedDDOS) -> None: ) -class AdvancedDDOSWithStreamingResponse: - def __init__(self, advanced_ddos: AdvancedDDOS) -> None: +class AdvancedDDoSWithStreamingResponse: + def __init__(self, advanced_ddos: AdvancedDDoS) -> None: self._advanced_ddos = advanced_ddos self.get = to_streamed_response_wrapper( @@ -153,8 +153,8 @@ def __init__(self, advanced_ddos: AdvancedDDOS) -> None: ) -class AsyncAdvancedDDOSWithStreamingResponse: - def __init__(self, advanced_ddos: AsyncAdvancedDDOS) -> None: +class AsyncAdvancedDDoSWithStreamingResponse: + def __init__(self, advanced_ddos: AsyncAdvancedDDoS) -> None: self._advanced_ddos = advanced_ddos self.get = async_to_streamed_response_wrapper( diff --git a/src/cloudflare/resources/zones/settings/settings.py b/src/cloudflare/resources/zones/settings/settings.py index cd42d6e7010..10df9fed82b 100644 --- a/src/cloudflare/resources/zones/settings/settings.py +++ b/src/cloudflare/resources/zones/settings/settings.py @@ -165,12 +165,12 @@ ) from ...._wrappers import ResultWrapper from .advanced_ddos import ( - AdvancedDDOS, - AsyncAdvancedDDOS, - AdvancedDDOSWithRawResponse, - AsyncAdvancedDDOSWithRawResponse, - AdvancedDDOSWithStreamingResponse, - AsyncAdvancedDDOSWithStreamingResponse, + AdvancedDDoS, + AsyncAdvancedDDoS, + AdvancedDDoSWithRawResponse, + AsyncAdvancedDDoSWithRawResponse, + AdvancedDDoSWithStreamingResponse, + AsyncAdvancedDDoSWithStreamingResponse, ) from .always_online import ( AlwaysOnline, @@ -442,8 +442,8 @@ def zero_rtt(self) -> ZeroRTT: return ZeroRTT(self._client) @cached_property - def advanced_ddos(self) -> AdvancedDDOS: - return AdvancedDDOS(self._client) + def advanced_ddos(self) -> AdvancedDDoS: + return AdvancedDDoS(self._client) @cached_property def always_online(self) -> AlwaysOnline: @@ -738,8 +738,8 @@ def zero_rtt(self) -> AsyncZeroRTT: return AsyncZeroRTT(self._client) @cached_property - def advanced_ddos(self) -> AsyncAdvancedDDOS: - return AsyncAdvancedDDOS(self._client) + def advanced_ddos(self) -> AsyncAdvancedDDoS: + return AsyncAdvancedDDoS(self._client) @cached_property def always_online(self) -> AsyncAlwaysOnline: @@ -1044,8 +1044,8 @@ def zero_rtt(self) -> ZeroRTTWithRawResponse: return ZeroRTTWithRawResponse(self._settings.zero_rtt) @cached_property - def advanced_ddos(self) -> AdvancedDDOSWithRawResponse: - return AdvancedDDOSWithRawResponse(self._settings.advanced_ddos) + def advanced_ddos(self) -> AdvancedDDoSWithRawResponse: + return AdvancedDDoSWithRawResponse(self._settings.advanced_ddos) @cached_property def always_online(self) -> AlwaysOnlineWithRawResponse: @@ -1260,8 +1260,8 @@ def zero_rtt(self) -> AsyncZeroRTTWithRawResponse: return AsyncZeroRTTWithRawResponse(self._settings.zero_rtt) @cached_property - def advanced_ddos(self) -> AsyncAdvancedDDOSWithRawResponse: - return AsyncAdvancedDDOSWithRawResponse(self._settings.advanced_ddos) + def advanced_ddos(self) -> AsyncAdvancedDDoSWithRawResponse: + return AsyncAdvancedDDoSWithRawResponse(self._settings.advanced_ddos) @cached_property def always_online(self) -> AsyncAlwaysOnlineWithRawResponse: @@ -1476,8 +1476,8 @@ def zero_rtt(self) -> ZeroRTTWithStreamingResponse: return ZeroRTTWithStreamingResponse(self._settings.zero_rtt) @cached_property - def advanced_ddos(self) -> AdvancedDDOSWithStreamingResponse: - return AdvancedDDOSWithStreamingResponse(self._settings.advanced_ddos) + def advanced_ddos(self) -> AdvancedDDoSWithStreamingResponse: + return AdvancedDDoSWithStreamingResponse(self._settings.advanced_ddos) @cached_property def always_online(self) -> AlwaysOnlineWithStreamingResponse: @@ -1692,8 +1692,8 @@ def zero_rtt(self) -> AsyncZeroRTTWithStreamingResponse: return AsyncZeroRTTWithStreamingResponse(self._settings.zero_rtt) @cached_property - def advanced_ddos(self) -> AsyncAdvancedDDOSWithStreamingResponse: - return AsyncAdvancedDDOSWithStreamingResponse(self._settings.advanced_ddos) + def advanced_ddos(self) -> AsyncAdvancedDDoSWithStreamingResponse: + return AsyncAdvancedDDoSWithStreamingResponse(self._settings.advanced_ddos) @cached_property def always_online(self) -> AsyncAlwaysOnlineWithStreamingResponse: diff --git a/src/cloudflare/types/zones/setting_edit_params.py b/src/cloudflare/types/zones/setting_edit_params.py index 48337d7b449..cf0c7c0befe 100644 --- a/src/cloudflare/types/zones/setting_edit_params.py +++ b/src/cloudflare/types/zones/setting_edit_params.py @@ -25,7 +25,7 @@ ZoneSettingEarlyHintsParam, ZoneSettingPseudoIPV4Param, ZoneSettingWebsocketsParam, - ZoneSettingAdvancedDDOSParam, + ZoneSettingAdvancedDDoSParam, ZoneSettingAlwaysOnlineParam, ZoneSettingBrowserCheckParam, ZoneSettingChallengeTTLParam, @@ -151,7 +151,7 @@ class ItemZonesTLS1_2Only(TypedDict, total=False): Item = Union[ ZoneSetting0rttParam, - ZoneSettingAdvancedDDOSParam, + ZoneSettingAdvancedDDoSParam, ZoneSettingAlwaysOnlineParam, ZoneSettingAlwaysUseHTTPSParam, ZoneSettingAutomaticHTTPSRewritesParam, diff --git a/src/cloudflare/types/zones/setting_edit_response.py b/src/cloudflare/types/zones/setting_edit_response.py index b2935263c54..28cc6aa5e87 100644 --- a/src/cloudflare/types/zones/setting_edit_response.py +++ b/src/cloudflare/types/zones/setting_edit_response.py @@ -24,7 +24,7 @@ ZoneSettingEarlyHints, ZoneSettingPseudoIPV4, ZoneSettingWebsockets, - ZoneSettingAdvancedDDOS, + ZoneSettingAdvancedDDoS, ZoneSettingAlwaysOnline, ZoneSettingBrowserCheck, ZoneSettingChallengeTTL, @@ -195,7 +195,7 @@ class SettingEditResponseItemZonesTLS1_2Only(BaseModel): SettingEditResponseItem = Union[ ZoneSetting0rtt, - ZoneSettingAdvancedDDOS, + ZoneSettingAdvancedDDoS, ZoneSettingAlwaysOnline, ZoneSettingAlwaysUseHTTPS, ZoneSettingAutomaticHTTPSRewrites, diff --git a/src/cloudflare/types/zones/setting_get_response.py b/src/cloudflare/types/zones/setting_get_response.py index 24a19873b63..f4d66ec4769 100644 --- a/src/cloudflare/types/zones/setting_get_response.py +++ b/src/cloudflare/types/zones/setting_get_response.py @@ -24,7 +24,7 @@ ZoneSettingEarlyHints, ZoneSettingPseudoIPV4, ZoneSettingWebsockets, - ZoneSettingAdvancedDDOS, + ZoneSettingAdvancedDDoS, ZoneSettingAlwaysOnline, ZoneSettingBrowserCheck, ZoneSettingChallengeTTL, @@ -195,7 +195,7 @@ class SettingGetResponseItemZonesTLS1_2Only(BaseModel): SettingGetResponseItem = Union[ ZoneSetting0rtt, - ZoneSettingAdvancedDDOS, + ZoneSettingAdvancedDDoS, ZoneSettingAlwaysOnline, ZoneSettingAlwaysUseHTTPS, ZoneSettingAutomaticHTTPSRewrites, diff --git a/src/cloudflare/types/zones/settings/__init__.py b/src/cloudflare/types/zones/settings/__init__.py index 8fb435e00d7..b52ab846052 100644 --- a/src/cloudflare/types/zones/settings/__init__.py +++ b/src/cloudflare/types/zones/settings/__init__.py @@ -60,7 +60,7 @@ from .image_resizing_edit_params import ImageResizingEditParams as ImageResizingEditParams from .ip_geolocation_edit_params import IPGeolocationEditParams as IPGeolocationEditParams from .security_level_edit_params import SecurityLevelEditParams as SecurityLevelEditParams -from .zone_setting_advanced_ddos import ZoneSettingAdvancedDDOS as ZoneSettingAdvancedDDOS +from .zone_setting_advanced_ddos import ZoneSettingAdvancedDDoS as ZoneSettingAdvancedDDoS from .zone_setting_always_online import ZoneSettingAlwaysOnline as ZoneSettingAlwaysOnline from .zone_setting_browser_check import ZoneSettingBrowserCheck as ZoneSettingBrowserCheck from .zone_setting_challenge_ttl import ZoneSettingChallengeTTL as ZoneSettingChallengeTTL @@ -106,7 +106,7 @@ from .server_side_exclude_edit_params import ServerSideExcludeEditParams as ServerSideExcludeEditParams from .zone_setting_hotlink_protection import ZoneSettingHotlinkProtection as ZoneSettingHotlinkProtection from .zone_setting_proxy_read_timeout import ZoneSettingProxyReadTimeout as ZoneSettingProxyReadTimeout -from .zone_setting_advanced_ddos_param import ZoneSettingAdvancedDDOSParam as ZoneSettingAdvancedDDOSParam +from .zone_setting_advanced_ddos_param import ZoneSettingAdvancedDDoSParam as ZoneSettingAdvancedDDoSParam from .zone_setting_always_online_param import ZoneSettingAlwaysOnlineParam as ZoneSettingAlwaysOnlineParam from .zone_setting_browser_check_param import ZoneSettingBrowserCheckParam as ZoneSettingBrowserCheckParam from .zone_setting_challenge_ttl_param import ZoneSettingChallengeTTLParam as ZoneSettingChallengeTTLParam diff --git a/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py index aaebab81f32..ea88edd4793 100644 --- a/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py +++ b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["ZoneSettingAdvancedDDOS"] +__all__ = ["ZoneSettingAdvancedDDoS"] -class ZoneSettingAdvancedDDOS(BaseModel): +class ZoneSettingAdvancedDDoS(BaseModel): id: Literal["advanced_ddos"] """ID of the zone setting.""" diff --git a/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py index d928f35a454..508516ae76d 100644 --- a/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py +++ b/src/cloudflare/types/zones/settings/zone_setting_advanced_ddos_param.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ZoneSettingAdvancedDDOSParam"] +__all__ = ["ZoneSettingAdvancedDDoSParam"] -class ZoneSettingAdvancedDDOSParam(TypedDict, total=False): +class ZoneSettingAdvancedDDoSParam(TypedDict, total=False): id: Required[Literal["advanced_ddos"]] """ID of the zone setting.""" diff --git a/tests/api_resources/zones/settings/test_advanced_ddos.py b/tests/api_resources/zones/settings/test_advanced_ddos.py index b2093a38e88..891653faed3 100644 --- a/tests/api_resources/zones/settings/test_advanced_ddos.py +++ b/tests/api_resources/zones/settings/test_advanced_ddos.py @@ -9,12 +9,12 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zones.settings import ZoneSettingAdvancedDDOS +from cloudflare.types.zones.settings import ZoneSettingAdvancedDDoS base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestAdvancedDDOS: +class TestAdvancedDDoS: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @pytest.mark.skip() @@ -23,7 +23,7 @@ def test_method_get(self, client: Cloudflare) -> None: advanced_ddos = client.zones.settings.advanced_ddos.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDoS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +35,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" advanced_ddos = response.parse() - assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDoS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +47,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = response.parse() - assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDoS], advanced_ddos, path=["response"]) assert cast(Any, response.is_closed) is True @@ -60,7 +60,7 @@ def test_path_params_get(self, client: Cloudflare) -> None: ) -class TestAsyncAdvancedDDOS: +class TestAsyncAdvancedDDoS: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @pytest.mark.skip() @@ -69,7 +69,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: advanced_ddos = await async_client.zones.settings.advanced_ddos.get( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDoS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +81,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" advanced_ddos = await response.parse() - assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDoS], advanced_ddos, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" advanced_ddos = await response.parse() - assert_matches_type(Optional[ZoneSettingAdvancedDDOS], advanced_ddos, path=["response"]) + assert_matches_type(Optional[ZoneSettingAdvancedDDoS], advanced_ddos, path=["response"]) assert cast(Any, response.is_closed) is True From 16b6e68d27670f443c9cd01c65a6006e839db8a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 05:56:20 +0000 Subject: [PATCH 07/16] feat(api): update via SDK Studio (#187) --- api.md | 407 +++++++----------- src/cloudflare/pagination.py | 41 +- src/cloudflare/resources/accounts/roles.py | 34 +- .../addressing/address_maps/address_maps.py | 31 +- .../addressing/prefixes/bgp/bindings.py | 37 +- .../addressing/prefixes/bgp/prefixes.py | 34 +- .../addressing/prefixes/delegations.py | 39 +- .../resources/addressing/prefixes/prefixes.py | 38 +- .../resources/addressing/services.py | 33 +- .../alerting/destinations/webhooks.py | 31 +- src/cloudflare/resources/alerting/policies.py | 31 +- src/cloudflare/resources/calls.py | 38 +- .../durable_objects/namespaces/namespaces.py | 35 +- .../resources/healthchecks/healthchecks.py | 31 +- .../resources/hyperdrive/configs.py | 30 +- .../intel/indicator_feeds/indicator_feeds.py | 30 +- src/cloudflare/resources/intel/sinkholes.py | 35 +- .../resources/keyless_certificates.py | 33 +- .../load_balancers/load_balancers.py | 33 +- .../load_balancers/monitors/monitors.py | 33 +- .../resources/load_balancers/pools/pools.py | 23 +- src/cloudflare/resources/logpush/jobs.py | 32 +- .../magic_network_monitoring/rules/rules.py | 32 +- .../mtls_certificates/mtls_certificates.py | 39 +- .../resources/origin_ca_certificates.py | 38 +- .../hostnames/certificates.py | 39 +- .../origin_tls_client_auth.py | 36 +- .../resources/page_shield/connections.py | 31 +- .../resources/page_shield/policies.py | 34 +- .../resources/page_shield/scripts.py | 31 +- .../pages/projects/deployments/deployments.py | 24 +- .../resources/pages/projects/domains.py | 40 +- .../resources/pages/projects/projects.py | 32 +- src/cloudflare/resources/pcaps/pcaps.py | 32 +- src/cloudflare/resources/plans.py | 34 +- src/cloudflare/resources/queues/queues.py | 30 +- src/cloudflare/resources/registrar/domains.py | 32 +- src/cloudflare/resources/rules/lists/lists.py | 32 +- .../resources/rulesets/phases/versions.py | 33 +- src/cloudflare/resources/rulesets/rulesets.py | 32 +- .../resources/rulesets/versions/versions.py | 33 +- .../resources/secondary_dns/acls.py | 40 +- .../resources/secondary_dns/peers.py | 40 +- .../resources/secondary_dns/tsigs.py | 40 +- src/cloudflare/resources/snippets/rules.py | 30 +- src/cloudflare/resources/snippets/snippets.py | 32 +- src/cloudflare/resources/speed/pages.py | 33 +- .../certificate_packs/certificate_packs.py | 32 +- .../resources/stream/live_inputs/outputs.py | 32 +- src/cloudflare/resources/stream/stream.py | 29 +- src/cloudflare/resources/stream/watermarks.py | 34 +- src/cloudflare/resources/subscriptions.py | 32 +- src/cloudflare/resources/user/invites.py | 32 +- .../user/load_balancers/analytics/events.py | 32 +- .../resources/user/load_balancers/monitors.py | 31 +- .../resources/user/load_balancers/pools.py | 23 +- .../user/tokens/permission_groups.py | 34 +- src/cloudflare/resources/vectorize/indexes.py | 31 +- .../resources/waiting_rooms/events/events.py | 31 +- .../resources/waiting_rooms/rules.py | 32 +- .../resources/waiting_rooms/waiting_rooms.py | 33 +- .../resources/web3/hostnames/hostnames.py | 38 +- src/cloudflare/resources/workers/domains.py | 24 +- src/cloudflare/resources/workers/filters.py | 31 +- src/cloudflare/resources/workers/routes.py | 31 +- .../resources/workers/scripts/scripts.py | 32 +- .../dispatch/namespaces/namespaces.py | 30 +- .../access/applications/applications.py | 33 +- .../zero_trust/access/applications/cas.py | 34 +- .../access/applications/policies.py | 33 +- .../resources/zero_trust/access/bookmarks.py | 34 +- .../access/certificates/certificates.py | 33 +- .../zero_trust/access/custom_pages.py | 33 +- .../resources/zero_trust/access/groups.py | 40 +- .../zero_trust/access/service_tokens.py | 33 +- .../resources/zero_trust/access/tags.py | 40 +- .../access/users/active_sessions.py | 32 +- .../zero_trust/access/users/failed_logins.py | 33 +- .../zero_trust/access/users/users.py | 35 +- .../resources/zero_trust/devices/devices.py | 34 +- .../resources/zero_trust/devices/dex_tests.py | 31 +- .../resources/zero_trust/devices/networks.py | 31 +- .../zero_trust/devices/policies/excludes.py | 32 +- .../devices/policies/fallback_domains.py | 32 +- .../zero_trust/devices/policies/includes.py | 32 +- .../zero_trust/devices/policies/policies.py | 31 +- .../devices/posture/integrations.py | 31 +- .../zero_trust/devices/posture/posture.py | 31 +- .../resources/zero_trust/dex/colos.py | 31 +- .../zero_trust/dlp/datasets/datasets.py | 38 +- .../zero_trust/dlp/profiles/profiles.py | 34 +- .../resources/zero_trust/gateway/app_types.py | 39 +- .../zero_trust/gateway/categories.py | 35 +- .../zero_trust/gateway/lists/items.py | 33 +- .../zero_trust/gateway/lists/lists.py | 33 +- .../resources/zero_trust/gateway/locations.py | 33 +- .../zero_trust/gateway/proxy_endpoints.py | 33 +- .../resources/zero_trust/gateway/rules.py | 33 +- .../zero_trust/identity_providers.py | 36 +- .../zero_trust/networks/virtual_networks.py | 26 +- .../resources/zones/subscriptions.py | 32 +- src/cloudflare/types/__init__.py | 11 +- src/cloudflare/types/accounts/__init__.py | 1 - .../types/accounts/role_list_response.py | 9 - src/cloudflare/types/addressing/__init__.py | 2 - .../addressing/address_map_list_response.py | 9 - .../types/addressing/prefix_list_response.py | 9 - .../types/addressing/prefixes/__init__.py | 1 - .../types/addressing/prefixes/bgp/__init__.py | 2 - .../prefixes/bgp/binding_list_response.py | 9 - .../prefixes/bgp/prefix_list_response.py | 9 - .../prefixes/delegation_list_response.py | 9 - .../types/addressing/service_list_response.py | 9 +- src/cloudflare/types/alerting/__init__.py | 1 - .../types/alerting/destinations/__init__.py | 1 - .../destinations/webhook_list_response.py | 9 - .../types/alerting/policy_list_response.py | 9 - src/cloudflare/types/call_list_response.py | 9 - .../types/durable_objects/__init__.py | 1 - .../namespace_list_response.py | 9 - .../types/healthcheck_list_response.py | 9 - .../types/hyperdrive/config_list_response.py | 9 +- src/cloudflare/types/intel/__init__.py | 1 - .../intel/indicator_feed_list_response.py | 9 +- .../types/intel/sinkhole_list_response.py | 9 - .../keyless_certificate_list_response.py | 9 - .../types/load_balancer_list_response.py | 9 - .../types/load_balancers/__init__.py | 2 - .../load_balancers/monitor_list_response.py | 9 - .../load_balancers/pool_list_response.py | 9 - src/cloudflare/types/logpush/__init__.py | 1 - .../types/logpush/job_list_response.py | 9 - .../magic_network_monitoring/__init__.py | 1 - .../rule_list_response.py | 9 - .../types/mtls_certificate_list_response.py | 9 - .../origin_ca_certificate_list_response.py | 9 - .../hostnames/__init__.py | 1 - .../hostnames/certificate_list_response.py | 9 - .../origin_tls_client_auth_list_response.py | 9 +- src/cloudflare/types/page_shield/__init__.py | 3 - .../page_shield/connection_list_response.py | 9 - .../types/page_shield/policy_list_response.py | 9 - .../types/page_shield/script_list_response.py | 9 - src/cloudflare/types/pages/__init__.py | 1 - .../types/pages/project_list_response.py | 9 - .../types/pages/projects/__init__.py | 2 - .../projects/deployment_list_response.py | 9 - .../pages/projects/domain_list_response.py | 7 - src/cloudflare/types/pcap_list_response.py | 29 +- src/cloudflare/types/plan_list_response.py | 9 - src/cloudflare/types/queue_list_response.py | 9 +- .../types/registrar/domain_list_response.py | 22 +- src/cloudflare/types/rules/__init__.py | 1 - .../types/rules/list_list_response.py | 9 - src/cloudflare/types/ruleset_list_response.py | 56 +++ src/cloudflare/types/rulesets/__init__.py | 1 + .../types/rulesets/phases/__init__.py | 2 + .../rulesets/phases/version_list_response.py | 56 +++ .../types/rulesets/version_list_response.py | 56 +++ .../types/secondary_dns/__init__.py | 3 - .../types/secondary_dns/acl_list_response.py | 9 - .../types/secondary_dns/peer_list_response.py | 9 - .../types/secondary_dns/tsig_list_response.py | 9 - src/cloudflare/types/snippet_list_response.py | 9 - .../types/snippets/rule_list_response.py | 9 +- .../types/speed/page_list_response.py | 11 +- src/cloudflare/types/ssl/__init__.py | 1 - .../ssl/certificate_pack_list_response.py | 7 - src/cloudflare/types/stream/__init__.py | 1 - .../types/stream/live_inputs/__init__.py | 1 - .../live_inputs/output_list_response.py | 9 - .../types/stream/watermark_list_response.py | 9 - src/cloudflare/types/stream_list_response.py | 9 - .../types/subscription_list_response.py | 30 +- .../types/user/invite_list_response.py | 7 +- .../types/user/load_balancers/__init__.py | 2 - .../user/load_balancers/analytics/__init__.py | 1 - .../analytics/event_list_response.py | 9 - .../load_balancers/monitor_list_response.py | 9 - .../user/load_balancers/pool_list_response.py | 9 - src/cloudflare/types/user/tokens/__init__.py | 1 - .../tokens/permission_group_list_response.py | 7 - src/cloudflare/types/vectorize/__init__.py | 1 - .../types/vectorize/index_list_response.py | 9 - .../types/waiting_room_list_response.py | 9 - .../types/waiting_rooms/__init__.py | 2 - .../waiting_rooms/event_list_response.py | 9 - .../types/waiting_rooms/rule_list_response.py | 9 - src/cloudflare/types/web3/__init__.py | 1 - .../types/web3/hostname_list_response.py | 9 - src/cloudflare/types/workers/__init__.py | 4 - .../types/workers/domain_list_response.py | 9 - .../types/workers/filter_list_response.py | 9 - .../types/workers/route_list_response.py | 9 - .../types/workers/script_list_response.py | 9 - .../dispatch/namespace_list_response.py | 9 +- src/cloudflare/types/zero_trust/__init__.py | 1 - .../types/zero_trust/access/__init__.py | 8 - .../access/application_list_response.py | 9 - .../access/applications/__init__.py | 2 - .../access/applications/ca_list_response.py | 9 - .../applications/policy_list_response.py | 9 - .../access/bookmark_list_response.py | 9 - .../access/certificate_list_response.py | 9 - .../access/custom_page_list_response.py | 9 - .../zero_trust/access/group_list_response.py | 9 - .../access/service_token_list_response.py | 9 - .../zero_trust/access/tag_list_response.py | 9 - .../zero_trust/access/user_list_response.py | 9 - .../users/active_session_list_response.py | 22 +- .../users/failed_login_list_response.py | 9 +- .../types/zero_trust/device_list_response.py | 9 - .../types/zero_trust/devices/__init__.py | 4 - .../devices/dex_test_list_response.py | 9 - .../devices/network_list_response.py | 9 - .../zero_trust/devices/policies/__init__.py | 3 - .../devices/policies/exclude_list_response.py | 9 - .../policies/fallback_domain_list_response.py | 9 - .../devices/policies/include_list_response.py | 9 - .../devices/policy_list_response.py | 9 - .../zero_trust/devices/posture/__init__.py | 1 - .../posture/integration_list_response.py | 9 - .../devices/posture_list_response.py | 9 - .../types/zero_trust/dex/__init__.py | 1 - .../zero_trust/dex/colo_list_response.py | 7 - .../types/zero_trust/dlp/__init__.py | 1 - .../zero_trust/dlp/profile_list_response.py | 9 - .../types/zero_trust/gateway/__init__.py | 6 - .../gateway/app_type_list_response.py | 9 - .../gateway/category_list_response.py | 9 - .../zero_trust/gateway/list_list_response.py | 9 - .../gateway/lists/item_list_response.py | 2 +- .../gateway/location_list_response.py | 9 - .../gateway/proxy_endpoint_list_response.py | 9 - .../zero_trust/gateway/rule_list_response.py | 9 - .../identity_provider_list_response.py | 245 ++++++----- .../types/zero_trust/networks/__init__.py | 1 - .../networks/virtual_network_list_response.py | 9 - .../types/zones/subscription_list_response.py | 30 +- tests/api_resources/accounts/test_roles.py | 17 +- .../addressing/prefixes/bgp/test_bindings.py | 14 +- .../addressing/prefixes/bgp/test_prefixes.py | 17 +- .../addressing/prefixes/test_delegations.py | 16 +- .../addressing/test_address_maps.py | 14 +- .../api_resources/addressing/test_prefixes.py | 14 +- .../api_resources/addressing/test_services.py | 13 +- .../alerting/destinations/test_webhooks.py | 14 +- tests/api_resources/alerting/test_policies.py | 14 +- .../durable_objects/test_namespaces.py | 17 +- .../api_resources/hyperdrive/test_configs.py | 13 +- .../intel/test_indicator_feeds.py | 13 +- tests/api_resources/intel/test_sinkholes.py | 15 +- .../load_balancers/test_monitors.py | 16 +- .../load_balancers/test_pools.py | 20 +- tests/api_resources/logpush/test_jobs.py | 19 +- .../magic_network_monitoring/test_rules.py | 15 +- .../hostnames/test_certificates.py | 21 +- .../page_shield/test_connections.py | 21 +- .../page_shield/test_policies.py | 20 +- .../api_resources/page_shield/test_scripts.py | 21 +- .../pages/projects/test_deployments.py | 18 +- .../pages/projects/test_domains.py | 14 +- tests/api_resources/pages/test_projects.py | 15 +- tests/api_resources/registrar/test_domains.py | 13 +- tests/api_resources/rules/test_lists.py | 19 +- .../rulesets/phases/test_versions.py | 20 +- tests/api_resources/rulesets/test_versions.py | 20 +- .../api_resources/secondary_dns/test_acls.py | 21 +- .../api_resources/secondary_dns/test_peers.py | 21 +- .../api_resources/secondary_dns/test_tsigs.py | 21 +- tests/api_resources/snippets/test_rules.py | 13 +- tests/api_resources/speed/test_pages.py | 15 +- .../ssl/test_certificate_packs.py | 20 +- .../stream/live_inputs/test_outputs.py | 18 +- tests/api_resources/stream/test_watermarks.py | 15 +- tests/api_resources/test_calls.py | 15 +- tests/api_resources/test_healthchecks.py | 16 +- .../test_keyless_certificates.py | 16 +- tests/api_resources/test_load_balancers.py | 16 +- tests/api_resources/test_mtls_certificates.py | 21 +- .../test_origin_ca_certificates.py | 17 +- .../test_origin_tls_client_auth.py | 19 +- tests/api_resources/test_pcaps.py | 15 +- tests/api_resources/test_plans.py | 17 +- tests/api_resources/test_queues.py | 13 +- tests/api_resources/test_rulesets.py | 22 +- tests/api_resources/test_snippets.py | 15 +- tests/api_resources/test_stream.py | 19 +- tests/api_resources/test_subscriptions.py | 15 +- tests/api_resources/test_waiting_rooms.py | 16 +- .../load_balancers/analytics/test_events.py | 21 +- .../user/load_balancers/test_monitors.py | 14 +- .../user/load_balancers/test_pools.py | 18 +- tests/api_resources/user/test_invites.py | 15 +- .../user/tokens/test_permission_groups.py | 16 +- tests/api_resources/vectorize/test_indexes.py | 14 +- .../waiting_rooms/test_events.py | 16 +- .../api_resources/waiting_rooms/test_rules.py | 15 +- tests/api_resources/web3/test_hostnames.py | 14 +- tests/api_resources/workers/test_domains.py | 19 +- tests/api_resources/workers/test_filters.py | 14 +- tests/api_resources/workers/test_routes.py | 14 +- tests/api_resources/workers/test_scripts.py | 15 +- .../dispatch/test_namespaces.py | 13 +- .../access/applications/test_cas.py | 21 +- .../access/applications/test_policies.py | 20 +- .../zero_trust/access/test_applications.py | 20 +- .../zero_trust/access/test_bookmarks.py | 17 +- .../zero_trust/access/test_certificates.py | 20 +- .../zero_trust/access/test_custom_pages.py | 16 +- .../zero_trust/access/test_groups.py | 20 +- .../zero_trust/access/test_service_tokens.py | 20 +- .../zero_trust/access/test_tags.py | 21 +- .../zero_trust/access/test_users.py | 17 +- .../access/users/test_active_sessions.py | 15 +- .../access/users/test_failed_logins.py | 15 +- .../devices/policies/test_excludes.py | 15 +- .../devices/policies/test_fallback_domains.py | 15 +- .../devices/policies/test_includes.py | 15 +- .../devices/posture/test_integrations.py | 14 +- .../zero_trust/devices/test_dex_tests.py | 14 +- .../zero_trust/devices/test_networks.py | 14 +- .../zero_trust/devices/test_policies.py | 14 +- .../zero_trust/devices/test_posture.py | 14 +- .../zero_trust/dex/test_colos.py | 20 +- .../zero_trust/dlp/test_datasets.py | 19 +- .../zero_trust/dlp/test_profiles.py | 17 +- .../zero_trust/gateway/lists/test_items.py | 15 +- .../zero_trust/gateway/test_app_types.py | 17 +- .../zero_trust/gateway/test_categories.py | 17 +- .../zero_trust/gateway/test_lists.py | 16 +- .../zero_trust/gateway/test_locations.py | 16 +- .../gateway/test_proxy_endpoints.py | 16 +- .../zero_trust/gateway/test_rules.py | 16 +- .../networks/test_virtual_networks.py | 21 +- .../api_resources/zero_trust/test_devices.py | 15 +- .../zero_trust/test_identity_providers.py | 19 +- .../api_resources/zones/test_subscriptions.py | 15 +- 338 files changed, 2770 insertions(+), 4013 deletions(-) delete mode 100644 src/cloudflare/types/accounts/role_list_response.py delete mode 100644 src/cloudflare/types/addressing/address_map_list_response.py delete mode 100644 src/cloudflare/types/addressing/prefix_list_response.py delete mode 100644 src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py delete mode 100644 src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py delete mode 100644 src/cloudflare/types/addressing/prefixes/delegation_list_response.py delete mode 100644 src/cloudflare/types/alerting/destinations/webhook_list_response.py delete mode 100644 src/cloudflare/types/alerting/policy_list_response.py delete mode 100644 src/cloudflare/types/call_list_response.py delete mode 100644 src/cloudflare/types/durable_objects/namespace_list_response.py delete mode 100644 src/cloudflare/types/healthcheck_list_response.py delete mode 100644 src/cloudflare/types/intel/sinkhole_list_response.py delete mode 100644 src/cloudflare/types/keyless_certificate_list_response.py delete mode 100644 src/cloudflare/types/load_balancer_list_response.py delete mode 100644 src/cloudflare/types/load_balancers/monitor_list_response.py delete mode 100644 src/cloudflare/types/load_balancers/pool_list_response.py delete mode 100644 src/cloudflare/types/logpush/job_list_response.py delete mode 100644 src/cloudflare/types/magic_network_monitoring/rule_list_response.py delete mode 100644 src/cloudflare/types/mtls_certificate_list_response.py delete mode 100644 src/cloudflare/types/origin_ca_certificate_list_response.py delete mode 100644 src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py delete mode 100644 src/cloudflare/types/page_shield/connection_list_response.py delete mode 100644 src/cloudflare/types/page_shield/policy_list_response.py delete mode 100644 src/cloudflare/types/page_shield/script_list_response.py delete mode 100644 src/cloudflare/types/pages/project_list_response.py delete mode 100644 src/cloudflare/types/pages/projects/deployment_list_response.py delete mode 100644 src/cloudflare/types/pages/projects/domain_list_response.py delete mode 100644 src/cloudflare/types/plan_list_response.py delete mode 100644 src/cloudflare/types/rules/list_list_response.py create mode 100644 src/cloudflare/types/ruleset_list_response.py create mode 100644 src/cloudflare/types/rulesets/phases/version_list_response.py create mode 100644 src/cloudflare/types/rulesets/version_list_response.py delete mode 100644 src/cloudflare/types/secondary_dns/acl_list_response.py delete mode 100644 src/cloudflare/types/secondary_dns/peer_list_response.py delete mode 100644 src/cloudflare/types/secondary_dns/tsig_list_response.py delete mode 100644 src/cloudflare/types/snippet_list_response.py delete mode 100644 src/cloudflare/types/ssl/certificate_pack_list_response.py delete mode 100644 src/cloudflare/types/stream/live_inputs/output_list_response.py delete mode 100644 src/cloudflare/types/stream/watermark_list_response.py delete mode 100644 src/cloudflare/types/stream_list_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/analytics/event_list_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/monitor_list_response.py delete mode 100644 src/cloudflare/types/user/load_balancers/pool_list_response.py delete mode 100644 src/cloudflare/types/user/tokens/permission_group_list_response.py delete mode 100644 src/cloudflare/types/vectorize/index_list_response.py delete mode 100644 src/cloudflare/types/waiting_room_list_response.py delete mode 100644 src/cloudflare/types/waiting_rooms/event_list_response.py delete mode 100644 src/cloudflare/types/waiting_rooms/rule_list_response.py delete mode 100644 src/cloudflare/types/web3/hostname_list_response.py delete mode 100644 src/cloudflare/types/workers/domain_list_response.py delete mode 100644 src/cloudflare/types/workers/filter_list_response.py delete mode 100644 src/cloudflare/types/workers/route_list_response.py delete mode 100644 src/cloudflare/types/workers/script_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/application_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/applications/ca_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/applications/policy_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/bookmark_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/certificate_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/custom_page_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/group_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/service_token_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/tag_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/access/user_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/device_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/dex_test_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/network_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policies/include_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/policy_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/devices/posture_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/dex/colo_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/dlp/profile_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/app_type_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/category_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/list_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/location_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/proxy_endpoint_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/gateway/rule_list_response.py delete mode 100644 src/cloudflare/types/zero_trust/networks/virtual_network_list_response.py diff --git a/api.md b/api.md index c6ef7011bf4..bbbeb5a3bad 100644 --- a/api.md +++ b/api.md @@ -44,12 +44,12 @@ Methods: Types: ```python -from cloudflare.types.accounts import Role, RoleListResponse, RoleGetResponse +from cloudflare.types.accounts import Role, RoleGetResponse ``` Methods: -- client.accounts.roles.list(\*, account_id) -> Optional +- client.accounts.roles.list(\*, account_id) -> SyncSinglePage[Role] - client.accounts.roles.get(role_id, \*, account_id) -> RoleGetResponse # OriginCACertificates @@ -60,7 +60,6 @@ Types: from cloudflare.types import ( OriginCACertificate, OriginCACertificateCreateResponse, - OriginCACertificateListResponse, OriginCACertificateDeleteResponse, OriginCACertificateGetResponse, ) @@ -69,7 +68,7 @@ from cloudflare.types import ( Methods: - client.origin_ca_certificates.create(\*\*params) -> OriginCACertificateCreateResponse -- client.origin_ca_certificates.list() -> Optional +- client.origin_ca_certificates.list() -> SyncSinglePage[OriginCACertificate] - client.origin_ca_certificates.delete(certificate_id) -> OriginCACertificateDeleteResponse - client.origin_ca_certificates.get(certificate_id) -> OriginCACertificateGetResponse @@ -188,7 +187,7 @@ from cloudflare.types.user import ( Methods: -- client.user.invites.list() -> Optional +- client.user.invites.list() -> SyncSinglePage[InviteListResponse] - client.user.invites.edit(invite_id, \*\*params) -> InviteEditResponse - client.user.invites.get(invite_id) -> InviteGetResponse @@ -201,7 +200,6 @@ Types: ```python from cloudflare.types.user.load_balancers import ( LoadBalancingMonitor, - MonitorListResponse, MonitorDeleteResponse, MonitorPreviewResponse, MonitorReferencesResponse, @@ -212,7 +210,7 @@ Methods: - client.user.load_balancers.monitors.create(\*\*params) -> LoadBalancingMonitor - client.user.load_balancers.monitors.update(monitor_id, \*\*params) -> LoadBalancingMonitor -- client.user.load_balancers.monitors.list() -> Optional +- client.user.load_balancers.monitors.list() -> SyncSinglePage[LoadBalancingMonitor] - client.user.load_balancers.monitors.delete(monitor_id) -> MonitorDeleteResponse - client.user.load_balancers.monitors.edit(monitor_id, \*\*params) -> LoadBalancingMonitor - client.user.load_balancers.monitors.get(monitor_id) -> LoadBalancingMonitor @@ -226,7 +224,6 @@ Types: ```python from cloudflare.types.user.load_balancers import ( LoadBalancingPool, - PoolListResponse, PoolDeleteResponse, PoolHealthResponse, PoolPreviewResponse, @@ -238,7 +235,7 @@ Methods: - client.user.load_balancers.pools.create(\*\*params) -> LoadBalancingPool - client.user.load_balancers.pools.update(pool_id, \*\*params) -> LoadBalancingPool -- client.user.load_balancers.pools.list(\*\*params) -> Optional +- client.user.load_balancers.pools.list(\*\*params) -> SyncSinglePage[LoadBalancingPool] - client.user.load_balancers.pools.delete(pool_id) -> PoolDeleteResponse - client.user.load_balancers.pools.edit(pool_id, \*\*params) -> LoadBalancingPool - client.user.load_balancers.pools.get(pool_id) -> LoadBalancingPool @@ -265,12 +262,12 @@ Methods: Types: ```python -from cloudflare.types.user.load_balancers.analytics import LoadBalancingAnalytics, EventListResponse +from cloudflare.types.user.load_balancers.analytics import LoadBalancingAnalytics ``` Methods: -- client.user.load_balancers.analytics.events.list(\*\*params) -> Optional +- client.user.load_balancers.analytics.events.list(\*\*params) -> SyncSinglePage[LoadBalancingAnalytics] ## Organizations @@ -341,7 +338,7 @@ from cloudflare.types.user.tokens import PermissionGroupListResponse Methods: -- client.user.tokens.permission_groups.list() -> Optional +- client.user.tokens.permission_groups.list() -> SyncSinglePage[object] ### Value @@ -1132,7 +1129,7 @@ from cloudflare.types.zones import ( Methods: - client.zones.subscriptions.create(identifier, \*\*params) -> SubscriptionCreateResponse -- client.zones.subscriptions.list(account_identifier) -> Optional +- client.zones.subscriptions.list(account_identifier) -> SyncSinglePage[SubscriptionListResponse] - client.zones.subscriptions.get(identifier) -> SubscriptionGetResponse # LoadBalancers @@ -1140,14 +1137,14 @@ Methods: Types: ```python -from cloudflare.types import LoadBalancer, LoadBalancerListResponse, LoadBalancerDeleteResponse +from cloudflare.types import LoadBalancer, LoadBalancerDeleteResponse ``` Methods: - client.load_balancers.create(\*, zone_id, \*\*params) -> LoadBalancer - client.load_balancers.update(load_balancer_id, \*, zone_id, \*\*params) -> LoadBalancer -- client.load_balancers.list(\*, zone_id) -> Optional +- client.load_balancers.list(\*, zone_id) -> SyncSinglePage[LoadBalancer] - client.load_balancers.delete(load_balancer_id, \*, zone_id) -> LoadBalancerDeleteResponse - client.load_balancers.edit(load_balancer_id, \*, zone_id, \*\*params) -> LoadBalancer - client.load_balancers.get(load_balancer_id, \*, zone_id) -> LoadBalancer @@ -1157,14 +1154,14 @@ Methods: Types: ```python -from cloudflare.types.load_balancers import MonitorListResponse, MonitorDeleteResponse +from cloudflare.types.load_balancers import MonitorDeleteResponse ``` Methods: - client.load_balancers.monitors.create(\*, account_id, \*\*params) -> LoadBalancingMonitor - client.load_balancers.monitors.update(monitor_id, \*, account_id, \*\*params) -> LoadBalancingMonitor -- client.load_balancers.monitors.list(\*, account_id) -> Optional +- client.load_balancers.monitors.list(\*, account_id) -> SyncSinglePage[LoadBalancingMonitor] - client.load_balancers.monitors.delete(monitor_id, \*, account_id) -> MonitorDeleteResponse - client.load_balancers.monitors.edit(monitor_id, \*, account_id, \*\*params) -> LoadBalancingMonitor - client.load_balancers.monitors.get(monitor_id, \*, account_id) -> LoadBalancingMonitor @@ -1198,14 +1195,14 @@ Methods: Types: ```python -from cloudflare.types.load_balancers import PoolListResponse, PoolDeleteResponse +from cloudflare.types.load_balancers import PoolDeleteResponse ``` Methods: - client.load_balancers.pools.create(\*, account_id, \*\*params) -> LoadBalancingPool - client.load_balancers.pools.update(pool_id, \*, account_id, \*\*params) -> LoadBalancingPool -- client.load_balancers.pools.list(\*, account_id, \*\*params) -> Optional +- client.load_balancers.pools.list(\*, account_id, \*\*params) -> SyncSinglePage[LoadBalancingPool] - client.load_balancers.pools.delete(pool_id, \*, account_id) -> PoolDeleteResponse - client.load_balancers.pools.edit(pool_id, \*, account_id, \*\*params) -> LoadBalancingPool - client.load_balancers.pools.get(pool_id, \*, account_id) -> LoadBalancingPool @@ -1372,7 +1369,7 @@ from cloudflare.types.ssl import ( Methods: -- client.ssl.certificate_packs.list(\*, zone_id, \*\*params) -> Optional +- client.ssl.certificate_packs.list(\*, zone_id, \*\*params) -> SyncSinglePage[object] - client.ssl.certificate_packs.delete(certificate_pack_id, \*, zone_id) -> CertificatePackDeleteResponse - client.ssl.certificate_packs.edit(certificate_pack_id, \*, zone_id) -> CertificatePackEditResponse - client.ssl.certificate_packs.get(certificate_pack_id, \*, zone_id) -> CertificatePackGetResponse @@ -1463,7 +1460,7 @@ Methods: - client.subscriptions.create(identifier, \*\*params) -> SubscriptionCreateResponse - client.subscriptions.update(subscription_identifier, \*, account_identifier, \*\*params) -> SubscriptionUpdateResponse -- client.subscriptions.list(account_identifier) -> Optional +- client.subscriptions.list(account_identifier) -> SyncSinglePage[SubscriptionListResponse] - client.subscriptions.delete(subscription_identifier, \*, account_identifier) -> SubscriptionDeleteResponse - client.subscriptions.get(identifier) -> SubscriptionGetResponse @@ -1515,12 +1512,12 @@ Methods: Types: ```python -from cloudflare.types import AvailableRatePlan, PlanListResponse +from cloudflare.types import AvailableRatePlan ``` Methods: -- client.plans.list(zone_identifier) -> Optional +- client.plans.list(zone_identifier) -> SyncSinglePage[AvailableRatePlan] - client.plans.get(plan_identifier, \*, zone_identifier) -> AvailableRatePlan # RatePlans @@ -2017,14 +2014,14 @@ Methods: Types: ```python -from cloudflare.types import Healthcheck, HealthcheckListResponse, HealthcheckDeleteResponse +from cloudflare.types import Healthcheck, HealthcheckDeleteResponse ``` Methods: - client.healthchecks.create(\*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.update(healthcheck_id, \*, zone_id, \*\*params) -> Healthcheck -- client.healthchecks.list(\*, zone_id) -> Optional +- client.healthchecks.list(\*, zone_id) -> SyncSinglePage[Healthcheck] - client.healthchecks.delete(healthcheck_id, \*, zone_id) -> HealthcheckDeleteResponse - client.healthchecks.edit(healthcheck_id, \*, zone_id, \*\*params) -> Healthcheck - client.healthchecks.get(healthcheck_id, \*, zone_id) -> Healthcheck @@ -2051,7 +2048,6 @@ Types: from cloudflare.types import ( KeylessCertificate, KeylessCertificateHostname, - KeylessCertificateListResponse, KeylessCertificateDeleteResponse, ) ``` @@ -2059,7 +2055,7 @@ from cloudflare.types import ( Methods: - client.keyless_certificates.create(\*, zone_id, \*\*params) -> KeylessCertificateHostname -- client.keyless_certificates.list(\*, zone_id) -> Optional +- client.keyless_certificates.list(\*, zone_id) -> SyncSinglePage[KeylessCertificateHostname] - client.keyless_certificates.delete(keyless_certificate_id, \*, zone_id) -> KeylessCertificateDeleteResponse - client.keyless_certificates.edit(keyless_certificate_id, \*, zone_id, \*\*params) -> KeylessCertificateHostname - client.keyless_certificates.get(keyless_certificate_id, \*, zone_id) -> KeylessCertificateHostname @@ -2110,14 +2106,14 @@ Methods: Types: ```python -from cloudflare.types.logpush import JobListResponse, JobDeleteResponse +from cloudflare.types.logpush import JobDeleteResponse ``` Methods: - client.logpush.jobs.create(\*, account_id, zone_id, \*\*params) -> Optional - client.logpush.jobs.update(job_id, \*, account_id, zone_id, \*\*params) -> Optional -- client.logpush.jobs.list(\*, account_id, zone_id) -> JobListResponse +- client.logpush.jobs.list(\*, account_id, zone_id) -> SyncSinglePage[Optional] - client.logpush.jobs.delete(job_id, \*, account_id, zone_id) -> Optional - client.logpush.jobs.get(job_id, \*, account_id, zone_id) -> Optional @@ -2235,7 +2231,7 @@ from cloudflare.types import ( Methods: - client.origin_tls_client_auth.create(\*, zone_id, \*\*params) -> OriginTLSClientAuthCreateResponse -- client.origin_tls_client_auth.list(\*, zone_id) -> Optional +- client.origin_tls_client_auth.list(\*, zone_id) -> SyncSinglePage[OriginTLSClientAuthListResponse] - client.origin_tls_client_auth.delete(certificate_id, \*, zone_id) -> OriginTLSClientAuthDeleteResponse - client.origin_tls_client_auth.get(certificate_id, \*, zone_id) -> OriginTLSClientAuthGetResponse @@ -2261,16 +2257,13 @@ Methods: Types: ```python -from cloudflare.types.origin_tls_client_auth.hostnames import ( - OriginTLSClientCertificate, - CertificateListResponse, -) +from cloudflare.types.origin_tls_client_auth.hostnames import OriginTLSClientCertificate ``` Methods: - client.origin_tls_client_auth.hostnames.certificates.create(\*, zone_id, \*\*params) -> OriginTLSClientCertificate -- client.origin_tls_client_auth.hostnames.certificates.list(\*, zone_id) -> Optional +- client.origin_tls_client_auth.hostnames.certificates.list(\*, zone_id) -> SyncSinglePage[OriginTLSClientCertificateID] - client.origin_tls_client_auth.hostnames.certificates.delete(certificate_id, \*, zone_id) -> OriginTLSClientCertificate - client.origin_tls_client_auth.hostnames.certificates.get(certificate_id, \*, zone_id) -> OriginTLSClientCertificate @@ -2418,14 +2411,14 @@ Methods: Types: ```python -from cloudflare.types.secondary_dns import SecondaryDNSACL, ACLListResponse, ACLDeleteResponse +from cloudflare.types.secondary_dns import SecondaryDNSACL, ACLDeleteResponse ``` Methods: - client.secondary_dns.acls.create(\*, account_id, \*\*params) -> SecondaryDNSACL - client.secondary_dns.acls.update(acl_id, \*, account_id, \*\*params) -> SecondaryDNSACL -- client.secondary_dns.acls.list(\*, account_id) -> Optional +- client.secondary_dns.acls.list(\*, account_id) -> SyncSinglePage[SecondaryDNSACL] - client.secondary_dns.acls.delete(acl_id, \*, account_id) -> ACLDeleteResponse - client.secondary_dns.acls.get(acl_id, \*, account_id) -> SecondaryDNSACL @@ -2434,14 +2427,14 @@ Methods: Types: ```python -from cloudflare.types.secondary_dns import SecondaryDNSPeer, PeerListResponse, PeerDeleteResponse +from cloudflare.types.secondary_dns import SecondaryDNSPeer, PeerDeleteResponse ``` Methods: - client.secondary_dns.peers.create(\*, account_id, \*\*params) -> SecondaryDNSPeer - client.secondary_dns.peers.update(peer_id, \*, account_id, \*\*params) -> SecondaryDNSPeer -- client.secondary_dns.peers.list(\*, account_id) -> Optional +- client.secondary_dns.peers.list(\*, account_id) -> SyncSinglePage[SecondaryDNSPeer] - client.secondary_dns.peers.delete(peer_id, \*, account_id) -> PeerDeleteResponse - client.secondary_dns.peers.get(peer_id, \*, account_id) -> SecondaryDNSPeer @@ -2450,14 +2443,14 @@ Methods: Types: ```python -from cloudflare.types.secondary_dns import SecondaryDNSTSIG, TSIGListResponse, TSIGDeleteResponse +from cloudflare.types.secondary_dns import SecondaryDNSTSIG, TSIGDeleteResponse ``` Methods: - client.secondary_dns.tsigs.create(\*, account_id, \*\*params) -> SecondaryDNSTSIG - client.secondary_dns.tsigs.update(tsig_id, \*, account_id, \*\*params) -> SecondaryDNSTSIG -- client.secondary_dns.tsigs.list(\*, account_id) -> Optional +- client.secondary_dns.tsigs.list(\*, account_id) -> SyncSinglePage[SecondaryDNSTSIG] - client.secondary_dns.tsigs.delete(tsig_id, \*, account_id) -> TSIGDeleteResponse - client.secondary_dns.tsigs.get(tsig_id, \*, account_id) -> SecondaryDNSTSIG @@ -2466,14 +2459,14 @@ Methods: Types: ```python -from cloudflare.types import WaitingRoom, WaitingRoomListResponse, WaitingRoomDeleteResponse +from cloudflare.types import WaitingRoom, WaitingRoomDeleteResponse ``` Methods: - client.waiting_rooms.create(zone_identifier, \*\*params) -> WaitingRoom - client.waiting_rooms.update(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingRoom -- client.waiting_rooms.list(zone_identifier) -> Optional +- client.waiting_rooms.list(zone_identifier) -> SyncSinglePage[WaitingRoom] - client.waiting_rooms.delete(waiting_room_id, \*, zone_identifier) -> WaitingRoomDeleteResponse - client.waiting_rooms.edit(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingRoom - client.waiting_rooms.get(waiting_room_id, \*, zone_identifier) -> WaitingRoom @@ -2495,14 +2488,14 @@ Methods: Types: ```python -from cloudflare.types.waiting_rooms import WaitingroomEvent, EventListResponse, EventDeleteResponse +from cloudflare.types.waiting_rooms import WaitingroomEvent, EventDeleteResponse ``` Methods: - client.waiting_rooms.events.create(waiting_room_id, \*, zone_identifier, \*\*params) -> WaitingroomEvent - client.waiting_rooms.events.update(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> WaitingroomEvent -- client.waiting_rooms.events.list(waiting_room_id, \*, zone_identifier) -> Optional +- client.waiting_rooms.events.list(waiting_room_id, \*, zone_identifier) -> SyncSinglePage[WaitingroomEvent] - client.waiting_rooms.events.delete(event_id, \*, zone_identifier, waiting_room_id) -> EventDeleteResponse - client.waiting_rooms.events.edit(event_id, \*, zone_identifier, waiting_room_id, \*\*params) -> WaitingroomEvent - client.waiting_rooms.events.get(event_id, \*, zone_identifier, waiting_room_id) -> WaitingroomEvent @@ -2528,7 +2521,6 @@ from cloudflare.types.waiting_rooms import ( WaitingroomRule, RuleCreateResponse, RuleUpdateResponse, - RuleListResponse, RuleDeleteResponse, RuleEditResponse, ) @@ -2538,7 +2530,7 @@ Methods: - client.waiting_rooms.rules.create(waiting_room_id, \*, zone_identifier, \*\*params) -> Optional - client.waiting_rooms.rules.update(waiting_room_id, \*, zone_identifier, \*\*params) -> Optional -- client.waiting_rooms.rules.list(waiting_room_id, \*, zone_identifier) -> Optional +- client.waiting_rooms.rules.list(waiting_room_id, \*, zone_identifier) -> SyncSinglePage[WaitingroomRule] - client.waiting_rooms.rules.delete(rule_id, \*, zone_identifier, waiting_room_id) -> Optional - client.waiting_rooms.rules.edit(rule_id, \*, zone_identifier, waiting_room_id, \*\*params) -> Optional @@ -2579,17 +2571,13 @@ Methods: Types: ```python -from cloudflare.types.web3 import ( - DistributedWebHostname, - HostnameListResponse, - HostnameDeleteResponse, -) +from cloudflare.types.web3 import DistributedWebHostname, HostnameDeleteResponse ``` Methods: - client.web3.hostnames.create(zone_identifier, \*\*params) -> DistributedWebHostname -- client.web3.hostnames.list(zone_identifier) -> Optional +- client.web3.hostnames.list(zone_identifier) -> SyncSinglePage[DistributedWebHostname] - client.web3.hostnames.delete(identifier, \*, zone_identifier) -> Optional - client.web3.hostnames.edit(identifier, \*, zone_identifier, \*\*params) -> DistributedWebHostname - client.web3.hostnames.get(identifier, \*, zone_identifier) -> DistributedWebHostname @@ -2648,13 +2636,13 @@ Methods: Types: ```python -from cloudflare.types.workers import WorkersScript, ScriptListResponse +from cloudflare.types.workers import WorkersScript ``` Methods: - client.workers.scripts.update(script_name, \*, account_id, \*\*params) -> WorkersScript -- client.workers.scripts.list(\*, account_id) -> ScriptListResponse +- client.workers.scripts.list(\*, account_id) -> SyncSinglePage[WorkersScript] - client.workers.scripts.delete(script_name, \*, account_id, \*\*params) -> None - client.workers.scripts.get(script_name, \*, account_id) -> BinaryAPIResponse @@ -2740,19 +2728,14 @@ Methods: Types: ```python -from cloudflare.types.workers import ( - WorkersFilter, - FilterCreateResponse, - FilterListResponse, - FilterDeleteResponse, -) +from cloudflare.types.workers import WorkersFilter, FilterCreateResponse, FilterDeleteResponse ``` Methods: - client.workers.filters.create(\*, zone_id, \*\*params) -> Optional - client.workers.filters.update(filter_id, \*, zone_id, \*\*params) -> WorkersFilter -- client.workers.filters.list(\*, zone_id) -> FilterListResponse +- client.workers.filters.list(\*, zone_id) -> SyncSinglePage[WorkersFilter] - client.workers.filters.delete(filter_id, \*, zone_id) -> Optional ## Routes @@ -2760,19 +2743,14 @@ Methods: Types: ```python -from cloudflare.types.workers import ( - WorkersRoute, - RouteCreateResponse, - RouteListResponse, - RouteDeleteResponse, -) +from cloudflare.types.workers import WorkersRoute, RouteCreateResponse, RouteDeleteResponse ``` Methods: - client.workers.routes.create(\*, zone_id, \*\*params) -> RouteCreateResponse - client.workers.routes.update(route_id, \*, zone_id, \*\*params) -> WorkersRoute -- client.workers.routes.list(\*, zone_id) -> RouteListResponse +- client.workers.routes.list(\*, zone_id) -> SyncSinglePage[WorkersRoute] - client.workers.routes.delete(route_id, \*, zone_id) -> RouteDeleteResponse - client.workers.routes.get(route_id, \*, zone_id) -> WorkersRoute @@ -2820,13 +2798,13 @@ Methods: Types: ```python -from cloudflare.types.workers import WorkersDomain, DomainListResponse +from cloudflare.types.workers import WorkersDomain ``` Methods: - client.workers.domains.update(\*, account_id, \*\*params) -> WorkersDomain -- client.workers.domains.list(\*, account_id, \*\*params) -> DomainListResponse +- client.workers.domains.list(\*, account_id, \*\*params) -> SyncSinglePage[WorkersDomain] - client.workers.domains.delete(domain_id, \*, account_id) -> None - client.workers.domains.get(domain_id, \*, account_id) -> WorkersDomain @@ -2946,12 +2924,12 @@ Methods: Types: ```python -from cloudflare.types.durable_objects import DurableObjectNamespace, NamespaceListResponse +from cloudflare.types.durable_objects import DurableObjectNamespace ``` Methods: -- client.durable_objects.namespaces.list(\*, account_id) -> Optional +- client.durable_objects.namespaces.list(\*, account_id) -> SyncSinglePage[DurableObjectNamespace] ### Objects @@ -2986,7 +2964,7 @@ Methods: - client.queues.create(\*, account_id, \*\*params) -> Optional - client.queues.update(queue_id, \*, account_id, \*\*params) -> Optional -- client.queues.list(\*, account_id) -> Optional +- client.queues.list(\*, account_id) -> SyncSinglePage[QueueListResponse] - client.queues.delete(queue_id, \*, account_id) -> Optional - client.queues.get(queue_id, \*, account_id) -> Optional @@ -3060,14 +3038,14 @@ Methods: Types: ```python -from cloudflare.types.page_shield import PageShieldPolicy, PolicyListResponse +from cloudflare.types.page_shield import PageShieldPolicy ``` Methods: - client.page_shield.policies.create(\*, zone_id, \*\*params) -> PageShieldPolicy - client.page_shield.policies.update(policy_id, \*, zone_id, \*\*params) -> PageShieldPolicy -- client.page_shield.policies.list(\*, zone_id) -> Optional +- client.page_shield.policies.list(\*, zone_id) -> SyncSinglePage[PageShieldPolicy] - client.page_shield.policies.delete(policy_id, \*, zone_id) -> None - client.page_shield.policies.get(policy_id, \*, zone_id) -> PageShieldPolicy @@ -3076,12 +3054,12 @@ Methods: Types: ```python -from cloudflare.types.page_shield import PageShieldConnection, ConnectionListResponse +from cloudflare.types.page_shield import PageShieldConnection ``` Methods: -- client.page_shield.connections.list(\*, zone_id, \*\*params) -> Optional +- client.page_shield.connections.list(\*, zone_id, \*\*params) -> SyncSinglePage[PageShieldConnection] - client.page_shield.connections.get(connection_id, \*, zone_id) -> PageShieldConnection ## Scripts @@ -3089,12 +3067,12 @@ Methods: Types: ```python -from cloudflare.types.page_shield import PageShieldScript, ScriptListResponse, ScriptGetResponse +from cloudflare.types.page_shield import PageShieldScript, ScriptGetResponse ``` Methods: -- client.page_shield.scripts.list(\*, zone_id, \*\*params) -> Optional +- client.page_shield.scripts.list(\*, zone_id, \*\*params) -> SyncSinglePage[PageShieldScript] - client.page_shield.scripts.get(script_id, \*, zone_id) -> ScriptGetResponse # Rulesets @@ -3102,14 +3080,14 @@ Methods: Types: ```python -from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse +from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse, RulesetListResponse ``` Methods: - client.rulesets.create(\*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse - client.rulesets.update(ruleset_id, \*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse -- client.rulesets.list(\*, account_id, zone_id) -> RulesetsRulesetsResponse +- client.rulesets.list(\*, account_id, zone_id) -> SyncSinglePage[RulesetListResponse] - client.rulesets.delete(ruleset_id, \*, account_id, zone_id) -> None - client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> RulesetsRulesetResponse @@ -3122,9 +3100,15 @@ Methods: ### Versions +Types: + +```python +from cloudflare.types.rulesets.phases import VersionListResponse +``` + Methods: -- client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> RulesetsRulesetsResponse +- client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse] - client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> RulesetsRulesetResponse ## Rules @@ -3137,9 +3121,15 @@ Methods: ## Versions +Types: + +```python +from cloudflare.types.rulesets import VersionListResponse +``` + Methods: -- client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> RulesetsRulesetsResponse +- client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse] - 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 @@ -3240,7 +3230,7 @@ from cloudflare.types.addressing import ServiceListResponse Methods: -- client.addressing.services.list(\*, account_id) -> ServiceListResponse +- client.addressing.services.list(\*, account_id) -> SyncSinglePage[ServiceListResponse] ## AddressMaps @@ -3250,7 +3240,6 @@ Types: from cloudflare.types.addressing import ( AddressingAddressMaps, AddressMapCreateResponse, - AddressMapListResponse, AddressMapDeleteResponse, AddressMapGetResponse, ) @@ -3259,7 +3248,7 @@ from cloudflare.types.addressing import ( Methods: - client.addressing.address_maps.create(\*, account_id, \*\*params) -> AddressMapCreateResponse -- client.addressing.address_maps.list(\*, account_id) -> Optional +- client.addressing.address_maps.list(\*, account_id) -> SyncSinglePage[AddressingAddressMaps] - client.addressing.address_maps.delete(address_map_id, \*, account_id) -> Optional - client.addressing.address_maps.edit(address_map_id, \*, account_id, \*\*params) -> AddressingAddressMaps - client.addressing.address_maps.get(address_map_id, \*, account_id) -> AddressMapGetResponse @@ -3332,17 +3321,13 @@ Methods: Types: ```python -from cloudflare.types.addressing import ( - AddressingIpamPrefixes, - PrefixListResponse, - PrefixDeleteResponse, -) +from cloudflare.types.addressing import AddressingIpamPrefixes, PrefixDeleteResponse ``` Methods: - client.addressing.prefixes.create(\*, account_id, \*\*params) -> AddressingIpamPrefixes -- client.addressing.prefixes.list(\*, account_id) -> Optional +- client.addressing.prefixes.list(\*, account_id) -> SyncSinglePage[AddressingIpamPrefixes] - client.addressing.prefixes.delete(prefix_id, \*, account_id) -> Optional - client.addressing.prefixes.edit(prefix_id, \*, account_id, \*\*params) -> AddressingIpamPrefixes - client.addressing.prefixes.get(prefix_id, \*, account_id) -> AddressingIpamPrefixes @@ -3354,17 +3339,13 @@ Methods: Types: ```python -from cloudflare.types.addressing.prefixes.bgp import ( - AddressingServiceBinding, - BindingListResponse, - BindingDeleteResponse, -) +from cloudflare.types.addressing.prefixes.bgp import AddressingServiceBinding, BindingDeleteResponse ``` Methods: - client.addressing.prefixes.bgp.bindings.create(prefix_id, \*, account_id, \*\*params) -> AddressingServiceBinding -- client.addressing.prefixes.bgp.bindings.list(prefix_id, \*, account_id) -> BindingListResponse +- client.addressing.prefixes.bgp.bindings.list(prefix_id, \*, account_id) -> SyncSinglePage[AddressingServiceBinding] - client.addressing.prefixes.bgp.bindings.delete(binding_id, \*, account_id, prefix_id) -> BindingDeleteResponse - client.addressing.prefixes.bgp.bindings.get(binding_id, \*, account_id, prefix_id) -> AddressingServiceBinding @@ -3373,12 +3354,12 @@ Methods: Types: ```python -from cloudflare.types.addressing.prefixes.bgp import AddressingIpamBGPPrefixes, PrefixListResponse +from cloudflare.types.addressing.prefixes.bgp import AddressingIpamBGPPrefixes ``` Methods: -- client.addressing.prefixes.bgp.prefixes.list(prefix_id, \*, account_id) -> Optional +- client.addressing.prefixes.bgp.prefixes.list(prefix_id, \*, account_id) -> SyncSinglePage[AddressingIpamBGPPrefixes] - client.addressing.prefixes.bgp.prefixes.edit(bgp_prefix_id, \*, account_id, prefix_id, \*\*params) -> AddressingIpamBGPPrefixes - client.addressing.prefixes.bgp.prefixes.get(bgp_prefix_id, \*, account_id, prefix_id) -> AddressingIpamBGPPrefixes @@ -3400,17 +3381,13 @@ Methods: Types: ```python -from cloudflare.types.addressing.prefixes import ( - AddressingIpamDelegations, - DelegationListResponse, - DelegationDeleteResponse, -) +from cloudflare.types.addressing.prefixes import AddressingIpamDelegations, DelegationDeleteResponse ``` Methods: - client.addressing.prefixes.delegations.create(prefix_id, \*, account_id, \*\*params) -> AddressingIpamDelegations -- client.addressing.prefixes.delegations.list(prefix_id, \*, account_id) -> Optional +- client.addressing.prefixes.delegations.list(prefix_id, \*, account_id) -> SyncSinglePage[AddressingIpamDelegations] - client.addressing.prefixes.delegations.delete(delegation_id, \*, account_id, prefix_id) -> DelegationDeleteResponse # AuditLogs @@ -3696,7 +3673,7 @@ Methods: - client.intel.indicator_feeds.create(\*, account_id, \*\*params) -> IndicatorFeedCreateResponse - client.intel.indicator_feeds.update(feed_id, \*, account_id, \*\*params) -> IndicatorFeedUpdateResponse -- client.intel.indicator_feeds.list(\*, account_id) -> IndicatorFeedListResponse +- client.intel.indicator_feeds.list(\*, account_id) -> SyncSinglePage[IndicatorFeedListResponse] - client.intel.indicator_feeds.data(feed_id, \*, account_id) -> str - client.intel.indicator_feeds.get(feed_id, \*, account_id) -> IndicatorFeedGetResponse @@ -3723,12 +3700,12 @@ Methods: Types: ```python -from cloudflare.types.intel import IntelSinkholeItem, SinkholeListResponse +from cloudflare.types.intel import IntelSinkholeItem ``` Methods: -- client.intel.sinkholes.list(\*, account_id) -> SinkholeListResponse +- client.intel.sinkholes.list(\*, account_id) -> SyncSinglePage[IntelSinkholeItem] ## AttackSurfaceReport @@ -3973,14 +3950,14 @@ Methods: Types: ```python -from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringRule, RuleListResponse +from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringRule ``` Methods: - client.magic_network_monitoring.rules.create(\*, account_id) -> Optional - client.magic_network_monitoring.rules.update(\*, account_id) -> Optional -- client.magic_network_monitoring.rules.list(\*, account_id) -> Optional +- client.magic_network_monitoring.rules.list(\*, account_id) -> SyncSinglePage[Optional] - client.magic_network_monitoring.rules.delete(rule_id, \*, account_id) -> Optional - client.magic_network_monitoring.rules.edit(rule_id, \*, account_id) -> Optional - client.magic_network_monitoring.rules.get(rule_id, \*, account_id) -> Optional @@ -4002,13 +3979,13 @@ Methods: Types: ```python -from cloudflare.types import MTLSCertificate, MTLSCertificateUpdate, MTLSCertificateListResponse +from cloudflare.types import MTLSCertificate, MTLSCertificateUpdate ``` Methods: - client.mtls_certificates.create(\*, account_id, \*\*params) -> MTLSCertificateUpdate -- client.mtls_certificates.list(\*, account_id) -> Optional +- client.mtls_certificates.list(\*, account_id) -> SyncSinglePage[MTLSCertificate] - client.mtls_certificates.delete(mtls_certificate_id, \*, account_id) -> MTLSCertificate - client.mtls_certificates.get(mtls_certificate_id, \*, account_id) -> MTLSCertificate @@ -4035,7 +4012,6 @@ from cloudflare.types.pages import ( PagesDeployments, PagesProjects, ProjectCreateResponse, - ProjectListResponse, ProjectDeleteResponse, ProjectEditResponse, ProjectPurgeBuildCacheResponse, @@ -4045,7 +4021,7 @@ from cloudflare.types.pages import ( Methods: - client.pages.projects.create(\*, account_id, \*\*params) -> ProjectCreateResponse -- client.pages.projects.list(\*, account_id) -> ProjectListResponse +- client.pages.projects.list(\*, account_id) -> SyncSinglePage[PagesDeployments] - client.pages.projects.delete(project_name, \*, account_id) -> object - client.pages.projects.edit(project_name, \*, account_id, \*\*params) -> ProjectEditResponse - client.pages.projects.get(project_name, \*, account_id) -> PagesProjects @@ -4056,13 +4032,13 @@ Methods: Types: ```python -from cloudflare.types.pages.projects import DeploymentListResponse, DeploymentDeleteResponse +from cloudflare.types.pages.projects import DeploymentDeleteResponse ``` Methods: - client.pages.projects.deployments.create(project_name, \*, account_id, \*\*params) -> PagesDeployments -- client.pages.projects.deployments.list(project_name, \*, account_id, \*\*params) -> DeploymentListResponse +- client.pages.projects.deployments.list(project_name, \*, account_id, \*\*params) -> SyncSinglePage[PagesDeployments] - client.pages.projects.deployments.delete(deployment_id, \*, account_id, project_name) -> object - client.pages.projects.deployments.get(deployment_id, \*, account_id, project_name) -> PagesDeployments - client.pages.projects.deployments.retry(deployment_id, \*, account_id, project_name) -> PagesDeployments @@ -4099,7 +4075,7 @@ from cloudflare.types.pages.projects import ( Methods: - client.pages.projects.domains.create(project_name, \*, account_id, \*\*params) -> Optional -- client.pages.projects.domains.list(project_name, \*, account_id) -> DomainListResponse +- client.pages.projects.domains.list(project_name, \*, account_id) -> SyncSinglePage[object] - client.pages.projects.domains.delete(domain_name, \*, account_id, project_name) -> object - client.pages.projects.domains.edit(domain_name, \*, account_id, project_name) -> Optional - client.pages.projects.domains.get(domain_name, \*, account_id, project_name) -> Optional @@ -4115,7 +4091,7 @@ from cloudflare.types import PCAPCreateResponse, PCAPListResponse, PCAPGetRespon Methods: - client.pcaps.create(\*, account_id, \*\*params) -> PCAPCreateResponse -- client.pcaps.list(\*, account_id) -> Optional +- client.pcaps.list(\*, account_id) -> SyncSinglePage[PCAPListResponse] - client.pcaps.get(pcap_id, \*, account_id) -> PCAPGetResponse ## Ownership @@ -4157,7 +4133,7 @@ from cloudflare.types.registrar import ( Methods: - client.registrar.domains.update(domain_name, \*, account_id, \*\*params) -> Optional -- client.registrar.domains.list(\*, account_id) -> Optional +- client.registrar.domains.list(\*, account_id) -> SyncSinglePage[DomainListResponse] - client.registrar.domains.get(domain_name, \*, account_id) -> Optional # RequestTracers @@ -4181,14 +4157,14 @@ Methods: Types: ```python -from cloudflare.types.rules import ListsList, ListListResponse, ListDeleteResponse +from cloudflare.types.rules import ListsList, ListDeleteResponse ``` Methods: - client.rules.lists.create(\*, account_id, \*\*params) -> Optional - client.rules.lists.update(list_id, \*, account_id, \*\*params) -> Optional -- client.rules.lists.list(\*, account_id) -> Optional +- client.rules.lists.list(\*, account_id) -> SyncSinglePage[ListsList] - client.rules.lists.delete(list_id, \*, account_id) -> Optional - client.rules.lists.get(list_id, \*, account_id) -> Optional @@ -4246,13 +4222,13 @@ Methods: Types: ```python -from cloudflare.types import StreamVideos, StreamListResponse +from cloudflare.types import StreamVideos ``` Methods: - client.stream.create(\*, account_id) -> None -- client.stream.list(\*, account_id, \*\*params) -> StreamListResponse +- client.stream.list(\*, account_id, \*\*params) -> SyncSinglePage[StreamVideos] - client.stream.delete(identifier, \*, account_id) -> None - client.stream.get(identifier, \*, account_id) -> StreamVideos @@ -4348,14 +4324,14 @@ Methods: Types: ```python -from cloudflare.types.stream.live_inputs import StreamOutput, OutputListResponse +from cloudflare.types.stream.live_inputs import StreamOutput ``` Methods: - client.stream.live_inputs.outputs.create(live_input_identifier, \*, account_id, \*\*params) -> StreamOutput - client.stream.live_inputs.outputs.update(output_identifier, \*, account_id, live_input_identifier, \*\*params) -> StreamOutput -- client.stream.live_inputs.outputs.list(live_input_identifier, \*, account_id) -> OutputListResponse +- client.stream.live_inputs.outputs.list(live_input_identifier, \*, account_id) -> SyncSinglePage[StreamOutput] - client.stream.live_inputs.outputs.delete(output_identifier, \*, account_id, live_input_identifier) -> None ## Watermarks @@ -4366,7 +4342,6 @@ Types: from cloudflare.types.stream import ( StreamWatermarks, WatermarkCreateResponse, - WatermarkListResponse, WatermarkDeleteResponse, WatermarkGetResponse, ) @@ -4375,7 +4350,7 @@ from cloudflare.types.stream import ( Methods: - client.stream.watermarks.create(\*, account_id, \*\*params) -> WatermarkCreateResponse -- client.stream.watermarks.list(\*, account_id) -> WatermarkListResponse +- client.stream.watermarks.list(\*, account_id) -> SyncSinglePage[StreamWatermarks] - client.stream.watermarks.delete(identifier, \*, account_id) -> WatermarkDeleteResponse - client.stream.watermarks.get(identifier, \*, account_id) -> WatermarkGetResponse @@ -4512,7 +4487,6 @@ from cloudflare.types.alerting.destinations import ( AlertingWebhooks, WebhookCreateResponse, WebhookUpdateResponse, - WebhookListResponse, WebhookDeleteResponse, ) ``` @@ -4521,7 +4495,7 @@ Methods: - 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.list(\*, account_id) -> SyncSinglePage[AlertingWebhooks] - client.alerting.destinations.webhooks.delete(webhook_id, \*, account_id) -> Optional - client.alerting.destinations.webhooks.get(webhook_id, \*, account_id) -> AlertingWebhooks @@ -4546,7 +4520,6 @@ from cloudflare.types.alerting import ( AlertingPolicies, PolicyCreateResponse, PolicyUpdateResponse, - PolicyListResponse, PolicyDeleteResponse, ) ``` @@ -4555,7 +4528,7 @@ Methods: - 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.list(\*, account_id) -> SyncSinglePage[AlertingPolicies] - client.alerting.policies.delete(policy_id, \*, account_id) -> Optional - client.alerting.policies.get(policy_id, \*, account_id) -> AlertingPolicies @@ -4658,7 +4631,7 @@ from cloudflare.types.workers_for_platforms.dispatch import ( Methods: - client.workers_for_platforms.dispatch.namespaces.create(\*, account_id, \*\*params) -> NamespaceCreateResponse -- client.workers_for_platforms.dispatch.namespaces.list(\*, account_id) -> NamespaceListResponse +- client.workers_for_platforms.dispatch.namespaces.list(\*, account_id) -> SyncSinglePage[NamespaceListResponse] - client.workers_for_platforms.dispatch.namespaces.delete(dispatch_namespace, \*, account_id) -> object - client.workers_for_platforms.dispatch.namespaces.get(dispatch_namespace, \*, account_id) -> NamespaceGetResponse @@ -4720,12 +4693,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust import ZeroTrustDevices, DeviceListResponse, DeviceGetResponse +from cloudflare.types.zero_trust import ZeroTrustDevices, DeviceGetResponse ``` Methods: -- client.zero_trust.devices.list(\*, account_id) -> Optional +- client.zero_trust.devices.list(\*, account_id) -> SyncSinglePage[ZeroTrustDevices] - client.zero_trust.devices.get(device_id, \*, account_id) -> Optional ### DEXTests @@ -4733,18 +4706,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.devices import ( - DEXTestSchemasHTTP, - DEXTestListResponse, - DEXTestDeleteResponse, -) +from cloudflare.types.zero_trust.devices import DEXTestSchemasHTTP, DEXTestDeleteResponse ``` Methods: - client.zero_trust.devices.dex_tests.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.dex_tests.update(dex_test_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.dex_tests.list(\*, account_id) -> Optional +- client.zero_trust.devices.dex_tests.list(\*, account_id) -> SyncSinglePage[DEXTestSchemasHTTP] - client.zero_trust.devices.dex_tests.delete(dex_test_id, \*, account_id) -> Optional - client.zero_trust.devices.dex_tests.get(dex_test_id, \*, account_id) -> Optional @@ -4753,18 +4722,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.devices import ( - DeviceManagedNetworks, - NetworkListResponse, - NetworkDeleteResponse, -) +from cloudflare.types.zero_trust.devices import DeviceManagedNetworks, NetworkDeleteResponse ``` Methods: - client.zero_trust.devices.networks.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.networks.update(network_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.networks.list(\*, account_id) -> Optional +- client.zero_trust.devices.networks.list(\*, account_id) -> SyncSinglePage[DeviceManagedNetworks] - client.zero_trust.devices.networks.delete(network_id, \*, account_id) -> Optional - client.zero_trust.devices.networks.get(network_id, \*, account_id) -> Optional @@ -4773,17 +4738,13 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.devices import ( - DevicesDeviceSettingsPolicy, - PolicyListResponse, - PolicyDeleteResponse, -) +from cloudflare.types.zero_trust.devices import DevicesDeviceSettingsPolicy, PolicyDeleteResponse ``` Methods: - client.zero_trust.devices.policies.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.policies.list(\*, account_id) -> Optional +- client.zero_trust.devices.policies.list(\*, account_id) -> SyncSinglePage[DevicesDeviceSettingsPolicy] - client.zero_trust.devices.policies.delete(policy_id, \*, account_id) -> Optional - client.zero_trust.devices.policies.edit(policy_id, \*, account_id, \*\*params) -> Optional - client.zero_trust.devices.policies.get(policy_id, \*, account_id) -> Optional @@ -4808,7 +4769,6 @@ Types: from cloudflare.types.zero_trust.devices.policies import ( DevicesSplitTunnel, ExcludeUpdateResponse, - ExcludeListResponse, ExcludeGetResponse, ) ``` @@ -4816,7 +4776,7 @@ from cloudflare.types.zero_trust.devices.policies import ( Methods: - client.zero_trust.devices.policies.excludes.update(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.policies.excludes.list(\*, account_id) -> Optional +- client.zero_trust.devices.policies.excludes.list(\*, account_id) -> SyncSinglePage[DevicesSplitTunnel] - client.zero_trust.devices.policies.excludes.get(policy_id, \*, account_id) -> Optional #### FallbackDomains @@ -4827,7 +4787,6 @@ Types: from cloudflare.types.zero_trust.devices.policies import ( DevicesFallbackDomain, FallbackDomainUpdateResponse, - FallbackDomainListResponse, FallbackDomainGetResponse, ) ``` @@ -4835,7 +4794,7 @@ from cloudflare.types.zero_trust.devices.policies import ( Methods: - client.zero_trust.devices.policies.fallback_domains.update(policy_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.policies.fallback_domains.list(\*, account_id) -> Optional +- client.zero_trust.devices.policies.fallback_domains.list(\*, account_id) -> SyncSinglePage[DevicesFallbackDomain] - client.zero_trust.devices.policies.fallback_domains.get(policy_id, \*, account_id) -> Optional #### Includes @@ -4846,7 +4805,6 @@ Types: from cloudflare.types.zero_trust.devices.policies import ( DevicesSplitTunnelInclude, IncludeUpdateResponse, - IncludeListResponse, IncludeGetResponse, ) ``` @@ -4854,7 +4812,7 @@ from cloudflare.types.zero_trust.devices.policies import ( Methods: - client.zero_trust.devices.policies.includes.update(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.policies.includes.list(\*, account_id) -> Optional +- client.zero_trust.devices.policies.includes.list(\*, account_id) -> SyncSinglePage[DevicesSplitTunnelInclude] - client.zero_trust.devices.policies.includes.get(policy_id, \*, account_id) -> Optional ### Posture @@ -4862,18 +4820,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.devices import ( - DevicePostureRules, - PostureListResponse, - PostureDeleteResponse, -) +from cloudflare.types.zero_trust.devices import DevicePostureRules, PostureDeleteResponse ``` Methods: - client.zero_trust.devices.posture.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.devices.posture.update(rule_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.posture.list(\*, account_id) -> Optional +- client.zero_trust.devices.posture.list(\*, account_id) -> SyncSinglePage[DevicePostureRules] - client.zero_trust.devices.posture.delete(rule_id, \*, account_id) -> Optional - client.zero_trust.devices.posture.get(rule_id, \*, account_id) -> Optional @@ -4884,7 +4838,6 @@ Types: ```python from cloudflare.types.zero_trust.devices.posture import ( DevicePostureIntegrations, - IntegrationListResponse, IntegrationDeleteResponse, ) ``` @@ -4892,7 +4845,7 @@ from cloudflare.types.zero_trust.devices.posture import ( Methods: - client.zero_trust.devices.posture.integrations.create(\*, account_id, \*\*params) -> Optional -- client.zero_trust.devices.posture.integrations.list(\*, account_id) -> Optional +- client.zero_trust.devices.posture.integrations.list(\*, account_id) -> SyncSinglePage[DevicePostureIntegrations] - client.zero_trust.devices.posture.integrations.delete(integration_id, \*, account_id) -> Optional - 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 @@ -4962,7 +4915,7 @@ Methods: - client.zero_trust.identity_providers.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustIdentityProviders - client.zero_trust.identity_providers.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustIdentityProviders -- client.zero_trust.identity_providers.list(\*, account_id, zone_id) -> Optional +- client.zero_trust.identity_providers.list(\*, account_id, zone_id) -> SyncSinglePage[IdentityProviderListResponse] - client.zero_trust.identity_providers.delete(uuid, \*, account_id, zone_id) -> IdentityProviderDeleteResponse - client.zero_trust.identity_providers.get(uuid, \*, account_id, zone_id) -> ZeroTrustIdentityProviders @@ -5002,7 +4955,6 @@ Types: ```python from cloudflare.types.zero_trust.access import ( ZeroTrustApps, - ApplicationListResponse, ApplicationDeleteResponse, ApplicationRevokeTokensResponse, ) @@ -5012,7 +4964,7 @@ Methods: - client.zero_trust.access.applications.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustApps - client.zero_trust.access.applications.update(app_id, \*, account_id, zone_id, \*\*params) -> ZeroTrustApps -- client.zero_trust.access.applications.list(\*, account_id, zone_id) -> Optional +- client.zero_trust.access.applications.list(\*, account_id, zone_id) -> SyncSinglePage[ZeroTrustApps] - client.zero_trust.access.applications.delete(app_id, \*, account_id, zone_id) -> ApplicationDeleteResponse - client.zero_trust.access.applications.get(app_id, \*, account_id, zone_id) -> ZeroTrustApps - client.zero_trust.access.applications.revoke_tokens(app_id, \*, account_id, zone_id) -> object @@ -5025,7 +4977,6 @@ Types: from cloudflare.types.zero_trust.access.applications import ( ZeroTrustCA, CACreateResponse, - CAListResponse, CADeleteResponse, CAGetResponse, ) @@ -5034,7 +4985,7 @@ from cloudflare.types.zero_trust.access.applications import ( Methods: - client.zero_trust.access.applications.cas.create(uuid, \*, account_id, zone_id) -> CACreateResponse -- client.zero_trust.access.applications.cas.list(\*, account_id, zone_id) -> Optional +- client.zero_trust.access.applications.cas.list(\*, account_id, zone_id) -> SyncSinglePage[ZeroTrustCA] - client.zero_trust.access.applications.cas.delete(uuid, \*, account_id, zone_id) -> CADeleteResponse - client.zero_trust.access.applications.cas.get(uuid, \*, account_id, zone_id) -> CAGetResponse @@ -5055,18 +5006,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access.applications import ( - ZeroTrustPolicies, - PolicyListResponse, - PolicyDeleteResponse, -) +from cloudflare.types.zero_trust.access.applications import ZeroTrustPolicies, PolicyDeleteResponse ``` Methods: - client.zero_trust.access.applications.policies.create(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustPolicies - client.zero_trust.access.applications.policies.update(uuid, \*, uuid1, account_id, zone_id, \*\*params) -> ZeroTrustPolicies -- client.zero_trust.access.applications.policies.list(uuid, \*, account_id, zone_id) -> Optional +- client.zero_trust.access.applications.policies.list(uuid, \*, account_id, zone_id) -> SyncSinglePage[ZeroTrustPolicies] - client.zero_trust.access.applications.policies.delete(uuid, \*, uuid1, account_id, zone_id) -> PolicyDeleteResponse - client.zero_trust.access.applications.policies.get(uuid, \*, uuid1, account_id, zone_id) -> ZeroTrustPolicies @@ -5075,18 +5022,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import ( - ZeroTrustCertificates, - CertificateListResponse, - CertificateDeleteResponse, -) +from cloudflare.types.zero_trust.access import ZeroTrustCertificates, CertificateDeleteResponse ``` Methods: - client.zero_trust.access.certificates.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustCertificates - client.zero_trust.access.certificates.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustCertificates -- client.zero_trust.access.certificates.list(\*, account_id, zone_id) -> Optional +- client.zero_trust.access.certificates.list(\*, account_id, zone_id) -> SyncSinglePage[ZeroTrustCertificates] - client.zero_trust.access.certificates.delete(uuid, \*, account_id, zone_id) -> CertificateDeleteResponse - client.zero_trust.access.certificates.get(uuid, \*, account_id, zone_id) -> ZeroTrustCertificates @@ -5112,18 +5055,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import ( - ZeroTrustGroups, - GroupListResponse, - GroupDeleteResponse, -) +from cloudflare.types.zero_trust.access import ZeroTrustGroups, GroupDeleteResponse ``` Methods: - client.zero_trust.access.groups.create(\*, account_id, zone_id, \*\*params) -> ZeroTrustGroups - client.zero_trust.access.groups.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustGroups -- client.zero_trust.access.groups.list(\*, account_id, zone_id) -> Optional +- client.zero_trust.access.groups.list(\*, account_id, zone_id) -> SyncSinglePage[ZeroTrustGroups] - client.zero_trust.access.groups.delete(uuid, \*, account_id, zone_id) -> GroupDeleteResponse - client.zero_trust.access.groups.get(uuid, \*, account_id, zone_id) -> ZeroTrustGroups @@ -5135,7 +5074,6 @@ Types: from cloudflare.types.zero_trust.access import ( ZeroTrustServiceTokens, ServiceTokenCreateResponse, - ServiceTokenListResponse, ServiceTokenRotateResponse, ) ``` @@ -5144,7 +5082,7 @@ Methods: - client.zero_trust.access.service_tokens.create(\*, account_id, zone_id, \*\*params) -> ServiceTokenCreateResponse - client.zero_trust.access.service_tokens.update(uuid, \*, account_id, zone_id, \*\*params) -> ZeroTrustServiceTokens -- client.zero_trust.access.service_tokens.list(\*, account_id, zone_id) -> Optional +- client.zero_trust.access.service_tokens.list(\*, account_id, zone_id) -> SyncSinglePage[ZeroTrustServiceTokens] - client.zero_trust.access.service_tokens.delete(uuid, \*, account_id, zone_id) -> ZeroTrustServiceTokens - client.zero_trust.access.service_tokens.refresh(uuid, \*, identifier) -> ZeroTrustServiceTokens - client.zero_trust.access.service_tokens.rotate(uuid, \*, identifier) -> ServiceTokenRotateResponse @@ -5154,18 +5092,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import ( - ZeroTrustBookmarks, - BookmarkListResponse, - BookmarkDeleteResponse, -) +from cloudflare.types.zero_trust.access import ZeroTrustBookmarks, BookmarkDeleteResponse ``` Methods: - client.zero_trust.access.bookmarks.create(uuid, \*, identifier) -> ZeroTrustBookmarks - client.zero_trust.access.bookmarks.update(uuid, \*, identifier) -> ZeroTrustBookmarks -- client.zero_trust.access.bookmarks.list(identifier) -> Optional +- client.zero_trust.access.bookmarks.list(identifier) -> SyncSinglePage[ZeroTrustBookmarks] - client.zero_trust.access.bookmarks.delete(uuid, \*, identifier) -> BookmarkDeleteResponse - client.zero_trust.access.bookmarks.get(uuid, \*, identifier) -> ZeroTrustBookmarks @@ -5205,12 +5139,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import ZeroTrustUsers, UserListResponse +from cloudflare.types.zero_trust.access import ZeroTrustUsers ``` Methods: -- client.zero_trust.access.users.list(identifier) -> Optional +- client.zero_trust.access.users.list(identifier) -> SyncSinglePage[ZeroTrustUsers] #### ActiveSessions @@ -5225,7 +5159,7 @@ from cloudflare.types.zero_trust.access.users import ( Methods: -- client.zero_trust.access.users.active_sessions.list(id, \*, identifier) -> Optional +- client.zero_trust.access.users.active_sessions.list(id, \*, identifier) -> SyncSinglePage[ActiveSessionListResponse] - client.zero_trust.access.users.active_sessions.get(nonce, \*, identifier, id) -> ActiveSessionGetResponse #### LastSeenIdentity @@ -5250,7 +5184,7 @@ from cloudflare.types.zero_trust.access.users import FailedLoginListResponse Methods: -- client.zero_trust.access.users.failed_logins.list(id, \*, identifier) -> Optional +- client.zero_trust.access.users.failed_logins.list(id, \*, identifier) -> SyncSinglePage[FailedLoginListResponse] ### CustomPages @@ -5260,7 +5194,6 @@ Types: from cloudflare.types.zero_trust.access import ( ZeroTrustCustomPage, ZeroTrustCustomPageWithoutHTML, - CustomPageListResponse, CustomPageDeleteResponse, ) ``` @@ -5269,7 +5202,7 @@ Methods: - client.zero_trust.access.custom_pages.create(identifier, \*\*params) -> ZeroTrustCustomPageWithoutHTML - client.zero_trust.access.custom_pages.update(uuid, \*, identifier, \*\*params) -> ZeroTrustCustomPageWithoutHTML -- client.zero_trust.access.custom_pages.list(identifier) -> Optional +- client.zero_trust.access.custom_pages.list(identifier) -> SyncSinglePage[ZeroTrustCustomPageWithoutHTML] - client.zero_trust.access.custom_pages.delete(uuid, \*, identifier) -> CustomPageDeleteResponse - client.zero_trust.access.custom_pages.get(uuid, \*, identifier) -> ZeroTrustCustomPage @@ -5278,14 +5211,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.access import ZeroTrustTag, TagListResponse, TagDeleteResponse +from cloudflare.types.zero_trust.access import ZeroTrustTag, TagDeleteResponse ``` Methods: - client.zero_trust.access.tags.create(identifier, \*\*params) -> ZeroTrustTag - client.zero_trust.access.tags.update(tag_name, \*, identifier, \*\*params) -> ZeroTrustTag -- client.zero_trust.access.tags.list(identifier) -> Optional +- client.zero_trust.access.tags.list(identifier) -> SyncSinglePage[ZeroTrustTag] - client.zero_trust.access.tags.delete(name, \*, identifier) -> TagDeleteResponse - client.zero_trust.access.tags.get(name, \*, identifier) -> ZeroTrustTag @@ -5301,7 +5234,7 @@ from cloudflare.types.zero_trust.dex import ColoListResponse Methods: -- client.zero_trust.dex.colos.list(\*, account_id, \*\*params) -> Optional +- client.zero_trust.dex.colos.list(\*, account_id, \*\*params) -> SyncSinglePage[object] ### FleetStatus @@ -5521,7 +5454,7 @@ Methods: - client.zero_trust.dlp.datasets.create(\*, account_id, \*\*params) -> Optional - client.zero_trust.dlp.datasets.update(dataset_id, \*, account_id, \*\*params) -> Optional -- client.zero_trust.dlp.datasets.list(\*, account_id) -> Optional +- client.zero_trust.dlp.datasets.list(\*, account_id) -> SyncSinglePage[DLPDataset] - client.zero_trust.dlp.datasets.delete(dataset_id, \*, account_id) -> None - client.zero_trust.dlp.datasets.get(dataset_id, \*, account_id) -> Optional @@ -5568,12 +5501,12 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.dlp import DLPProfiles, ProfileListResponse, ProfileGetResponse +from cloudflare.types.zero_trust.dlp import DLPProfiles, ProfileGetResponse ``` Methods: -- client.zero_trust.dlp.profiles.list(\*, account_id) -> Optional +- client.zero_trust.dlp.profiles.list(\*, account_id) -> SyncSinglePage[DLPProfiles] - client.zero_trust.dlp.profiles.get(profile_id, \*, account_id) -> ProfileGetResponse #### Custom @@ -5639,24 +5572,24 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayCategories, CategoryListResponse +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayCategories ``` Methods: -- client.zero_trust.gateway.categories.list(\*, account_id) -> Optional +- client.zero_trust.gateway.categories.list(\*, account_id) -> SyncSinglePage[ZeroTrustGatewayCategories] ### AppTypes Types: ```python -from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayAppTypes, AppTypeListResponse +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayAppTypes ``` Methods: -- client.zero_trust.gateway.app_types.list(\*, account_id) -> Optional +- client.zero_trust.gateway.app_types.list(\*, account_id) -> SyncSinglePage[ZeroTrustGatewayAppTypes] ### Configurations @@ -5684,7 +5617,6 @@ Types: from cloudflare.types.zero_trust.gateway import ( ZeroTrustGatewayLists, ListCreateResponse, - ListListResponse, ListDeleteResponse, ) ``` @@ -5693,7 +5625,7 @@ Methods: - client.zero_trust.gateway.lists.create(\*, account_id, \*\*params) -> ListCreateResponse - client.zero_trust.gateway.lists.update(list_id, \*, account_id, \*\*params) -> ZeroTrustGatewayLists -- client.zero_trust.gateway.lists.list(\*, account_id) -> Optional +- client.zero_trust.gateway.lists.list(\*, account_id) -> SyncSinglePage[ZeroTrustGatewayLists] - client.zero_trust.gateway.lists.delete(list_id, \*, account_id) -> ListDeleteResponse - client.zero_trust.gateway.lists.edit(list_id, \*, account_id, \*\*params) -> ZeroTrustGatewayLists - client.zero_trust.gateway.lists.get(list_id, \*, account_id) -> ZeroTrustGatewayLists @@ -5708,25 +5640,21 @@ from cloudflare.types.zero_trust.gateway.lists import ItemListResponse Methods: -- client.zero_trust.gateway.lists.items.list(list_id, \*, account_id) -> Optional +- client.zero_trust.gateway.lists.items.list(list_id, \*, account_id) -> SyncSinglePage[ItemListResponse] ### Locations Types: ```python -from cloudflare.types.zero_trust.gateway import ( - ZeroTrustGatewayLocations, - LocationListResponse, - LocationDeleteResponse, -) +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayLocations, LocationDeleteResponse ``` Methods: - client.zero_trust.gateway.locations.create(\*, account_id, \*\*params) -> ZeroTrustGatewayLocations - client.zero_trust.gateway.locations.update(location_id, \*, account_id, \*\*params) -> ZeroTrustGatewayLocations -- client.zero_trust.gateway.locations.list(\*, account_id) -> Optional +- client.zero_trust.gateway.locations.list(\*, account_id) -> SyncSinglePage[ZeroTrustGatewayLocations] - client.zero_trust.gateway.locations.delete(location_id, \*, account_id) -> LocationDeleteResponse - client.zero_trust.gateway.locations.get(location_id, \*, account_id) -> ZeroTrustGatewayLocations @@ -5750,7 +5678,6 @@ Types: ```python from cloudflare.types.zero_trust.gateway import ( ZeroTrustGatewayProxyEndpoints, - ProxyEndpointListResponse, ProxyEndpointDeleteResponse, ) ``` @@ -5758,7 +5685,7 @@ from cloudflare.types.zero_trust.gateway import ( Methods: - client.zero_trust.gateway.proxy_endpoints.create(\*, account_id, \*\*params) -> ZeroTrustGatewayProxyEndpoints -- client.zero_trust.gateway.proxy_endpoints.list(\*, account_id) -> Optional +- client.zero_trust.gateway.proxy_endpoints.list(\*, account_id) -> SyncSinglePage[ZeroTrustGatewayProxyEndpoints] - client.zero_trust.gateway.proxy_endpoints.delete(proxy_endpoint_id, \*, account_id) -> ProxyEndpointDeleteResponse - client.zero_trust.gateway.proxy_endpoints.edit(proxy_endpoint_id, \*, account_id, \*\*params) -> ZeroTrustGatewayProxyEndpoints - client.zero_trust.gateway.proxy_endpoints.get(proxy_endpoint_id, \*, account_id) -> ZeroTrustGatewayProxyEndpoints @@ -5768,18 +5695,14 @@ Methods: Types: ```python -from cloudflare.types.zero_trust.gateway import ( - ZeroTrustGatewayRules, - RuleListResponse, - RuleDeleteResponse, -) +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayRules, RuleDeleteResponse ``` Methods: - client.zero_trust.gateway.rules.create(\*, account_id, \*\*params) -> ZeroTrustGatewayRules - client.zero_trust.gateway.rules.update(rule_id, \*, account_id, \*\*params) -> ZeroTrustGatewayRules -- client.zero_trust.gateway.rules.list(\*, account_id) -> Optional +- client.zero_trust.gateway.rules.list(\*, account_id) -> SyncSinglePage[ZeroTrustGatewayRules] - client.zero_trust.gateway.rules.delete(rule_id, \*, account_id) -> RuleDeleteResponse - client.zero_trust.gateway.rules.get(rule_id, \*, account_id) -> ZeroTrustGatewayRules @@ -5822,7 +5745,6 @@ Types: from cloudflare.types.zero_trust.networks import ( TunnelVirtualNetwork, VirtualNetworkCreateResponse, - VirtualNetworkListResponse, VirtualNetworkDeleteResponse, VirtualNetworkEditResponse, ) @@ -5831,7 +5753,7 @@ from cloudflare.types.zero_trust.networks import ( Methods: - client.zero_trust.networks.virtual_networks.create(\*, account_id, \*\*params) -> VirtualNetworkCreateResponse -- client.zero_trust.networks.virtual_networks.list(\*, account_id, \*\*params) -> Optional +- client.zero_trust.networks.virtual_networks.list(\*, account_id, \*\*params) -> SyncSinglePage[TunnelVirtualNetwork] - client.zero_trust.networks.virtual_networks.delete(virtual_network_id, \*, account_id) -> VirtualNetworkDeleteResponse - client.zero_trust.networks.virtual_networks.edit(virtual_network_id, \*, account_id, \*\*params) -> VirtualNetworkEditResponse @@ -5876,7 +5798,7 @@ Methods: - client.hyperdrive.configs.create(\*, account_id, \*\*params) -> Optional - client.hyperdrive.configs.update(hyperdrive_id, \*, account_id, \*\*params) -> Optional -- client.hyperdrive.configs.list(\*, account_id) -> ConfigListResponse +- client.hyperdrive.configs.list(\*, account_id) -> SyncSinglePage[ConfigListResponse] - client.hyperdrive.configs.delete(hyperdrive_id, \*, account_id) -> Optional - client.hyperdrive.configs.edit(hyperdrive_id, \*, account_id, \*\*params) -> Optional - client.hyperdrive.configs.get(hyperdrive_id, \*, account_id) -> Optional @@ -5927,7 +5849,6 @@ from cloudflare.types.vectorize import ( VectorizeIndexInsert, VectorizeIndexQuery, VectorizeIndexUpsert, - IndexListResponse, IndexDeleteResponse, IndexGetByIDsResponse, ) @@ -5937,7 +5858,7 @@ Methods: - client.vectorize.indexes.create(account_identifier, \*\*params) -> Optional - client.vectorize.indexes.update(index_name, \*, account_identifier, \*\*params) -> Optional -- client.vectorize.indexes.list(account_identifier) -> IndexListResponse +- client.vectorize.indexes.list(account_identifier) -> SyncSinglePage[VectorizeCreateIndex] - client.vectorize.indexes.delete(index_name, \*, account_identifier) -> Optional - client.vectorize.indexes.delete_by_ids(index_name, \*, account_identifier, \*\*params) -> Optional - client.vectorize.indexes.get(index_name, \*, account_identifier) -> Optional @@ -7106,7 +7027,7 @@ from cloudflare.types.speed import PageListResponse Methods: -- client.speed.pages.list(\*, zone_id) -> Optional +- client.speed.pages.list(\*, zone_id) -> SyncSinglePage[PageListResponse] # DCVDelegation @@ -7149,13 +7070,13 @@ Methods: Types: ```python -from cloudflare.types import Snippet, SnippetListResponse, SnippetDeleteResponse +from cloudflare.types import Snippet, SnippetDeleteResponse ``` Methods: - client.snippets.update(snippet_name, \*, zone_identifier, \*\*params) -> Snippet -- client.snippets.list(zone_identifier) -> SnippetListResponse +- client.snippets.list(zone_identifier) -> SyncSinglePage[Snippet] - client.snippets.delete(snippet_name, \*, zone_identifier) -> SnippetDeleteResponse - client.snippets.get(snippet_name, \*, zone_identifier) -> Snippet @@ -7176,21 +7097,21 @@ from cloudflare.types.snippets import RuleUpdateResponse, RuleListResponse Methods: - client.snippets.rules.update(zone_identifier, \*\*params) -> RuleUpdateResponse -- client.snippets.rules.list(zone_identifier) -> RuleListResponse +- client.snippets.rules.list(zone_identifier) -> SyncSinglePage[RuleListResponse] # Calls Types: ```python -from cloudflare.types import CallsApp, CallsAppWithSecret, CallListResponse +from cloudflare.types import CallsApp, CallsAppWithSecret ``` Methods: - client.calls.create(\*, account_id, \*\*params) -> CallsAppWithSecret - client.calls.update(app_id, \*, account_id, \*\*params) -> CallsApp -- client.calls.list(\*, account_id) -> CallListResponse +- client.calls.list(\*, account_id) -> SyncSinglePage[CallsApp] - client.calls.delete(app_id, \*, account_id) -> CallsApp - client.calls.get(app_id, \*, account_id) -> CallsApp diff --git a/src/cloudflare/pagination.py b/src/cloudflare/pagination.py index 7382cf23d68..37e133da6f6 100644 --- a/src/cloudflare/pagination.py +++ b/src/cloudflare/pagination.py @@ -1,11 +1,8 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Any, List, Type, Generic, Mapping, TypeVar, Optional, cast +from typing import List, Generic, TypeVar, Optional, cast from typing_extensions import override -from httpx import Response - -from ._utils import is_mapping from ._models import BaseModel, GenericModel from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage @@ -27,8 +24,6 @@ "AsyncSinglePage", ] -_BaseModelT = TypeVar("_BaseModelT", bound=BaseModel) - _T = TypeVar("_T") @@ -257,14 +252,14 @@ def next_page_info(self) -> Optional[PageInfo]: class SyncSinglePage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): - items: List[_T] + result: List[_T] @override def _get_page_items(self) -> List[_T]: - items = self.items - if not items: + result = self.result + if not result: return [] - return items + return result @override def next_page_info(self) -> None: @@ -274,25 +269,16 @@ def next_page_info(self) -> None: """ return None - @classmethod - def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 - return cls.construct( - None, - **{ - **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), - }, - ) - class AsyncSinglePage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): - items: List[_T] + result: List[_T] @override def _get_page_items(self) -> List[_T]: - items = self.items - if not items: + result = self.result + if not result: return [] - return items + return result @override def next_page_info(self) -> None: @@ -301,12 +287,3 @@ def next_page_info(self) -> None: so there will never be a next page. """ return None - - @classmethod - def build(cls: Type[_BaseModelT], *, response: Response, data: object) -> _BaseModelT: # noqa: ARG003 - return cls.construct( - None, - **{ - **(cast(Mapping[str, Any], data) if is_mapping(data) else {"items": data}), - }, - ) diff --git a/src/cloudflare/resources/accounts/roles.py b/src/cloudflare/resources/accounts/roles.py index 00196588ccd..0bfc6405723 100644 --- a/src/cloudflare/resources/accounts/roles.py +++ b/src/cloudflare/resources/accounts/roles.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, cast import httpx @@ -16,10 +16,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.accounts import RoleGetResponse, RoleListResponse +from ...types.accounts import Role, RoleGetResponse __all__ = ["Roles", "AsyncRoles"] @@ -43,7 +45,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RoleListResponse]: + ) -> SyncSinglePage[Role]: """ Get all available roles for an account. @@ -56,16 +58,13 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( f"/accounts/{account_id}/roles", + page=SyncSinglePage[Role], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RoleListResponse]], ResultWrapper[RoleListResponse]), + model=Role, ) def get( @@ -119,7 +118,7 @@ def with_raw_response(self) -> AsyncRolesWithRawResponse: def with_streaming_response(self) -> AsyncRolesWithStreamingResponse: return AsyncRolesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: object, @@ -129,7 +128,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RoleListResponse]: + ) -> AsyncPaginator[Role, AsyncSinglePage[Role]]: """ Get all available roles for an account. @@ -142,16 +141,13 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/roles", + page=AsyncSinglePage[Role], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RoleListResponse]], ResultWrapper[RoleListResponse]), + model=Role, ) async def get( diff --git a/src/cloudflare/resources/addressing/address_maps/address_maps.py b/src/cloudflare/resources/addressing/address_maps/address_maps.py index c60212fff0c..f892395f3cc 100644 --- a/src/cloudflare/resources/addressing/address_maps/address_maps.py +++ b/src/cloudflare/resources/addressing/address_maps/address_maps.py @@ -44,13 +44,14 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.addressing import ( AddressingAddressMaps, AddressMapGetResponse, - AddressMapListResponse, AddressMapCreateResponse, AddressMapDeleteResponse, address_map_edit_params, @@ -145,7 +146,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AddressMapListResponse]: + ) -> SyncSinglePage[AddressingAddressMaps]: """ List all address maps owned by the account. @@ -162,16 +163,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/address_maps", + page=SyncSinglePage[AddressingAddressMaps], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[AddressMapListResponse]], ResultWrapper[AddressMapListResponse]), + model=AddressingAddressMaps, ) def delete( @@ -412,7 +410,7 @@ async def create( cast_to=cast(Type[AddressMapCreateResponse], ResultWrapper[AddressMapCreateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -422,7 +420,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AddressMapListResponse]: + ) -> AsyncPaginator[AddressingAddressMaps, AsyncSinglePage[AddressingAddressMaps]]: """ List all address maps owned by the account. @@ -439,16 +437,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/address_maps", + page=AsyncSinglePage[AddressingAddressMaps], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[AddressMapListResponse]], ResultWrapper[AddressMapListResponse]), + model=AddressingAddressMaps, ) async def delete( diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py b/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py index c28b159dfe3..46ce8e5e38d 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/bindings.py @@ -20,15 +20,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.addressing.prefixes.bgp import ( - BindingListResponse, - BindingDeleteResponse, - AddressingServiceBinding, - binding_create_params, -) +from .....types.addressing.prefixes.bgp import BindingDeleteResponse, AddressingServiceBinding, binding_create_params __all__ = ["Bindings", "AsyncBindings"] @@ -113,7 +110,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BindingListResponse: + ) -> SyncSinglePage[AddressingServiceBinding]: """List the Cloudflare services this prefix is currently bound to. Traffic sent to @@ -140,16 +137,13 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not prefix_id: raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings", + page=SyncSinglePage[AddressingServiceBinding], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[BindingListResponse], ResultWrapper[BindingListResponse]), + model=AddressingServiceBinding, ) def delete( @@ -325,7 +319,7 @@ async def create( cast_to=cast(Type[AddressingServiceBinding], ResultWrapper[AddressingServiceBinding]), ) - async def list( + def list( self, prefix_id: str, *, @@ -336,7 +330,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> BindingListResponse: + ) -> AsyncPaginator[AddressingServiceBinding, AsyncSinglePage[AddressingServiceBinding]]: """List the Cloudflare services this prefix is currently bound to. Traffic sent to @@ -363,16 +357,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not prefix_id: raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/bindings", + page=AsyncSinglePage[AddressingServiceBinding], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[BindingListResponse], ResultWrapper[BindingListResponse]), + model=AddressingServiceBinding, ) async def delete( diff --git a/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py b/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py index 25d953a8ed5..113ea0f6d3d 100644 --- a/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/bgp/prefixes.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,10 +20,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.addressing.prefixes.bgp import PrefixListResponse, AddressingIpamBGPPrefixes, prefix_edit_params +from .....types.addressing.prefixes.bgp import AddressingIpamBGPPrefixes, prefix_edit_params __all__ = ["Prefixes", "AsyncPrefixes"] @@ -48,7 +50,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefixListResponse]: + ) -> SyncSinglePage[AddressingIpamBGPPrefixes]: """List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to @@ -73,16 +75,13 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not prefix_id: raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes", + page=SyncSinglePage[AddressingIpamBGPPrefixes], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PrefixListResponse]], ResultWrapper[PrefixListResponse]), + model=AddressingIpamBGPPrefixes, ) def edit( @@ -196,7 +195,7 @@ def with_raw_response(self) -> AsyncPrefixesWithRawResponse: def with_streaming_response(self) -> AsyncPrefixesWithStreamingResponse: return AsyncPrefixesWithStreamingResponse(self) - async def list( + def list( self, prefix_id: str, *, @@ -207,7 +206,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefixListResponse]: + ) -> AsyncPaginator[AddressingIpamBGPPrefixes, AsyncSinglePage[AddressingIpamBGPPrefixes]]: """List all BGP Prefixes within the specified IP Prefix. BGP Prefixes are used to @@ -232,16 +231,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not prefix_id: raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/bgp/prefixes", + page=AsyncSinglePage[AddressingIpamBGPPrefixes], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PrefixListResponse]], ResultWrapper[PrefixListResponse]), + model=AddressingIpamBGPPrefixes, ) async def edit( diff --git a/src/cloudflare/resources/addressing/prefixes/delegations.py b/src/cloudflare/resources/addressing/prefixes/delegations.py index f84c4f7290a..128e96049de 100644 --- a/src/cloudflare/resources/addressing/prefixes/delegations.py +++ b/src/cloudflare/resources/addressing/prefixes/delegations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,15 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.addressing.prefixes import ( - DelegationListResponse, - DelegationDeleteResponse, - AddressingIpamDelegations, - delegation_create_params, -) +from ....types.addressing.prefixes import DelegationDeleteResponse, AddressingIpamDelegations, delegation_create_params __all__ = ["Delegations", "AsyncDelegations"] @@ -110,7 +107,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DelegationListResponse]: + ) -> SyncSinglePage[AddressingIpamDelegations]: """ List all delegations for a given account IP prefix. @@ -131,16 +128,13 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not prefix_id: raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations", + page=SyncSinglePage[AddressingIpamDelegations], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DelegationListResponse]], ResultWrapper[DelegationListResponse]), + model=AddressingIpamDelegations, ) def delete( @@ -259,7 +253,7 @@ async def create( cast_to=cast(Type[AddressingIpamDelegations], ResultWrapper[AddressingIpamDelegations]), ) - async def list( + def list( self, prefix_id: str, *, @@ -270,7 +264,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DelegationListResponse]: + ) -> AsyncPaginator[AddressingIpamDelegations, AsyncSinglePage[AddressingIpamDelegations]]: """ List all delegations for a given account IP prefix. @@ -291,16 +285,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not prefix_id: raise ValueError(f"Expected a non-empty value for `prefix_id` but received {prefix_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes/{prefix_id}/delegations", + page=AsyncSinglePage[AddressingIpamDelegations], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DelegationListResponse]], ResultWrapper[DelegationListResponse]), + model=AddressingIpamDelegations, ) async def delete( diff --git a/src/cloudflare/resources/addressing/prefixes/prefixes.py b/src/cloudflare/resources/addressing/prefixes/prefixes.py index 182c703144f..c93fbcd9ef6 100644 --- a/src/cloudflare/resources/addressing/prefixes/prefixes.py +++ b/src/cloudflare/resources/addressing/prefixes/prefixes.py @@ -37,16 +37,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.addressing import ( - PrefixListResponse, - PrefixDeleteResponse, - AddressingIpamPrefixes, - prefix_edit_params, - prefix_create_params, -) +from ....types.addressing import PrefixDeleteResponse, AddressingIpamPrefixes, prefix_edit_params, prefix_create_params __all__ = ["Prefixes", "AsyncPrefixes"] @@ -134,7 +130,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefixListResponse]: + ) -> SyncSinglePage[AddressingIpamPrefixes]: """ List all prefixes owned by the account. @@ -151,16 +147,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes", + page=SyncSinglePage[AddressingIpamPrefixes], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PrefixListResponse]], ResultWrapper[PrefixListResponse]), + model=AddressingIpamPrefixes, ) def delete( @@ -378,7 +371,7 @@ async def create( cast_to=cast(Type[AddressingIpamPrefixes], ResultWrapper[AddressingIpamPrefixes]), ) - async def list( + def list( self, *, account_id: str, @@ -388,7 +381,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PrefixListResponse]: + ) -> AsyncPaginator[AddressingIpamPrefixes, AsyncSinglePage[AddressingIpamPrefixes]]: """ List all prefixes owned by the account. @@ -405,16 +398,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/prefixes", + page=AsyncSinglePage[AddressingIpamPrefixes], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PrefixListResponse]], ResultWrapper[PrefixListResponse]), + model=AddressingIpamPrefixes, ) async def delete( diff --git a/src/cloudflare/resources/addressing/services.py b/src/cloudflare/resources/addressing/services.py index 92e194808cd..13a93ebb865 100644 --- a/src/cloudflare/resources/addressing/services.py +++ b/src/cloudflare/resources/addressing/services.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, cast - import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,8 +13,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.addressing import ServiceListResponse @@ -43,7 +42,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceListResponse: + ) -> SyncSinglePage[ServiceListResponse]: """ Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the @@ -63,16 +62,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/services", + page=SyncSinglePage[ServiceListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ServiceListResponse], ResultWrapper[ServiceListResponse]), + model=ServiceListResponse, ) @@ -85,7 +81,7 @@ def with_raw_response(self) -> AsyncServicesWithRawResponse: def with_streaming_response(self) -> AsyncServicesWithStreamingResponse: return AsyncServicesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -95,7 +91,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ServiceListResponse: + ) -> AsyncPaginator[ServiceListResponse, AsyncSinglePage[ServiceListResponse]]: """ Bring-Your-Own IP (BYOIP) prefixes onboarded to Cloudflare must be bound to a service running on the Cloudflare network to enable a Cloudflare product on the @@ -115,16 +111,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/addressing/services", + page=AsyncSinglePage[ServiceListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ServiceListResponse], ResultWrapper[ServiceListResponse]), + model=ServiceListResponse, ) diff --git a/src/cloudflare/resources/alerting/destinations/webhooks.py b/src/cloudflare/resources/alerting/destinations/webhooks.py index 62567e627bb..62528f9e741 100644 --- a/src/cloudflare/resources/alerting/destinations/webhooks.py +++ b/src/cloudflare/resources/alerting/destinations/webhooks.py @@ -20,12 +20,13 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.alerting.destinations import ( AlertingWebhooks, - WebhookListResponse, WebhookCreateResponse, WebhookDeleteResponse, WebhookUpdateResponse, @@ -178,7 +179,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebhookListResponse]: + ) -> SyncSinglePage[AlertingWebhooks]: """ Gets a list of all configured webhook destinations. @@ -195,16 +196,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/alerting/v3/destinations/webhooks", + page=SyncSinglePage[AlertingWebhooks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[WebhookListResponse]], ResultWrapper[WebhookListResponse]), + model=AlertingWebhooks, ) def delete( @@ -433,7 +431,7 @@ async def update( cast_to=cast(Type[WebhookUpdateResponse], ResultWrapper[WebhookUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -443,7 +441,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WebhookListResponse]: + ) -> AsyncPaginator[AlertingWebhooks, AsyncSinglePage[AlertingWebhooks]]: """ Gets a list of all configured webhook destinations. @@ -460,16 +458,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/alerting/v3/destinations/webhooks", + page=AsyncSinglePage[AlertingWebhooks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[WebhookListResponse]], ResultWrapper[WebhookListResponse]), + model=AlertingWebhooks, ) async def delete( diff --git a/src/cloudflare/resources/alerting/policies.py b/src/cloudflare/resources/alerting/policies.py index 434a862f31c..a3372cb90f5 100644 --- a/src/cloudflare/resources/alerting/policies.py +++ b/src/cloudflare/resources/alerting/policies.py @@ -21,12 +21,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.alerting import ( AlertingPolicies, - PolicyListResponse, PolicyCreateResponse, PolicyDeleteResponse, PolicyUpdateResponse, @@ -320,7 +321,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> SyncSinglePage[AlertingPolicies]: """ Get a list of all Notification policies. @@ -337,16 +338,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/alerting/v3/policies", + page=SyncSinglePage[AlertingPolicies], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=AlertingPolicies, ) def delete( @@ -716,7 +714,7 @@ async def update( cast_to=cast(Type[PolicyUpdateResponse], ResultWrapper[PolicyUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -726,7 +724,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> AsyncPaginator[AlertingPolicies, AsyncSinglePage[AlertingPolicies]]: """ Get a list of all Notification policies. @@ -743,16 +741,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/alerting/v3/policies", + page=AsyncSinglePage[AlertingPolicies], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=AlertingPolicies, ) async def delete( diff --git a/src/cloudflare/resources/calls.py b/src/cloudflare/resources/calls.py index d9b7184ecb0..595b997a7e5 100644 --- a/src/cloudflare/resources/calls.py +++ b/src/cloudflare/resources/calls.py @@ -6,13 +6,7 @@ import httpx -from ..types import ( - CallsApp, - CallListResponse, - CallsAppWithSecret, - call_create_params, - call_update_params, -) +from ..types import CallsApp, CallsAppWithSecret, call_create_params, call_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -27,7 +21,9 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper +from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( + AsyncPaginator, make_request_options, ) @@ -146,7 +142,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallListResponse: + ) -> SyncSinglePage[CallsApp]: """ Lists all apps in the Cloudflare account @@ -163,16 +159,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/calls/apps", + page=SyncSinglePage[CallsApp], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[CallListResponse], ResultWrapper[CallListResponse]), + model=CallsApp, ) def delete( @@ -366,7 +359,7 @@ async def update( cast_to=cast(Type[CallsApp], ResultWrapper[CallsApp]), ) - async def list( + def list( self, *, account_id: str, @@ -376,7 +369,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CallListResponse: + ) -> AsyncPaginator[CallsApp, AsyncSinglePage[CallsApp]]: """ Lists all apps in the Cloudflare account @@ -393,16 +386,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/calls/apps", + page=AsyncSinglePage[CallsApp], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[CallListResponse], ResultWrapper[CallListResponse]), + model=CallsApp, ) async def delete( diff --git a/src/cloudflare/resources/durable_objects/namespaces/namespaces.py b/src/cloudflare/resources/durable_objects/namespaces/namespaces.py index c6fc6f7e5dd..a46939676e7 100644 --- a/src/cloudflare/resources/durable_objects/namespaces/namespaces.py +++ b/src/cloudflare/resources/durable_objects/namespaces/namespaces.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from .objects import ( @@ -23,11 +21,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.durable_objects import NamespaceListResponse +from ....types.durable_objects import DurableObjectNamespace __all__ = ["Namespaces", "AsyncNamespaces"] @@ -55,7 +54,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NamespaceListResponse]: + ) -> SyncSinglePage[DurableObjectNamespace]: """ Returns the Durable Object namespaces owned by an account. @@ -72,16 +71,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/durable_objects/namespaces", + page=SyncSinglePage[DurableObjectNamespace], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[NamespaceListResponse]], ResultWrapper[NamespaceListResponse]), + model=DurableObjectNamespace, ) @@ -98,7 +94,7 @@ def with_raw_response(self) -> AsyncNamespacesWithRawResponse: def with_streaming_response(self) -> AsyncNamespacesWithStreamingResponse: return AsyncNamespacesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -108,7 +104,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NamespaceListResponse]: + ) -> AsyncPaginator[DurableObjectNamespace, AsyncSinglePage[DurableObjectNamespace]]: """ Returns the Durable Object namespaces owned by an account. @@ -125,16 +121,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/durable_objects/namespaces", + page=AsyncSinglePage[DurableObjectNamespace], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[NamespaceListResponse]], ResultWrapper[NamespaceListResponse]), + model=DurableObjectNamespace, ) diff --git a/src/cloudflare/resources/healthchecks/healthchecks.py b/src/cloudflare/resources/healthchecks/healthchecks.py index 113f89b83eb..5ceeb208130 100644 --- a/src/cloudflare/resources/healthchecks/healthchecks.py +++ b/src/cloudflare/resources/healthchecks/healthchecks.py @@ -9,7 +9,6 @@ from ...types import ( Healthcheck, - HealthcheckListResponse, HealthcheckDeleteResponse, healthcheck_edit_params, healthcheck_create_params, @@ -37,7 +36,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -320,7 +321,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HealthcheckListResponse]: + ) -> SyncSinglePage[Healthcheck]: """ List configured health checks. @@ -337,16 +338,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/healthchecks", + page=SyncSinglePage[Healthcheck], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[HealthcheckListResponse]], ResultWrapper[HealthcheckListResponse]), + model=Healthcheck, ) def delete( @@ -833,7 +831,7 @@ async def update( cast_to=cast(Type[Healthcheck], ResultWrapper[Healthcheck]), ) - async def list( + def list( self, *, zone_id: str, @@ -843,7 +841,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HealthcheckListResponse]: + ) -> AsyncPaginator[Healthcheck, AsyncSinglePage[Healthcheck]]: """ List configured health checks. @@ -860,16 +858,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/healthchecks", + page=AsyncSinglePage[Healthcheck], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[HealthcheckListResponse]], ResultWrapper[HealthcheckListResponse]), + model=Healthcheck, ) async def delete( diff --git a/src/cloudflare/resources/hyperdrive/configs.py b/src/cloudflare/resources/hyperdrive/configs.py index 31e96b71c10..451c1c4020c 100644 --- a/src/cloudflare/resources/hyperdrive/configs.py +++ b/src/cloudflare/resources/hyperdrive/configs.py @@ -20,7 +20,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.hyperdrive import ( @@ -144,7 +146,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigListResponse: + ) -> SyncSinglePage[ConfigListResponse]: """ Returns a list of Hyperdrives @@ -161,16 +163,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/hyperdrive/configs", + page=SyncSinglePage[ConfigListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ConfigListResponse], ResultWrapper[ConfigListResponse]), + model=ConfigListResponse, ) def delete( @@ -411,7 +410,7 @@ async def update( cast_to=cast(Type[Optional[ConfigUpdateResponse]], ResultWrapper[ConfigUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -421,7 +420,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ConfigListResponse: + ) -> AsyncPaginator[ConfigListResponse, AsyncSinglePage[ConfigListResponse]]: """ Returns a list of Hyperdrives @@ -438,16 +437,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/hyperdrive/configs", + page=AsyncSinglePage[ConfigListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ConfigListResponse], ResultWrapper[ConfigListResponse]), + model=ConfigListResponse, ) async def delete( diff --git a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py index 98e9e9e195e..add3191f331 100644 --- a/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py +++ b/src/cloudflare/resources/intel/indicator_feeds/indicator_feeds.py @@ -28,6 +28,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.intel import ( IndicatorFeedGetResponse, IndicatorFeedListResponse, @@ -37,6 +38,7 @@ indicator_feed_update_params, ) from ...._base_client import ( + AsyncPaginator, make_request_options, ) @@ -164,7 +166,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedListResponse: + ) -> SyncSinglePage[IndicatorFeedListResponse]: """ Get indicator feeds owned by this account @@ -181,16 +183,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/intel/indicator-feeds", + page=SyncSinglePage[IndicatorFeedListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[IndicatorFeedListResponse], ResultWrapper[IndicatorFeedListResponse]), + model=IndicatorFeedListResponse, ) def data( @@ -388,7 +387,7 @@ async def update( cast_to=cast(Type[IndicatorFeedUpdateResponse], ResultWrapper[IndicatorFeedUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -398,7 +397,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndicatorFeedListResponse: + ) -> AsyncPaginator[IndicatorFeedListResponse, AsyncSinglePage[IndicatorFeedListResponse]]: """ Get indicator feeds owned by this account @@ -415,16 +414,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/intel/indicator-feeds", + page=AsyncSinglePage[IndicatorFeedListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[IndicatorFeedListResponse], ResultWrapper[IndicatorFeedListResponse]), + model=IndicatorFeedListResponse, ) async def data( diff --git a/src/cloudflare/resources/intel/sinkholes.py b/src/cloudflare/resources/intel/sinkholes.py index e29c60fbf81..ecd8c6c8e4e 100644 --- a/src/cloudflare/resources/intel/sinkholes.py +++ b/src/cloudflare/resources/intel/sinkholes.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, cast - import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,9 +13,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper -from ...types.intel import SinkholeListResponse +from ...pagination import SyncSinglePage, AsyncSinglePage +from ...types.intel import IntelSinkholeItem from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -43,7 +42,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SinkholeListResponse: + ) -> SyncSinglePage[IntelSinkholeItem]: """ List sinkholes owned by this account @@ -60,16 +59,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/intel/sinkholes", + page=SyncSinglePage[IntelSinkholeItem], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[SinkholeListResponse], ResultWrapper[SinkholeListResponse]), + model=IntelSinkholeItem, ) @@ -82,7 +78,7 @@ def with_raw_response(self) -> AsyncSinkholesWithRawResponse: def with_streaming_response(self) -> AsyncSinkholesWithStreamingResponse: return AsyncSinkholesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -92,7 +88,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SinkholeListResponse: + ) -> AsyncPaginator[IntelSinkholeItem, AsyncSinglePage[IntelSinkholeItem]]: """ List sinkholes owned by this account @@ -109,16 +105,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/intel/sinkholes", + page=AsyncSinglePage[IntelSinkholeItem], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[SinkholeListResponse], ResultWrapper[SinkholeListResponse]), + model=IntelSinkholeItem, ) diff --git a/src/cloudflare/resources/keyless_certificates.py b/src/cloudflare/resources/keyless_certificates.py index 6fa50f619f8..8fc10fd3d1e 100644 --- a/src/cloudflare/resources/keyless_certificates.py +++ b/src/cloudflare/resources/keyless_certificates.py @@ -2,14 +2,13 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast from typing_extensions import Literal import httpx from ..types import ( KeylessCertificateHostname, - KeylessCertificateListResponse, KeylessCertificateDeleteResponse, keyless_certificate_edit_params, keyless_certificate_create_params, @@ -28,7 +27,9 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper +from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( + AsyncPaginator, make_request_options, ) @@ -126,7 +127,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[KeylessCertificateListResponse]: + ) -> SyncSinglePage[KeylessCertificateHostname]: """ List all Keyless SSL configurations for a given zone. @@ -143,16 +144,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/keyless_certificates", + page=SyncSinglePage[KeylessCertificateHostname], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[KeylessCertificateListResponse]], ResultWrapper[KeylessCertificateListResponse]), + model=KeylessCertificateHostname, ) def delete( @@ -403,7 +401,7 @@ async def create( cast_to=cast(Type[KeylessCertificateHostname], ResultWrapper[KeylessCertificateHostname]), ) - async def list( + def list( self, *, zone_id: str, @@ -413,7 +411,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[KeylessCertificateListResponse]: + ) -> AsyncPaginator[KeylessCertificateHostname, AsyncSinglePage[KeylessCertificateHostname]]: """ List all Keyless SSL configurations for a given zone. @@ -430,16 +428,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/keyless_certificates", + page=AsyncSinglePage[KeylessCertificateHostname], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[KeylessCertificateListResponse]], ResultWrapper[KeylessCertificateListResponse]), + model=KeylessCertificateHostname, ) async def delete( diff --git a/src/cloudflare/resources/load_balancers/load_balancers.py b/src/cloudflare/resources/load_balancers/load_balancers.py index 5dba4f5b38f..4216e4e2fe2 100644 --- a/src/cloudflare/resources/load_balancers/load_balancers.py +++ b/src/cloudflare/resources/load_balancers/load_balancers.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Iterable, Optional, cast +from typing import List, Type, Iterable, cast from typing_extensions import Literal import httpx @@ -17,7 +17,6 @@ ) from ...types import ( LoadBalancer, - LoadBalancerListResponse, LoadBalancerDeleteResponse, load_balancer_edit_params, load_balancer_create_params, @@ -70,7 +69,9 @@ ) from ..._wrappers import ResultWrapper from .pools.pools import Pools, AsyncPools +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from .monitors.monitors import Monitors, AsyncMonitors @@ -520,7 +521,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LoadBalancerListResponse]: + ) -> SyncSinglePage[LoadBalancer]: """ List configured load balancers. @@ -535,16 +536,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/load_balancers", + page=SyncSinglePage[LoadBalancer], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[LoadBalancerListResponse]], ResultWrapper[LoadBalancerListResponse]), + model=LoadBalancer, ) def delete( @@ -1265,7 +1263,7 @@ async def update( cast_to=cast(Type[LoadBalancer], ResultWrapper[LoadBalancer]), ) - async def list( + def list( self, *, zone_id: str, @@ -1275,7 +1273,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LoadBalancerListResponse]: + ) -> AsyncPaginator[LoadBalancer, AsyncSinglePage[LoadBalancer]]: """ List configured load balancers. @@ -1290,16 +1288,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/load_balancers", + page=AsyncSinglePage[LoadBalancer], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[LoadBalancerListResponse]], ResultWrapper[LoadBalancerListResponse]), + model=LoadBalancer, ) async def delete( diff --git a/src/cloudflare/resources/load_balancers/monitors/monitors.py b/src/cloudflare/resources/load_balancers/monitors/monitors.py index 60212b302d3..53b9f963ff6 100644 --- a/src/cloudflare/resources/load_balancers/monitors/monitors.py +++ b/src/cloudflare/resources/load_balancers/monitors/monitors.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -37,11 +37,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.load_balancers import ( - MonitorListResponse, MonitorDeleteResponse, monitor_edit_params, monitor_create_params, @@ -332,7 +333,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MonitorListResponse]: + ) -> SyncSinglePage[LoadBalancingMonitor]: """ List configured monitors for an account. @@ -349,16 +350,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/load_balancers/monitors", + page=SyncSinglePage[LoadBalancingMonitor], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[MonitorListResponse]], ResultWrapper[MonitorListResponse]), + model=LoadBalancingMonitor, ) def delete( @@ -844,7 +842,7 @@ async def update( cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) - async def list( + def list( self, *, account_id: str, @@ -854,7 +852,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MonitorListResponse]: + ) -> AsyncPaginator[LoadBalancingMonitor, AsyncSinglePage[LoadBalancingMonitor]]: """ List configured monitors for an account. @@ -871,16 +869,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/load_balancers/monitors", + page=AsyncSinglePage[LoadBalancingMonitor], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[MonitorListResponse]], ResultWrapper[MonitorListResponse]), + model=LoadBalancingMonitor, ) async def delete( diff --git a/src/cloudflare/resources/load_balancers/pools/pools.py b/src/cloudflare/resources/load_balancers/pools/pools.py index 5e115bdb6f8..d08af267c65 100644 --- a/src/cloudflare/resources/load_balancers/pools/pools.py +++ b/src/cloudflare/resources/load_balancers/pools/pools.py @@ -37,11 +37,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.load_balancers import ( - PoolListResponse, PoolDeleteResponse, pool_edit_params, pool_list_params, @@ -323,7 +324,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PoolListResponse]: + ) -> SyncSinglePage[LoadBalancingPool]: """ List configured pools. @@ -343,17 +344,17 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/load_balancers/pools", + page=SyncSinglePage[LoadBalancingPool], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, query=maybe_transform({"monitor": monitor}, pool_list_params.PoolListParams), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PoolListResponse]], ResultWrapper[PoolListResponse]), + model=LoadBalancingPool, ) def delete( @@ -835,7 +836,7 @@ async def update( cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) - async def list( + def list( self, *, account_id: str, @@ -846,7 +847,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PoolListResponse]: + ) -> AsyncPaginator[LoadBalancingPool, AsyncSinglePage[LoadBalancingPool]]: """ List configured pools. @@ -866,17 +867,17 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/load_balancers/pools", + page=AsyncSinglePage[LoadBalancingPool], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"monitor": monitor}, pool_list_params.PoolListParams), - post_parser=ResultWrapper._unwrapper, + query=maybe_transform({"monitor": monitor}, pool_list_params.PoolListParams), ), - cast_to=cast(Type[Optional[PoolListResponse]], ResultWrapper[PoolListResponse]), + model=LoadBalancingPool, ) async def delete( diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index 56f3a10d613..f16d111e08b 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -21,10 +21,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.logpush import JobListResponse, JobDeleteResponse, job_create_params, job_update_params +from ...types.logpush import JobDeleteResponse, job_create_params, job_update_params from ...types.logpush.datasets import LogpushJob __all__ = ["Jobs", "AsyncJobs"] @@ -249,7 +251,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> JobListResponse: + ) -> SyncSinglePage[Optional[LogpushJob]]: """ Lists Logpush jobs for an account or zone. @@ -281,16 +283,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs", + page=SyncSinglePage[LogpushJob], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[JobListResponse], ResultWrapper[JobListResponse]), + model=LogpushJob, ) def delete( @@ -623,7 +622,7 @@ async def update( cast_to=cast(Type[Optional[LogpushJob]], ResultWrapper[LogpushJob]), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -634,7 +633,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> JobListResponse: + ) -> AsyncPaginator[Optional[LogpushJob], AsyncSinglePage[Optional[LogpushJob]]]: """ Lists Logpush jobs for an account or zone. @@ -666,16 +665,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs", + page=AsyncSinglePage[LogpushJob], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[JobListResponse], ResultWrapper[JobListResponse]), + model=LogpushJob, ) async def delete( diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py index e1888cd6b18..fa4ae167353 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py @@ -16,6 +16,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from .advertisements import ( Advertisements, AsyncAdvertisements, @@ -25,9 +26,10 @@ AsyncAdvertisementsWithStreamingResponse, ) from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.magic_network_monitoring import RuleListResponse, MagicNetworkMonitoringRule +from ....types.magic_network_monitoring import MagicNetworkMonitoringRule __all__ = ["Rules", "AsyncRules"] @@ -131,7 +133,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleListResponse]: + ) -> SyncSinglePage[Optional[MagicNetworkMonitoringRule]]: """ Lists network monitoring rules for account. @@ -146,16 +148,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/mnm/rules", + page=SyncSinglePage[MagicNetworkMonitoringRule], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RuleListResponse]], ResultWrapper[RuleListResponse]), + model=MagicNetworkMonitoringRule, ) def delete( @@ -368,7 +367,7 @@ async def update( cast_to=cast(Type[Optional[MagicNetworkMonitoringRule]], ResultWrapper[MagicNetworkMonitoringRule]), ) - async def list( + def list( self, *, account_id: str, @@ -378,7 +377,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleListResponse]: + ) -> AsyncPaginator[Optional[MagicNetworkMonitoringRule], AsyncSinglePage[Optional[MagicNetworkMonitoringRule]]]: """ Lists network monitoring rules for account. @@ -393,16 +392,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/mnm/rules", + page=AsyncSinglePage[MagicNetworkMonitoringRule], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RuleListResponse]], ResultWrapper[RuleListResponse]), + model=MagicNetworkMonitoringRule, ) async def delete( diff --git a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py index 0b04602dfd9..505f1a90c7d 100644 --- a/src/cloudflare/resources/mtls_certificates/mtls_certificates.py +++ b/src/cloudflare/resources/mtls_certificates/mtls_certificates.py @@ -2,16 +2,11 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx -from ...types import ( - MTLSCertificate, - MTLSCertificateUpdate, - MTLSCertificateListResponse, - mtls_certificate_create_params, -) +from ...types import MTLSCertificate, MTLSCertificateUpdate, mtls_certificate_create_params from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -26,6 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from .associations import ( Associations, AsyncAssociations, @@ -35,6 +31,7 @@ AsyncAssociationsWithStreamingResponse, ) from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -124,7 +121,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MTLSCertificateListResponse]: + ) -> SyncSinglePage[MTLSCertificate]: """ Lists all mTLS certificates. @@ -141,16 +138,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/mtls_certificates", + page=SyncSinglePage[MTLSCertificate], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[MTLSCertificateListResponse]], ResultWrapper[MTLSCertificateListResponse]), + model=MTLSCertificate, ) def delete( @@ -320,7 +314,7 @@ async def create( cast_to=cast(Type[MTLSCertificateUpdate], ResultWrapper[MTLSCertificateUpdate]), ) - async def list( + def list( self, *, account_id: str, @@ -330,7 +324,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MTLSCertificateListResponse]: + ) -> AsyncPaginator[MTLSCertificate, AsyncSinglePage[MTLSCertificate]]: """ Lists all mTLS certificates. @@ -347,16 +341,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/mtls_certificates", + page=AsyncSinglePage[MTLSCertificate], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[MTLSCertificateListResponse]], ResultWrapper[MTLSCertificateListResponse]), + model=MTLSCertificate, ) async def delete( diff --git a/src/cloudflare/resources/origin_ca_certificates.py b/src/cloudflare/resources/origin_ca_certificates.py index 9451a6f5ae9..b9104ca3a01 100644 --- a/src/cloudflare/resources/origin_ca_certificates.py +++ b/src/cloudflare/resources/origin_ca_certificates.py @@ -2,14 +2,14 @@ from __future__ import annotations -from typing import Any, Type, Iterable, Optional, cast +from typing import Any, Type, Iterable, cast from typing_extensions import Literal import httpx from ..types import ( + OriginCACertificate, OriginCACertificateGetResponse, - OriginCACertificateListResponse, OriginCACertificateCreateResponse, OriginCACertificateDeleteResponse, origin_ca_certificate_create_params, @@ -28,7 +28,9 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper +from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( + AsyncPaginator, make_request_options, ) @@ -117,25 +119,20 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginCACertificateListResponse]: + ) -> SyncSinglePage[OriginCACertificate]: """List all existing Origin CA certificates for a given zone. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)). """ - return self._get( + return self._get_api_list( "/certificates", + page=SyncSinglePage[OriginCACertificate], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast( - Type[Optional[OriginCACertificateListResponse]], ResultWrapper[OriginCACertificateListResponse] + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + model=OriginCACertificate, ) def delete( @@ -301,7 +298,7 @@ async def create( ), ) - async def list( + def list( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -310,25 +307,20 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginCACertificateListResponse]: + ) -> AsyncPaginator[OriginCACertificate, AsyncSinglePage[OriginCACertificate]]: """List all existing Origin CA certificates for a given zone. Use your Origin CA Key as your User Service Key when calling this endpoint ([see above](#requests)). """ - return await self._get( + return self._get_api_list( "/certificates", + page=AsyncSinglePage[OriginCACertificate], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast( - Type[Optional[OriginCACertificateListResponse]], ResultWrapper[OriginCACertificateListResponse] + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + model=OriginCACertificate, ) async def delete( diff --git a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py index 840dd2147a0..a20922942f9 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py +++ b/src/cloudflare/resources/origin_tls_client_auth/hostnames/certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,14 +20,13 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.origin_tls_client_auth.hostnames import ( - CertificateListResponse, - OriginTLSClientCertificate, - certificate_create_params, -) +from ....types.origin_tls_client_auth import OriginTLSClientCertificateID +from ....types.origin_tls_client_auth.hostnames import OriginTLSClientCertificate, certificate_create_params __all__ = ["Certificates", "AsyncCertificates"] @@ -105,7 +104,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CertificateListResponse]: + ) -> SyncSinglePage[OriginTLSClientCertificateID]: """ List Certificates @@ -122,16 +121,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates", + page=SyncSinglePage[OriginTLSClientCertificateID], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CertificateListResponse]], ResultWrapper[CertificateListResponse]), + model=OriginTLSClientCertificateID, ) def delete( @@ -286,7 +282,7 @@ async def create( cast_to=cast(Type[OriginTLSClientCertificate], ResultWrapper[OriginTLSClientCertificate]), ) - async def list( + def list( self, *, zone_id: str, @@ -296,7 +292,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CertificateListResponse]: + ) -> AsyncPaginator[OriginTLSClientCertificateID, AsyncSinglePage[OriginTLSClientCertificateID]]: """ List Certificates @@ -313,16 +309,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/origin_tls_client_auth/hostnames/certificates", + page=AsyncSinglePage[OriginTLSClientCertificateID], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CertificateListResponse]], ResultWrapper[CertificateListResponse]), + model=OriginTLSClientCertificateID, ) async def delete( diff --git a/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py b/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py index 8c9e842761c..bfed59276f2 100644 --- a/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py +++ b/src/cloudflare/resources/origin_tls_client_auth/origin_tls_client_auth.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, cast import httpx @@ -43,7 +43,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from .hostnames.hostnames import Hostnames, AsyncHostnames @@ -139,7 +141,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginTLSClientAuthListResponse]: + ) -> SyncSinglePage[OriginTLSClientAuthListResponse]: """ List Certificates @@ -156,18 +158,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/origin_tls_client_auth", + page=SyncSinglePage[OriginTLSClientAuthListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast( - Type[Optional[OriginTLSClientAuthListResponse]], ResultWrapper[OriginTLSClientAuthListResponse] + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + model=OriginTLSClientAuthListResponse, ) def delete( @@ -347,7 +344,7 @@ async def create( ), ) - async def list( + def list( self, *, zone_id: str, @@ -357,7 +354,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[OriginTLSClientAuthListResponse]: + ) -> AsyncPaginator[OriginTLSClientAuthListResponse, AsyncSinglePage[OriginTLSClientAuthListResponse]]: """ List Certificates @@ -374,18 +371,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/origin_tls_client_auth", + page=AsyncSinglePage[OriginTLSClientAuthListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, - ), - cast_to=cast( - Type[Optional[OriginTLSClientAuthListResponse]], ResultWrapper[OriginTLSClientAuthListResponse] + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), + model=OriginTLSClientAuthListResponse, ) async def delete( diff --git a/src/cloudflare/resources/page_shield/connections.py b/src/cloudflare/resources/page_shield/connections.py index 2bd9d184b44..64c146b362e 100644 --- a/src/cloudflare/resources/page_shield/connections.py +++ b/src/cloudflare/resources/page_shield/connections.py @@ -2,16 +2,12 @@ from __future__ import annotations -from typing import Type, Optional, cast from typing_extensions import Literal import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -20,11 +16,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.page_shield import PageShieldConnection, ConnectionListResponse, connection_list_params +from ...types.page_shield import PageShieldConnection, connection_list_params __all__ = ["Connections", "AsyncConnections"] @@ -60,7 +57,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConnectionListResponse]: + ) -> SyncSinglePage[PageShieldConnection]: """ Lists all connections detected by Page Shield. @@ -123,8 +120,9 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/page_shield/connections", + page=SyncSinglePage[PageShieldConnection], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -147,9 +145,8 @@ def list( }, connection_list_params.ConnectionListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConnectionListResponse]], ResultWrapper[ConnectionListResponse]), + model=PageShieldConnection, ) def get( @@ -202,7 +199,7 @@ def with_raw_response(self) -> AsyncConnectionsWithRawResponse: def with_streaming_response(self) -> AsyncConnectionsWithStreamingResponse: return AsyncConnectionsWithStreamingResponse(self) - async def list( + def list( self, *, zone_id: str, @@ -224,7 +221,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ConnectionListResponse]: + ) -> AsyncPaginator[PageShieldConnection, AsyncSinglePage[PageShieldConnection]]: """ Lists all connections detected by Page Shield. @@ -287,14 +284,15 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/page_shield/connections", + page=AsyncSinglePage[PageShieldConnection], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "direction": direction, "exclude_cdn_cgi": exclude_cdn_cgi, @@ -311,9 +309,8 @@ async def list( }, connection_list_params.ConnectionListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ConnectionListResponse]], ResultWrapper[ConnectionListResponse]), + model=PageShieldConnection, ) async def get( diff --git a/src/cloudflare/resources/page_shield/policies.py b/src/cloudflare/resources/page_shield/policies.py index 626e619f8ac..5f55c1bc288 100644 --- a/src/cloudflare/resources/page_shield/policies.py +++ b/src/cloudflare/resources/page_shield/policies.py @@ -2,7 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast from typing_extensions import Literal import httpx @@ -20,11 +19,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.page_shield import PageShieldPolicy, PolicyListResponse, policy_create_params, policy_update_params +from ...types.page_shield import PageShieldPolicy, policy_create_params, policy_update_params __all__ = ["Policies", "AsyncPolicies"] @@ -175,7 +175,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> SyncSinglePage[PageShieldPolicy]: """ Lists all Page Shield policies. @@ -192,16 +192,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/page_shield/policies", + page=SyncSinglePage[PageShieldPolicy], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=PageShieldPolicy, ) def delete( @@ -422,7 +419,7 @@ async def update( cast_to=PageShieldPolicy, ) - async def list( + def list( self, *, zone_id: str, @@ -432,7 +429,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> AsyncPaginator[PageShieldPolicy, AsyncSinglePage[PageShieldPolicy]]: """ Lists all Page Shield policies. @@ -449,16 +446,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/page_shield/policies", + page=AsyncSinglePage[PageShieldPolicy], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=PageShieldPolicy, ) async def delete( diff --git a/src/cloudflare/resources/page_shield/scripts.py b/src/cloudflare/resources/page_shield/scripts.py index 2b108402984..58d201d5e36 100644 --- a/src/cloudflare/resources/page_shield/scripts.py +++ b/src/cloudflare/resources/page_shield/scripts.py @@ -2,16 +2,12 @@ from __future__ import annotations -from typing import Type, Optional, cast from typing_extensions import Literal import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -20,11 +16,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.page_shield import ScriptGetResponse, ScriptListResponse, script_list_params +from ...types.page_shield import PageShieldScript, ScriptGetResponse, script_list_params __all__ = ["Scripts", "AsyncScripts"] @@ -61,7 +58,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ScriptListResponse]: + ) -> SyncSinglePage[PageShieldScript]: """ Lists all scripts detected by Page Shield. @@ -129,8 +126,9 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/page_shield/scripts", + page=SyncSinglePage[PageShieldScript], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -154,9 +152,8 @@ def list( }, script_list_params.ScriptListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ScriptListResponse]], ResultWrapper[ScriptListResponse]), + model=PageShieldScript, ) def get( @@ -209,7 +206,7 @@ def with_raw_response(self) -> AsyncScriptsWithRawResponse: def with_streaming_response(self) -> AsyncScriptsWithStreamingResponse: return AsyncScriptsWithStreamingResponse(self) - async def list( + def list( self, *, zone_id: str, @@ -232,7 +229,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ScriptListResponse]: + ) -> AsyncPaginator[PageShieldScript, AsyncSinglePage[PageShieldScript]]: """ Lists all scripts detected by Page Shield. @@ -300,14 +297,15 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/page_shield/scripts", + page=AsyncSinglePage[PageShieldScript], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "direction": direction, "exclude_cdn_cgi": exclude_cdn_cgi, @@ -325,9 +323,8 @@ async def list( }, script_list_params.ScriptListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ScriptListResponse]], ResultWrapper[ScriptListResponse]), + model=PageShieldScript, ) async def get( diff --git a/src/cloudflare/resources/pages/projects/deployments/deployments.py b/src/cloudflare/resources/pages/projects/deployments/deployments.py index 83cd0a1c3c4..114d015e84d 100644 --- a/src/cloudflare/resources/pages/projects/deployments/deployments.py +++ b/src/cloudflare/resources/pages/projects/deployments/deployments.py @@ -29,12 +29,14 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from .....types.pages import PagesDeployments from .history.history import History, AsyncHistory from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.pages.projects import DeploymentListResponse, deployment_list_params, deployment_create_params +from .....types.pages.projects import deployment_list_params, deployment_create_params __all__ = ["Deployments", "AsyncDeployments"] @@ -115,7 +117,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentListResponse: + ) -> SyncSinglePage[PagesDeployments]: """ Fetch a list of project deployments. @@ -138,17 +140,17 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not project_name: raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/pages/projects/{project_name}/deployments", + page=SyncSinglePage[PagesDeployments], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, query=maybe_transform({"env": env}, deployment_list_params.DeploymentListParams), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]), + model=PagesDeployments, ) def delete( @@ -410,7 +412,7 @@ async def create( cast_to=cast(Type[PagesDeployments], ResultWrapper[PagesDeployments]), ) - async def list( + def list( self, project_name: str, *, @@ -422,7 +424,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DeploymentListResponse: + ) -> AsyncPaginator[PagesDeployments, AsyncSinglePage[PagesDeployments]]: """ Fetch a list of project deployments. @@ -445,17 +447,17 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not project_name: raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/pages/projects/{project_name}/deployments", + page=AsyncSinglePage[PagesDeployments], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"env": env}, deployment_list_params.DeploymentListParams), - post_parser=ResultWrapper._unwrapper, + query=maybe_transform({"env": env}, deployment_list_params.DeploymentListParams), ), - cast_to=cast(Type[DeploymentListResponse], ResultWrapper[DeploymentListResponse]), + model=PagesDeployments, ) async def delete( diff --git a/src/cloudflare/resources/pages/projects/domains.py b/src/cloudflare/resources/pages/projects/domains.py index 35b21afcafd..41fdc48d87f 100644 --- a/src/cloudflare/resources/pages/projects/domains.py +++ b/src/cloudflare/resources/pages/projects/domains.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, Optional, cast import httpx @@ -20,16 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.pages.projects import ( - DomainGetResponse, - DomainEditResponse, - DomainListResponse, - DomainCreateResponse, - domain_create_params, -) +from ....types.pages.projects import DomainGetResponse, DomainEditResponse, DomainCreateResponse, domain_create_params __all__ = ["Domains", "AsyncDomains"] @@ -105,7 +101,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainListResponse: + ) -> SyncSinglePage[object]: """ Fetch a list of all domains associated with a Pages project. @@ -126,16 +122,13 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not project_name: raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/pages/projects/{project_name}/domains", + page=SyncSinglePage[object], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[DomainListResponse], ResultWrapper[DomainListResponse]), + model=object, ) def delete( @@ -352,7 +345,7 @@ async def create( ), ) - async def list( + def list( self, project_name: str, *, @@ -363,7 +356,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainListResponse: + ) -> AsyncPaginator[object, AsyncSinglePage[object]]: """ Fetch a list of all domains associated with a Pages project. @@ -384,16 +377,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not project_name: raise ValueError(f"Expected a non-empty value for `project_name` but received {project_name!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/pages/projects/{project_name}/domains", + page=AsyncSinglePage[object], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[DomainListResponse], ResultWrapper[DomainListResponse]), + model=object, ) async def delete( diff --git a/src/cloudflare/resources/pages/projects/projects.py b/src/cloudflare/resources/pages/projects/projects.py index a964fcb0a20..9aaba8bcf16 100644 --- a/src/cloudflare/resources/pages/projects/projects.py +++ b/src/cloudflare/resources/pages/projects/projects.py @@ -36,16 +36,18 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ....types.pages import ( PagesProjects, + PagesDeployments, ProjectEditResponse, - ProjectListResponse, PagesDeploymentsParam, ProjectCreateResponse, project_edit_params, project_create_params, ) from ...._base_client import ( + AsyncPaginator, make_request_options, ) from .deployments.deployments import Deployments, AsyncDeployments @@ -149,7 +151,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProjectListResponse: + ) -> SyncSinglePage[PagesDeployments]: """ Fetch a list of all user projects. @@ -166,16 +168,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/pages/projects", + page=SyncSinglePage[PagesDeployments], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ProjectListResponse], ResultWrapper[ProjectListResponse]), + model=PagesDeployments, ) def delete( @@ -442,7 +441,7 @@ async def create( ), ) - async def list( + def list( self, *, account_id: str, @@ -452,7 +451,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProjectListResponse: + ) -> AsyncPaginator[PagesDeployments, AsyncSinglePage[PagesDeployments]]: """ Fetch a list of all user projects. @@ -469,16 +468,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/pages/projects", + page=AsyncSinglePage[PagesDeployments], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ProjectListResponse], ResultWrapper[ProjectListResponse]), + model=PagesDeployments, ) async def delete( diff --git a/src/cloudflare/resources/pcaps/pcaps.py b/src/cloudflare/resources/pcaps/pcaps.py index 5bacf266dc8..2afd4a28fae 100644 --- a/src/cloudflare/resources/pcaps/pcaps.py +++ b/src/cloudflare/resources/pcaps/pcaps.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast, overload +from typing import Any, cast, overload from typing_extensions import Literal import httpx @@ -39,7 +39,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -228,7 +230,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PCAPListResponse]: + ) -> SyncSinglePage[PCAPListResponse]: """ Lists all packet capture requests for an account. @@ -245,16 +247,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/pcaps", + page=SyncSinglePage[PCAPListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PCAPListResponse]], ResultWrapper[PCAPListResponse]), + model=cast(Any, PCAPListResponse), # Union types cannot be passed in as arguments in the type system ) def get( @@ -479,7 +478,7 @@ async def create( ), ) - async def list( + def list( self, *, account_id: str, @@ -489,7 +488,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PCAPListResponse]: + ) -> AsyncPaginator[PCAPListResponse, AsyncSinglePage[PCAPListResponse]]: """ Lists all packet capture requests for an account. @@ -506,16 +505,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/pcaps", + page=AsyncSinglePage[PCAPListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PCAPListResponse]], ResultWrapper[PCAPListResponse]), + model=cast(Any, PCAPListResponse), # Union types cannot be passed in as arguments in the type system ) async def get( diff --git a/src/cloudflare/resources/plans.py b/src/cloudflare/resources/plans.py index f6ed7bc0e42..8b49136d3df 100644 --- a/src/cloudflare/resources/plans.py +++ b/src/cloudflare/resources/plans.py @@ -2,11 +2,11 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx -from ..types import PlanListResponse, AvailableRatePlan +from ..types import AvailableRatePlan from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -17,7 +17,9 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper +from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( + AsyncPaginator, make_request_options, ) @@ -43,7 +45,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PlanListResponse]: + ) -> SyncSinglePage[AvailableRatePlan]: """ Lists available plans the zone can subscribe to. @@ -60,16 +62,13 @@ def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/available_plans", + page=SyncSinglePage[AvailableRatePlan], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PlanListResponse]], ResultWrapper[PlanListResponse]), + model=AvailableRatePlan, ) def get( @@ -126,7 +125,7 @@ def with_raw_response(self) -> AsyncPlansWithRawResponse: def with_streaming_response(self) -> AsyncPlansWithStreamingResponse: return AsyncPlansWithStreamingResponse(self) - async def list( + def list( self, zone_identifier: str, *, @@ -136,7 +135,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PlanListResponse]: + ) -> AsyncPaginator[AvailableRatePlan, AsyncSinglePage[AvailableRatePlan]]: """ Lists available plans the zone can subscribe to. @@ -153,16 +152,13 @@ async def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/available_plans", + page=AsyncSinglePage[AvailableRatePlan], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PlanListResponse]], ResultWrapper[PlanListResponse]), + model=AvailableRatePlan, ) async def get( diff --git a/src/cloudflare/resources/queues/queues.py b/src/cloudflare/resources/queues/queues.py index 5f3220b8cbb..0f3f2a0c7fe 100644 --- a/src/cloudflare/resources/queues/queues.py +++ b/src/cloudflare/resources/queues/queues.py @@ -45,7 +45,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -166,7 +168,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueListResponse]: + ) -> SyncSinglePage[QueueListResponse]: """ Returns the queues owned by an account. @@ -183,16 +185,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/queues", + page=SyncSinglePage[QueueListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[QueueListResponse]], ResultWrapper[QueueListResponse]), + model=QueueListResponse, ) def delete( @@ -393,7 +392,7 @@ async def update( cast_to=cast(Type[Optional[QueueUpdateResponse]], ResultWrapper[QueueUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -403,7 +402,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[QueueListResponse]: + ) -> AsyncPaginator[QueueListResponse, AsyncSinglePage[QueueListResponse]]: """ Returns the queues owned by an account. @@ -420,16 +419,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/queues", + page=AsyncSinglePage[QueueListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[QueueListResponse]], ResultWrapper[QueueListResponse]), + model=QueueListResponse, ) async def delete( diff --git a/src/cloudflare/resources/registrar/domains.py b/src/cloudflare/resources/registrar/domains.py index cb889156b64..46e5881cae9 100644 --- a/src/cloudflare/resources/registrar/domains.py +++ b/src/cloudflare/resources/registrar/domains.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, Optional, cast import httpx @@ -20,7 +20,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.registrar import DomainGetResponse, DomainListResponse, DomainUpdateResponse, domain_update_params @@ -114,7 +116,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DomainListResponse]: + ) -> SyncSinglePage[DomainListResponse]: """ List domains handled by Registrar. @@ -131,16 +133,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/registrar/domains", + page=SyncSinglePage[DomainListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DomainListResponse]], ResultWrapper[DomainListResponse]), + model=DomainListResponse, ) def get( @@ -269,7 +268,7 @@ async def update( ), ) - async def list( + def list( self, *, account_id: str, @@ -279,7 +278,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DomainListResponse]: + ) -> AsyncPaginator[DomainListResponse, AsyncSinglePage[DomainListResponse]]: """ List domains handled by Registrar. @@ -296,16 +295,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/registrar/domains", + page=AsyncSinglePage[DomainListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DomainListResponse]], ResultWrapper[DomainListResponse]), + model=DomainListResponse, ) async def get( diff --git a/src/cloudflare/resources/rules/lists/lists.py b/src/cloudflare/resources/rules/lists/lists.py index 45adeabd513..5cf9ef96496 100644 --- a/src/cloudflare/resources/rules/lists/lists.py +++ b/src/cloudflare/resources/rules/lists/lists.py @@ -29,8 +29,10 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.rules import ListsList, ListListResponse, ListDeleteResponse, list_create_params, list_update_params +from ....pagination import SyncSinglePage, AsyncSinglePage +from ....types.rules import ListsList, ListDeleteResponse, list_create_params, list_update_params from ...._base_client import ( + AsyncPaginator, make_request_options, ) from .bulk_operations import ( @@ -177,7 +179,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListListResponse]: + ) -> SyncSinglePage[ListsList]: """ Fetches all lists in the account. @@ -194,16 +196,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/rules/lists", + page=SyncSinglePage[ListsList], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ListListResponse]], ResultWrapper[ListListResponse]), + model=ListsList, ) def delete( @@ -417,7 +416,7 @@ async def update( cast_to=cast(Type[Optional[ListsList]], ResultWrapper[ListsList]), ) - async def list( + def list( self, *, account_id: str, @@ -427,7 +426,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListListResponse]: + ) -> AsyncPaginator[ListsList, AsyncSinglePage[ListsList]]: """ Fetches all lists in the account. @@ -444,16 +443,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/rules/lists", + page=AsyncSinglePage[ListsList], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ListListResponse]], ResultWrapper[ListListResponse]), + model=ListsList, ) async def delete( diff --git a/src/cloudflare/resources/rulesets/phases/versions.py b/src/cloudflare/resources/rulesets/phases/versions.py index 9ba3ae4e191..88d2733058d 100644 --- a/src/cloudflare/resources/rulesets/phases/versions.py +++ b/src/cloudflare/resources/rulesets/phases/versions.py @@ -7,7 +7,7 @@ import httpx -from ....types import RulesetsRulesetResponse, RulesetsRulesetsResponse +from ....types import RulesetsRulesetResponse from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -18,9 +18,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) +from ....types.rulesets.phases import VersionListResponse __all__ = ["Versions", "AsyncVersions"] @@ -70,7 +73,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetsResponse: + ) -> SyncSinglePage[VersionListResponse]: """ Fetches the versions of an account or zone entry point ruleset. @@ -106,16 +109,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions", + page=SyncSinglePage[VersionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), + model=VersionListResponse, ) def get( @@ -217,7 +217,7 @@ def with_raw_response(self) -> AsyncVersionsWithRawResponse: def with_streaming_response(self) -> AsyncVersionsWithStreamingResponse: return AsyncVersionsWithStreamingResponse(self) - async def list( + def list( self, ruleset_phase: Literal[ "ddos_l4", @@ -253,7 +253,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetsResponse: + ) -> AsyncPaginator[VersionListResponse, AsyncSinglePage[VersionListResponse]]: """ Fetches the versions of an account or zone entry point ruleset. @@ -289,16 +289,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/rulesets/phases/{ruleset_phase}/entrypoint/versions", + page=AsyncSinglePage[VersionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), + model=VersionListResponse, ) async def get( diff --git a/src/cloudflare/resources/rulesets/rulesets.py b/src/cloudflare/resources/rulesets/rulesets.py index 8a3262927f6..987edf37a38 100644 --- a/src/cloudflare/resources/rulesets/rulesets.py +++ b/src/cloudflare/resources/rulesets/rulesets.py @@ -24,8 +24,8 @@ AsyncPhasesWithStreamingResponse, ) from ...types import ( + RulesetListResponse, RulesetsRulesetResponse, - RulesetsRulesetsResponse, ruleset_create_params, ruleset_update_params, ) @@ -51,8 +51,10 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from .phases.phases import Phases, AsyncPhases from ..._base_client import ( + AsyncPaginator, make_request_options, ) from .versions.versions import Versions, AsyncVersions @@ -310,7 +312,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetsResponse: + ) -> SyncSinglePage[RulesetListResponse]: """ Fetches all rulesets. @@ -342,16 +344,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/rulesets", + page=SyncSinglePage[RulesetListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), + model=RulesetListResponse, ) def delete( @@ -711,7 +710,7 @@ async def update( cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -722,7 +721,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetsResponse: + ) -> AsyncPaginator[RulesetListResponse, AsyncSinglePage[RulesetListResponse]]: """ Fetches all rulesets. @@ -754,16 +753,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/rulesets", + page=AsyncSinglePage[RulesetListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), + model=RulesetListResponse, ) async def delete( diff --git a/src/cloudflare/resources/rulesets/versions/versions.py b/src/cloudflare/resources/rulesets/versions/versions.py index 170c31aff2e..6722ae11b41 100644 --- a/src/cloudflare/resources/rulesets/versions/versions.py +++ b/src/cloudflare/resources/rulesets/versions/versions.py @@ -14,7 +14,7 @@ ByTagWithStreamingResponse, AsyncByTagWithStreamingResponse, ) -from ....types import RulesetsRulesetResponse, RulesetsRulesetsResponse +from ....types import RulesetsRulesetResponse from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -25,9 +25,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) +from ....types.rulesets import VersionListResponse __all__ = ["Versions", "AsyncVersions"] @@ -57,7 +60,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetsResponse: + ) -> SyncSinglePage[VersionListResponse]: """ Fetches the versions of an account or zone ruleset. @@ -93,16 +96,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/versions", + page=SyncSinglePage[VersionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), + model=VersionListResponse, ) def delete( @@ -246,7 +246,7 @@ def with_raw_response(self) -> AsyncVersionsWithRawResponse: def with_streaming_response(self) -> AsyncVersionsWithStreamingResponse: return AsyncVersionsWithStreamingResponse(self) - async def list( + def list( self, ruleset_id: str, *, @@ -258,7 +258,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetsResponse: + ) -> AsyncPaginator[VersionListResponse, AsyncSinglePage[VersionListResponse]]: """ Fetches the versions of an account or zone ruleset. @@ -294,16 +294,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/rulesets/{ruleset_id}/versions", + page=AsyncSinglePage[VersionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RulesetsRulesetsResponse], ResultWrapper[RulesetsRulesetsResponse]), + model=VersionListResponse, ) async def delete( diff --git a/src/cloudflare/resources/secondary_dns/acls.py b/src/cloudflare/resources/secondary_dns/acls.py index e77f5a4ea81..66ece684370 100644 --- a/src/cloudflare/resources/secondary_dns/acls.py +++ b/src/cloudflare/resources/secondary_dns/acls.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,16 +20,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.secondary_dns import ( - ACLListResponse, - SecondaryDNSACL, - ACLDeleteResponse, - acl_create_params, - acl_update_params, -) +from ...types.secondary_dns import SecondaryDNSACL, ACLDeleteResponse, acl_create_params, acl_update_params __all__ = ["ACLs", "AsyncACLs"] @@ -149,7 +145,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ACLListResponse]: + ) -> SyncSinglePage[SecondaryDNSACL]: """ List ACLs. @@ -164,16 +160,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/secondary_dns/acls", + page=SyncSinglePage[SecondaryDNSACL], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ACLListResponse]], ResultWrapper[ACLListResponse]), + model=SecondaryDNSACL, ) def delete( @@ -362,7 +355,7 @@ async def update( cast_to=cast(Type[SecondaryDNSACL], ResultWrapper[SecondaryDNSACL]), ) - async def list( + def list( self, *, account_id: str, @@ -372,7 +365,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ACLListResponse]: + ) -> AsyncPaginator[SecondaryDNSACL, AsyncSinglePage[SecondaryDNSACL]]: """ List ACLs. @@ -387,16 +380,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/secondary_dns/acls", + page=AsyncSinglePage[SecondaryDNSACL], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ACLListResponse]], ResultWrapper[ACLListResponse]), + model=SecondaryDNSACL, ) async def delete( diff --git a/src/cloudflare/resources/secondary_dns/peers.py b/src/cloudflare/resources/secondary_dns/peers.py index 450572f1a7e..662e94d3bb6 100644 --- a/src/cloudflare/resources/secondary_dns/peers.py +++ b/src/cloudflare/resources/secondary_dns/peers.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,16 +20,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.secondary_dns import ( - PeerListResponse, - SecondaryDNSPeer, - PeerDeleteResponse, - peer_create_params, - peer_update_params, -) +from ...types.secondary_dns import SecondaryDNSPeer, PeerDeleteResponse, peer_create_params, peer_update_params __all__ = ["Peers", "AsyncPeers"] @@ -163,7 +159,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PeerListResponse]: + ) -> SyncSinglePage[SecondaryDNSPeer]: """ List Peers. @@ -178,16 +174,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/secondary_dns/peers", + page=SyncSinglePage[SecondaryDNSPeer], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PeerListResponse]], ResultWrapper[PeerListResponse]), + model=SecondaryDNSPeer, ) def delete( @@ -390,7 +383,7 @@ async def update( cast_to=cast(Type[SecondaryDNSPeer], ResultWrapper[SecondaryDNSPeer]), ) - async def list( + def list( self, *, account_id: str, @@ -400,7 +393,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PeerListResponse]: + ) -> AsyncPaginator[SecondaryDNSPeer, AsyncSinglePage[SecondaryDNSPeer]]: """ List Peers. @@ -415,16 +408,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/secondary_dns/peers", + page=AsyncSinglePage[SecondaryDNSPeer], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PeerListResponse]], ResultWrapper[PeerListResponse]), + model=SecondaryDNSPeer, ) async def delete( diff --git a/src/cloudflare/resources/secondary_dns/tsigs.py b/src/cloudflare/resources/secondary_dns/tsigs.py index 20ba897b9a5..6031863ce6b 100644 --- a/src/cloudflare/resources/secondary_dns/tsigs.py +++ b/src/cloudflare/resources/secondary_dns/tsigs.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,16 +20,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.secondary_dns import ( - SecondaryDNSTSIG, - TSIGListResponse, - TSIGDeleteResponse, - tsig_create_params, - tsig_update_params, -) +from ...types.secondary_dns import SecondaryDNSTSIG, TSIGDeleteResponse, tsig_create_params, tsig_update_params __all__ = ["TSIGs", "AsyncTSIGs"] @@ -164,7 +160,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TSIGListResponse]: + ) -> SyncSinglePage[SecondaryDNSTSIG]: """ List TSIGs. @@ -179,16 +175,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/secondary_dns/tsigs", + page=SyncSinglePage[SecondaryDNSTSIG], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[TSIGListResponse]], ResultWrapper[TSIGListResponse]), + model=SecondaryDNSTSIG, ) def delete( @@ -392,7 +385,7 @@ async def update( cast_to=cast(Type[SecondaryDNSTSIG], ResultWrapper[SecondaryDNSTSIG]), ) - async def list( + def list( self, *, account_id: str, @@ -402,7 +395,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TSIGListResponse]: + ) -> AsyncPaginator[SecondaryDNSTSIG, AsyncSinglePage[SecondaryDNSTSIG]]: """ List TSIGs. @@ -417,16 +410,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/secondary_dns/tsigs", + page=AsyncSinglePage[SecondaryDNSTSIG], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[TSIGListResponse]], ResultWrapper[TSIGListResponse]), + model=SecondaryDNSTSIG, ) async def delete( diff --git a/src/cloudflare/resources/snippets/rules.py b/src/cloudflare/resources/snippets/rules.py index ce543039f23..97ff1902080 100644 --- a/src/cloudflare/resources/snippets/rules.py +++ b/src/cloudflare/resources/snippets/rules.py @@ -20,7 +20,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.snippets import RuleListResponse, RuleUpdateResponse, rule_update_params @@ -90,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleListResponse: + ) -> SyncSinglePage[RuleListResponse]: """ Rules @@ -107,16 +109,13 @@ def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/snippets/snippet_rules", + page=SyncSinglePage[RuleListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RuleListResponse], ResultWrapper[RuleListResponse]), + model=RuleListResponse, ) @@ -172,7 +171,7 @@ async def update( cast_to=cast(Type[RuleUpdateResponse], ResultWrapper[RuleUpdateResponse]), ) - async def list( + def list( self, zone_identifier: str, *, @@ -182,7 +181,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RuleListResponse: + ) -> AsyncPaginator[RuleListResponse, AsyncSinglePage[RuleListResponse]]: """ Rules @@ -199,16 +198,13 @@ async def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/snippets/snippet_rules", + page=AsyncSinglePage[RuleListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RuleListResponse], ResultWrapper[RuleListResponse]), + model=RuleListResponse, ) diff --git a/src/cloudflare/resources/snippets/snippets.py b/src/cloudflare/resources/snippets/snippets.py index 7340d291f64..b0427590db5 100644 --- a/src/cloudflare/resources/snippets/snippets.py +++ b/src/cloudflare/resources/snippets/snippets.py @@ -14,7 +14,7 @@ RulesWithStreamingResponse, AsyncRulesWithStreamingResponse, ) -from ...types import Snippet, SnippetListResponse, SnippetDeleteResponse, snippet_update_params +from ...types import Snippet, SnippetDeleteResponse, snippet_update_params from .content import ( Content, AsyncContent, @@ -37,7 +37,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -126,7 +128,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetListResponse: + ) -> SyncSinglePage[Snippet]: """ All Snippets @@ -143,16 +145,13 @@ def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/snippets", + page=SyncSinglePage[Snippet], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[SnippetListResponse], ResultWrapper[SnippetListResponse]), + model=Snippet, ) def delete( @@ -321,7 +320,7 @@ async def update( cast_to=cast(Type[Snippet], ResultWrapper[Snippet]), ) - async def list( + def list( self, zone_identifier: str, *, @@ -331,7 +330,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SnippetListResponse: + ) -> AsyncPaginator[Snippet, AsyncSinglePage[Snippet]]: """ All Snippets @@ -348,16 +347,13 @@ async def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/snippets", + page=AsyncSinglePage[Snippet], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[SnippetListResponse], ResultWrapper[SnippetListResponse]), + model=Snippet, ) async def delete( diff --git a/src/cloudflare/resources/speed/pages.py b/src/cloudflare/resources/speed/pages.py index ce7be395119..97ec103cef3 100644 --- a/src/cloudflare/resources/speed/pages.py +++ b/src/cloudflare/resources/speed/pages.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,9 +13,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.speed import PageListResponse from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -43,7 +42,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PageListResponse]: + ) -> SyncSinglePage[PageListResponse]: """ Lists all webpages which have been tested. @@ -60,16 +59,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/speed_api/pages", + page=SyncSinglePage[PageListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PageListResponse]], ResultWrapper[PageListResponse]), + model=PageListResponse, ) @@ -82,7 +78,7 @@ def with_raw_response(self) -> AsyncPagesWithRawResponse: def with_streaming_response(self) -> AsyncPagesWithStreamingResponse: return AsyncPagesWithStreamingResponse(self) - async def list( + def list( self, *, zone_id: str, @@ -92,7 +88,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PageListResponse]: + ) -> AsyncPaginator[PageListResponse, AsyncSinglePage[PageListResponse]]: """ Lists all webpages which have been tested. @@ -109,16 +105,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/speed_api/pages", + page=AsyncSinglePage[PageListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PageListResponse]], ResultWrapper[PageListResponse]), + model=PageListResponse, ) diff --git a/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py b/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py index fc408ca318a..f13bf748f95 100644 --- a/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py +++ b/src/cloudflare/resources/ssl/certificate_packs/certificate_packs.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, Type, cast from typing_extensions import Literal import httpx @@ -24,10 +24,7 @@ AsyncQuotaWithStreamingResponse, ) from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) +from ...._utils import maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -40,11 +37,12 @@ from ....types.ssl import ( CertificatePackGetResponse, CertificatePackEditResponse, - CertificatePackListResponse, CertificatePackDeleteResponse, certificate_pack_list_params, ) +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) @@ -79,7 +77,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CertificatePackListResponse]: + ) -> SyncSinglePage[object]: """ For a given zone, list all active certificate packs. @@ -98,17 +96,17 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/ssl/certificate_packs", + page=SyncSinglePage[object], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, query=maybe_transform({"status": status}, certificate_pack_list_params.CertificatePackListParams), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[CertificatePackListResponse]], ResultWrapper[CertificatePackListResponse]), + model=object, ) def delete( @@ -275,7 +273,7 @@ def with_raw_response(self) -> AsyncCertificatePacksWithRawResponse: def with_streaming_response(self) -> AsyncCertificatePacksWithStreamingResponse: return AsyncCertificatePacksWithStreamingResponse(self) - async def list( + def list( self, *, zone_id: str, @@ -286,7 +284,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CertificatePackListResponse]: + ) -> AsyncPaginator[object, AsyncSinglePage[object]]: """ For a given zone, list all active certificate packs. @@ -305,19 +303,17 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/ssl/certificate_packs", + page=AsyncSinglePage[object], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( - {"status": status}, certificate_pack_list_params.CertificatePackListParams - ), - post_parser=ResultWrapper._unwrapper, + query=maybe_transform({"status": status}, certificate_pack_list_params.CertificatePackListParams), ), - cast_to=cast(Type[Optional[CertificatePackListResponse]], ResultWrapper[CertificatePackListResponse]), + model=object, ) async def delete( diff --git a/src/cloudflare/resources/stream/live_inputs/outputs.py b/src/cloudflare/resources/stream/live_inputs/outputs.py index 8e302d83a9a..4bed7a329b8 100644 --- a/src/cloudflare/resources/stream/live_inputs/outputs.py +++ b/src/cloudflare/resources/stream/live_inputs/outputs.py @@ -20,10 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.stream.live_inputs import StreamOutput, OutputListResponse, output_create_params, output_update_params +from ....types.stream.live_inputs import StreamOutput, output_create_params, output_update_params __all__ = ["Outputs", "AsyncOutputs"] @@ -176,7 +178,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OutputListResponse: + ) -> SyncSinglePage[StreamOutput]: """ Retrieves all outputs associated with a specified live input. @@ -199,16 +201,13 @@ def list( raise ValueError( f"Expected a non-empty value for `live_input_identifier` but received {live_input_identifier!r}" ) - return self._get( + return self._get_api_list( f"/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs", + page=SyncSinglePage[StreamOutput], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[OutputListResponse], ResultWrapper[OutputListResponse]), + model=StreamOutput, ) def delete( @@ -397,7 +396,7 @@ async def update( cast_to=cast(Type[StreamOutput], ResultWrapper[StreamOutput]), ) - async def list( + def list( self, live_input_identifier: str, *, @@ -408,7 +407,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> OutputListResponse: + ) -> AsyncPaginator[StreamOutput, AsyncSinglePage[StreamOutput]]: """ Retrieves all outputs associated with a specified live input. @@ -431,16 +430,13 @@ async def list( raise ValueError( f"Expected a non-empty value for `live_input_identifier` but received {live_input_identifier!r}" ) - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/stream/live_inputs/{live_input_identifier}/outputs", + page=AsyncSinglePage[StreamOutput], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[OutputListResponse], ResultWrapper[OutputListResponse]), + model=StreamOutput, ) async def delete( diff --git a/src/cloudflare/resources/stream/stream.py b/src/cloudflare/resources/stream/stream.py index a29b5cb7b15..1523b2cdec2 100644 --- a/src/cloudflare/resources/stream/stream.py +++ b/src/cloudflare/resources/stream/stream.py @@ -56,12 +56,9 @@ VideosWithStreamingResponse, AsyncVideosWithStreamingResponse, ) -from ...types import StreamVideos, StreamListResponse, stream_list_params +from ...types import StreamVideos, stream_list_params from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform from .captions import ( Captions, AsyncCaptions, @@ -111,6 +108,7 @@ LiveInputsWithStreamingResponse, AsyncLiveInputsWithStreamingResponse, ) +from ...pagination import SyncSinglePage, AsyncSinglePage from .audio_tracks import ( AudioTracks, AsyncAudioTracks, @@ -128,6 +126,7 @@ AsyncDirectUploadWithStreamingResponse, ) from ..._base_client import ( + AsyncPaginator, make_request_options, ) from .live_inputs.live_inputs import LiveInputs, AsyncLiveInputs @@ -255,7 +254,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamListResponse: + ) -> SyncSinglePage[StreamVideos]: """Lists up to 1000 videos from a single request. For a specific range, refer to @@ -292,8 +291,9 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/stream", + page=SyncSinglePage[StreamVideos], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -312,9 +312,8 @@ def list( }, stream_list_params.StreamListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamListResponse], ResultWrapper[StreamListResponse]), + model=StreamVideos, ) def delete( @@ -504,7 +503,7 @@ async def create( cast_to=NoneType, ) - async def list( + def list( self, *, account_id: str, @@ -523,7 +522,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> StreamListResponse: + ) -> AsyncPaginator[StreamVideos, AsyncSinglePage[StreamVideos]]: """Lists up to 1000 videos from a single request. For a specific range, refer to @@ -560,14 +559,15 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/stream", + page=AsyncSinglePage[StreamVideos], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "asc": asc, "creator": creator, @@ -580,9 +580,8 @@ async def list( }, stream_list_params.StreamListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[StreamListResponse], ResultWrapper[StreamListResponse]), + model=StreamVideos, ) async def delete( diff --git a/src/cloudflare/resources/stream/watermarks.py b/src/cloudflare/resources/stream/watermarks.py index 957e459c21d..d869bd90f78 100644 --- a/src/cloudflare/resources/stream/watermarks.py +++ b/src/cloudflare/resources/stream/watermarks.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, cast +from typing import Any, cast import httpx @@ -20,12 +20,14 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.stream import ( + StreamWatermarks, WatermarkGetResponse, - WatermarkListResponse, WatermarkCreateResponse, WatermarkDeleteResponse, watermark_create_params, @@ -136,7 +138,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WatermarkListResponse: + ) -> SyncSinglePage[StreamWatermarks]: """ Lists all watermark profiles for an account. @@ -153,16 +155,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/stream/watermarks", + page=SyncSinglePage[StreamWatermarks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[WatermarkListResponse], ResultWrapper[WatermarkListResponse]), + model=StreamWatermarks, ) def delete( @@ -356,7 +355,7 @@ async def create( ), ) - async def list( + def list( self, *, account_id: str, @@ -366,7 +365,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> WatermarkListResponse: + ) -> AsyncPaginator[StreamWatermarks, AsyncSinglePage[StreamWatermarks]]: """ Lists all watermark profiles for an account. @@ -383,16 +382,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/stream/watermarks", + page=AsyncSinglePage[StreamWatermarks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[WatermarkListResponse], ResultWrapper[WatermarkListResponse]), + model=StreamWatermarks, ) async def delete( diff --git a/src/cloudflare/resources/subscriptions.py b/src/cloudflare/resources/subscriptions.py index ef45680e6dc..03ebe32ebe1 100644 --- a/src/cloudflare/resources/subscriptions.py +++ b/src/cloudflare/resources/subscriptions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Iterable, Optional, cast +from typing import Any, Type, Iterable, cast from typing_extensions import Literal import httpx @@ -30,7 +30,9 @@ async_to_streamed_response_wrapper, ) from .._wrappers import ResultWrapper +from ..pagination import SyncSinglePage, AsyncSinglePage from .._base_client import ( + AsyncPaginator, make_request_options, ) @@ -197,7 +199,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SubscriptionListResponse]: + ) -> SyncSinglePage[SubscriptionListResponse]: """ Lists all of an account's subscriptions. @@ -214,16 +216,13 @@ def list( """ if not account_identifier: raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_identifier}/subscriptions", + page=SyncSinglePage[SubscriptionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[SubscriptionListResponse]], ResultWrapper[SubscriptionListResponse]), + model=SubscriptionListResponse, ) def delete( @@ -467,7 +466,7 @@ async def update( ), ) - async def list( + def list( self, account_identifier: str, *, @@ -477,7 +476,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SubscriptionListResponse]: + ) -> AsyncPaginator[SubscriptionListResponse, AsyncSinglePage[SubscriptionListResponse]]: """ Lists all of an account's subscriptions. @@ -494,16 +493,13 @@ async def list( """ if not account_identifier: raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_identifier}/subscriptions", + page=AsyncSinglePage[SubscriptionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[SubscriptionListResponse]], ResultWrapper[SubscriptionListResponse]), + model=SubscriptionListResponse, ) async def delete( diff --git a/src/cloudflare/resources/user/invites.py b/src/cloudflare/resources/user/invites.py index fb776d08e2b..004b6fc05ea 100644 --- a/src/cloudflare/resources/user/invites.py +++ b/src/cloudflare/resources/user/invites.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, cast from typing_extensions import Literal import httpx @@ -21,8 +21,10 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.user import InviteGetResponse, InviteEditResponse, InviteListResponse, invite_edit_params from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -47,18 +49,15 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[InviteListResponse]: + ) -> SyncSinglePage[InviteListResponse]: """Lists all invitations associated with my user.""" - return self._get( + return self._get_api_list( "/user/invites", + page=SyncSinglePage[InviteListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[InviteListResponse]], ResultWrapper[InviteListResponse]), + model=InviteListResponse, ) def edit( @@ -163,7 +162,7 @@ def with_raw_response(self) -> AsyncInvitesWithRawResponse: def with_streaming_response(self) -> AsyncInvitesWithStreamingResponse: return AsyncInvitesWithStreamingResponse(self) - async def list( + def list( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -172,18 +171,15 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[InviteListResponse]: + ) -> AsyncPaginator[InviteListResponse, AsyncSinglePage[InviteListResponse]]: """Lists all invitations associated with my user.""" - return await self._get( + return self._get_api_list( "/user/invites", + page=AsyncSinglePage[InviteListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[InviteListResponse]], ResultWrapper[InviteListResponse]), + model=InviteListResponse, ) async def edit( diff --git a/src/cloudflare/resources/user/load_balancers/analytics/events.py b/src/cloudflare/resources/user/load_balancers/analytics/events.py index 56dbd0fcca1..16d130bb45c 100644 --- a/src/cloudflare/resources/user/load_balancers/analytics/events.py +++ b/src/cloudflare/resources/user/load_balancers/analytics/events.py @@ -2,16 +2,13 @@ from __future__ import annotations -from typing import Type, Union, Optional, cast +from typing import Union from datetime import datetime import httpx from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ....._utils import ( - maybe_transform, - async_maybe_transform, -) +from ....._utils import maybe_transform from ....._compat import cached_property from ....._resource import SyncAPIResource, AsyncAPIResource from ....._response import ( @@ -20,11 +17,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.user.load_balancers.analytics import EventListResponse, event_list_params +from .....types.user.load_balancers.analytics import LoadBalancingAnalytics, event_list_params __all__ = ["Events", "AsyncEvents"] @@ -54,7 +52,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EventListResponse]: + ) -> SyncSinglePage[LoadBalancingAnalytics]: """ List origin health changes. @@ -81,8 +79,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/user/load_balancing_analytics/events", + page=SyncSinglePage[LoadBalancingAnalytics], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -100,9 +99,8 @@ def list( }, event_list_params.EventListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EventListResponse]], ResultWrapper[EventListResponse]), + model=LoadBalancingAnalytics, ) @@ -115,7 +113,7 @@ def with_raw_response(self) -> AsyncEventsWithRawResponse: def with_streaming_response(self) -> AsyncEventsWithStreamingResponse: return AsyncEventsWithStreamingResponse(self) - async def list( + def list( self, *, origin_healthy: bool | NotGiven = NOT_GIVEN, @@ -131,7 +129,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EventListResponse]: + ) -> AsyncPaginator[LoadBalancingAnalytics, AsyncSinglePage[LoadBalancingAnalytics]]: """ List origin health changes. @@ -158,14 +156,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/user/load_balancing_analytics/events", + page=AsyncSinglePage[LoadBalancingAnalytics], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "origin_healthy": origin_healthy, "origin_name": origin_name, @@ -177,9 +176,8 @@ async def list( }, event_list_params.EventListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[EventListResponse]], ResultWrapper[EventListResponse]), + model=LoadBalancingAnalytics, ) diff --git a/src/cloudflare/resources/user/load_balancers/monitors.py b/src/cloudflare/resources/user/load_balancers/monitors.py index 153221cfaf9..6fbbc6c5283 100644 --- a/src/cloudflare/resources/user/load_balancers/monitors.py +++ b/src/cloudflare/resources/user/load_balancers/monitors.py @@ -21,11 +21,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.user.load_balancers import ( - MonitorListResponse, LoadBalancingMonitor, MonitorDeleteResponse, MonitorPreviewResponse, @@ -300,18 +301,15 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MonitorListResponse]: + ) -> SyncSinglePage[LoadBalancingMonitor]: """List configured monitors for a user.""" - return self._get( + return self._get_api_list( "/user/load_balancers/monitors", + page=SyncSinglePage[LoadBalancingMonitor], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[MonitorListResponse]], ResultWrapper[MonitorListResponse]), + model=LoadBalancingMonitor, ) def delete( @@ -926,7 +924,7 @@ async def update( cast_to=cast(Type[LoadBalancingMonitor], ResultWrapper[LoadBalancingMonitor]), ) - async def list( + def list( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -935,18 +933,15 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[MonitorListResponse]: + ) -> AsyncPaginator[LoadBalancingMonitor, AsyncSinglePage[LoadBalancingMonitor]]: """List configured monitors for a user.""" - return await self._get( + return self._get_api_list( "/user/load_balancers/monitors", + page=AsyncSinglePage[LoadBalancingMonitor], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[MonitorListResponse]], ResultWrapper[MonitorListResponse]), + model=LoadBalancingMonitor, ) async def delete( diff --git a/src/cloudflare/resources/user/load_balancers/pools.py b/src/cloudflare/resources/user/load_balancers/pools.py index 4fd53ba8dd7..26b35dcb7d7 100644 --- a/src/cloudflare/resources/user/load_balancers/pools.py +++ b/src/cloudflare/resources/user/load_balancers/pools.py @@ -21,11 +21,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.user.load_balancers import ( - PoolListResponse, LoadBalancingPool, PoolDeleteResponse, PoolHealthResponse, @@ -319,7 +320,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PoolListResponse]: + ) -> SyncSinglePage[LoadBalancingPool]: """ List configured pools. @@ -335,17 +336,17 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/user/load_balancers/pools", + page=SyncSinglePage[LoadBalancingPool], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, query=maybe_transform({"monitor": monitor}, pool_list_params.PoolListParams), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[PoolListResponse]], ResultWrapper[PoolListResponse]), + model=LoadBalancingPool, ) def delete( @@ -1025,7 +1026,7 @@ async def update( cast_to=cast(Type[LoadBalancingPool], ResultWrapper[LoadBalancingPool]), ) - async def list( + def list( self, *, monitor: object | NotGiven = NOT_GIVEN, @@ -1035,7 +1036,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PoolListResponse]: + ) -> AsyncPaginator[LoadBalancingPool, AsyncSinglePage[LoadBalancingPool]]: """ List configured pools. @@ -1051,17 +1052,17 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/user/load_balancers/pools", + page=AsyncSinglePage[LoadBalancingPool], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"monitor": monitor}, pool_list_params.PoolListParams), - post_parser=ResultWrapper._unwrapper, + query=maybe_transform({"monitor": monitor}, pool_list_params.PoolListParams), ), - cast_to=cast(Type[Optional[PoolListResponse]], ResultWrapper[PoolListResponse]), + model=LoadBalancingPool, ) async def delete( diff --git a/src/cloudflare/resources/user/tokens/permission_groups.py b/src/cloudflare/resources/user/tokens/permission_groups.py index b3b6b36a735..56114d8047d 100644 --- a/src/cloudflare/resources/user/tokens/permission_groups.py +++ b/src/cloudflare/resources/user/tokens/permission_groups.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,11 +13,11 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.user.tokens import PermissionGroupListResponse __all__ = ["PermissionGroups", "AsyncPermissionGroups"] @@ -42,18 +40,15 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PermissionGroupListResponse]: + ) -> SyncSinglePage[object]: """Find all available permission groups.""" - return self._get( + return self._get_api_list( "/user/tokens/permission_groups", + page=SyncSinglePage[object], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PermissionGroupListResponse]], ResultWrapper[PermissionGroupListResponse]), + model=object, ) @@ -66,7 +61,7 @@ def with_raw_response(self) -> AsyncPermissionGroupsWithRawResponse: def with_streaming_response(self) -> AsyncPermissionGroupsWithStreamingResponse: return AsyncPermissionGroupsWithStreamingResponse(self) - async def list( + def list( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -75,18 +70,15 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PermissionGroupListResponse]: + ) -> AsyncPaginator[object, AsyncSinglePage[object]]: """Find all available permission groups.""" - return await self._get( + return self._get_api_list( "/user/tokens/permission_groups", + page=AsyncSinglePage[object], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PermissionGroupListResponse]], ResultWrapper[PermissionGroupListResponse]), + model=object, ) diff --git a/src/cloudflare/resources/vectorize/indexes.py b/src/cloudflare/resources/vectorize/indexes.py index fc02930befd..345e6f36299 100644 --- a/src/cloudflare/resources/vectorize/indexes.py +++ b/src/cloudflare/resources/vectorize/indexes.py @@ -20,11 +20,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.vectorize import ( - IndexListResponse, IndexDeleteResponse, VectorizeIndexQuery, VectorizeCreateIndex, @@ -160,7 +161,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndexListResponse: + ) -> SyncSinglePage[VectorizeCreateIndex]: """ Returns a list of Vectorize Indexes @@ -177,16 +178,13 @@ def list( """ if not account_identifier: raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_identifier}/vectorize/indexes", + page=SyncSinglePage[VectorizeCreateIndex], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[IndexListResponse], ResultWrapper[IndexListResponse]), + model=VectorizeCreateIndex, ) def delete( @@ -631,7 +629,7 @@ async def update( cast_to=cast(Type[Optional[VectorizeCreateIndex]], ResultWrapper[VectorizeCreateIndex]), ) - async def list( + def list( self, account_identifier: str, *, @@ -641,7 +639,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> IndexListResponse: + ) -> AsyncPaginator[VectorizeCreateIndex, AsyncSinglePage[VectorizeCreateIndex]]: """ Returns a list of Vectorize Indexes @@ -658,16 +656,13 @@ async def list( """ if not account_identifier: raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_identifier}/vectorize/indexes", + page=AsyncSinglePage[VectorizeCreateIndex], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[IndexListResponse], ResultWrapper[IndexListResponse]), + model=VectorizeCreateIndex, ) async def delete( diff --git a/src/cloudflare/resources/waiting_rooms/events/events.py b/src/cloudflare/resources/waiting_rooms/events/events.py index 0f506aa3801..4f640e2a6c9 100644 --- a/src/cloudflare/resources/waiting_rooms/events/events.py +++ b/src/cloudflare/resources/waiting_rooms/events/events.py @@ -28,12 +28,13 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.waiting_rooms import ( WaitingroomEvent, - EventListResponse, EventDeleteResponse, event_edit_params, event_create_params, @@ -312,7 +313,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EventListResponse]: + ) -> SyncSinglePage[WaitingroomEvent]: """ Lists events for a waiting room. @@ -331,16 +332,13 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") if not waiting_room_id: raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/waiting_rooms/{waiting_room_id}/events", + page=SyncSinglePage[WaitingroomEvent], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[EventListResponse]], ResultWrapper[EventListResponse]), + model=WaitingroomEvent, ) def delete( @@ -813,7 +811,7 @@ async def update( cast_to=cast(Type[WaitingroomEvent], ResultWrapper[WaitingroomEvent]), ) - async def list( + def list( self, waiting_room_id: str, *, @@ -824,7 +822,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[EventListResponse]: + ) -> AsyncPaginator[WaitingroomEvent, AsyncSinglePage[WaitingroomEvent]]: """ Lists events for a waiting room. @@ -843,16 +841,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") if not waiting_room_id: raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/waiting_rooms/{waiting_room_id}/events", + page=AsyncSinglePage[WaitingroomEvent], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[EventListResponse]], ResultWrapper[EventListResponse]), + model=WaitingroomEvent, ) async def delete( diff --git a/src/cloudflare/resources/waiting_rooms/rules.py b/src/cloudflare/resources/waiting_rooms/rules.py index cce5332dfa7..78bd8d41228 100644 --- a/src/cloudflare/resources/waiting_rooms/rules.py +++ b/src/cloudflare/resources/waiting_rooms/rules.py @@ -21,12 +21,14 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.waiting_rooms import ( + WaitingroomRule, RuleEditResponse, - RuleListResponse, RuleCreateResponse, RuleDeleteResponse, RuleUpdateResponse, @@ -169,7 +171,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleListResponse]: + ) -> SyncSinglePage[WaitingroomRule]: """ Lists rules for a waiting room. @@ -188,16 +190,13 @@ def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") if not waiting_room_id: raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/waiting_rooms/{waiting_room_id}/rules", + page=SyncSinglePage[WaitingroomRule], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RuleListResponse]], ResultWrapper[RuleListResponse]), + model=WaitingroomRule, ) def delete( @@ -440,7 +439,7 @@ async def update( cast_to=cast(Type[Optional[RuleUpdateResponse]], ResultWrapper[RuleUpdateResponse]), ) - async def list( + def list( self, waiting_room_id: str, *, @@ -451,7 +450,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleListResponse]: + ) -> AsyncPaginator[WaitingroomRule, AsyncSinglePage[WaitingroomRule]]: """ Lists rules for a waiting room. @@ -470,16 +469,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") if not waiting_room_id: raise ValueError(f"Expected a non-empty value for `waiting_room_id` but received {waiting_room_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/waiting_rooms/{waiting_room_id}/rules", + page=AsyncSinglePage[WaitingroomRule], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RuleListResponse]], ResultWrapper[RuleListResponse]), + model=WaitingroomRule, ) async def delete( diff --git a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py index ff2bb29295e..d7db5dfc32a 100644 --- a/src/cloudflare/resources/waiting_rooms/waiting_rooms.py +++ b/src/cloudflare/resources/waiting_rooms/waiting_rooms.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, Optional, cast +from typing import Type, Iterable, cast from typing_extensions import Literal import httpx @@ -33,7 +33,6 @@ ) from ...types import ( WaitingRoom, - WaitingRoomListResponse, WaitingRoomDeleteResponse, waiting_room_edit_params, waiting_room_create_params, @@ -69,8 +68,10 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from .events.events import Events, AsyncEvents from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -829,7 +830,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WaitingRoomListResponse]: + ) -> SyncSinglePage[WaitingRoom]: """ Lists waiting rooms. @@ -846,16 +847,13 @@ def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/waiting_rooms", + page=SyncSinglePage[WaitingRoom], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[WaitingRoomListResponse]], ResultWrapper[WaitingRoomListResponse]), + model=WaitingRoom, ) def delete( @@ -2043,7 +2041,7 @@ async def update( cast_to=cast(Type[WaitingRoom], ResultWrapper[WaitingRoom]), ) - async def list( + def list( self, zone_identifier: str, *, @@ -2053,7 +2051,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[WaitingRoomListResponse]: + ) -> AsyncPaginator[WaitingRoom, AsyncSinglePage[WaitingRoom]]: """ Lists waiting rooms. @@ -2070,16 +2068,13 @@ async def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/waiting_rooms", + page=AsyncSinglePage[WaitingRoom], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[WaitingRoomListResponse]], ResultWrapper[WaitingRoomListResponse]), + model=WaitingRoom, ) async def delete( diff --git a/src/cloudflare/resources/web3/hostnames/hostnames.py b/src/cloudflare/resources/web3/hostnames/hostnames.py index 9473bfe6c9d..368e8f12e60 100644 --- a/src/cloudflare/resources/web3/hostnames/hostnames.py +++ b/src/cloudflare/resources/web3/hostnames/hostnames.py @@ -21,14 +21,10 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper -from ....types.web3 import ( - HostnameListResponse, - DistributedWebHostname, - HostnameDeleteResponse, - hostname_edit_params, - hostname_create_params, -) +from ....pagination import SyncSinglePage, AsyncSinglePage +from ....types.web3 import DistributedWebHostname, HostnameDeleteResponse, hostname_edit_params, hostname_create_params from ...._base_client import ( + AsyncPaginator, make_request_options, ) from .ipfs_universal_paths import ( @@ -123,7 +119,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HostnameListResponse]: + ) -> SyncSinglePage[DistributedWebHostname]: """ List Web3 Hostnames @@ -140,16 +136,13 @@ def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_identifier}/web3/hostnames", + page=SyncSinglePage[DistributedWebHostname], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[HostnameListResponse]], ResultWrapper[HostnameListResponse]), + model=DistributedWebHostname, ) def delete( @@ -367,7 +360,7 @@ async def create( cast_to=cast(Type[DistributedWebHostname], ResultWrapper[DistributedWebHostname]), ) - async def list( + def list( self, zone_identifier: str, *, @@ -377,7 +370,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[HostnameListResponse]: + ) -> AsyncPaginator[DistributedWebHostname, AsyncSinglePage[DistributedWebHostname]]: """ List Web3 Hostnames @@ -394,16 +387,13 @@ async def list( """ if not zone_identifier: raise ValueError(f"Expected a non-empty value for `zone_identifier` but received {zone_identifier!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_identifier}/web3/hostnames", + page=AsyncSinglePage[DistributedWebHostname], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[HostnameListResponse]], ResultWrapper[HostnameListResponse]), + model=DistributedWebHostname, ) async def delete( diff --git a/src/cloudflare/resources/workers/domains.py b/src/cloudflare/resources/workers/domains.py index 53c62b76aa7..6fbc1af6e8c 100644 --- a/src/cloudflare/resources/workers/domains.py +++ b/src/cloudflare/resources/workers/domains.py @@ -20,10 +20,12 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) -from ...types.workers import WorkersDomain, DomainListResponse, domain_list_params, domain_update_params +from ...types.workers import WorkersDomain, domain_list_params, domain_update_params __all__ = ["Domains", "AsyncDomains"] @@ -110,7 +112,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainListResponse: + ) -> SyncSinglePage[WorkersDomain]: """ Lists all Worker Domains for an account. @@ -135,8 +137,9 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/domains", + page=SyncSinglePage[WorkersDomain], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -152,9 +155,8 @@ def list( }, domain_list_params.DomainListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainListResponse], ResultWrapper[DomainListResponse]), + model=WorkersDomain, ) def delete( @@ -306,7 +308,7 @@ async def update( cast_to=cast(Type[WorkersDomain], ResultWrapper[WorkersDomain]), ) - async def list( + def list( self, *, account_id: str, @@ -321,7 +323,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> DomainListResponse: + ) -> AsyncPaginator[WorkersDomain, AsyncSinglePage[WorkersDomain]]: """ Lists all Worker Domains for an account. @@ -346,14 +348,15 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/domains", + page=AsyncSinglePage[WorkersDomain], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "environment": environment, "hostname": hostname, @@ -363,9 +366,8 @@ async def list( }, domain_list_params.DomainListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[DomainListResponse], ResultWrapper[DomainListResponse]), + model=WorkersDomain, ) async def delete( diff --git a/src/cloudflare/resources/workers/filters.py b/src/cloudflare/resources/workers/filters.py index ab63f0f0627..f9b067df2f0 100644 --- a/src/cloudflare/resources/workers/filters.py +++ b/src/cloudflare/resources/workers/filters.py @@ -20,12 +20,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.workers import ( WorkersFilter, - FilterListResponse, FilterCreateResponse, FilterDeleteResponse, filter_create_params, @@ -155,7 +156,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FilterListResponse: + ) -> SyncSinglePage[WorkersFilter]: """ List Filters @@ -172,16 +173,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/workers/filters", + page=SyncSinglePage[WorkersFilter], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[FilterListResponse], ResultWrapper[FilterListResponse]), + model=WorkersFilter, ) def delete( @@ -339,7 +337,7 @@ async def update( cast_to=cast(Type[WorkersFilter], ResultWrapper[WorkersFilter]), ) - async def list( + def list( self, *, zone_id: str, @@ -349,7 +347,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FilterListResponse: + ) -> AsyncPaginator[WorkersFilter, AsyncSinglePage[WorkersFilter]]: """ List Filters @@ -366,16 +364,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/workers/filters", + page=AsyncSinglePage[WorkersFilter], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[FilterListResponse], ResultWrapper[FilterListResponse]), + model=WorkersFilter, ) async def delete( diff --git a/src/cloudflare/resources/workers/routes.py b/src/cloudflare/resources/workers/routes.py index 3231926ebed..4b5b565e3f7 100644 --- a/src/cloudflare/resources/workers/routes.py +++ b/src/cloudflare/resources/workers/routes.py @@ -20,12 +20,13 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.workers import ( WorkersRoute, - RouteListResponse, RouteCreateResponse, RouteDeleteResponse, route_create_params, @@ -164,7 +165,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteListResponse: + ) -> SyncSinglePage[WorkersRoute]: """ Returns routes for a zone. @@ -181,16 +182,13 @@ def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return self._get( + return self._get_api_list( f"/zones/{zone_id}/workers/routes", + page=SyncSinglePage[WorkersRoute], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RouteListResponse], ResultWrapper[RouteListResponse]), + model=WorkersRoute, ) def delete( @@ -406,7 +404,7 @@ async def update( cast_to=cast(Type[WorkersRoute], ResultWrapper[WorkersRoute]), ) - async def list( + def list( self, *, zone_id: str, @@ -416,7 +414,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RouteListResponse: + ) -> AsyncPaginator[WorkersRoute, AsyncSinglePage[WorkersRoute]]: """ Returns routes for a zone. @@ -433,16 +431,13 @@ async def list( """ if not zone_id: raise ValueError(f"Expected a non-empty value for `zone_id` but received {zone_id!r}") - return await self._get( + return self._get_api_list( f"/zones/{zone_id}/workers/routes", + page=AsyncSinglePage[WorkersRoute], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[RouteListResponse], ResultWrapper[RouteListResponse]), + model=WorkersRoute, ) async def delete( diff --git a/src/cloudflare/resources/workers/scripts/scripts.py b/src/cloudflare/resources/workers/scripts/scripts.py index 7288195cf54..80ae6ca12c3 100644 --- a/src/cloudflare/resources/workers/scripts/scripts.py +++ b/src/cloudflare/resources/workers/scripts/scripts.py @@ -85,10 +85,12 @@ async_to_custom_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.workers import WorkersScript, ScriptListResponse, script_delete_params, script_update_params +from ....types.workers import WorkersScript, script_delete_params, script_update_params __all__ = ["Scripts", "AsyncScripts"] @@ -266,7 +268,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptListResponse: + ) -> SyncSinglePage[WorkersScript]: """ Fetch a list of uploaded workers. @@ -283,16 +285,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/scripts", + page=SyncSinglePage[WorkersScript], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ScriptListResponse], ResultWrapper[ScriptListResponse]), + model=WorkersScript, ) def delete( @@ -555,7 +554,7 @@ async def update( cast_to=cast(Type[WorkersScript], ResultWrapper[WorkersScript]), ) - async def list( + def list( self, *, account_id: str, @@ -565,7 +564,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ScriptListResponse: + ) -> AsyncPaginator[WorkersScript, AsyncSinglePage[WorkersScript]]: """ Fetch a list of uploaded workers. @@ -582,16 +581,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/scripts", + page=AsyncSinglePage[WorkersScript], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[ScriptListResponse], ResultWrapper[ScriptListResponse]), + model=WorkersScript, ) async def delete( diff --git a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py index 1830339efd6..0f025e9189a 100644 --- a/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py +++ b/src/cloudflare/resources/workers_for_platforms/dispatch/namespaces/namespaces.py @@ -28,8 +28,10 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from .scripts.scripts import Scripts, AsyncScripts from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.workers_for_platforms.dispatch import ( @@ -108,7 +110,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NamespaceListResponse: + ) -> SyncSinglePage[NamespaceListResponse]: """ Fetch a list of Workers for Platforms namespaces. @@ -125,16 +127,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/dispatch/namespaces", + page=SyncSinglePage[NamespaceListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[NamespaceListResponse], ResultWrapper[NamespaceListResponse]), + model=NamespaceListResponse, ) def delete( @@ -282,7 +281,7 @@ async def create( cast_to=cast(Type[NamespaceCreateResponse], ResultWrapper[NamespaceCreateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -292,7 +291,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> NamespaceListResponse: + ) -> AsyncPaginator[NamespaceListResponse, AsyncSinglePage[NamespaceListResponse]]: """ Fetch a list of Workers for Platforms namespaces. @@ -309,16 +308,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/workers/dispatch/namespaces", + page=AsyncSinglePage[NamespaceListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[NamespaceListResponse], ResultWrapper[NamespaceListResponse]), + model=NamespaceListResponse, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index e2069c027d2..79e1cc21d43 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, Union, Optional, cast, overload +from typing import Any, List, Type, Union, cast, overload from typing_extensions import Literal import httpx @@ -37,7 +37,9 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .user_policy_checks import ( @@ -50,7 +52,6 @@ ) from .....types.zero_trust.access import ( ZeroTrustApps, - ApplicationListResponse, ApplicationDeleteResponse, application_create_params, application_update_params, @@ -1472,7 +1473,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ApplicationListResponse]: + ) -> SyncSinglePage[ZeroTrustApps]: """ Lists all Access applications in an account or zone. @@ -1504,16 +1505,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/apps", + page=SyncSinglePage[ZeroTrustApps], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ApplicationListResponse]], ResultWrapper[ApplicationListResponse]), + model=cast(Any, ZeroTrustApps), # Union types cannot be passed in as arguments in the type system ) def delete( @@ -3098,7 +3096,7 @@ async def update( ), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -3109,7 +3107,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ApplicationListResponse]: + ) -> AsyncPaginator[ZeroTrustApps, AsyncSinglePage[ZeroTrustApps]]: """ Lists all Access applications in an account or zone. @@ -3141,16 +3139,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/apps", + page=AsyncSinglePage[ZeroTrustApps], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ApplicationListResponse]], ResultWrapper[ApplicationListResponse]), + model=cast(Any, ZeroTrustApps), # Union types cannot be passed in as arguments in the type system ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/applications/cas.py b/src/cloudflare/resources/zero_trust/access/applications/cas.py index 15d65bc4bf2..34262b5b4fd 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/cas.py +++ b/src/cloudflare/resources/zero_trust/access/applications/cas.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, Type, cast import httpx @@ -16,10 +16,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.zero_trust.access.applications import CAGetResponse, CAListResponse, CACreateResponse, CADeleteResponse +from .....types.zero_trust.access.applications import ZeroTrustCA, CAGetResponse, CACreateResponse, CADeleteResponse __all__ = ["CAs", "AsyncCAs"] @@ -109,7 +111,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CAListResponse]: + ) -> SyncSinglePage[ZeroTrustCA]: """ Lists short-lived certificate CAs and their public keys. @@ -141,16 +143,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/apps/ca", + page=SyncSinglePage[ZeroTrustCA], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CAListResponse]], ResultWrapper[CAListResponse]), + model=ZeroTrustCA, ) def delete( @@ -353,7 +352,7 @@ async def create( ), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -364,7 +363,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CAListResponse]: + ) -> AsyncPaginator[ZeroTrustCA, AsyncSinglePage[ZeroTrustCA]]: """ Lists short-lived certificate CAs and their public keys. @@ -396,16 +395,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/apps/ca", + page=AsyncSinglePage[ZeroTrustCA], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CAListResponse]], ResultWrapper[CAListResponse]), + model=ZeroTrustCA, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/applications/policies.py b/src/cloudflare/resources/zero_trust/access/applications/policies.py index 1b96d6d8493..cab5e55073f 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/policies.py +++ b/src/cloudflare/resources/zero_trust/access/applications/policies.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, Optional, cast +from typing import Type, Iterable, cast from typing_extensions import Literal import httpx @@ -21,12 +21,13 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.access.applications import ( ZeroTrustPolicies, - PolicyListResponse, PolicyDeleteResponse, policy_create_params, policy_update_params, @@ -303,7 +304,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> SyncSinglePage[ZeroTrustPolicies]: """ Lists Access policies configured for an application. @@ -339,16 +340,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{uuid}/policies", + page=SyncSinglePage[ZeroTrustPolicies], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=ZeroTrustPolicies, ) def delete( @@ -738,7 +736,7 @@ async def update( cast_to=cast(Type[ZeroTrustPolicies], ResultWrapper[ZeroTrustPolicies]), ) - async def list( + def list( self, uuid: str, *, @@ -750,7 +748,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> AsyncPaginator[ZeroTrustPolicies, AsyncSinglePage[ZeroTrustPolicies]]: """ Lists Access policies configured for an application. @@ -786,16 +784,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/apps/{uuid}/policies", + page=AsyncSinglePage[ZeroTrustPolicies], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=ZeroTrustPolicies, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/bookmarks.py b/src/cloudflare/resources/zero_trust/access/bookmarks.py index 488fc78f779..283c3ef36b0 100644 --- a/src/cloudflare/resources/zero_trust/access/bookmarks.py +++ b/src/cloudflare/resources/zero_trust/access/bookmarks.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -16,10 +16,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.zero_trust.access import ZeroTrustBookmarks, BookmarkListResponse, BookmarkDeleteResponse +from ....types.zero_trust.access import ZeroTrustBookmarks, BookmarkDeleteResponse __all__ = ["Bookmarks", "AsyncBookmarks"] @@ -127,7 +129,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BookmarkListResponse]: + ) -> SyncSinglePage[ZeroTrustBookmarks]: """ Lists Bookmark applications. @@ -142,16 +144,13 @@ def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{identifier}/access/bookmarks", + page=SyncSinglePage[ZeroTrustBookmarks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[BookmarkListResponse]], ResultWrapper[BookmarkListResponse]), + model=ZeroTrustBookmarks, ) def delete( @@ -332,7 +331,7 @@ async def update( cast_to=cast(Type[ZeroTrustBookmarks], ResultWrapper[ZeroTrustBookmarks]), ) - async def list( + def list( self, identifier: str, *, @@ -342,7 +341,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[BookmarkListResponse]: + ) -> AsyncPaginator[ZeroTrustBookmarks, AsyncSinglePage[ZeroTrustBookmarks]]: """ Lists Bookmark applications. @@ -357,16 +356,13 @@ async def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{identifier}/access/bookmarks", + page=AsyncSinglePage[ZeroTrustBookmarks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[BookmarkListResponse]], ResultWrapper[BookmarkListResponse]), + model=ZeroTrustBookmarks, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py index c356a526d8f..72886a437a4 100644 --- a/src/cloudflare/resources/zero_trust/access/certificates/certificates.py +++ b/src/cloudflare/resources/zero_trust/access/certificates/certificates.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Type, Optional, cast +from typing import List, Type, cast import httpx @@ -28,12 +28,13 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.access import ( ZeroTrustCertificates, - CertificateListResponse, CertificateDeleteResponse, certificate_create_params, certificate_update_params, @@ -211,7 +212,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CertificateListResponse]: + ) -> SyncSinglePage[ZeroTrustCertificates]: """ Lists all mTLS root certificates. @@ -243,16 +244,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/certificates", + page=SyncSinglePage[ZeroTrustCertificates], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CertificateListResponse]], ResultWrapper[CertificateListResponse]), + model=ZeroTrustCertificates, ) def delete( @@ -534,7 +532,7 @@ async def update( cast_to=cast(Type[ZeroTrustCertificates], ResultWrapper[ZeroTrustCertificates]), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -545,7 +543,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CertificateListResponse]: + ) -> AsyncPaginator[ZeroTrustCertificates, AsyncSinglePage[ZeroTrustCertificates]]: """ Lists all mTLS root certificates. @@ -577,16 +575,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/certificates", + page=AsyncSinglePage[ZeroTrustCertificates], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CertificateListResponse]], ResultWrapper[CertificateListResponse]), + model=ZeroTrustCertificates, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/custom_pages.py b/src/cloudflare/resources/zero_trust/access/custom_pages.py index e5d50209dac..1e65a80ae45 100644 --- a/src/cloudflare/resources/zero_trust/access/custom_pages.py +++ b/src/cloudflare/resources/zero_trust/access/custom_pages.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast from typing_extensions import Literal import httpx @@ -21,12 +21,13 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.access import ( ZeroTrustCustomPage, - CustomPageListResponse, CustomPageDeleteResponse, ZeroTrustCustomPageWithoutHTML, custom_page_create_params, @@ -180,7 +181,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CustomPageListResponse]: + ) -> SyncSinglePage[ZeroTrustCustomPageWithoutHTML]: """ List custom pages @@ -197,16 +198,13 @@ def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{identifier}/access/custom_pages", + page=SyncSinglePage[ZeroTrustCustomPageWithoutHTML], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CustomPageListResponse]], ResultWrapper[CustomPageListResponse]), + model=ZeroTrustCustomPageWithoutHTML, ) def delete( @@ -432,7 +430,7 @@ async def update( cast_to=cast(Type[ZeroTrustCustomPageWithoutHTML], ResultWrapper[ZeroTrustCustomPageWithoutHTML]), ) - async def list( + def list( self, identifier: str, *, @@ -442,7 +440,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CustomPageListResponse]: + ) -> AsyncPaginator[ZeroTrustCustomPageWithoutHTML, AsyncSinglePage[ZeroTrustCustomPageWithoutHTML]]: """ List custom pages @@ -459,16 +457,13 @@ async def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{identifier}/access/custom_pages", + page=AsyncSinglePage[ZeroTrustCustomPageWithoutHTML], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CustomPageListResponse]], ResultWrapper[CustomPageListResponse]), + model=ZeroTrustCustomPageWithoutHTML, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/groups.py b/src/cloudflare/resources/zero_trust/access/groups.py index 250aa7914f5..5920fb6f57b 100644 --- a/src/cloudflare/resources/zero_trust/access/groups.py +++ b/src/cloudflare/resources/zero_trust/access/groups.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Iterable, Optional, cast +from typing import Type, Iterable, cast import httpx @@ -20,16 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.zero_trust.access import ( - ZeroTrustGroups, - GroupListResponse, - GroupDeleteResponse, - group_create_params, - group_update_params, -) +from ....types.zero_trust.access import ZeroTrustGroups, GroupDeleteResponse, group_create_params, group_update_params __all__ = ["Groups", "AsyncGroups"] @@ -225,7 +221,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[GroupListResponse]: + ) -> SyncSinglePage[ZeroTrustGroups]: """ Lists all Access groups. @@ -257,16 +253,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/groups", + page=SyncSinglePage[ZeroTrustGroups], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[GroupListResponse]], ResultWrapper[GroupListResponse]), + model=ZeroTrustGroups, ) def delete( @@ -570,7 +563,7 @@ async def update( cast_to=cast(Type[ZeroTrustGroups], ResultWrapper[ZeroTrustGroups]), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -581,7 +574,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[GroupListResponse]: + ) -> AsyncPaginator[ZeroTrustGroups, AsyncSinglePage[ZeroTrustGroups]]: """ Lists all Access groups. @@ -613,16 +606,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/groups", + page=AsyncSinglePage[ZeroTrustGroups], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[GroupListResponse]], ResultWrapper[GroupListResponse]), + model=ZeroTrustGroups, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/service_tokens.py b/src/cloudflare/resources/zero_trust/access/service_tokens.py index f318849caa8..953e58131ec 100644 --- a/src/cloudflare/resources/zero_trust/access/service_tokens.py +++ b/src/cloudflare/resources/zero_trust/access/service_tokens.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,12 +20,13 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.access import ( ZeroTrustServiceTokens, - ServiceTokenListResponse, ServiceTokenCreateResponse, ServiceTokenRotateResponse, service_token_create_params, @@ -203,7 +204,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ServiceTokenListResponse]: + ) -> SyncSinglePage[ZeroTrustServiceTokens]: """ Lists all service tokens. @@ -235,16 +236,13 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/service_tokens", + page=SyncSinglePage[ZeroTrustServiceTokens], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ServiceTokenListResponse]], ResultWrapper[ServiceTokenListResponse]), + model=ZeroTrustServiceTokens, ) def delete( @@ -553,7 +551,7 @@ async def update( cast_to=cast(Type[ZeroTrustServiceTokens], ResultWrapper[ZeroTrustServiceTokens]), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -564,7 +562,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ServiceTokenListResponse]: + ) -> AsyncPaginator[ZeroTrustServiceTokens, AsyncSinglePage[ZeroTrustServiceTokens]]: """ Lists all service tokens. @@ -596,16 +594,13 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/service_tokens", + page=AsyncSinglePage[ZeroTrustServiceTokens], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ServiceTokenListResponse]], ResultWrapper[ServiceTokenListResponse]), + model=ZeroTrustServiceTokens, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/tags.py b/src/cloudflare/resources/zero_trust/access/tags.py index 57cd3bb4b25..0bfece83082 100644 --- a/src/cloudflare/resources/zero_trust/access/tags.py +++ b/src/cloudflare/resources/zero_trust/access/tags.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -20,16 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.zero_trust.access import ( - ZeroTrustTag, - TagListResponse, - TagDeleteResponse, - tag_create_params, - tag_update_params, -) +from ....types.zero_trust.access import ZeroTrustTag, TagDeleteResponse, tag_create_params, tag_update_params __all__ = ["Tags", "AsyncTags"] @@ -144,7 +140,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TagListResponse]: + ) -> SyncSinglePage[ZeroTrustTag]: """ List tags @@ -161,16 +157,13 @@ def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{identifier}/access/tags", + page=SyncSinglePage[ZeroTrustTag], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[TagListResponse]], ResultWrapper[TagListResponse]), + model=ZeroTrustTag, ) def delete( @@ -362,7 +355,7 @@ async def update( cast_to=cast(Type[ZeroTrustTag], ResultWrapper[ZeroTrustTag]), ) - async def list( + def list( self, identifier: str, *, @@ -372,7 +365,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[TagListResponse]: + ) -> AsyncPaginator[ZeroTrustTag, AsyncSinglePage[ZeroTrustTag]]: """ List tags @@ -389,16 +382,13 @@ async def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{identifier}/access/tags", + page=AsyncSinglePage[ZeroTrustTag], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[TagListResponse]], ResultWrapper[TagListResponse]), + model=ZeroTrustTag, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/access/users/active_sessions.py b/src/cloudflare/resources/zero_trust/access/users/active_sessions.py index 87c9717dad3..92e9fc65093 100644 --- a/src/cloudflare/resources/zero_trust/access/users/active_sessions.py +++ b/src/cloudflare/resources/zero_trust/access/users/active_sessions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Type, cast import httpx @@ -16,7 +16,9 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.access.users import ActiveSessionGetResponse, ActiveSessionListResponse @@ -44,7 +46,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ActiveSessionListResponse]: + ) -> SyncSinglePage[ActiveSessionListResponse]: """ Get active sessions for a single user. @@ -65,16 +67,13 @@ def list( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return self._get( + return self._get_api_list( f"/accounts/{identifier}/access/users/{id}/active_sessions", + page=SyncSinglePage[ActiveSessionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ActiveSessionListResponse]], ResultWrapper[ActiveSessionListResponse]), + model=ActiveSessionListResponse, ) def get( @@ -134,7 +133,7 @@ def with_raw_response(self) -> AsyncActiveSessionsWithRawResponse: def with_streaming_response(self) -> AsyncActiveSessionsWithStreamingResponse: return AsyncActiveSessionsWithStreamingResponse(self) - async def list( + def list( self, id: str, *, @@ -145,7 +144,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ActiveSessionListResponse]: + ) -> AsyncPaginator[ActiveSessionListResponse, AsyncSinglePage[ActiveSessionListResponse]]: """ Get active sessions for a single user. @@ -166,16 +165,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{identifier}/access/users/{id}/active_sessions", + page=AsyncSinglePage[ActiveSessionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ActiveSessionListResponse]], ResultWrapper[ActiveSessionListResponse]), + model=ActiveSessionListResponse, ) async def get( diff --git a/src/cloudflare/resources/zero_trust/access/users/failed_logins.py b/src/cloudflare/resources/zero_trust/access/users/failed_logins.py index bc10927f50f..7f37f31f146 100644 --- a/src/cloudflare/resources/zero_trust/access/users/failed_logins.py +++ b/src/cloudflare/resources/zero_trust/access/users/failed_logins.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,8 +13,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.access.users import FailedLoginListResponse @@ -44,7 +43,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FailedLoginListResponse]: + ) -> SyncSinglePage[FailedLoginListResponse]: """ Get all failed login attempts for a single user. @@ -65,16 +64,13 @@ def list( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return self._get( + return self._get_api_list( f"/accounts/{identifier}/access/users/{id}/failed_logins", + page=SyncSinglePage[FailedLoginListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[FailedLoginListResponse]], ResultWrapper[FailedLoginListResponse]), + model=FailedLoginListResponse, ) @@ -87,7 +83,7 @@ def with_raw_response(self) -> AsyncFailedLoginsWithRawResponse: def with_streaming_response(self) -> AsyncFailedLoginsWithStreamingResponse: return AsyncFailedLoginsWithStreamingResponse(self) - async def list( + def list( self, id: str, *, @@ -98,7 +94,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FailedLoginListResponse]: + ) -> AsyncPaginator[FailedLoginListResponse, AsyncSinglePage[FailedLoginListResponse]]: """ Get all failed login attempts for a single user. @@ -119,16 +115,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") if not id: raise ValueError(f"Expected a non-empty value for `id` but received {id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{identifier}/access/users/{id}/failed_logins", + page=AsyncSinglePage[FailedLoginListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[FailedLoginListResponse]], ResultWrapper[FailedLoginListResponse]), + model=FailedLoginListResponse, ) diff --git a/src/cloudflare/resources/zero_trust/access/users/users.py b/src/cloudflare/resources/zero_trust/access/users/users.py index fe06ee20999..0d656b5f90b 100644 --- a/src/cloudflare/resources/zero_trust/access/users/users.py +++ b/src/cloudflare/resources/zero_trust/access/users/users.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,7 +13,6 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....._wrappers import ResultWrapper from .failed_logins import ( FailedLogins, AsyncFailedLogins, @@ -24,6 +21,7 @@ FailedLoginsWithStreamingResponse, AsyncFailedLoginsWithStreamingResponse, ) +from .....pagination import SyncSinglePage, AsyncSinglePage from .active_sessions import ( ActiveSessions, AsyncActiveSessions, @@ -33,6 +31,7 @@ AsyncActiveSessionsWithStreamingResponse, ) from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .last_seen_identity import ( @@ -43,7 +42,7 @@ LastSeenIdentityWithStreamingResponse, AsyncLastSeenIdentityWithStreamingResponse, ) -from .....types.zero_trust.access import UserListResponse +from .....types.zero_trust.access import ZeroTrustUsers __all__ = ["Users", "AsyncUsers"] @@ -79,7 +78,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[UserListResponse]: + ) -> SyncSinglePage[ZeroTrustUsers]: """ Gets a list of users for an account. @@ -96,16 +95,13 @@ def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{identifier}/access/users", + page=SyncSinglePage[ZeroTrustUsers], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[UserListResponse]], ResultWrapper[UserListResponse]), + model=ZeroTrustUsers, ) @@ -130,7 +126,7 @@ def with_raw_response(self) -> AsyncUsersWithRawResponse: def with_streaming_response(self) -> AsyncUsersWithStreamingResponse: return AsyncUsersWithStreamingResponse(self) - async def list( + def list( self, identifier: str, *, @@ -140,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[UserListResponse]: + ) -> AsyncPaginator[ZeroTrustUsers, AsyncSinglePage[ZeroTrustUsers]]: """ Gets a list of users for an account. @@ -157,16 +153,13 @@ async def list( """ if not identifier: raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{identifier}/access/users", + page=AsyncSinglePage[ZeroTrustUsers], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[UserListResponse]], ResultWrapper[UserListResponse]), + model=ZeroTrustUsers, ) diff --git a/src/cloudflare/resources/zero_trust/devices/devices.py b/src/cloudflare/resources/zero_trust/devices/devices.py index 08e70ae1bf7..c8462bafd41 100644 --- a/src/cloudflare/resources/zero_trust/devices/devices.py +++ b/src/cloudflare/resources/zero_trust/devices/devices.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, Optional, cast import httpx @@ -72,6 +72,7 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from .override_codes import ( OverrideCodes, AsyncOverrideCodes, @@ -81,11 +82,12 @@ AsyncOverrideCodesWithStreamingResponse, ) from ...._base_client import ( + AsyncPaginator, make_request_options, ) from .posture.posture import Posture, AsyncPosture from .policies.policies import Policies, AsyncPolicies -from ....types.zero_trust import DeviceGetResponse, DeviceListResponse +from ....types.zero_trust import ZeroTrustDevices, DeviceGetResponse __all__ = ["Devices", "AsyncDevices"] @@ -141,7 +143,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DeviceListResponse]: + ) -> SyncSinglePage[ZeroTrustDevices]: """ Fetches a list of enrolled devices. @@ -156,16 +158,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices", + page=SyncSinglePage[ZeroTrustDevices], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DeviceListResponse]], ResultWrapper[DeviceListResponse]), + model=ZeroTrustDevices, ) def get( @@ -257,7 +256,7 @@ def with_raw_response(self) -> AsyncDevicesWithRawResponse: def with_streaming_response(self) -> AsyncDevicesWithStreamingResponse: return AsyncDevicesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -267,7 +266,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DeviceListResponse]: + ) -> AsyncPaginator[ZeroTrustDevices, AsyncSinglePage[ZeroTrustDevices]]: """ Fetches a list of enrolled devices. @@ -282,16 +281,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices", + page=AsyncSinglePage[ZeroTrustDevices], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DeviceListResponse]], ResultWrapper[DeviceListResponse]), + model=ZeroTrustDevices, ) async def get( diff --git a/src/cloudflare/resources/zero_trust/devices/dex_tests.py b/src/cloudflare/resources/zero_trust/devices/dex_tests.py index 50735d5de84..65ad0e65432 100644 --- a/src/cloudflare/resources/zero_trust/devices/dex_tests.py +++ b/src/cloudflare/resources/zero_trust/devices/dex_tests.py @@ -20,12 +20,13 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.devices import ( DEXTestSchemasHTTP, - DEXTestListResponse, DEXTestDeleteResponse, dex_test_create_params, dex_test_update_params, @@ -184,7 +185,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestListResponse]: + ) -> SyncSinglePage[DEXTestSchemasHTTP]: """ Fetch all DEX tests. @@ -199,16 +200,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/dex_tests", + page=SyncSinglePage[DEXTestSchemasHTTP], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DEXTestListResponse]], ResultWrapper[DEXTestListResponse]), + model=DEXTestSchemasHTTP, ) def delete( @@ -438,7 +436,7 @@ async def update( cast_to=cast(Type[Optional[DEXTestSchemasHTTP]], ResultWrapper[DEXTestSchemasHTTP]), ) - async def list( + def list( self, *, account_id: str, @@ -448,7 +446,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DEXTestListResponse]: + ) -> AsyncPaginator[DEXTestSchemasHTTP, AsyncSinglePage[DEXTestSchemasHTTP]]: """ Fetch all DEX tests. @@ -463,16 +461,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/dex_tests", + page=AsyncSinglePage[DEXTestSchemasHTTP], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DEXTestListResponse]], ResultWrapper[DEXTestListResponse]), + model=DEXTestSchemasHTTP, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/devices/networks.py b/src/cloudflare/resources/zero_trust/devices/networks.py index 4666e1cd3ba..0e1f3328fea 100644 --- a/src/cloudflare/resources/zero_trust/devices/networks.py +++ b/src/cloudflare/resources/zero_trust/devices/networks.py @@ -21,11 +21,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.devices import ( - NetworkListResponse, DeviceManagedNetworks, NetworkDeleteResponse, network_create_params, @@ -169,7 +170,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkListResponse]: + ) -> SyncSinglePage[DeviceManagedNetworks]: """ Fetches a list of managed networks for an account. @@ -184,16 +185,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/networks", + page=SyncSinglePage[DeviceManagedNetworks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[NetworkListResponse]], ResultWrapper[NetworkListResponse]), + model=DeviceManagedNetworks, ) def delete( @@ -406,7 +404,7 @@ async def update( cast_to=cast(Type[Optional[DeviceManagedNetworks]], ResultWrapper[DeviceManagedNetworks]), ) - async def list( + def list( self, *, account_id: str, @@ -416,7 +414,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[NetworkListResponse]: + ) -> AsyncPaginator[DeviceManagedNetworks, AsyncSinglePage[DeviceManagedNetworks]]: """ Fetches a list of managed networks for an account. @@ -431,16 +429,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/networks", + page=AsyncSinglePage[DeviceManagedNetworks], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[NetworkListResponse]], ResultWrapper[NetworkListResponse]), + model=DeviceManagedNetworks, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py index cc9d47f8db6..9ee1ea2922b 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/excludes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/excludes.py @@ -20,12 +20,14 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.devices.policies import ( + DevicesSplitTunnel, ExcludeGetResponse, - ExcludeListResponse, ExcludeUpdateResponse, DevicesSplitTunnelParam, exclude_update_params, @@ -92,7 +94,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ExcludeListResponse]: + ) -> SyncSinglePage[DevicesSplitTunnel]: """ Fetches the list of routes excluded from the WARP client's tunnel. @@ -107,16 +109,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policy/exclude", + page=SyncSinglePage[DevicesSplitTunnel], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ExcludeListResponse]], ResultWrapper[ExcludeListResponse]), + model=DevicesSplitTunnel, ) def get( @@ -211,7 +210,7 @@ async def update( cast_to=cast(Type[Optional[ExcludeUpdateResponse]], ResultWrapper[ExcludeUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -221,7 +220,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ExcludeListResponse]: + ) -> AsyncPaginator[DevicesSplitTunnel, AsyncSinglePage[DevicesSplitTunnel]]: """ Fetches the list of routes excluded from the WARP client's tunnel. @@ -236,16 +235,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policy/exclude", + page=AsyncSinglePage[DevicesSplitTunnel], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ExcludeListResponse]], ResultWrapper[ExcludeListResponse]), + model=DevicesSplitTunnel, ) async def get( diff --git a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py index 3984767e2d7..4c968946186 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/fallback_domains.py @@ -20,13 +20,15 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.devices.policies import ( + DevicesFallbackDomain, FallbackDomainGetResponse, DevicesFallbackDomainParam, - FallbackDomainListResponse, FallbackDomainUpdateResponse, fallback_domain_update_params, ) @@ -100,7 +102,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FallbackDomainListResponse]: + ) -> SyncSinglePage[DevicesFallbackDomain]: """Fetches a list of domains to bypass Gateway DNS resolution. These domains will @@ -117,16 +119,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policy/fallback_domains", + page=SyncSinglePage[DevicesFallbackDomain], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[FallbackDomainListResponse]], ResultWrapper[FallbackDomainListResponse]), + model=DevicesFallbackDomain, ) def get( @@ -230,7 +229,7 @@ async def update( cast_to=cast(Type[Optional[FallbackDomainUpdateResponse]], ResultWrapper[FallbackDomainUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -240,7 +239,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[FallbackDomainListResponse]: + ) -> AsyncPaginator[DevicesFallbackDomain, AsyncSinglePage[DevicesFallbackDomain]]: """Fetches a list of domains to bypass Gateway DNS resolution. These domains will @@ -257,16 +256,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policy/fallback_domains", + page=AsyncSinglePage[DevicesFallbackDomain], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[FallbackDomainListResponse]], ResultWrapper[FallbackDomainListResponse]), + model=DevicesFallbackDomain, ) async def get( diff --git a/src/cloudflare/resources/zero_trust/devices/policies/includes.py b/src/cloudflare/resources/zero_trust/devices/policies/includes.py index d04eaa8f338..7a6d7b9880b 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/includes.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/includes.py @@ -20,13 +20,15 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.devices.policies import ( IncludeGetResponse, - IncludeListResponse, IncludeUpdateResponse, + DevicesSplitTunnelInclude, DevicesSplitTunnelIncludeParam, include_update_params, ) @@ -92,7 +94,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IncludeListResponse]: + ) -> SyncSinglePage[DevicesSplitTunnelInclude]: """ Fetches the list of routes included in the WARP client's tunnel. @@ -107,16 +109,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policy/include", + page=SyncSinglePage[DevicesSplitTunnelInclude], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[IncludeListResponse]], ResultWrapper[IncludeListResponse]), + model=DevicesSplitTunnelInclude, ) def get( @@ -211,7 +210,7 @@ async def update( cast_to=cast(Type[Optional[IncludeUpdateResponse]], ResultWrapper[IncludeUpdateResponse]), ) - async def list( + def list( self, *, account_id: str, @@ -221,7 +220,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IncludeListResponse]: + ) -> AsyncPaginator[DevicesSplitTunnelInclude, AsyncSinglePage[DevicesSplitTunnelInclude]]: """ Fetches the list of routes included in the WARP client's tunnel. @@ -236,16 +235,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policy/include", + page=AsyncSinglePage[DevicesSplitTunnelInclude], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[IncludeListResponse]], ResultWrapper[IncludeListResponse]), + model=DevicesSplitTunnelInclude, ) async def get( diff --git a/src/cloudflare/resources/zero_trust/devices/policies/policies.py b/src/cloudflare/resources/zero_trust/devices/policies/policies.py index 7a2ad9f251f..9a84c73442b 100644 --- a/src/cloudflare/resources/zero_trust/devices/policies/policies.py +++ b/src/cloudflare/resources/zero_trust/devices/policies/policies.py @@ -36,6 +36,7 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from .default_policy import ( DefaultPolicy, AsyncDefaultPolicy, @@ -45,6 +46,7 @@ AsyncDefaultPolicyWithStreamingResponse, ) from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .fallback_domains import ( @@ -56,7 +58,6 @@ AsyncFallbackDomainsWithStreamingResponse, ) from .....types.zero_trust.devices import ( - PolicyListResponse, PolicyDeleteResponse, DevicesDeviceSettingsPolicy, policy_edit_params, @@ -218,7 +219,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> SyncSinglePage[DevicesDeviceSettingsPolicy]: """ Fetches a list of the device settings profiles for an account. @@ -233,16 +234,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policies", + page=SyncSinglePage[DevicesDeviceSettingsPolicy], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=DevicesDeviceSettingsPolicy, ) def delete( @@ -582,7 +580,7 @@ async def create( cast_to=cast(Type[Optional[DevicesDeviceSettingsPolicy]], ResultWrapper[DevicesDeviceSettingsPolicy]), ) - async def list( + def list( self, *, account_id: str, @@ -592,7 +590,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PolicyListResponse]: + ) -> AsyncPaginator[DevicesDeviceSettingsPolicy, AsyncSinglePage[DevicesDeviceSettingsPolicy]]: """ Fetches a list of the device settings profiles for an account. @@ -607,16 +605,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/policies", + page=AsyncSinglePage[DevicesDeviceSettingsPolicy], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PolicyListResponse]], ResultWrapper[PolicyListResponse]), + model=DevicesDeviceSettingsPolicy, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py index 829193dfa63..9bc0de48001 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/integrations.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/integrations.py @@ -21,11 +21,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.devices.posture import ( - IntegrationListResponse, DevicePostureIntegrations, IntegrationDeleteResponse, integration_edit_params, @@ -113,7 +114,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationListResponse]: + ) -> SyncSinglePage[DevicePostureIntegrations]: """ Fetches the list of device posture integrations for an account. @@ -128,16 +129,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/posture/integration", + page=SyncSinglePage[DevicePostureIntegrations], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[IntegrationListResponse]], ResultWrapper[IntegrationListResponse]), + model=DevicePostureIntegrations, ) def delete( @@ -363,7 +361,7 @@ async def create( cast_to=cast(Type[Optional[DevicePostureIntegrations]], ResultWrapper[DevicePostureIntegrations]), ) - async def list( + def list( self, *, account_id: str, @@ -373,7 +371,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IntegrationListResponse]: + ) -> AsyncPaginator[DevicePostureIntegrations, AsyncSinglePage[DevicePostureIntegrations]]: """ Fetches the list of device posture integrations for an account. @@ -388,16 +386,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/posture/integration", + page=AsyncSinglePage[DevicePostureIntegrations], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[IntegrationListResponse]], ResultWrapper[IntegrationListResponse]), + model=DevicePostureIntegrations, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/devices/posture/posture.py b/src/cloudflare/resources/zero_trust/devices/posture/posture.py index 07d0f53e101..93c970a7bbc 100644 --- a/src/cloudflare/resources/zero_trust/devices/posture/posture.py +++ b/src/cloudflare/resources/zero_trust/devices/posture/posture.py @@ -29,12 +29,13 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.devices import ( DevicePostureRules, - PostureListResponse, PostureDeleteResponse, posture_create_params, posture_update_params, @@ -255,7 +256,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureListResponse]: + ) -> SyncSinglePage[DevicePostureRules]: """ Fetches device posture rules for a Zero Trust account. @@ -270,16 +271,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/posture", + page=SyncSinglePage[DevicePostureRules], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PostureListResponse]], ResultWrapper[PostureListResponse]), + model=DevicePostureRules, ) def delete( @@ -569,7 +567,7 @@ async def update( cast_to=cast(Type[Optional[DevicePostureRules]], ResultWrapper[DevicePostureRules]), ) - async def list( + def list( self, *, account_id: str, @@ -579,7 +577,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[PostureListResponse]: + ) -> AsyncPaginator[DevicePostureRules, AsyncSinglePage[DevicePostureRules]]: """ Fetches device posture rules for a Zero Trust account. @@ -594,16 +592,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/devices/posture", + page=AsyncSinglePage[DevicePostureRules], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[PostureListResponse]], ResultWrapper[PostureListResponse]), + model=DevicePostureRules, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/dex/colos.py b/src/cloudflare/resources/zero_trust/dex/colos.py index 22b91354d01..8d49fdc332a 100644 --- a/src/cloudflare/resources/zero_trust/dex/colos.py +++ b/src/cloudflare/resources/zero_trust/dex/colos.py @@ -2,16 +2,12 @@ from __future__ import annotations -from typing import Type, Optional, cast from typing_extensions import Literal import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ...._utils import ( - maybe_transform, - async_maybe_transform, -) +from ...._utils import maybe_transform from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource from ...._response import ( @@ -20,11 +16,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.zero_trust.dex import ColoListResponse, colo_list_params +from ....types.zero_trust.dex import colo_list_params __all__ = ["Colos", "AsyncColos"] @@ -51,7 +48,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ColoListResponse]: + ) -> SyncSinglePage[object]: """ List Cloudflare colos that account's devices were connected to during a time period, sorted by usage starting from the most used colo. Colos without traffic @@ -75,8 +72,9 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/dex/colos", + page=SyncSinglePage[object], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -90,9 +88,8 @@ def list( }, colo_list_params.ColoListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ColoListResponse]], ResultWrapper[ColoListResponse]), + model=object, ) @@ -105,7 +102,7 @@ def with_raw_response(self) -> AsyncColosWithRawResponse: def with_streaming_response(self) -> AsyncColosWithStreamingResponse: return AsyncColosWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -118,7 +115,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ColoListResponse]: + ) -> AsyncPaginator[object, AsyncSinglePage[object]]: """ List Cloudflare colos that account's devices were connected to during a time period, sorted by usage starting from the most used colo. Colos without traffic @@ -142,14 +139,15 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/dex/colos", + page=AsyncSinglePage[object], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "time_end": time_end, "time_start": time_start, @@ -157,9 +155,8 @@ async def list( }, colo_list_params.ColoListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[ColoListResponse]], ResultWrapper[ColoListResponse]), + model=object, ) diff --git a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py index ba359dd804d..edb57507ffe 100644 --- a/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py +++ b/src/cloudflare/resources/zero_trust/dlp/datasets/datasets.py @@ -28,16 +28,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.zero_trust.dlp import ( - DLPDataset, - DLPDatasetArray, - DLPDatasetCreation, - dataset_create_params, - dataset_update_params, -) +from .....types.zero_trust.dlp import DLPDataset, DLPDatasetCreation, dataset_create_params, dataset_update_params __all__ = ["Datasets", "AsyncDatasets"] @@ -167,7 +163,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DLPDatasetArray]: + ) -> SyncSinglePage[DLPDataset]: """ Fetch all datasets with information about available versions. @@ -182,16 +178,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/dlp/datasets", + page=SyncSinglePage[DLPDataset], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DLPDatasetArray]], ResultWrapper[DLPDatasetArray]), + model=DLPDataset, ) def delete( @@ -389,7 +382,7 @@ async def update( cast_to=cast(Type[Optional[DLPDataset]], ResultWrapper[DLPDataset]), ) - async def list( + def list( self, *, account_id: str, @@ -399,7 +392,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[DLPDatasetArray]: + ) -> AsyncPaginator[DLPDataset, AsyncSinglePage[DLPDataset]]: """ Fetch all datasets with information about available versions. @@ -414,16 +407,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/dlp/datasets", + page=AsyncSinglePage[DLPDataset], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[DLPDatasetArray]], ResultWrapper[DLPDatasetArray]), + model=DLPDataset, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py b/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py index ff46cbf04ee..04d6aa9cb2c 100644 --- a/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py +++ b/src/cloudflare/resources/zero_trust/dlp/profiles/profiles.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, cast import httpx @@ -32,10 +32,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) -from .....types.zero_trust.dlp import ProfileGetResponse, ProfileListResponse +from .....types.zero_trust.dlp import DLPProfiles, ProfileGetResponse __all__ = ["Profiles", "AsyncProfiles"] @@ -67,7 +69,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ProfileListResponse]: + ) -> SyncSinglePage[DLPProfiles]: """ Lists all DLP profiles in an account. @@ -84,16 +86,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/dlp/profiles", + page=SyncSinglePage[DLPProfiles], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ProfileListResponse]], ResultWrapper[ProfileListResponse]), + model=cast(Any, DLPProfiles), # Union types cannot be passed in as arguments in the type system ) def get( @@ -164,7 +163,7 @@ def with_raw_response(self) -> AsyncProfilesWithRawResponse: def with_streaming_response(self) -> AsyncProfilesWithStreamingResponse: return AsyncProfilesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -174,7 +173,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ProfileListResponse]: + ) -> AsyncPaginator[DLPProfiles, AsyncSinglePage[DLPProfiles]]: """ Lists all DLP profiles in an account. @@ -191,16 +190,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/dlp/profiles", + page=AsyncSinglePage[DLPProfiles], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ProfileListResponse]], ResultWrapper[ProfileListResponse]), + model=cast(Any, DLPProfiles), # Union types cannot be passed in as arguments in the type system ) async def get( diff --git a/src/cloudflare/resources/zero_trust/gateway/app_types.py b/src/cloudflare/resources/zero_trust/gateway/app_types.py index 6f78b840fe0..c7b75140620 100644 --- a/src/cloudflare/resources/zero_trust/gateway/app_types.py +++ b/src/cloudflare/resources/zero_trust/gateway/app_types.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Type, Optional, cast +from typing import Any, cast import httpx @@ -15,11 +15,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.zero_trust.gateway import AppTypeListResponse +from ....types.zero_trust.gateway import ZeroTrustGatewayAppTypes __all__ = ["AppTypes", "AsyncAppTypes"] @@ -43,7 +44,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AppTypeListResponse]: + ) -> SyncSinglePage[ZeroTrustGatewayAppTypes]: """ Fetches all application and application type mappings. @@ -60,16 +61,15 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/app_types", + page=SyncSinglePage[ZeroTrustGatewayAppTypes], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[AppTypeListResponse]], ResultWrapper[AppTypeListResponse]), + model=cast( + Any, ZeroTrustGatewayAppTypes + ), # Union types cannot be passed in as arguments in the type system ) @@ -82,7 +82,7 @@ def with_raw_response(self) -> AsyncAppTypesWithRawResponse: def with_streaming_response(self) -> AsyncAppTypesWithStreamingResponse: return AsyncAppTypesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -92,7 +92,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[AppTypeListResponse]: + ) -> AsyncPaginator[ZeroTrustGatewayAppTypes, AsyncSinglePage[ZeroTrustGatewayAppTypes]]: """ Fetches all application and application type mappings. @@ -109,16 +109,15 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/app_types", + page=AsyncSinglePage[ZeroTrustGatewayAppTypes], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[AppTypeListResponse]], ResultWrapper[AppTypeListResponse]), + model=cast( + Any, ZeroTrustGatewayAppTypes + ), # Union types cannot be passed in as arguments in the type system ) diff --git a/src/cloudflare/resources/zero_trust/gateway/categories.py b/src/cloudflare/resources/zero_trust/gateway/categories.py index 5eb0fe36103..430e44ef82f 100644 --- a/src/cloudflare/resources/zero_trust/gateway/categories.py +++ b/src/cloudflare/resources/zero_trust/gateway/categories.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,11 +13,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) -from ....types.zero_trust.gateway import CategoryListResponse +from ....types.zero_trust.gateway import ZeroTrustGatewayCategories __all__ = ["Categories", "AsyncCategories"] @@ -43,7 +42,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CategoryListResponse]: + ) -> SyncSinglePage[ZeroTrustGatewayCategories]: """ Fetches a list of all categories. @@ -60,16 +59,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/categories", + page=SyncSinglePage[ZeroTrustGatewayCategories], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CategoryListResponse]], ResultWrapper[CategoryListResponse]), + model=ZeroTrustGatewayCategories, ) @@ -82,7 +78,7 @@ def with_raw_response(self) -> AsyncCategoriesWithRawResponse: def with_streaming_response(self) -> AsyncCategoriesWithStreamingResponse: return AsyncCategoriesWithStreamingResponse(self) - async def list( + def list( self, *, account_id: str, @@ -92,7 +88,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[CategoryListResponse]: + ) -> AsyncPaginator[ZeroTrustGatewayCategories, AsyncSinglePage[ZeroTrustGatewayCategories]]: """ Fetches a list of all categories. @@ -109,16 +105,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/categories", + page=AsyncSinglePage[ZeroTrustGatewayCategories], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[CategoryListResponse]], ResultWrapper[CategoryListResponse]), + model=ZeroTrustGatewayCategories, ) diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/items.py b/src/cloudflare/resources/zero_trust/gateway/lists/items.py index a2b29256b0d..ef83861be8d 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/items.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/items.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Type, Optional, cast - import httpx from ....._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -15,8 +13,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.gateway.lists import ItemListResponse @@ -44,7 +43,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ItemListResponse]: + ) -> SyncSinglePage[ItemListResponse]: """ Fetches all items in a single Zero Trust list. @@ -63,16 +62,13 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/lists/{list_id}/items", + page=SyncSinglePage[ItemListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ItemListResponse]], ResultWrapper[ItemListResponse]), + model=ItemListResponse, ) @@ -85,7 +81,7 @@ def with_raw_response(self) -> AsyncItemsWithRawResponse: def with_streaming_response(self) -> AsyncItemsWithStreamingResponse: return AsyncItemsWithStreamingResponse(self) - async def list( + def list( self, list_id: str, *, @@ -96,7 +92,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ItemListResponse]: + ) -> AsyncPaginator[ItemListResponse, AsyncSinglePage[ItemListResponse]]: """ Fetches all items in a single Zero Trust list. @@ -115,16 +111,13 @@ async def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") if not list_id: raise ValueError(f"Expected a non-empty value for `list_id` but received {list_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/lists/{list_id}/items", + page=AsyncSinglePage[ItemListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ItemListResponse]], ResultWrapper[ItemListResponse]), + model=ItemListResponse, ) diff --git a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py index a3eb02e0167..3c8587631cc 100644 --- a/src/cloudflare/resources/zero_trust/gateway/lists/lists.py +++ b/src/cloudflare/resources/zero_trust/gateway/lists/lists.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, Iterable, Optional, cast +from typing import Any, List, Type, Iterable, cast from typing_extensions import Literal import httpx @@ -29,11 +29,12 @@ async_to_streamed_response_wrapper, ) from ....._wrappers import ResultWrapper +from .....pagination import SyncSinglePage, AsyncSinglePage from ....._base_client import ( + AsyncPaginator, make_request_options, ) from .....types.zero_trust.gateway import ( - ListListResponse, ListCreateResponse, ListDeleteResponse, ZeroTrustGatewayLists, @@ -181,7 +182,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListListResponse]: + ) -> SyncSinglePage[ZeroTrustGatewayLists]: """ Fetches all Zero Trust lists for an account. @@ -196,16 +197,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/lists", + page=SyncSinglePage[ZeroTrustGatewayLists], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ListListResponse]], ResultWrapper[ListListResponse]), + model=ZeroTrustGatewayLists, ) def delete( @@ -479,7 +477,7 @@ async def update( cast_to=cast(Type[ZeroTrustGatewayLists], ResultWrapper[ZeroTrustGatewayLists]), ) - async def list( + def list( self, *, account_id: str, @@ -489,7 +487,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ListListResponse]: + ) -> AsyncPaginator[ZeroTrustGatewayLists, AsyncSinglePage[ZeroTrustGatewayLists]]: """ Fetches all Zero Trust lists for an account. @@ -504,16 +502,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/lists", + page=AsyncSinglePage[ZeroTrustGatewayLists], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ListListResponse]], ResultWrapper[ListListResponse]), + model=ZeroTrustGatewayLists, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/gateway/locations.py b/src/cloudflare/resources/zero_trust/gateway/locations.py index d39d1382e09..f0795637204 100644 --- a/src/cloudflare/resources/zero_trust/gateway/locations.py +++ b/src/cloudflare/resources/zero_trust/gateway/locations.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Iterable, Optional, cast +from typing import Any, Type, Iterable, cast import httpx @@ -20,11 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.gateway import ( - LocationListResponse, LocationDeleteResponse, ZeroTrustGatewayLocations, location_create_params, @@ -172,7 +173,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LocationListResponse]: + ) -> SyncSinglePage[ZeroTrustGatewayLocations]: """ Fetches Zero Trust Gateway locations for an account. @@ -187,16 +188,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/locations", + page=SyncSinglePage[ZeroTrustGatewayLocations], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[LocationListResponse]], ResultWrapper[LocationListResponse]), + model=ZeroTrustGatewayLocations, ) def delete( @@ -413,7 +411,7 @@ async def update( cast_to=cast(Type[ZeroTrustGatewayLocations], ResultWrapper[ZeroTrustGatewayLocations]), ) - async def list( + def list( self, *, account_id: str, @@ -423,7 +421,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[LocationListResponse]: + ) -> AsyncPaginator[ZeroTrustGatewayLocations, AsyncSinglePage[ZeroTrustGatewayLocations]]: """ Fetches Zero Trust Gateway locations for an account. @@ -438,16 +436,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/locations", + page=AsyncSinglePage[ZeroTrustGatewayLocations], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[LocationListResponse]], ResultWrapper[LocationListResponse]), + model=ZeroTrustGatewayLocations, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py index 991533ef25e..f9d72d45d45 100644 --- a/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py +++ b/src/cloudflare/resources/zero_trust/gateway/proxy_endpoints.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, Optional, cast +from typing import Any, List, Type, cast import httpx @@ -20,11 +20,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.gateway import ( - ProxyEndpointListResponse, ProxyEndpointDeleteResponse, ZeroTrustGatewayProxyEndpoints, proxy_endpoint_edit_params, @@ -107,7 +108,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ProxyEndpointListResponse]: + ) -> SyncSinglePage[ZeroTrustGatewayProxyEndpoints]: """ Fetches a single Zero Trust Gateway proxy endpoint. @@ -122,16 +123,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/proxy_endpoints", + page=SyncSinglePage[ZeroTrustGatewayProxyEndpoints], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ProxyEndpointListResponse]], ResultWrapper[ProxyEndpointListResponse]), + model=ZeroTrustGatewayProxyEndpoints, ) def delete( @@ -340,7 +338,7 @@ async def create( cast_to=cast(Type[ZeroTrustGatewayProxyEndpoints], ResultWrapper[ZeroTrustGatewayProxyEndpoints]), ) - async def list( + def list( self, *, account_id: str, @@ -350,7 +348,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[ProxyEndpointListResponse]: + ) -> AsyncPaginator[ZeroTrustGatewayProxyEndpoints, AsyncSinglePage[ZeroTrustGatewayProxyEndpoints]]: """ Fetches a single Zero Trust Gateway proxy endpoint. @@ -365,16 +363,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/proxy_endpoints", + page=AsyncSinglePage[ZeroTrustGatewayProxyEndpoints], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[ProxyEndpointListResponse]], ResultWrapper[ProxyEndpointListResponse]), + model=ZeroTrustGatewayProxyEndpoints, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/gateway/rules.py b/src/cloudflare/resources/zero_trust/gateway/rules.py index 420cc8f9db5..9330728e9ac 100644 --- a/src/cloudflare/resources/zero_trust/gateway/rules.py +++ b/src/cloudflare/resources/zero_trust/gateway/rules.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Type, Optional, cast +from typing import Any, List, Type, cast from typing_extensions import Literal import httpx @@ -21,11 +21,12 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.gateway import ( - RuleListResponse, RuleDeleteResponse, ZeroTrustGatewayRules, rule_create_params, @@ -271,7 +272,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleListResponse]: + ) -> SyncSinglePage[ZeroTrustGatewayRules]: """ Fetches the Zero Trust Gateway rules for an account. @@ -286,16 +287,13 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/rules", + page=SyncSinglePage[ZeroTrustGatewayRules], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RuleListResponse]], ResultWrapper[RuleListResponse]), + model=ZeroTrustGatewayRules, ) def delete( @@ -614,7 +612,7 @@ async def update( cast_to=cast(Type[ZeroTrustGatewayRules], ResultWrapper[ZeroTrustGatewayRules]), ) - async def list( + def list( self, *, account_id: str, @@ -624,7 +622,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[RuleListResponse]: + ) -> AsyncPaginator[ZeroTrustGatewayRules, AsyncSinglePage[ZeroTrustGatewayRules]]: """ Fetches the Zero Trust Gateway rules for an account. @@ -639,16 +637,13 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/gateway/rules", + page=AsyncSinglePage[ZeroTrustGatewayRules], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[RuleListResponse]], ResultWrapper[RuleListResponse]), + model=ZeroTrustGatewayRules, ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/identity_providers.py b/src/cloudflare/resources/zero_trust/identity_providers.py index f24db0e102f..c265b813a21 100644 --- a/src/cloudflare/resources/zero_trust/identity_providers.py +++ b/src/cloudflare/resources/zero_trust/identity_providers.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast, overload +from typing import Any, Type, cast, overload from typing_extensions import Literal import httpx @@ -22,7 +22,9 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ..._base_client import ( + AsyncPaginator, make_request_options, ) from ...types.zero_trust import ( @@ -2061,7 +2063,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IdentityProviderListResponse]: + ) -> SyncSinglePage[IdentityProviderListResponse]: """ Lists all configured identity providers. @@ -2093,16 +2095,15 @@ def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers", + page=SyncSinglePage[IdentityProviderListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[IdentityProviderListResponse]], ResultWrapper[IdentityProviderListResponse]), + model=cast( + Any, IdentityProviderListResponse + ), # Union types cannot be passed in as arguments in the type system ) def delete( @@ -4245,7 +4246,7 @@ async def update( ), ) - async def list( + def list( self, *, account_id: str | NotGiven = NOT_GIVEN, @@ -4256,7 +4257,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[IdentityProviderListResponse]: + ) -> AsyncPaginator[IdentityProviderListResponse, AsyncSinglePage[IdentityProviderListResponse]]: """ Lists all configured identity providers. @@ -4288,16 +4289,15 @@ async def list( else: account_or_zone = "zones" account_or_zone_id = zone_id - return await self._get( + return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/access/identity_providers", + page=AsyncSinglePage[IdentityProviderListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[IdentityProviderListResponse]], ResultWrapper[IdentityProviderListResponse]), + model=cast( + Any, IdentityProviderListResponse + ), # Union types cannot be passed in as arguments in the type system ) async def delete( diff --git a/src/cloudflare/resources/zero_trust/networks/virtual_networks.py b/src/cloudflare/resources/zero_trust/networks/virtual_networks.py index cadeec684ae..0144eed7a10 100644 --- a/src/cloudflare/resources/zero_trust/networks/virtual_networks.py +++ b/src/cloudflare/resources/zero_trust/networks/virtual_networks.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Optional, cast +from typing import Any, cast import httpx @@ -20,12 +20,14 @@ async_to_streamed_response_wrapper, ) from ...._wrappers import ResultWrapper +from ....pagination import SyncSinglePage, AsyncSinglePage from ...._base_client import ( + AsyncPaginator, make_request_options, ) from ....types.zero_trust.networks import ( + TunnelVirtualNetwork, VirtualNetworkEditResponse, - VirtualNetworkListResponse, VirtualNetworkCreateResponse, VirtualNetworkDeleteResponse, virtual_network_edit_params, @@ -120,7 +122,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[VirtualNetworkListResponse]: + ) -> SyncSinglePage[TunnelVirtualNetwork]: """ Lists and filters virtual networks in an account. @@ -147,8 +149,9 @@ def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_id}/teamnet/virtual_networks", + page=SyncSinglePage[TunnelVirtualNetwork], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -163,9 +166,8 @@ def list( }, virtual_network_list_params.VirtualNetworkListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[VirtualNetworkListResponse]], ResultWrapper[VirtualNetworkListResponse]), + model=TunnelVirtualNetwork, ) def delete( @@ -354,7 +356,7 @@ async def create( ), ) - async def list( + def list( self, *, account_id: str, @@ -368,7 +370,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[VirtualNetworkListResponse]: + ) -> AsyncPaginator[TunnelVirtualNetwork, AsyncSinglePage[TunnelVirtualNetwork]]: """ Lists and filters virtual networks in an account. @@ -395,14 +397,15 @@ async def list( """ if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_id}/teamnet/virtual_networks", + page=AsyncSinglePage[TunnelVirtualNetwork], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "is_default": is_default, "is_deleted": is_deleted, @@ -411,9 +414,8 @@ async def list( }, virtual_network_list_params.VirtualNetworkListParams, ), - post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[Optional[VirtualNetworkListResponse]], ResultWrapper[VirtualNetworkListResponse]), + model=TunnelVirtualNetwork, ) async def delete( diff --git a/src/cloudflare/resources/zones/subscriptions.py b/src/cloudflare/resources/zones/subscriptions.py index d667294237e..8eb96a52ed6 100644 --- a/src/cloudflare/resources/zones/subscriptions.py +++ b/src/cloudflare/resources/zones/subscriptions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, Type, Iterable, Optional, cast +from typing import Any, Iterable, cast from typing_extensions import Literal import httpx @@ -21,6 +21,7 @@ async_to_streamed_response_wrapper, ) from ..._wrappers import ResultWrapper +from ...pagination import SyncSinglePage, AsyncSinglePage from ...types.zones import ( SubscriptionGetResponse, SubscriptionListResponse, @@ -28,6 +29,7 @@ subscription_create_params, ) from ..._base_client import ( + AsyncPaginator, make_request_options, ) @@ -120,7 +122,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SubscriptionListResponse]: + ) -> SyncSinglePage[SubscriptionListResponse]: """ Lists all of an account's subscriptions. @@ -137,16 +139,13 @@ def list( """ if not account_identifier: raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") - return self._get( + return self._get_api_list( f"/accounts/{account_identifier}/subscriptions", + page=SyncSinglePage[SubscriptionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[SubscriptionListResponse]], ResultWrapper[SubscriptionListResponse]), + model=SubscriptionListResponse, ) def get( @@ -270,7 +269,7 @@ async def create( ), ) - async def list( + def list( self, account_identifier: str, *, @@ -280,7 +279,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> Optional[SubscriptionListResponse]: + ) -> AsyncPaginator[SubscriptionListResponse, AsyncSinglePage[SubscriptionListResponse]]: """ Lists all of an account's subscriptions. @@ -297,16 +296,13 @@ async def list( """ if not account_identifier: raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}") - return await self._get( + return self._get_api_list( f"/accounts/{account_identifier}/subscriptions", + page=AsyncSinglePage[SubscriptionListResponse], options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - post_parser=ResultWrapper._unwrapper, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=cast(Type[Optional[SubscriptionListResponse]], ResultWrapper[SubscriptionListResponse]), + model=SubscriptionListResponse, ) async def get( diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index 743bd7b3600..2a1eba444ba 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -29,7 +29,6 @@ from .user_get_response import UserGetResponse as UserGetResponse from .cache_purge_params import CachePurgeParams as CachePurgeParams from .call_create_params import CallCreateParams as CallCreateParams -from .call_list_response import CallListResponse as CallListResponse from .call_update_params import CallUpdateParams as CallUpdateParams from .client_certificate import ClientCertificate as ClientCertificate from .custom_certificate import CustomCertificate as CustomCertificate @@ -37,7 +36,6 @@ 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 .queue_get_response import QueueGetResponse as QueueGetResponse from .stream_list_params import StreamListParams as StreamListParams from .user_edit_response import UserEditResponse as UserEditResponse @@ -57,7 +55,6 @@ from .pagerule_edit_params import PageruleEditParams as PageruleEditParams from .pagerule_list_params import PageruleListParams as PageruleListParams from .pcap_create_response import PCAPCreateResponse as PCAPCreateResponse -from .stream_list_response import StreamListResponse as StreamListResponse from .zone_delete_response import ZoneDeleteResponse as ZoneDeleteResponse from .account_update_params import AccountUpdateParams as AccountUpdateParams from .audit_log_list_params import AuditLogListParams as AuditLogListParams @@ -68,8 +65,8 @@ from .queue_delete_response import QueueDeleteResponse as QueueDeleteResponse from .queue_update_response import QueueUpdateResponse as QueueUpdateResponse from .ruleset_create_params import RulesetCreateParams as RulesetCreateParams +from .ruleset_list_response import RulesetListResponse as RulesetListResponse from .ruleset_update_params import RulesetUpdateParams as RulesetUpdateParams -from .snippet_list_response import SnippetListResponse as SnippetListResponse from .snippet_update_params import SnippetUpdateParams as SnippetUpdateParams from .speed_delete_response import SpeedDeleteResponse as SpeedDeleteResponse from .dnssec_delete_response import DNSSECDeleteResponse as DNSSECDeleteResponse @@ -101,7 +98,6 @@ from .speed_trends_list_params import SpeedTrendsListParams as SpeedTrendsListParams from .waiting_room_edit_params import WaitingRoomEditParams as WaitingRoomEditParams from .healthcheck_create_params import HealthcheckCreateParams as HealthcheckCreateParams -from .healthcheck_list_response import HealthcheckListResponse as HealthcheckListResponse from .healthcheck_update_params import HealthcheckUpdateParams as HealthcheckUpdateParams from .intel_phishing_url_submit import IntelPhishingURLSubmit as IntelPhishingURLSubmit from .load_balancer_edit_params import LoadBalancerEditParams as LoadBalancerEditParams @@ -121,7 +117,6 @@ from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams from .waiting_room_create_params import WaitingRoomCreateParams as WaitingRoomCreateParams -from .waiting_room_list_response import WaitingRoomListResponse as WaitingRoomListResponse from .waiting_room_update_params import WaitingRoomUpdateParams as WaitingRoomUpdateParams from .warp_connector_edit_params import WARPConnectorEditParams as WARPConnectorEditParams from .warp_connector_list_params import WARPConnectorListParams as WARPConnectorListParams @@ -130,7 +125,6 @@ from .custom_hostname_list_params import CustomHostnameListParams as CustomHostnameListParams from .healthcheck_delete_response import HealthcheckDeleteResponse as HealthcheckDeleteResponse from .load_balancer_create_params import LoadBalancerCreateParams as LoadBalancerCreateParams -from .load_balancer_list_response import LoadBalancerListResponse as LoadBalancerListResponse from .load_balancer_update_params import LoadBalancerUpdateParams as LoadBalancerUpdateParams from .page_shield_update_response import PageShieldUpdateResponse as PageShieldUpdateResponse from .warp_connector_get_response import WARPConnectorGetResponse as WARPConnectorGetResponse @@ -161,7 +155,6 @@ 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 from .warp_connector_create_response import WARPConnectorCreateResponse as WARPConnectorCreateResponse from .warp_connector_delete_response import WARPConnectorDeleteResponse as WARPConnectorDeleteResponse @@ -178,14 +171,12 @@ from .custom_nameserver_delete_response import CustomNameserverDeleteResponse as CustomNameserverDeleteResponse from .custom_nameserver_verify_response import CustomNameserverVerifyResponse as CustomNameserverVerifyResponse from .keyless_certificate_create_params import KeylessCertificateCreateParams as KeylessCertificateCreateParams -from .keyless_certificate_list_response import KeylessCertificateListResponse as KeylessCertificateListResponse from .url_normalization_update_response import URLNormalizationUpdateResponse as URLNormalizationUpdateResponse from .custom_certificate_create_response import CustomCertificateCreateResponse as CustomCertificateCreateResponse from .custom_certificate_delete_response import CustomCertificateDeleteResponse as CustomCertificateDeleteResponse from .origin_ca_certificate_get_response import OriginCACertificateGetResponse as OriginCACertificateGetResponse from .keyless_certificate_delete_response import KeylessCertificateDeleteResponse as KeylessCertificateDeleteResponse from .origin_ca_certificate_create_params import OriginCACertificateCreateParams as OriginCACertificateCreateParams -from .origin_ca_certificate_list_response import OriginCACertificateListResponse as OriginCACertificateListResponse from .origin_tls_client_auth_get_response import OriginTLSClientAuthGetResponse as OriginTLSClientAuthGetResponse from .origin_tls_client_auth_create_params import OriginTLSClientAuthCreateParams as OriginTLSClientAuthCreateParams from .origin_tls_client_auth_list_response import OriginTLSClientAuthListResponse as OriginTLSClientAuthListResponse diff --git a/src/cloudflare/types/accounts/__init__.py b/src/cloudflare/types/accounts/__init__.py index f642f617512..c004560aa23 100644 --- a/src/cloudflare/types/accounts/__init__.py +++ b/src/cloudflare/types/accounts/__init__.py @@ -6,7 +6,6 @@ from .account_member import AccountMember as AccountMember from .role_get_response import RoleGetResponse as RoleGetResponse from .member_list_params import MemberListParams as MemberListParams -from .role_list_response import RoleListResponse as RoleListResponse from .member_create_params import MemberCreateParams as MemberCreateParams from .member_list_response import MemberListResponse as MemberListResponse from .member_update_params import MemberUpdateParams as MemberUpdateParams diff --git a/src/cloudflare/types/accounts/role_list_response.py b/src/cloudflare/types/accounts/role_list_response.py deleted file mode 100644 index d68445c0957..00000000000 --- a/src/cloudflare/types/accounts/role_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .role import Role - -__all__ = ["RoleListResponse"] - -RoleListResponse = List[Role] diff --git a/src/cloudflare/types/addressing/__init__.py b/src/cloudflare/types/addressing/__init__.py index 18f47438c47..ede0ad000f2 100644 --- a/src/cloudflare/types/addressing/__init__.py +++ b/src/cloudflare/types/addressing/__init__.py @@ -4,7 +4,6 @@ from .prefix_edit_params import PrefixEditParams as PrefixEditParams from .prefix_create_params import PrefixCreateParams as PrefixCreateParams -from .prefix_list_response import PrefixListResponse as PrefixListResponse from .service_list_response import ServiceListResponse as ServiceListResponse from .prefix_delete_response import PrefixDeleteResponse as PrefixDeleteResponse from .address_map_edit_params import AddressMapEditParams as AddressMapEditParams @@ -12,7 +11,6 @@ from .address_map_get_response import AddressMapGetResponse as AddressMapGetResponse from .addressing_ipam_prefixes import AddressingIpamPrefixes as AddressingIpamPrefixes from .address_map_create_params import AddressMapCreateParams as AddressMapCreateParams -from .address_map_list_response import AddressMapListResponse as AddressMapListResponse from .loa_document_create_params import LOADocumentCreateParams as LOADocumentCreateParams from .address_map_create_response import AddressMapCreateResponse as AddressMapCreateResponse from .address_map_delete_response import AddressMapDeleteResponse as AddressMapDeleteResponse diff --git a/src/cloudflare/types/addressing/address_map_list_response.py b/src/cloudflare/types/addressing/address_map_list_response.py deleted file mode 100644 index e2bd1bd0a11..00000000000 --- a/src/cloudflare/types/addressing/address_map_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .addressing_address_maps import AddressingAddressMaps - -__all__ = ["AddressMapListResponse"] - -AddressMapListResponse = List[AddressingAddressMaps] diff --git a/src/cloudflare/types/addressing/prefix_list_response.py b/src/cloudflare/types/addressing/prefix_list_response.py deleted file mode 100644 index 7c96f914616..00000000000 --- a/src/cloudflare/types/addressing/prefix_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .addressing_ipam_prefixes import AddressingIpamPrefixes - -__all__ = ["PrefixListResponse"] - -PrefixListResponse = List[AddressingIpamPrefixes] diff --git a/src/cloudflare/types/addressing/prefixes/__init__.py b/src/cloudflare/types/addressing/prefixes/__init__.py index a8c7c5a3450..9239415391d 100644 --- a/src/cloudflare/types/addressing/prefixes/__init__.py +++ b/src/cloudflare/types/addressing/prefixes/__init__.py @@ -3,6 +3,5 @@ from __future__ import annotations from .delegation_create_params import DelegationCreateParams as DelegationCreateParams -from .delegation_list_response import DelegationListResponse as DelegationListResponse from .delegation_delete_response import DelegationDeleteResponse as DelegationDeleteResponse from .addressing_ipam_delegations import AddressingIpamDelegations as AddressingIpamDelegations diff --git a/src/cloudflare/types/addressing/prefixes/bgp/__init__.py b/src/cloudflare/types/addressing/prefixes/bgp/__init__.py index 11200d454d1..6e1aa204e26 100644 --- a/src/cloudflare/types/addressing/prefixes/bgp/__init__.py +++ b/src/cloudflare/types/addressing/prefixes/bgp/__init__.py @@ -5,10 +5,8 @@ from .prefix_edit_params import PrefixEditParams as PrefixEditParams from .status_edit_params import StatusEditParams as StatusEditParams from .status_get_response import StatusGetResponse as StatusGetResponse -from .prefix_list_response import PrefixListResponse as PrefixListResponse from .status_edit_response import StatusEditResponse as StatusEditResponse from .binding_create_params import BindingCreateParams as BindingCreateParams -from .binding_list_response import BindingListResponse as BindingListResponse from .binding_delete_response import BindingDeleteResponse as BindingDeleteResponse from .addressing_service_binding import AddressingServiceBinding as AddressingServiceBinding from .addressing_ipam_bgp_prefixes import AddressingIpamBGPPrefixes as AddressingIpamBGPPrefixes diff --git a/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py b/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py deleted file mode 100644 index ce8490ed2e7..00000000000 --- a/src/cloudflare/types/addressing/prefixes/bgp/binding_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .addressing_service_binding import AddressingServiceBinding - -__all__ = ["BindingListResponse"] - -BindingListResponse = List[AddressingServiceBinding] diff --git a/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py b/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py deleted file mode 100644 index b5a6d8d1dac..00000000000 --- a/src/cloudflare/types/addressing/prefixes/bgp/prefix_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .addressing_ipam_bgp_prefixes import AddressingIpamBGPPrefixes - -__all__ = ["PrefixListResponse"] - -PrefixListResponse = List[AddressingIpamBGPPrefixes] diff --git a/src/cloudflare/types/addressing/prefixes/delegation_list_response.py b/src/cloudflare/types/addressing/prefixes/delegation_list_response.py deleted file mode 100644 index 06c8b22efa7..00000000000 --- a/src/cloudflare/types/addressing/prefixes/delegation_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .addressing_ipam_delegations import AddressingIpamDelegations - -__all__ = ["DelegationListResponse"] - -DelegationListResponse = List[AddressingIpamDelegations] diff --git a/src/cloudflare/types/addressing/service_list_response.py b/src/cloudflare/types/addressing/service_list_response.py index 46524e059af..e4e66040091 100644 --- a/src/cloudflare/types/addressing/service_list_response.py +++ b/src/cloudflare/types/addressing/service_list_response.py @@ -1,18 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from ..._models import BaseModel -__all__ = ["ServiceListResponse", "ServiceListResponseItem"] +__all__ = ["ServiceListResponse"] -class ServiceListResponseItem(BaseModel): +class ServiceListResponse(BaseModel): id: Optional[str] = None """Identifier""" name: Optional[str] = None """Name of a service running on the Cloudflare network""" - - -ServiceListResponse = List[ServiceListResponseItem] diff --git a/src/cloudflare/types/alerting/__init__.py b/src/cloudflare/types/alerting/__init__.py index 130bbca1356..50de6d3c5e7 100644 --- a/src/cloudflare/types/alerting/__init__.py +++ b/src/cloudflare/types/alerting/__init__.py @@ -6,7 +6,6 @@ from .alerting_policies import AlertingPolicies as AlertingPolicies 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 diff --git a/src/cloudflare/types/alerting/destinations/__init__.py b/src/cloudflare/types/alerting/destinations/__init__.py index ec704abb4c0..720b22c588e 100644 --- a/src/cloudflare/types/alerting/destinations/__init__.py +++ b/src/cloudflare/types/alerting/destinations/__init__.py @@ -6,7 +6,6 @@ from .alerting_pagerduty import AlertingPagerduty as AlertingPagerduty from .eligible_get_response import EligibleGetResponse as EligibleGetResponse from .webhook_create_params import WebhookCreateParams as WebhookCreateParams -from .webhook_list_response import WebhookListResponse as WebhookListResponse from .webhook_update_params import WebhookUpdateParams as WebhookUpdateParams from .pagerduty_get_response import PagerdutyGetResponse as PagerdutyGetResponse from .pagerduty_link_response import PagerdutyLinkResponse as PagerdutyLinkResponse diff --git a/src/cloudflare/types/alerting/destinations/webhook_list_response.py b/src/cloudflare/types/alerting/destinations/webhook_list_response.py deleted file mode 100644 index fbab0b11b17..00000000000 --- a/src/cloudflare/types/alerting/destinations/webhook_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .alerting_webhooks import AlertingWebhooks - -__all__ = ["WebhookListResponse"] - -WebhookListResponse = List[AlertingWebhooks] diff --git a/src/cloudflare/types/alerting/policy_list_response.py b/src/cloudflare/types/alerting/policy_list_response.py deleted file mode 100644 index ed8d3284838..00000000000 --- a/src/cloudflare/types/alerting/policy_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .alerting_policies import AlertingPolicies - -__all__ = ["PolicyListResponse"] - -PolicyListResponse = List[AlertingPolicies] diff --git a/src/cloudflare/types/call_list_response.py b/src/cloudflare/types/call_list_response.py deleted file mode 100644 index e90f4feda80..00000000000 --- a/src/cloudflare/types/call_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .calls_app import CallsApp - -__all__ = ["CallListResponse"] - -CallListResponse = List[CallsApp] diff --git a/src/cloudflare/types/durable_objects/__init__.py b/src/cloudflare/types/durable_objects/__init__.py index c300a66b56d..6688d0304a5 100644 --- a/src/cloudflare/types/durable_objects/__init__.py +++ b/src/cloudflare/types/durable_objects/__init__.py @@ -2,5 +2,4 @@ from __future__ import annotations -from .namespace_list_response import NamespaceListResponse as NamespaceListResponse from .durable_object_namespace import DurableObjectNamespace as DurableObjectNamespace diff --git a/src/cloudflare/types/durable_objects/namespace_list_response.py b/src/cloudflare/types/durable_objects/namespace_list_response.py deleted file mode 100644 index 970cab661cd..00000000000 --- a/src/cloudflare/types/durable_objects/namespace_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .durable_object_namespace import DurableObjectNamespace - -__all__ = ["NamespaceListResponse"] - -NamespaceListResponse = List[DurableObjectNamespace] diff --git a/src/cloudflare/types/healthcheck_list_response.py b/src/cloudflare/types/healthcheck_list_response.py deleted file mode 100644 index 1c5907a04b9..00000000000 --- a/src/cloudflare/types/healthcheck_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .healthcheck import Healthcheck - -__all__ = ["HealthcheckListResponse"] - -HealthcheckListResponse = List[Healthcheck] diff --git a/src/cloudflare/types/hyperdrive/config_list_response.py b/src/cloudflare/types/hyperdrive/config_list_response.py index 8737707a80b..7721424cc22 100644 --- a/src/cloudflare/types/hyperdrive/config_list_response.py +++ b/src/cloudflare/types/hyperdrive/config_list_response.py @@ -1,15 +1,12 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from ..._models import BaseModel -__all__ = ["ConfigListResponse", "ConfigListResponseItem"] +__all__ = ["ConfigListResponse"] -class ConfigListResponseItem(BaseModel): +class ConfigListResponse(BaseModel): id: Optional[str] = None """Identifier""" - - -ConfigListResponse = List[ConfigListResponseItem] diff --git a/src/cloudflare/types/intel/__init__.py b/src/cloudflare/types/intel/__init__.py index 3749dbb5139..4797f1df51d 100644 --- a/src/cloudflare/types/intel/__init__.py +++ b/src/cloudflare/types/intel/__init__.py @@ -15,7 +15,6 @@ from .intel_sinkhole_item import IntelSinkholeItem as IntelSinkholeItem from .intel_domain_history import IntelDomainHistory as IntelDomainHistory from .ip_list_get_response import IPListGetResponse as IPListGetResponse -from .sinkhole_list_response import SinkholeListResponse as SinkholeListResponse from .intel_passive_dns_by_ip import IntelPassiveDNSByIP as IntelPassiveDNSByIP from .domain_history_get_params import DomainHistoryGetParams as DomainHistoryGetParams from .domain_history_get_response import DomainHistoryGetResponse as DomainHistoryGetResponse diff --git a/src/cloudflare/types/intel/indicator_feed_list_response.py b/src/cloudflare/types/intel/indicator_feed_list_response.py index 419628c0893..5f965155c38 100644 --- a/src/cloudflare/types/intel/indicator_feed_list_response.py +++ b/src/cloudflare/types/intel/indicator_feed_list_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from ..._models import BaseModel -__all__ = ["IndicatorFeedListResponse", "IndicatorFeedListResponseItem"] +__all__ = ["IndicatorFeedListResponse"] -class IndicatorFeedListResponseItem(BaseModel): +class IndicatorFeedListResponse(BaseModel): id: Optional[int] = None """The unique identifier for the indicator feed""" @@ -23,6 +23,3 @@ class IndicatorFeedListResponseItem(BaseModel): name: Optional[str] = None """The name of the indicator feed""" - - -IndicatorFeedListResponse = List[IndicatorFeedListResponseItem] diff --git a/src/cloudflare/types/intel/sinkhole_list_response.py b/src/cloudflare/types/intel/sinkhole_list_response.py deleted file mode 100644 index f6032dcc8a5..00000000000 --- a/src/cloudflare/types/intel/sinkhole_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .intel_sinkhole_item import IntelSinkholeItem - -__all__ = ["SinkholeListResponse"] - -SinkholeListResponse = List[IntelSinkholeItem] diff --git a/src/cloudflare/types/keyless_certificate_list_response.py b/src/cloudflare/types/keyless_certificate_list_response.py deleted file mode 100644 index d2830796083..00000000000 --- a/src/cloudflare/types/keyless_certificate_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .keyless_certificate_hostname import KeylessCertificateHostname - -__all__ = ["KeylessCertificateListResponse"] - -KeylessCertificateListResponse = List[KeylessCertificateHostname] diff --git a/src/cloudflare/types/load_balancer_list_response.py b/src/cloudflare/types/load_balancer_list_response.py deleted file mode 100644 index b9fcda285c2..00000000000 --- a/src/cloudflare/types/load_balancer_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .load_balancer import LoadBalancer - -__all__ = ["LoadBalancerListResponse"] - -LoadBalancerListResponse = List[LoadBalancer] diff --git a/src/cloudflare/types/load_balancers/__init__.py b/src/cloudflare/types/load_balancers/__init__.py index 73537bf6dd5..ec053f79213 100644 --- a/src/cloudflare/types/load_balancers/__init__.py +++ b/src/cloudflare/types/load_balancers/__init__.py @@ -6,7 +6,6 @@ from .pool_list_params import PoolListParams as PoolListParams from .search_get_params import SearchGetParams as SearchGetParams from .pool_create_params import PoolCreateParams as PoolCreateParams -from .pool_list_response import PoolListResponse as PoolListResponse from .pool_update_params import PoolUpdateParams as PoolUpdateParams from .region_list_params import RegionListParams as RegionListParams from .monitor_edit_params import MonitorEditParams as MonitorEditParams @@ -15,6 +14,5 @@ from .pool_delete_response import PoolDeleteResponse as PoolDeleteResponse from .region_list_response import RegionListResponse as RegionListResponse from .monitor_create_params import MonitorCreateParams as MonitorCreateParams -from .monitor_list_response import MonitorListResponse as MonitorListResponse from .monitor_update_params import MonitorUpdateParams as MonitorUpdateParams from .monitor_delete_response import MonitorDeleteResponse as MonitorDeleteResponse diff --git a/src/cloudflare/types/load_balancers/monitor_list_response.py b/src/cloudflare/types/load_balancers/monitor_list_response.py deleted file mode 100644 index f53dc19f332..00000000000 --- a/src/cloudflare/types/load_balancers/monitor_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from ..user.load_balancers import LoadBalancingMonitor - -__all__ = ["MonitorListResponse"] - -MonitorListResponse = List[LoadBalancingMonitor] diff --git a/src/cloudflare/types/load_balancers/pool_list_response.py b/src/cloudflare/types/load_balancers/pool_list_response.py deleted file mode 100644 index 377c57b9f70..00000000000 --- a/src/cloudflare/types/load_balancers/pool_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from ..user.load_balancers import LoadBalancingPool - -__all__ = ["PoolListResponse"] - -PoolListResponse = List[LoadBalancingPool] diff --git a/src/cloudflare/types/logpush/__init__.py b/src/cloudflare/types/logpush/__init__.py index 9e659c00d63..37d5d84f48c 100644 --- a/src/cloudflare/types/logpush/__init__.py +++ b/src/cloudflare/types/logpush/__init__.py @@ -4,7 +4,6 @@ from .edge_get_response import EdgeGetResponse as EdgeGetResponse from .job_create_params import JobCreateParams as JobCreateParams -from .job_list_response import JobListResponse as JobListResponse from .job_update_params import JobUpdateParams as JobUpdateParams from .edge_create_params import EdgeCreateParams as EdgeCreateParams from .instant_logpush_job import InstantLogpushJob as InstantLogpushJob diff --git a/src/cloudflare/types/logpush/job_list_response.py b/src/cloudflare/types/logpush/job_list_response.py deleted file mode 100644 index e30f65b2620..00000000000 --- a/src/cloudflare/types/logpush/job_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .datasets import LogpushJob - -__all__ = ["JobListResponse"] - -JobListResponse = List[Optional[LogpushJob]] diff --git a/src/cloudflare/types/magic_network_monitoring/__init__.py b/src/cloudflare/types/magic_network_monitoring/__init__.py index 1cef197ce1b..5bfc950aadb 100644 --- a/src/cloudflare/types/magic_network_monitoring/__init__.py +++ b/src/cloudflare/types/magic_network_monitoring/__init__.py @@ -2,6 +2,5 @@ from __future__ import annotations -from .rule_list_response import RuleListResponse as RuleListResponse from .magic_network_monitoring_rule import MagicNetworkMonitoringRule as MagicNetworkMonitoringRule from .magic_network_monitoring_config import MagicNetworkMonitoringConfig as MagicNetworkMonitoringConfig diff --git a/src/cloudflare/types/magic_network_monitoring/rule_list_response.py b/src/cloudflare/types/magic_network_monitoring/rule_list_response.py deleted file mode 100644 index 29929a92adc..00000000000 --- a/src/cloudflare/types/magic_network_monitoring/rule_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .magic_network_monitoring_rule import MagicNetworkMonitoringRule - -__all__ = ["RuleListResponse"] - -RuleListResponse = List[Optional[MagicNetworkMonitoringRule]] diff --git a/src/cloudflare/types/mtls_certificate_list_response.py b/src/cloudflare/types/mtls_certificate_list_response.py deleted file mode 100644 index a4dc4610fd2..00000000000 --- a/src/cloudflare/types/mtls_certificate_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .mtls_certificate import MTLSCertificate - -__all__ = ["MTLSCertificateListResponse"] - -MTLSCertificateListResponse = List[MTLSCertificate] diff --git a/src/cloudflare/types/origin_ca_certificate_list_response.py b/src/cloudflare/types/origin_ca_certificate_list_response.py deleted file mode 100644 index 404f4af7631..00000000000 --- a/src/cloudflare/types/origin_ca_certificate_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .origin_ca_certificate import OriginCACertificate - -__all__ = ["OriginCACertificateListResponse"] - -OriginCACertificateListResponse = List[OriginCACertificate] diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py index 11cf99a6c82..4db93e9c1fe 100644 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py +++ b/src/cloudflare/types/origin_tls_client_auth/hostnames/__init__.py @@ -3,5 +3,4 @@ from __future__ import annotations from .certificate_create_params import CertificateCreateParams as CertificateCreateParams -from .certificate_list_response import CertificateListResponse as CertificateListResponse from .origin_tls_client_certificate import OriginTLSClientCertificate as OriginTLSClientCertificate diff --git a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py b/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py deleted file mode 100644 index 5dcb437b4d6..00000000000 --- a/src/cloudflare/types/origin_tls_client_auth/hostnames/certificate_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from ..origin_tls_client_certificate_id import OriginTLSClientCertificateID - -__all__ = ["CertificateListResponse"] - -CertificateListResponse = List[OriginTLSClientCertificateID] diff --git a/src/cloudflare/types/origin_tls_client_auth_list_response.py b/src/cloudflare/types/origin_tls_client_auth_list_response.py index 97559730db1..c29eb8c17d1 100644 --- a/src/cloudflare/types/origin_tls_client_auth_list_response.py +++ b/src/cloudflare/types/origin_tls_client_auth_list_response.py @@ -1,13 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from .._models import BaseModel -__all__ = ["OriginTLSClientAuthListResponse", "OriginTLSClientAuthListResponseItem"] +__all__ = ["OriginTLSClientAuthListResponse"] -class OriginTLSClientAuthListResponseItem(BaseModel): +class OriginTLSClientAuthListResponse(BaseModel): id: Optional[str] = None """Identifier""" @@ -19,6 +19,3 @@ class OriginTLSClientAuthListResponseItem(BaseModel): private_key: Optional[str] = None """The zone's private key.""" - - -OriginTLSClientAuthListResponse = List[OriginTLSClientAuthListResponseItem] diff --git a/src/cloudflare/types/page_shield/__init__.py b/src/cloudflare/types/page_shield/__init__.py index ecd67c57457..f9203122f82 100644 --- a/src/cloudflare/types/page_shield/__init__.py +++ b/src/cloudflare/types/page_shield/__init__.py @@ -7,9 +7,6 @@ from .script_list_params import ScriptListParams as ScriptListParams from .script_get_response import ScriptGetResponse as ScriptGetResponse 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 .script_list_response import ScriptListResponse as ScriptListResponse from .connection_list_params import ConnectionListParams as ConnectionListParams from .page_shield_connection import PageShieldConnection as PageShieldConnection -from .connection_list_response import ConnectionListResponse as ConnectionListResponse diff --git a/src/cloudflare/types/page_shield/connection_list_response.py b/src/cloudflare/types/page_shield/connection_list_response.py deleted file mode 100644 index e840921597f..00000000000 --- a/src/cloudflare/types/page_shield/connection_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .page_shield_connection import PageShieldConnection - -__all__ = ["ConnectionListResponse"] - -ConnectionListResponse = List[PageShieldConnection] diff --git a/src/cloudflare/types/page_shield/policy_list_response.py b/src/cloudflare/types/page_shield/policy_list_response.py deleted file mode 100644 index ba303df61e0..00000000000 --- a/src/cloudflare/types/page_shield/policy_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .page_shield_policy import PageShieldPolicy - -__all__ = ["PolicyListResponse"] - -PolicyListResponse = List[PageShieldPolicy] diff --git a/src/cloudflare/types/page_shield/script_list_response.py b/src/cloudflare/types/page_shield/script_list_response.py deleted file mode 100644 index cb784d2b50b..00000000000 --- a/src/cloudflare/types/page_shield/script_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .page_shield_script import PageShieldScript - -__all__ = ["ScriptListResponse"] - -ScriptListResponse = List[PageShieldScript] diff --git a/src/cloudflare/types/pages/__init__.py b/src/cloudflare/types/pages/__init__.py index a2af4a66bff..7619885558e 100644 --- a/src/cloudflare/types/pages/__init__.py +++ b/src/cloudflare/types/pages/__init__.py @@ -7,6 +7,5 @@ from .project_edit_params import ProjectEditParams as ProjectEditParams from .project_create_params import ProjectCreateParams as ProjectCreateParams from .project_edit_response import ProjectEditResponse as ProjectEditResponse -from .project_list_response import ProjectListResponse as ProjectListResponse from .pages_deployments_param import PagesDeploymentsParam as PagesDeploymentsParam from .project_create_response import ProjectCreateResponse as ProjectCreateResponse diff --git a/src/cloudflare/types/pages/project_list_response.py b/src/cloudflare/types/pages/project_list_response.py deleted file mode 100644 index 78292e7956f..00000000000 --- a/src/cloudflare/types/pages/project_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .pages_deployments import PagesDeployments - -__all__ = ["ProjectListResponse"] - -ProjectListResponse = List[PagesDeployments] diff --git a/src/cloudflare/types/pages/projects/__init__.py b/src/cloudflare/types/pages/projects/__init__.py index 92edb94f56f..5a41f0031a9 100644 --- a/src/cloudflare/types/pages/projects/__init__.py +++ b/src/cloudflare/types/pages/projects/__init__.py @@ -5,8 +5,6 @@ from .domain_get_response import DomainGetResponse as DomainGetResponse from .domain_create_params import DomainCreateParams as DomainCreateParams from .domain_edit_response import DomainEditResponse as DomainEditResponse -from .domain_list_response import DomainListResponse as DomainListResponse from .deployment_list_params import DeploymentListParams as DeploymentListParams from .domain_create_response import DomainCreateResponse as DomainCreateResponse from .deployment_create_params import DeploymentCreateParams as DeploymentCreateParams -from .deployment_list_response import DeploymentListResponse as DeploymentListResponse diff --git a/src/cloudflare/types/pages/projects/deployment_list_response.py b/src/cloudflare/types/pages/projects/deployment_list_response.py deleted file mode 100644 index cc21070b73e..00000000000 --- a/src/cloudflare/types/pages/projects/deployment_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from ..pages_deployments import PagesDeployments - -__all__ = ["DeploymentListResponse"] - -DeploymentListResponse = List[PagesDeployments] diff --git a/src/cloudflare/types/pages/projects/domain_list_response.py b/src/cloudflare/types/pages/projects/domain_list_response.py deleted file mode 100644 index 0389742f089..00000000000 --- a/src/cloudflare/types/pages/projects/domain_list_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -__all__ = ["DomainListResponse"] - -DomainListResponse = List[object] diff --git a/src/cloudflare/types/pcap_list_response.py b/src/cloudflare/types/pcap_list_response.py index fa55cd1e0a4..ef6ac672c55 100644 --- a/src/cloudflare/types/pcap_list_response.py +++ b/src/cloudflare/types/pcap_list_response.py @@ -1,21 +1,20 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import Union, Optional from typing_extensions import Literal from .._models import BaseModel __all__ = [ "PCAPListResponse", - "PCAPListResponseItem", - "PCAPListResponseItemMagicVisibilityPCAPsResponseSimple", - "PCAPListResponseItemMagicVisibilityPCAPsResponseSimpleFilterV1", - "PCAPListResponseItemMagicVisibilityPCAPsResponseFull", - "PCAPListResponseItemMagicVisibilityPCAPsResponseFullFilterV1", + "MagicVisibilityPCAPsResponseSimple", + "MagicVisibilityPCAPsResponseSimpleFilterV1", + "MagicVisibilityPCAPsResponseFull", + "MagicVisibilityPCAPsResponseFullFilterV1", ] -class PCAPListResponseItemMagicVisibilityPCAPsResponseSimpleFilterV1(BaseModel): +class MagicVisibilityPCAPsResponseSimpleFilterV1(BaseModel): destination_address: Optional[str] = None """The destination IP address of the packet.""" @@ -32,11 +31,11 @@ class PCAPListResponseItemMagicVisibilityPCAPsResponseSimpleFilterV1(BaseModel): """The source port of the packet.""" -class PCAPListResponseItemMagicVisibilityPCAPsResponseSimple(BaseModel): +class MagicVisibilityPCAPsResponseSimple(BaseModel): id: Optional[str] = None """The ID for the packet capture.""" - filter_v1: Optional[PCAPListResponseItemMagicVisibilityPCAPsResponseSimpleFilterV1] = None + filter_v1: Optional[MagicVisibilityPCAPsResponseSimpleFilterV1] = None """The packet capture filter. When this field is empty, all packets are captured.""" status: Optional[ @@ -63,7 +62,7 @@ class PCAPListResponseItemMagicVisibilityPCAPsResponseSimple(BaseModel): """ -class PCAPListResponseItemMagicVisibilityPCAPsResponseFullFilterV1(BaseModel): +class MagicVisibilityPCAPsResponseFullFilterV1(BaseModel): destination_address: Optional[str] = None """The destination IP address of the packet.""" @@ -80,7 +79,7 @@ class PCAPListResponseItemMagicVisibilityPCAPsResponseFullFilterV1(BaseModel): """The source port of the packet.""" -class PCAPListResponseItemMagicVisibilityPCAPsResponseFull(BaseModel): +class MagicVisibilityPCAPsResponseFull(BaseModel): id: Optional[str] = None """The ID for the packet capture.""" @@ -106,7 +105,7 @@ class PCAPListResponseItemMagicVisibilityPCAPsResponseFull(BaseModel): This field only applies to `full` packet captures. """ - filter_v1: Optional[PCAPListResponseItemMagicVisibilityPCAPsResponseFullFilterV1] = None + filter_v1: Optional[MagicVisibilityPCAPsResponseFullFilterV1] = None """The packet capture filter. When this field is empty, all packets are captured.""" status: Optional[ @@ -133,8 +132,4 @@ class PCAPListResponseItemMagicVisibilityPCAPsResponseFull(BaseModel): """ -PCAPListResponseItem = Union[ - PCAPListResponseItemMagicVisibilityPCAPsResponseSimple, PCAPListResponseItemMagicVisibilityPCAPsResponseFull -] - -PCAPListResponse = List[PCAPListResponseItem] +PCAPListResponse = Union[MagicVisibilityPCAPsResponseSimple, MagicVisibilityPCAPsResponseFull] diff --git a/src/cloudflare/types/plan_list_response.py b/src/cloudflare/types/plan_list_response.py deleted file mode 100644 index 0b3bfce127b..00000000000 --- a/src/cloudflare/types/plan_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .available_rate_plan import AvailableRatePlan - -__all__ = ["PlanListResponse"] - -PlanListResponse = List[AvailableRatePlan] diff --git a/src/cloudflare/types/queue_list_response.py b/src/cloudflare/types/queue_list_response.py index 9b0038b8c4d..1ccfe1e6e71 100644 --- a/src/cloudflare/types/queue_list_response.py +++ b/src/cloudflare/types/queue_list_response.py @@ -1,13 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from .._models import BaseModel -__all__ = ["QueueListResponse", "QueueListResponseItem"] +__all__ = ["QueueListResponse"] -class QueueListResponseItem(BaseModel): +class QueueListResponse(BaseModel): consumers: Optional[object] = None consumers_total_count: Optional[object] = None @@ -23,6 +23,3 @@ class QueueListResponseItem(BaseModel): queue_id: Optional[str] = None queue_name: Optional[str] = None - - -QueueListResponse = List[QueueListResponseItem] diff --git a/src/cloudflare/types/registrar/domain_list_response.py b/src/cloudflare/types/registrar/domain_list_response.py index bb2c9ac02f0..7dbde7dd61a 100644 --- a/src/cloudflare/types/registrar/domain_list_response.py +++ b/src/cloudflare/types/registrar/domain_list_response.py @@ -1,19 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from ..._models import BaseModel -__all__ = [ - "DomainListResponse", - "DomainListResponseItem", - "DomainListResponseItemRegistrantContact", - "DomainListResponseItemTransferIn", -] +__all__ = ["DomainListResponse", "RegistrantContact", "TransferIn"] -class DomainListResponseItemRegistrantContact(BaseModel): +class RegistrantContact(BaseModel): address: str """Address.""" @@ -54,7 +49,7 @@ class DomainListResponseItemRegistrantContact(BaseModel): """Contact fax number.""" -class DomainListResponseItemTransferIn(BaseModel): +class TransferIn(BaseModel): accept_foa: Optional[str] = None """Form of authorization has been accepted by the registrant.""" @@ -74,7 +69,7 @@ class DomainListResponseItemTransferIn(BaseModel): """Domain is unlocked at the foreign registrar.""" -class DomainListResponseItem(BaseModel): +class DomainListResponse(BaseModel): id: Optional[str] = None """Domain identifier.""" @@ -96,7 +91,7 @@ class DomainListResponseItem(BaseModel): locked: Optional[bool] = None """Shows whether a registrar lock is in place for a domain.""" - registrant_contact: Optional[DomainListResponseItemRegistrantContact] = None + registrant_contact: Optional[RegistrantContact] = None """Shows contact information for domain registrant.""" registry_statuses: Optional[str] = None @@ -113,11 +108,8 @@ class DomainListResponseItem(BaseModel): supported TLDs. """ - transfer_in: Optional[DomainListResponseItemTransferIn] = None + transfer_in: Optional[TransferIn] = None """Statuses for domain transfers into Cloudflare Registrar.""" updated_at: Optional[datetime] = None """Last updated.""" - - -DomainListResponse = List[DomainListResponseItem] diff --git a/src/cloudflare/types/rules/__init__.py b/src/cloudflare/types/rules/__init__.py index da78e03456e..eac7c5e729f 100644 --- a/src/cloudflare/types/rules/__init__.py +++ b/src/cloudflare/types/rules/__init__.py @@ -4,6 +4,5 @@ from .lists_list import ListsList as ListsList from .list_create_params import ListCreateParams as ListCreateParams -from .list_list_response import ListListResponse as ListListResponse from .list_update_params import ListUpdateParams as ListUpdateParams from .list_delete_response import ListDeleteResponse as ListDeleteResponse diff --git a/src/cloudflare/types/rules/list_list_response.py b/src/cloudflare/types/rules/list_list_response.py deleted file mode 100644 index 0960fc6af0f..00000000000 --- a/src/cloudflare/types/rules/list_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .lists_list import ListsList - -__all__ = ["ListListResponse"] - -ListListResponse = List[ListsList] diff --git a/src/cloudflare/types/ruleset_list_response.py b/src/cloudflare/types/ruleset_list_response.py new file mode 100644 index 00000000000..ef7fb89731e --- /dev/null +++ b/src/cloudflare/types/ruleset_list_response.py @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["RulesetListResponse"] + + +class RulesetListResponse(BaseModel): + kind: Literal["managed", "custom", "root", "zone"] + """The kind of the ruleset.""" + + name: str + """The human-readable name of the ruleset.""" + + phase: Literal[ + "ddos_l4", + "ddos_l7", + "http_config_settings", + "http_custom_errors", + "http_log_custom_fields", + "http_ratelimit", + "http_request_cache_settings", + "http_request_dynamic_redirect", + "http_request_firewall_custom", + "http_request_firewall_managed", + "http_request_late_transform", + "http_request_origin", + "http_request_redirect", + "http_request_sanitize", + "http_request_sbfm", + "http_request_select_configuration", + "http_request_transform", + "http_response_compression", + "http_response_firewall_managed", + "http_response_headers_transform", + "magic_transit", + "magic_transit_ids_managed", + "magic_transit_managed", + ] + """The phase of the ruleset.""" + + id: Optional[str] = None + """The unique ID of the ruleset.""" + + description: Optional[str] = None + """An informative description of the ruleset.""" + + last_updated: Optional[datetime] = None + """The timestamp of when the ruleset was last modified.""" + + version: Optional[str] = None + """The version of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/__init__.py b/src/cloudflare/types/rulesets/__init__.py index a7defbada7b..f493d78c72b 100644 --- a/src/cloudflare/types/rulesets/__init__.py +++ b/src/cloudflare/types/rulesets/__init__.py @@ -5,3 +5,4 @@ from .rule_edit_params import RuleEditParams as RuleEditParams from .rule_create_params import RuleCreateParams as RuleCreateParams from .phase_update_params import PhaseUpdateParams as PhaseUpdateParams +from .version_list_response import VersionListResponse as VersionListResponse diff --git a/src/cloudflare/types/rulesets/phases/__init__.py b/src/cloudflare/types/rulesets/phases/__init__.py index f8ee8b14b1c..6164c34d4c8 100644 --- a/src/cloudflare/types/rulesets/phases/__init__.py +++ b/src/cloudflare/types/rulesets/phases/__init__.py @@ -1,3 +1,5 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from __future__ import annotations + +from .version_list_response import VersionListResponse as VersionListResponse diff --git a/src/cloudflare/types/rulesets/phases/version_list_response.py b/src/cloudflare/types/rulesets/phases/version_list_response.py new file mode 100644 index 00000000000..f91c007c1f9 --- /dev/null +++ b/src/cloudflare/types/rulesets/phases/version_list_response.py @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ...._models import BaseModel + +__all__ = ["VersionListResponse"] + + +class VersionListResponse(BaseModel): + kind: Literal["managed", "custom", "root", "zone"] + """The kind of the ruleset.""" + + name: str + """The human-readable name of the ruleset.""" + + phase: Literal[ + "ddos_l4", + "ddos_l7", + "http_config_settings", + "http_custom_errors", + "http_log_custom_fields", + "http_ratelimit", + "http_request_cache_settings", + "http_request_dynamic_redirect", + "http_request_firewall_custom", + "http_request_firewall_managed", + "http_request_late_transform", + "http_request_origin", + "http_request_redirect", + "http_request_sanitize", + "http_request_sbfm", + "http_request_select_configuration", + "http_request_transform", + "http_response_compression", + "http_response_firewall_managed", + "http_response_headers_transform", + "magic_transit", + "magic_transit_ids_managed", + "magic_transit_managed", + ] + """The phase of the ruleset.""" + + id: Optional[str] = None + """The unique ID of the ruleset.""" + + description: Optional[str] = None + """An informative description of the ruleset.""" + + last_updated: Optional[datetime] = None + """The timestamp of when the ruleset was last modified.""" + + version: Optional[str] = None + """The version of the ruleset.""" diff --git a/src/cloudflare/types/rulesets/version_list_response.py b/src/cloudflare/types/rulesets/version_list_response.py new file mode 100644 index 00000000000..dd14aeee32a --- /dev/null +++ b/src/cloudflare/types/rulesets/version_list_response.py @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["VersionListResponse"] + + +class VersionListResponse(BaseModel): + kind: Literal["managed", "custom", "root", "zone"] + """The kind of the ruleset.""" + + name: str + """The human-readable name of the ruleset.""" + + phase: Literal[ + "ddos_l4", + "ddos_l7", + "http_config_settings", + "http_custom_errors", + "http_log_custom_fields", + "http_ratelimit", + "http_request_cache_settings", + "http_request_dynamic_redirect", + "http_request_firewall_custom", + "http_request_firewall_managed", + "http_request_late_transform", + "http_request_origin", + "http_request_redirect", + "http_request_sanitize", + "http_request_sbfm", + "http_request_select_configuration", + "http_request_transform", + "http_response_compression", + "http_response_firewall_managed", + "http_response_headers_transform", + "magic_transit", + "magic_transit_ids_managed", + "magic_transit_managed", + ] + """The phase of the ruleset.""" + + id: Optional[str] = None + """The unique ID of the ruleset.""" + + description: Optional[str] = None + """An informative description of the ruleset.""" + + last_updated: Optional[datetime] = None + """The timestamp of when the ruleset was last modified.""" + + version: Optional[str] = None + """The version of the ruleset.""" diff --git a/src/cloudflare/types/secondary_dns/__init__.py b/src/cloudflare/types/secondary_dns/__init__.py index 06ee64c3d7a..cae90a7d2c4 100644 --- a/src/cloudflare/types/secondary_dns/__init__.py +++ b/src/cloudflare/types/secondary_dns/__init__.py @@ -3,16 +3,13 @@ from __future__ import annotations 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 .secondary_dns_acl import SecondaryDNSACL as SecondaryDNSACL from .peer_create_params import PeerCreateParams as PeerCreateParams -from .peer_list_response import PeerListResponse as PeerListResponse from .peer_update_params import PeerUpdateParams as PeerUpdateParams from .secondary_dns_peer import SecondaryDNSPeer as SecondaryDNSPeer from .secondary_dns_tsig import SecondaryDNSTSIG as SecondaryDNSTSIG from .tsig_create_params import TSIGCreateParams as TSIGCreateParams -from .tsig_list_response import TSIGListResponse as TSIGListResponse from .tsig_update_params import TSIGUpdateParams as TSIGUpdateParams from .acl_delete_response import ACLDeleteResponse as ACLDeleteResponse from .secondary_dns_force import SecondaryDNSForce as SecondaryDNSForce diff --git a/src/cloudflare/types/secondary_dns/acl_list_response.py b/src/cloudflare/types/secondary_dns/acl_list_response.py deleted file mode 100644 index a59ec9be8c9..00000000000 --- a/src/cloudflare/types/secondary_dns/acl_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .secondary_dns_acl import SecondaryDNSACL - -__all__ = ["ACLListResponse"] - -ACLListResponse = List[SecondaryDNSACL] diff --git a/src/cloudflare/types/secondary_dns/peer_list_response.py b/src/cloudflare/types/secondary_dns/peer_list_response.py deleted file mode 100644 index d6288041048..00000000000 --- a/src/cloudflare/types/secondary_dns/peer_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .secondary_dns_peer import SecondaryDNSPeer - -__all__ = ["PeerListResponse"] - -PeerListResponse = List[SecondaryDNSPeer] diff --git a/src/cloudflare/types/secondary_dns/tsig_list_response.py b/src/cloudflare/types/secondary_dns/tsig_list_response.py deleted file mode 100644 index 02c7e684662..00000000000 --- a/src/cloudflare/types/secondary_dns/tsig_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .secondary_dns_tsig import SecondaryDNSTSIG - -__all__ = ["TSIGListResponse"] - -TSIGListResponse = List[SecondaryDNSTSIG] diff --git a/src/cloudflare/types/snippet_list_response.py b/src/cloudflare/types/snippet_list_response.py deleted file mode 100644 index 1713f9f089c..00000000000 --- a/src/cloudflare/types/snippet_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .snippet import Snippet - -__all__ = ["SnippetListResponse"] - -SnippetListResponse = List[Snippet] diff --git a/src/cloudflare/types/snippets/rule_list_response.py b/src/cloudflare/types/snippets/rule_list_response.py index eff01c9b2b0..63c540e55c7 100644 --- a/src/cloudflare/types/snippets/rule_list_response.py +++ b/src/cloudflare/types/snippets/rule_list_response.py @@ -1,13 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from ..._models import BaseModel -__all__ = ["RuleListResponse", "RuleListResponseItem"] +__all__ = ["RuleListResponse"] -class RuleListResponseItem(BaseModel): +class RuleListResponse(BaseModel): description: Optional[str] = None enabled: Optional[bool] = None @@ -16,6 +16,3 @@ class RuleListResponseItem(BaseModel): snippet_name: Optional[str] = None """Snippet identifying name""" - - -RuleListResponse = List[RuleListResponseItem] diff --git a/src/cloudflare/types/speed/page_list_response.py b/src/cloudflare/types/speed/page_list_response.py index d1f9bf88a7e..a8d40729f35 100644 --- a/src/cloudflare/types/speed/page_list_response.py +++ b/src/cloudflare/types/speed/page_list_response.py @@ -8,10 +8,10 @@ from ..._models import BaseModel from .observatory_page_test import ObservatoryPageTest -__all__ = ["PageListResponse", "PageListResponseItem", "PageListResponseItemRegion"] +__all__ = ["PageListResponse", "Region"] -class PageListResponseItemRegion(BaseModel): +class Region(BaseModel): label: Optional[str] = None value: Optional[ @@ -42,8 +42,8 @@ class PageListResponseItemRegion(BaseModel): """A test region.""" -class PageListResponseItem(BaseModel): - region: Optional[PageListResponseItemRegion] = None +class PageListResponse(BaseModel): + region: Optional[Region] = None """A test region with a label.""" schedule_frequency: Optional[Literal["DAILY", "WEEKLY"]] = FieldInfo(alias="scheduleFrequency", default=None) @@ -53,6 +53,3 @@ class PageListResponseItem(BaseModel): url: Optional[str] = None """A URL.""" - - -PageListResponse = List[PageListResponseItem] diff --git a/src/cloudflare/types/ssl/__init__.py b/src/cloudflare/types/ssl/__init__.py index 1d4a5253625..ce56689f3f6 100644 --- a/src/cloudflare/types/ssl/__init__.py +++ b/src/cloudflare/types/ssl/__init__.py @@ -13,5 +13,4 @@ from .certificate_pack_list_params import CertificatePackListParams as CertificatePackListParams from .certificate_pack_get_response import CertificatePackGetResponse as CertificatePackGetResponse from .certificate_pack_edit_response import CertificatePackEditResponse as CertificatePackEditResponse -from .certificate_pack_list_response import CertificatePackListResponse as CertificatePackListResponse from .certificate_pack_delete_response import CertificatePackDeleteResponse as CertificatePackDeleteResponse diff --git a/src/cloudflare/types/ssl/certificate_pack_list_response.py b/src/cloudflare/types/ssl/certificate_pack_list_response.py deleted file mode 100644 index f0f8da5a679..00000000000 --- a/src/cloudflare/types/ssl/certificate_pack_list_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -__all__ = ["CertificatePackListResponse"] - -CertificatePackListResponse = List[object] diff --git a/src/cloudflare/types/stream/__init__.py b/src/cloudflare/types/stream/__init__.py index 532bacd0826..c80b853fe3f 100644 --- a/src/cloudflare/types/stream/__init__.py +++ b/src/cloudflare/types/stream/__init__.py @@ -27,7 +27,6 @@ from .caption_delete_response import CaptionDeleteResponse as CaptionDeleteResponse from .caption_update_response import CaptionUpdateResponse as CaptionUpdateResponse from .watermark_create_params import WatermarkCreateParams as WatermarkCreateParams -from .watermark_list_response import WatermarkListResponse as WatermarkListResponse from .webhook_delete_response import WebhookDeleteResponse as WebhookDeleteResponse from .webhook_update_response import WebhookUpdateResponse as WebhookUpdateResponse from .audio_track_get_response import AudioTrackGetResponse as AudioTrackGetResponse diff --git a/src/cloudflare/types/stream/live_inputs/__init__.py b/src/cloudflare/types/stream/live_inputs/__init__.py index 58b3f4b5355..be1652c3338 100644 --- a/src/cloudflare/types/stream/live_inputs/__init__.py +++ b/src/cloudflare/types/stream/live_inputs/__init__.py @@ -4,5 +4,4 @@ from .stream_output import StreamOutput as StreamOutput from .output_create_params import OutputCreateParams as OutputCreateParams -from .output_list_response import OutputListResponse as OutputListResponse from .output_update_params import OutputUpdateParams as OutputUpdateParams diff --git a/src/cloudflare/types/stream/live_inputs/output_list_response.py b/src/cloudflare/types/stream/live_inputs/output_list_response.py deleted file mode 100644 index 5bdf153d982..00000000000 --- a/src/cloudflare/types/stream/live_inputs/output_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .stream_output import StreamOutput - -__all__ = ["OutputListResponse"] - -OutputListResponse = List[StreamOutput] diff --git a/src/cloudflare/types/stream/watermark_list_response.py b/src/cloudflare/types/stream/watermark_list_response.py deleted file mode 100644 index 1bad6e2f713..00000000000 --- a/src/cloudflare/types/stream/watermark_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .stream_watermarks import StreamWatermarks - -__all__ = ["WatermarkListResponse"] - -WatermarkListResponse = List[StreamWatermarks] diff --git a/src/cloudflare/types/stream_list_response.py b/src/cloudflare/types/stream_list_response.py deleted file mode 100644 index c0ff17fb611..00000000000 --- a/src/cloudflare/types/stream_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .stream_videos import StreamVideos - -__all__ = ["StreamListResponse"] - -StreamListResponse = List[StreamVideos] diff --git a/src/cloudflare/types/subscription_list_response.py b/src/cloudflare/types/subscription_list_response.py index 82a91bcdabf..88d6c34f983 100644 --- a/src/cloudflare/types/subscription_list_response.py +++ b/src/cloudflare/types/subscription_list_response.py @@ -6,22 +6,15 @@ from .._models import BaseModel -__all__ = [ - "SubscriptionListResponse", - "SubscriptionListResponseItem", - "SubscriptionListResponseItemApp", - "SubscriptionListResponseItemComponentValue", - "SubscriptionListResponseItemRatePlan", - "SubscriptionListResponseItemZone", -] +__all__ = ["SubscriptionListResponse", "App", "ComponentValue", "RatePlan", "Zone"] -class SubscriptionListResponseItemApp(BaseModel): +class App(BaseModel): install_id: Optional[str] = None """app install id.""" -class SubscriptionListResponseItemComponentValue(BaseModel): +class ComponentValue(BaseModel): default: Optional[float] = None """The default amount assigned.""" @@ -35,7 +28,7 @@ class SubscriptionListResponseItemComponentValue(BaseModel): """The amount of the component value assigned.""" -class SubscriptionListResponseItemRatePlan(BaseModel): +class RatePlan(BaseModel): id: Optional[str] = None """The ID of the rate plan.""" @@ -58,7 +51,7 @@ class SubscriptionListResponseItemRatePlan(BaseModel): """The list of sets this rate plan applies to.""" -class SubscriptionListResponseItemZone(BaseModel): +class Zone(BaseModel): id: Optional[str] = None """Identifier""" @@ -66,13 +59,13 @@ class SubscriptionListResponseItemZone(BaseModel): """The domain name""" -class SubscriptionListResponseItem(BaseModel): +class SubscriptionListResponse(BaseModel): id: Optional[str] = None """Subscription identifier tag.""" - app: Optional[SubscriptionListResponseItemApp] = None + app: Optional[App] = None - component_values: Optional[List[SubscriptionListResponseItemComponentValue]] = None + component_values: Optional[List[ComponentValue]] = None """The list of add-ons subscribed to.""" currency: Optional[str] = None @@ -93,14 +86,11 @@ class SubscriptionListResponseItem(BaseModel): price: Optional[float] = None """The price of the subscription that will be billed, in US dollars.""" - rate_plan: Optional[SubscriptionListResponseItemRatePlan] = None + rate_plan: Optional[RatePlan] = None """The rate plan applied to the subscription.""" state: Optional[Literal["Trial", "Provisioned", "Paid", "AwaitingPayment", "Cancelled", "Failed", "Expired"]] = None """The state that the subscription is in.""" - zone: Optional[SubscriptionListResponseItemZone] = None + zone: Optional[Zone] = None """A simple zone object. May have null properties if not a zone subscription.""" - - -SubscriptionListResponse = List[SubscriptionListResponseItem] diff --git a/src/cloudflare/types/user/invite_list_response.py b/src/cloudflare/types/user/invite_list_response.py index 338d0f09636..4552dab6bdb 100644 --- a/src/cloudflare/types/user/invite_list_response.py +++ b/src/cloudflare/types/user/invite_list_response.py @@ -7,10 +7,10 @@ from ..._models import BaseModel from ..accounts import Role -__all__ = ["InviteListResponse", "InviteListResponseItem"] +__all__ = ["InviteListResponse"] -class InviteListResponseItem(BaseModel): +class InviteListResponse(BaseModel): invited_member_id: Optional[str] = None """ID of the user to add to the organization.""" @@ -40,6 +40,3 @@ class InviteListResponseItem(BaseModel): status: Optional[Literal["pending", "accepted", "rejected", "expired"]] = None """Current status of the invitation.""" - - -InviteListResponse = List[InviteListResponseItem] diff --git a/src/cloudflare/types/user/load_balancers/__init__.py b/src/cloudflare/types/user/load_balancers/__init__.py index 650c5b7f348..acb23dfd758 100644 --- a/src/cloudflare/types/user/load_balancers/__init__.py +++ b/src/cloudflare/types/user/load_balancers/__init__.py @@ -5,7 +5,6 @@ from .pool_edit_params import PoolEditParams as PoolEditParams from .pool_list_params import PoolListParams as PoolListParams from .pool_create_params import PoolCreateParams as PoolCreateParams -from .pool_list_response import PoolListResponse as PoolListResponse from .pool_update_params import PoolUpdateParams as PoolUpdateParams from .load_balancing_pool import LoadBalancingPool as LoadBalancingPool from .monitor_edit_params import MonitorEditParams as MonitorEditParams @@ -13,7 +12,6 @@ from .pool_delete_response import PoolDeleteResponse as PoolDeleteResponse from .pool_health_response import PoolHealthResponse as PoolHealthResponse from .monitor_create_params import MonitorCreateParams as MonitorCreateParams -from .monitor_list_response import MonitorListResponse as MonitorListResponse from .monitor_update_params import MonitorUpdateParams as MonitorUpdateParams from .pool_preview_response import PoolPreviewResponse as PoolPreviewResponse from .load_balancing_monitor import LoadBalancingMonitor as LoadBalancingMonitor diff --git a/src/cloudflare/types/user/load_balancers/analytics/__init__.py b/src/cloudflare/types/user/load_balancers/analytics/__init__.py index 03445926bb1..6e17e38c1cd 100644 --- a/src/cloudflare/types/user/load_balancers/analytics/__init__.py +++ b/src/cloudflare/types/user/load_balancers/analytics/__init__.py @@ -3,5 +3,4 @@ from __future__ import annotations from .event_list_params import EventListParams as EventListParams -from .event_list_response import EventListResponse as EventListResponse from .load_balancing_analytics import LoadBalancingAnalytics as LoadBalancingAnalytics diff --git a/src/cloudflare/types/user/load_balancers/analytics/event_list_response.py b/src/cloudflare/types/user/load_balancers/analytics/event_list_response.py deleted file mode 100644 index a667cbd1d3e..00000000000 --- a/src/cloudflare/types/user/load_balancers/analytics/event_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .load_balancing_analytics import LoadBalancingAnalytics - -__all__ = ["EventListResponse"] - -EventListResponse = List[LoadBalancingAnalytics] diff --git a/src/cloudflare/types/user/load_balancers/monitor_list_response.py b/src/cloudflare/types/user/load_balancers/monitor_list_response.py deleted file mode 100644 index a044deba898..00000000000 --- a/src/cloudflare/types/user/load_balancers/monitor_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .load_balancing_monitor import LoadBalancingMonitor - -__all__ = ["MonitorListResponse"] - -MonitorListResponse = List[LoadBalancingMonitor] diff --git a/src/cloudflare/types/user/load_balancers/pool_list_response.py b/src/cloudflare/types/user/load_balancers/pool_list_response.py deleted file mode 100644 index 90fa664c357..00000000000 --- a/src/cloudflare/types/user/load_balancers/pool_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .load_balancing_pool import LoadBalancingPool - -__all__ = ["PoolListResponse"] - -PoolListResponse = List[LoadBalancingPool] diff --git a/src/cloudflare/types/user/tokens/__init__.py b/src/cloudflare/types/user/tokens/__init__.py index e8c83a2d8f5..11148d0023c 100644 --- a/src/cloudflare/types/user/tokens/__init__.py +++ b/src/cloudflare/types/user/tokens/__init__.py @@ -4,4 +4,3 @@ from .token_value import TokenValue as TokenValue from .value_update_params import ValueUpdateParams as ValueUpdateParams -from .permission_group_list_response import PermissionGroupListResponse as PermissionGroupListResponse diff --git a/src/cloudflare/types/user/tokens/permission_group_list_response.py b/src/cloudflare/types/user/tokens/permission_group_list_response.py deleted file mode 100644 index ee266930c69..00000000000 --- a/src/cloudflare/types/user/tokens/permission_group_list_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -__all__ = ["PermissionGroupListResponse"] - -PermissionGroupListResponse = List[object] diff --git a/src/cloudflare/types/vectorize/__init__.py b/src/cloudflare/types/vectorize/__init__.py index a595b894226..2abd20d71b2 100644 --- a/src/cloudflare/types/vectorize/__init__.py +++ b/src/cloudflare/types/vectorize/__init__.py @@ -4,7 +4,6 @@ from .index_query_params import IndexQueryParams as IndexQueryParams from .index_create_params import IndexCreateParams as IndexCreateParams -from .index_list_response import IndexListResponse as IndexListResponse from .index_update_params import IndexUpdateParams as IndexUpdateParams from .index_delete_response import IndexDeleteResponse as IndexDeleteResponse from .vectorize_index_query import VectorizeIndexQuery as VectorizeIndexQuery diff --git a/src/cloudflare/types/vectorize/index_list_response.py b/src/cloudflare/types/vectorize/index_list_response.py deleted file mode 100644 index 89b1a3fefb5..00000000000 --- a/src/cloudflare/types/vectorize/index_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .vectorize_create_index import VectorizeCreateIndex - -__all__ = ["IndexListResponse"] - -IndexListResponse = List[VectorizeCreateIndex] diff --git a/src/cloudflare/types/waiting_room_list_response.py b/src/cloudflare/types/waiting_room_list_response.py deleted file mode 100644 index 45a85780e8a..00000000000 --- a/src/cloudflare/types/waiting_room_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .waiting_room import WaitingRoom - -__all__ = ["WaitingRoomListResponse"] - -WaitingRoomListResponse = List[WaitingRoom] diff --git a/src/cloudflare/types/waiting_rooms/__init__.py b/src/cloudflare/types/waiting_rooms/__init__.py index 0175c121a21..0ca5f4aadf1 100644 --- a/src/cloudflare/types/waiting_rooms/__init__.py +++ b/src/cloudflare/types/waiting_rooms/__init__.py @@ -8,10 +8,8 @@ from .waitingroom_event import WaitingroomEvent as WaitingroomEvent from .rule_create_params import RuleCreateParams as RuleCreateParams from .rule_edit_response import RuleEditResponse as RuleEditResponse -from .rule_list_response import RuleListResponse as RuleListResponse from .rule_update_params import RuleUpdateParams as RuleUpdateParams from .event_create_params import EventCreateParams as EventCreateParams -from .event_list_response import EventListResponse as EventListResponse from .event_update_params import EventUpdateParams as EventUpdateParams from .page_preview_params import PagePreviewParams as PagePreviewParams from .setting_edit_params import SettingEditParams as SettingEditParams diff --git a/src/cloudflare/types/waiting_rooms/event_list_response.py b/src/cloudflare/types/waiting_rooms/event_list_response.py deleted file mode 100644 index 1aae0ee87eb..00000000000 --- a/src/cloudflare/types/waiting_rooms/event_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .waitingroom_event import WaitingroomEvent - -__all__ = ["EventListResponse"] - -EventListResponse = List[WaitingroomEvent] diff --git a/src/cloudflare/types/waiting_rooms/rule_list_response.py b/src/cloudflare/types/waiting_rooms/rule_list_response.py deleted file mode 100644 index 7b1cf806b3b..00000000000 --- a/src/cloudflare/types/waiting_rooms/rule_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .waitingroom_rule import WaitingroomRule - -__all__ = ["RuleListResponse"] - -RuleListResponse = List[WaitingroomRule] diff --git a/src/cloudflare/types/web3/__init__.py b/src/cloudflare/types/web3/__init__.py index 4e579bfc0e9..f4b73f59178 100644 --- a/src/cloudflare/types/web3/__init__.py +++ b/src/cloudflare/types/web3/__init__.py @@ -4,6 +4,5 @@ from .hostname_edit_params import HostnameEditParams as HostnameEditParams from .hostname_create_params import HostnameCreateParams as HostnameCreateParams -from .hostname_list_response import HostnameListResponse as HostnameListResponse from .distributed_web_hostname import DistributedWebHostname as DistributedWebHostname from .hostname_delete_response import HostnameDeleteResponse as HostnameDeleteResponse diff --git a/src/cloudflare/types/web3/hostname_list_response.py b/src/cloudflare/types/web3/hostname_list_response.py deleted file mode 100644 index 37188d53ac7..00000000000 --- a/src/cloudflare/types/web3/hostname_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .distributed_web_hostname import DistributedWebHostname - -__all__ = ["HostnameListResponse"] - -HostnameListResponse = List[DistributedWebHostname] diff --git a/src/cloudflare/types/workers/__init__.py b/src/cloudflare/types/workers/__init__.py index 48267c12bb4..64fead694f0 100644 --- a/src/cloudflare/types/workers/__init__.py +++ b/src/cloudflare/types/workers/__init__.py @@ -10,15 +10,11 @@ from .ai_run_response import AIRunResponse as AIRunResponse from .domain_list_params import DomainListParams as DomainListParams from .route_create_params import RouteCreateParams as RouteCreateParams -from .route_list_response import RouteListResponse as RouteListResponse from .route_update_params import RouteUpdateParams as RouteUpdateParams -from .domain_list_response import DomainListResponse as DomainListResponse from .domain_update_params import DomainUpdateParams as DomainUpdateParams from .filter_create_params import FilterCreateParams as FilterCreateParams -from .filter_list_response import FilterListResponse as FilterListResponse from .filter_update_params import FilterUpdateParams as FilterUpdateParams from .script_delete_params import ScriptDeleteParams as ScriptDeleteParams -from .script_list_response import ScriptListResponse as ScriptListResponse from .script_update_params import ScriptUpdateParams as ScriptUpdateParams from .route_create_response import RouteCreateResponse as RouteCreateResponse from .route_delete_response import RouteDeleteResponse as RouteDeleteResponse diff --git a/src/cloudflare/types/workers/domain_list_response.py b/src/cloudflare/types/workers/domain_list_response.py deleted file mode 100644 index 3e9ce9a4d6c..00000000000 --- a/src/cloudflare/types/workers/domain_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .workers_domain import WorkersDomain - -__all__ = ["DomainListResponse"] - -DomainListResponse = List[WorkersDomain] diff --git a/src/cloudflare/types/workers/filter_list_response.py b/src/cloudflare/types/workers/filter_list_response.py deleted file mode 100644 index e01ef8e5a05..00000000000 --- a/src/cloudflare/types/workers/filter_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .workers_filter import WorkersFilter - -__all__ = ["FilterListResponse"] - -FilterListResponse = List[WorkersFilter] diff --git a/src/cloudflare/types/workers/route_list_response.py b/src/cloudflare/types/workers/route_list_response.py deleted file mode 100644 index 0c238e3bfff..00000000000 --- a/src/cloudflare/types/workers/route_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .workers_route import WorkersRoute - -__all__ = ["RouteListResponse"] - -RouteListResponse = List[WorkersRoute] diff --git a/src/cloudflare/types/workers/script_list_response.py b/src/cloudflare/types/workers/script_list_response.py deleted file mode 100644 index 12cccbaa599..00000000000 --- a/src/cloudflare/types/workers/script_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .workers_script import WorkersScript - -__all__ = ["ScriptListResponse"] - -ScriptListResponse = List[WorkersScript] diff --git a/src/cloudflare/types/workers_for_platforms/dispatch/namespace_list_response.py b/src/cloudflare/types/workers_for_platforms/dispatch/namespace_list_response.py index 18986d0c333..afd2b614ddc 100644 --- a/src/cloudflare/types/workers_for_platforms/dispatch/namespace_list_response.py +++ b/src/cloudflare/types/workers_for_platforms/dispatch/namespace_list_response.py @@ -1,14 +1,14 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from datetime import datetime from ...._models import BaseModel -__all__ = ["NamespaceListResponse", "NamespaceListResponseItem"] +__all__ = ["NamespaceListResponse"] -class NamespaceListResponseItem(BaseModel): +class NamespaceListResponse(BaseModel): created_by: Optional[str] = None """Identifier""" @@ -29,6 +29,3 @@ class NamespaceListResponseItem(BaseModel): script_count: Optional[int] = None """The current number of scripts in this Dispatch Namespace""" - - -NamespaceListResponse = List[NamespaceListResponseItem] diff --git a/src/cloudflare/types/zero_trust/__init__.py b/src/cloudflare/types/zero_trust/__init__.py index ee029326e27..63750a56b20 100644 --- a/src/cloudflare/types/zero_trust/__init__.py +++ b/src/cloudflare/types/zero_trust/__init__.py @@ -10,7 +10,6 @@ from .tunnel_list_params import TunnelListParams as TunnelListParams from .zero_trust_devices import ZeroTrustDevices as ZeroTrustDevices from .device_get_response import DeviceGetResponse as DeviceGetResponse -from .device_list_response import DeviceListResponse as DeviceListResponse from .tunnel_create_params import TunnelCreateParams as TunnelCreateParams from .tunnel_delete_params import TunnelDeleteParams as TunnelDeleteParams from .tunnel_edit_response import TunnelEditResponse as TunnelEditResponse diff --git a/src/cloudflare/types/zero_trust/access/__init__.py b/src/cloudflare/types/zero_trust/access/__init__.py index 7f01f1a80df..8406db99375 100644 --- a/src/cloudflare/types/zero_trust/access/__init__.py +++ b/src/cloudflare/types/zero_trust/access/__init__.py @@ -8,37 +8,29 @@ from .zero_trust_users import ZeroTrustUsers as ZeroTrustUsers from .key_update_params import KeyUpdateParams as KeyUpdateParams from .tag_create_params import TagCreateParams as TagCreateParams -from .tag_list_response import TagListResponse as TagListResponse from .tag_update_params import TagUpdateParams as TagUpdateParams from .zero_trust_groups import ZeroTrustGroups as ZeroTrustGroups -from .user_list_response import UserListResponse as UserListResponse from .group_create_params import GroupCreateParams as GroupCreateParams -from .group_list_response import GroupListResponse as GroupListResponse from .group_update_params import GroupUpdateParams as GroupUpdateParams from .key_rotate_response import KeyRotateResponse as KeyRotateResponse from .key_update_response import KeyUpdateResponse as KeyUpdateResponse from .tag_delete_response import TagDeleteResponse as TagDeleteResponse from .zero_trust_bookmarks import ZeroTrustBookmarks as ZeroTrustBookmarks from .group_delete_response import GroupDeleteResponse as GroupDeleteResponse -from .bookmark_list_response import BookmarkListResponse as BookmarkListResponse from .zero_trust_custom_page import ZeroTrustCustomPage as ZeroTrustCustomPage from .zero_trust_certificates import ZeroTrustCertificates as ZeroTrustCertificates from .bookmark_delete_response import BookmarkDeleteResponse as BookmarkDeleteResponse from .application_create_params import ApplicationCreateParams as ApplicationCreateParams -from .application_list_response import ApplicationListResponse as ApplicationListResponse from .application_update_params import ApplicationUpdateParams as ApplicationUpdateParams from .certificate_create_params import CertificateCreateParams as CertificateCreateParams -from .certificate_list_response import CertificateListResponse as CertificateListResponse from .certificate_update_params import CertificateUpdateParams as CertificateUpdateParams from .custom_page_create_params import CustomPageCreateParams as CustomPageCreateParams -from .custom_page_list_response import CustomPageListResponse as CustomPageListResponse from .custom_page_update_params import CustomPageUpdateParams as CustomPageUpdateParams from .zero_trust_service_tokens import ZeroTrustServiceTokens as ZeroTrustServiceTokens from .application_delete_response import ApplicationDeleteResponse as ApplicationDeleteResponse from .certificate_delete_response import CertificateDeleteResponse as CertificateDeleteResponse from .custom_page_delete_response import CustomPageDeleteResponse as CustomPageDeleteResponse from .service_token_create_params import ServiceTokenCreateParams as ServiceTokenCreateParams -from .service_token_list_response import ServiceTokenListResponse as ServiceTokenListResponse from .service_token_update_params import ServiceTokenUpdateParams as ServiceTokenUpdateParams from .service_token_create_response import ServiceTokenCreateResponse as ServiceTokenCreateResponse from .service_token_rotate_response import ServiceTokenRotateResponse as ServiceTokenRotateResponse diff --git a/src/cloudflare/types/zero_trust/access/application_list_response.py b/src/cloudflare/types/zero_trust/access/application_list_response.py deleted file mode 100644 index 910868ea87c..00000000000 --- a/src/cloudflare/types/zero_trust/access/application_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_apps import ZeroTrustApps - -__all__ = ["ApplicationListResponse"] - -ApplicationListResponse = List[ZeroTrustApps] diff --git a/src/cloudflare/types/zero_trust/access/applications/__init__.py b/src/cloudflare/types/zero_trust/access/applications/__init__.py index a4ca1c2cdb4..4c51f6afacf 100644 --- a/src/cloudflare/types/zero_trust/access/applications/__init__.py +++ b/src/cloudflare/types/zero_trust/access/applications/__init__.py @@ -4,12 +4,10 @@ from .zero_trust_ca import ZeroTrustCA as ZeroTrustCA from .ca_get_response import CAGetResponse as CAGetResponse -from .ca_list_response import CAListResponse as CAListResponse from .ca_create_response import CACreateResponse as CACreateResponse from .ca_delete_response import CADeleteResponse as CADeleteResponse from .zero_trust_policies import ZeroTrustPolicies as ZeroTrustPolicies 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_delete_response import PolicyDeleteResponse as PolicyDeleteResponse from .user_policy_check_list_response import UserPolicyCheckListResponse as UserPolicyCheckListResponse diff --git a/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py b/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py deleted file mode 100644 index 9c1eb6e62bc..00000000000 --- a/src/cloudflare/types/zero_trust/access/applications/ca_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_ca import ZeroTrustCA - -__all__ = ["CAListResponse"] - -CAListResponse = List[ZeroTrustCA] diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py b/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py deleted file mode 100644 index 8413c1af279..00000000000 --- a/src/cloudflare/types/zero_trust/access/applications/policy_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_policies import ZeroTrustPolicies - -__all__ = ["PolicyListResponse"] - -PolicyListResponse = List[ZeroTrustPolicies] diff --git a/src/cloudflare/types/zero_trust/access/bookmark_list_response.py b/src/cloudflare/types/zero_trust/access/bookmark_list_response.py deleted file mode 100644 index 50bdaeafc83..00000000000 --- a/src/cloudflare/types/zero_trust/access/bookmark_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_bookmarks import ZeroTrustBookmarks - -__all__ = ["BookmarkListResponse"] - -BookmarkListResponse = List[ZeroTrustBookmarks] diff --git a/src/cloudflare/types/zero_trust/access/certificate_list_response.py b/src/cloudflare/types/zero_trust/access/certificate_list_response.py deleted file mode 100644 index 4366d11dd0b..00000000000 --- a/src/cloudflare/types/zero_trust/access/certificate_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_certificates import ZeroTrustCertificates - -__all__ = ["CertificateListResponse"] - -CertificateListResponse = List[ZeroTrustCertificates] diff --git a/src/cloudflare/types/zero_trust/access/custom_page_list_response.py b/src/cloudflare/types/zero_trust/access/custom_page_list_response.py deleted file mode 100644 index 2f7128ef608..00000000000 --- a/src/cloudflare/types/zero_trust/access/custom_page_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_custom_page_without_html import ZeroTrustCustomPageWithoutHTML - -__all__ = ["CustomPageListResponse"] - -CustomPageListResponse = List[ZeroTrustCustomPageWithoutHTML] diff --git a/src/cloudflare/types/zero_trust/access/group_list_response.py b/src/cloudflare/types/zero_trust/access/group_list_response.py deleted file mode 100644 index 75d9ddeea05..00000000000 --- a/src/cloudflare/types/zero_trust/access/group_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_groups import ZeroTrustGroups - -__all__ = ["GroupListResponse"] - -GroupListResponse = List[ZeroTrustGroups] diff --git a/src/cloudflare/types/zero_trust/access/service_token_list_response.py b/src/cloudflare/types/zero_trust/access/service_token_list_response.py deleted file mode 100644 index ec616ff266b..00000000000 --- a/src/cloudflare/types/zero_trust/access/service_token_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_service_tokens import ZeroTrustServiceTokens - -__all__ = ["ServiceTokenListResponse"] - -ServiceTokenListResponse = List[ZeroTrustServiceTokens] diff --git a/src/cloudflare/types/zero_trust/access/tag_list_response.py b/src/cloudflare/types/zero_trust/access/tag_list_response.py deleted file mode 100644 index 727b975fce5..00000000000 --- a/src/cloudflare/types/zero_trust/access/tag_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_tag import ZeroTrustTag - -__all__ = ["TagListResponse"] - -TagListResponse = List[ZeroTrustTag] diff --git a/src/cloudflare/types/zero_trust/access/user_list_response.py b/src/cloudflare/types/zero_trust/access/user_list_response.py deleted file mode 100644 index 255083b287b..00000000000 --- a/src/cloudflare/types/zero_trust/access/user_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_users import ZeroTrustUsers - -__all__ = ["UserListResponse"] - -UserListResponse = List[ZeroTrustUsers] diff --git a/src/cloudflare/types/zero_trust/access/users/active_session_list_response.py b/src/cloudflare/types/zero_trust/access/users/active_session_list_response.py index e27ef03ac17..ac0f4059a81 100644 --- a/src/cloudflare/types/zero_trust/access/users/active_session_list_response.py +++ b/src/cloudflare/types/zero_trust/access/users/active_session_list_response.py @@ -1,18 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional +from typing import Dict, Optional from ....._models import BaseModel -__all__ = [ - "ActiveSessionListResponse", - "ActiveSessionListResponseItem", - "ActiveSessionListResponseItemMetadata", - "ActiveSessionListResponseItemMetadataApps", -] +__all__ = ["ActiveSessionListResponse", "Metadata", "MetadataApps"] -class ActiveSessionListResponseItemMetadataApps(BaseModel): +class MetadataApps(BaseModel): hostname: Optional[str] = None name: Optional[str] = None @@ -22,8 +17,8 @@ class ActiveSessionListResponseItemMetadataApps(BaseModel): uid: Optional[str] = None -class ActiveSessionListResponseItemMetadata(BaseModel): - apps: Optional[Dict[str, ActiveSessionListResponseItemMetadataApps]] = None +class Metadata(BaseModel): + apps: Optional[Dict[str, MetadataApps]] = None expires: Optional[int] = None @@ -34,12 +29,9 @@ class ActiveSessionListResponseItemMetadata(BaseModel): ttl: Optional[int] = None -class ActiveSessionListResponseItem(BaseModel): +class ActiveSessionListResponse(BaseModel): expiration: Optional[int] = None - metadata: Optional[ActiveSessionListResponseItemMetadata] = None + metadata: Optional[Metadata] = None name: Optional[str] = None - - -ActiveSessionListResponse = List[ActiveSessionListResponseItem] diff --git a/src/cloudflare/types/zero_trust/access/users/failed_login_list_response.py b/src/cloudflare/types/zero_trust/access/users/failed_login_list_response.py index 7554fc42d5b..358f7afc443 100644 --- a/src/cloudflare/types/zero_trust/access/users/failed_login_list_response.py +++ b/src/cloudflare/types/zero_trust/access/users/failed_login_list_response.py @@ -1,16 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import Optional from ....._models import BaseModel -__all__ = ["FailedLoginListResponse", "FailedLoginListResponseItem"] +__all__ = ["FailedLoginListResponse"] -class FailedLoginListResponseItem(BaseModel): +class FailedLoginListResponse(BaseModel): expiration: Optional[int] = None metadata: Optional[object] = None - - -FailedLoginListResponse = List[FailedLoginListResponseItem] diff --git a/src/cloudflare/types/zero_trust/device_list_response.py b/src/cloudflare/types/zero_trust/device_list_response.py deleted file mode 100644 index 6d4470567bd..00000000000 --- a/src/cloudflare/types/zero_trust/device_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_devices import ZeroTrustDevices - -__all__ = ["DeviceListResponse"] - -DeviceListResponse = List[ZeroTrustDevices] diff --git a/src/cloudflare/types/zero_trust/devices/__init__.py b/src/cloudflare/types/zero_trust/devices/__init__.py index e2c73206405..138d36d47e8 100644 --- a/src/cloudflare/types/zero_trust/devices/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/__init__.py @@ -5,18 +5,14 @@ from .policy_edit_params import PolicyEditParams as PolicyEditParams from .device_posture_rules import DevicePostureRules as DevicePostureRules from .policy_create_params import PolicyCreateParams as PolicyCreateParams -from .policy_list_response import PolicyListResponse as PolicyListResponse from .revoke_create_params import RevokeCreateParams as RevokeCreateParams from .dex_test_schemas_http import DEXTestSchemasHTTP as DEXTestSchemasHTTP from .network_create_params import NetworkCreateParams as NetworkCreateParams -from .network_list_response import NetworkListResponse as NetworkListResponse from .network_update_params import NetworkUpdateParams as NetworkUpdateParams from .posture_create_params import PostureCreateParams as PostureCreateParams -from .posture_list_response import PostureListResponse as PostureListResponse from .posture_update_params import PostureUpdateParams as PostureUpdateParams from .setting_update_params import SettingUpdateParams as SettingUpdateParams from .dex_test_create_params import DEXTestCreateParams as DEXTestCreateParams -from .dex_test_list_response import DEXTestListResponse as DEXTestListResponse from .dex_test_update_params import DEXTestUpdateParams as DEXTestUpdateParams from .policy_delete_response import PolicyDeleteResponse as PolicyDeleteResponse from .revoke_create_response import RevokeCreateResponse as RevokeCreateResponse diff --git a/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py b/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py deleted file mode 100644 index 2dc36bc019f..00000000000 --- a/src/cloudflare/types/zero_trust/devices/dex_test_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .dex_test_schemas_http import DEXTestSchemasHTTP - -__all__ = ["DEXTestListResponse"] - -DEXTestListResponse = List[DEXTestSchemasHTTP] diff --git a/src/cloudflare/types/zero_trust/devices/network_list_response.py b/src/cloudflare/types/zero_trust/devices/network_list_response.py deleted file mode 100644 index 6a6ace56b12..00000000000 --- a/src/cloudflare/types/zero_trust/devices/network_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .device_managed_networks import DeviceManagedNetworks - -__all__ = ["NetworkListResponse"] - -NetworkListResponse = List[DeviceManagedNetworks] diff --git a/src/cloudflare/types/zero_trust/devices/policies/__init__.py b/src/cloudflare/types/zero_trust/devices/policies/__init__.py index 36cd5be2b66..8e3419b0673 100644 --- a/src/cloudflare/types/zero_trust/devices/policies/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/policies/__init__.py @@ -5,9 +5,7 @@ from .devices_split_tunnel import DevicesSplitTunnel as DevicesSplitTunnel from .exclude_get_response import ExcludeGetResponse as ExcludeGetResponse from .include_get_response import IncludeGetResponse as IncludeGetResponse -from .exclude_list_response import ExcludeListResponse as ExcludeListResponse from .exclude_update_params import ExcludeUpdateParams as ExcludeUpdateParams -from .include_list_response import IncludeListResponse as IncludeListResponse from .include_update_params import IncludeUpdateParams as IncludeUpdateParams from .devices_fallback_domain import DevicesFallbackDomain as DevicesFallbackDomain from .exclude_update_response import ExcludeUpdateResponse as ExcludeUpdateResponse @@ -17,7 +15,6 @@ from .devices_split_tunnel_include import DevicesSplitTunnelInclude as DevicesSplitTunnelInclude from .fallback_domain_get_response import FallbackDomainGetResponse as FallbackDomainGetResponse from .devices_fallback_domain_param import DevicesFallbackDomainParam as DevicesFallbackDomainParam -from .fallback_domain_list_response import FallbackDomainListResponse as FallbackDomainListResponse from .fallback_domain_update_params import FallbackDomainUpdateParams as FallbackDomainUpdateParams from .fallback_domain_update_response import FallbackDomainUpdateResponse as FallbackDomainUpdateResponse from .devices_split_tunnel_include_param import DevicesSplitTunnelIncludeParam as DevicesSplitTunnelIncludeParam diff --git a/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py b/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py deleted file mode 100644 index b8ed64891e5..00000000000 --- a/src/cloudflare/types/zero_trust/devices/policies/exclude_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .devices_split_tunnel import DevicesSplitTunnel - -__all__ = ["ExcludeListResponse"] - -ExcludeListResponse = List[DevicesSplitTunnel] diff --git a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py b/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py deleted file mode 100644 index 3a33387f983..00000000000 --- a/src/cloudflare/types/zero_trust/devices/policies/fallback_domain_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .devices_fallback_domain import DevicesFallbackDomain - -__all__ = ["FallbackDomainListResponse"] - -FallbackDomainListResponse = List[DevicesFallbackDomain] diff --git a/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py b/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py deleted file mode 100644 index 4173afcf096..00000000000 --- a/src/cloudflare/types/zero_trust/devices/policies/include_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .devices_split_tunnel_include import DevicesSplitTunnelInclude - -__all__ = ["IncludeListResponse"] - -IncludeListResponse = List[DevicesSplitTunnelInclude] diff --git a/src/cloudflare/types/zero_trust/devices/policy_list_response.py b/src/cloudflare/types/zero_trust/devices/policy_list_response.py deleted file mode 100644 index 95cadbca13b..00000000000 --- a/src/cloudflare/types/zero_trust/devices/policy_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .devices_device_settings_policy import DevicesDeviceSettingsPolicy - -__all__ = ["PolicyListResponse"] - -PolicyListResponse = List[DevicesDeviceSettingsPolicy] diff --git a/src/cloudflare/types/zero_trust/devices/posture/__init__.py b/src/cloudflare/types/zero_trust/devices/posture/__init__.py index 666d6d134b2..3771dca8a78 100644 --- a/src/cloudflare/types/zero_trust/devices/posture/__init__.py +++ b/src/cloudflare/types/zero_trust/devices/posture/__init__.py @@ -4,6 +4,5 @@ from .integration_edit_params import IntegrationEditParams as IntegrationEditParams from .integration_create_params import IntegrationCreateParams as IntegrationCreateParams -from .integration_list_response import IntegrationListResponse as IntegrationListResponse from .device_posture_integrations import DevicePostureIntegrations as DevicePostureIntegrations from .integration_delete_response import IntegrationDeleteResponse as IntegrationDeleteResponse diff --git a/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py b/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py deleted file mode 100644 index ffbb8633862..00000000000 --- a/src/cloudflare/types/zero_trust/devices/posture/integration_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .device_posture_integrations import DevicePostureIntegrations - -__all__ = ["IntegrationListResponse"] - -IntegrationListResponse = List[DevicePostureIntegrations] diff --git a/src/cloudflare/types/zero_trust/devices/posture_list_response.py b/src/cloudflare/types/zero_trust/devices/posture_list_response.py deleted file mode 100644 index c183e9cd3e9..00000000000 --- a/src/cloudflare/types/zero_trust/devices/posture_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .device_posture_rules import DevicePostureRules - -__all__ = ["PostureListResponse"] - -PostureListResponse = List[DevicePostureRules] diff --git a/src/cloudflare/types/zero_trust/dex/__init__.py b/src/cloudflare/types/zero_trust/dex/__init__.py index 02ea497ebd0..7262361be64 100644 --- a/src/cloudflare/types/zero_trust/dex/__init__.py +++ b/src/cloudflare/types/zero_trust/dex/__init__.py @@ -4,7 +4,6 @@ from .colo_list_params import ColoListParams as ColoListParams from .test_list_params import TestListParams as TestListParams -from .colo_list_response import ColoListResponse as ColoListResponse from .test_list_response import TestListResponse as TestListResponse from .http_test_get_params import HTTPTestGetParams as HTTPTestGetParams from .fleet_status_live_params import FleetStatusLiveParams as FleetStatusLiveParams diff --git a/src/cloudflare/types/zero_trust/dex/colo_list_response.py b/src/cloudflare/types/zero_trust/dex/colo_list_response.py deleted file mode 100644 index 87e34437735..00000000000 --- a/src/cloudflare/types/zero_trust/dex/colo_list_response.py +++ /dev/null @@ -1,7 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -__all__ = ["ColoListResponse"] - -ColoListResponse = List[object] diff --git a/src/cloudflare/types/zero_trust/dlp/__init__.py b/src/cloudflare/types/zero_trust/dlp/__init__.py index 90329580a74..5786dd444be 100644 --- a/src/cloudflare/types/zero_trust/dlp/__init__.py +++ b/src/cloudflare/types/zero_trust/dlp/__init__.py @@ -9,7 +9,6 @@ from .profile_get_response import ProfileGetResponse as ProfileGetResponse from .dataset_create_params import DatasetCreateParams as DatasetCreateParams from .dataset_update_params import DatasetUpdateParams as DatasetUpdateParams -from .profile_list_response import ProfileListResponse as ProfileListResponse from .pattern_validate_params import PatternValidateParams as PatternValidateParams from .payload_log_get_response import PayloadLogGetResponse as PayloadLogGetResponse from .pattern_validate_response import PatternValidateResponse as PatternValidateResponse diff --git a/src/cloudflare/types/zero_trust/dlp/profile_list_response.py b/src/cloudflare/types/zero_trust/dlp/profile_list_response.py deleted file mode 100644 index 453c9f2b820..00000000000 --- a/src/cloudflare/types/zero_trust/dlp/profile_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .dlp_profiles import DLPProfiles - -__all__ = ["ProfileListResponse"] - -ProfileListResponse = List[DLPProfiles] diff --git a/src/cloudflare/types/zero_trust/gateway/__init__.py b/src/cloudflare/types/zero_trust/gateway/__init__.py index a2c2796fa1a..b828b0a8432 100644 --- a/src/cloudflare/types/zero_trust/gateway/__init__.py +++ b/src/cloudflare/types/zero_trust/gateway/__init__.py @@ -4,19 +4,14 @@ from .list_edit_params import ListEditParams as ListEditParams from .list_create_params import ListCreateParams as ListCreateParams -from .list_list_response import ListListResponse as ListListResponse from .list_update_params import ListUpdateParams as ListUpdateParams 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 .list_create_response import ListCreateResponse as ListCreateResponse from .list_delete_response import ListDeleteResponse as ListDeleteResponse from .rule_delete_response import RuleDeleteResponse as RuleDeleteResponse from .logging_update_params import LoggingUpdateParams as LoggingUpdateParams -from .app_type_list_response import AppTypeListResponse as AppTypeListResponse -from .category_list_response import CategoryListResponse as CategoryListResponse from .location_create_params import LocationCreateParams as LocationCreateParams -from .location_list_response import LocationListResponse as LocationListResponse from .location_update_params import LocationUpdateParams as LocationUpdateParams from .location_delete_response import LocationDeleteResponse as LocationDeleteResponse from .zero_trust_gateway_lists import ZeroTrustGatewayLists as ZeroTrustGatewayLists @@ -28,7 +23,6 @@ from .configuration_update_params import ConfigurationUpdateParams as ConfigurationUpdateParams from .zero_trust_gateway_settings import ZeroTrustGatewaySettings as ZeroTrustGatewaySettings from .proxy_endpoint_create_params import ProxyEndpointCreateParams as ProxyEndpointCreateParams -from .proxy_endpoint_list_response import ProxyEndpointListResponse as ProxyEndpointListResponse from .zero_trust_gateway_app_types import ZeroTrustGatewayAppTypes as ZeroTrustGatewayAppTypes from .zero_trust_gateway_locations import ZeroTrustGatewayLocations as ZeroTrustGatewayLocations from .configuration_update_response import ConfigurationUpdateResponse as ConfigurationUpdateResponse diff --git a/src/cloudflare/types/zero_trust/gateway/app_type_list_response.py b/src/cloudflare/types/zero_trust/gateway/app_type_list_response.py deleted file mode 100644 index 296c5ffcb44..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/app_type_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_gateway_app_types import ZeroTrustGatewayAppTypes - -__all__ = ["AppTypeListResponse"] - -AppTypeListResponse = List[ZeroTrustGatewayAppTypes] diff --git a/src/cloudflare/types/zero_trust/gateway/category_list_response.py b/src/cloudflare/types/zero_trust/gateway/category_list_response.py deleted file mode 100644 index 4d5d832ca96..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/category_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_gateway_categories import ZeroTrustGatewayCategories - -__all__ = ["CategoryListResponse"] - -CategoryListResponse = List[ZeroTrustGatewayCategories] diff --git a/src/cloudflare/types/zero_trust/gateway/list_list_response.py b/src/cloudflare/types/zero_trust/gateway/list_list_response.py deleted file mode 100644 index 0fcbf124bb0..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/list_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_gateway_lists import ZeroTrustGatewayLists - -__all__ = ["ListListResponse"] - -ListListResponse = List[ZeroTrustGatewayLists] diff --git a/src/cloudflare/types/zero_trust/gateway/lists/item_list_response.py b/src/cloudflare/types/zero_trust/gateway/lists/item_list_response.py index 5b0373d47e3..a1537bbcdde 100644 --- a/src/cloudflare/types/zero_trust/gateway/lists/item_list_response.py +++ b/src/cloudflare/types/zero_trust/gateway/lists/item_list_response.py @@ -15,4 +15,4 @@ class ItemListResponseItem(BaseModel): """The value of the item in a list.""" -ItemListResponse = List[List[ItemListResponseItem]] +ItemListResponse = List[ItemListResponseItem] diff --git a/src/cloudflare/types/zero_trust/gateway/location_list_response.py b/src/cloudflare/types/zero_trust/gateway/location_list_response.py deleted file mode 100644 index 8857a60393c..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/location_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_gateway_locations import ZeroTrustGatewayLocations - -__all__ = ["LocationListResponse"] - -LocationListResponse = List[ZeroTrustGatewayLocations] diff --git a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_list_response.py b/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_list_response.py deleted file mode 100644 index d5fe8f12bd6..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/proxy_endpoint_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_gateway_proxy_endpoints import ZeroTrustGatewayProxyEndpoints - -__all__ = ["ProxyEndpointListResponse"] - -ProxyEndpointListResponse = List[ZeroTrustGatewayProxyEndpoints] diff --git a/src/cloudflare/types/zero_trust/gateway/rule_list_response.py b/src/cloudflare/types/zero_trust/gateway/rule_list_response.py deleted file mode 100644 index 33bf145a3aa..00000000000 --- a/src/cloudflare/types/zero_trust/gateway/rule_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .zero_trust_gateway_rules import ZeroTrustGatewayRules - -__all__ = ["RuleListResponse"] - -RuleListResponse = List[ZeroTrustGatewayRules] diff --git a/src/cloudflare/types/zero_trust/identity_provider_list_response.py b/src/cloudflare/types/zero_trust/identity_provider_list_response.py index 20e74e5ffad..fe476a77ad3 100644 --- a/src/cloudflare/types/zero_trust/identity_provider_list_response.py +++ b/src/cloudflare/types/zero_trust/identity_provider_list_response.py @@ -7,51 +7,50 @@ __all__ = [ "IdentityProviderListResponse", - "IdentityProviderListResponseItem", - "IdentityProviderListResponseItemAccessAzureAd", - "IdentityProviderListResponseItemAccessAzureAdConfig", - "IdentityProviderListResponseItemAccessAzureAdScimConfig", - "IdentityProviderListResponseItemAccessCentrify", - "IdentityProviderListResponseItemAccessCentrifyConfig", - "IdentityProviderListResponseItemAccessCentrifyScimConfig", - "IdentityProviderListResponseItemAccessFacebook", - "IdentityProviderListResponseItemAccessFacebookConfig", - "IdentityProviderListResponseItemAccessFacebookScimConfig", - "IdentityProviderListResponseItemAccessGitHub", - "IdentityProviderListResponseItemAccessGitHubConfig", - "IdentityProviderListResponseItemAccessGitHubScimConfig", - "IdentityProviderListResponseItemAccessGoogle", - "IdentityProviderListResponseItemAccessGoogleConfig", - "IdentityProviderListResponseItemAccessGoogleScimConfig", - "IdentityProviderListResponseItemAccessGoogleApps", - "IdentityProviderListResponseItemAccessGoogleAppsConfig", - "IdentityProviderListResponseItemAccessGoogleAppsScimConfig", - "IdentityProviderListResponseItemAccessLinkedin", - "IdentityProviderListResponseItemAccessLinkedinConfig", - "IdentityProviderListResponseItemAccessLinkedinScimConfig", - "IdentityProviderListResponseItemAccessOidc", - "IdentityProviderListResponseItemAccessOidcConfig", - "IdentityProviderListResponseItemAccessOidcScimConfig", - "IdentityProviderListResponseItemAccessOkta", - "IdentityProviderListResponseItemAccessOktaConfig", - "IdentityProviderListResponseItemAccessOktaScimConfig", - "IdentityProviderListResponseItemAccessOnelogin", - "IdentityProviderListResponseItemAccessOneloginConfig", - "IdentityProviderListResponseItemAccessOneloginScimConfig", - "IdentityProviderListResponseItemAccessPingone", - "IdentityProviderListResponseItemAccessPingoneConfig", - "IdentityProviderListResponseItemAccessPingoneScimConfig", - "IdentityProviderListResponseItemAccessSaml", - "IdentityProviderListResponseItemAccessSamlConfig", - "IdentityProviderListResponseItemAccessSamlConfigHeaderAttribute", - "IdentityProviderListResponseItemAccessSamlScimConfig", - "IdentityProviderListResponseItemAccessYandex", - "IdentityProviderListResponseItemAccessYandexConfig", - "IdentityProviderListResponseItemAccessYandexScimConfig", + "AccessAzureAd", + "AccessAzureAdConfig", + "AccessAzureAdScimConfig", + "AccessCentrify", + "AccessCentrifyConfig", + "AccessCentrifyScimConfig", + "AccessFacebook", + "AccessFacebookConfig", + "AccessFacebookScimConfig", + "AccessGitHub", + "AccessGitHubConfig", + "AccessGitHubScimConfig", + "AccessGoogle", + "AccessGoogleConfig", + "AccessGoogleScimConfig", + "AccessGoogleApps", + "AccessGoogleAppsConfig", + "AccessGoogleAppsScimConfig", + "AccessLinkedin", + "AccessLinkedinConfig", + "AccessLinkedinScimConfig", + "AccessOidc", + "AccessOidcConfig", + "AccessOidcScimConfig", + "AccessOkta", + "AccessOktaConfig", + "AccessOktaScimConfig", + "AccessOnelogin", + "AccessOneloginConfig", + "AccessOneloginScimConfig", + "AccessPingone", + "AccessPingoneConfig", + "AccessPingoneScimConfig", + "AccessSaml", + "AccessSamlConfig", + "AccessSamlConfigHeaderAttribute", + "AccessSamlScimConfig", + "AccessYandex", + "AccessYandexConfig", + "AccessYandexScimConfig", ] -class IdentityProviderListResponseItemAccessAzureAdConfig(BaseModel): +class AccessAzureAdConfig(BaseModel): claims: Optional[List[str]] = None """Custom claims""" @@ -87,7 +86,7 @@ class IdentityProviderListResponseItemAccessAzureAdConfig(BaseModel): """Should Cloudflare try to load groups from your account""" -class IdentityProviderListResponseItemAccessAzureAdScimConfig(BaseModel): +class AccessAzureAdScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -119,8 +118,8 @@ class IdentityProviderListResponseItemAccessAzureAdScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessAzureAd(BaseModel): - config: IdentityProviderListResponseItemAccessAzureAdConfig +class AccessAzureAd(BaseModel): + config: AccessAzureAdConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -155,14 +154,14 @@ class IdentityProviderListResponseItemAccessAzureAd(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessAzureAdScimConfig] = None + scim_config: Optional[AccessAzureAdScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessCentrifyConfig(BaseModel): +class AccessCentrifyConfig(BaseModel): centrify_account: Optional[str] = None """Your centrify account url""" @@ -182,7 +181,7 @@ class IdentityProviderListResponseItemAccessCentrifyConfig(BaseModel): """The claim name for email in the id_token response.""" -class IdentityProviderListResponseItemAccessCentrifyScimConfig(BaseModel): +class AccessCentrifyScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -214,8 +213,8 @@ class IdentityProviderListResponseItemAccessCentrifyScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessCentrify(BaseModel): - config: IdentityProviderListResponseItemAccessCentrifyConfig +class AccessCentrify(BaseModel): + config: AccessCentrifyConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -250,14 +249,14 @@ class IdentityProviderListResponseItemAccessCentrify(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessCentrifyScimConfig] = None + scim_config: Optional[AccessCentrifyScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessFacebookConfig(BaseModel): +class AccessFacebookConfig(BaseModel): client_id: Optional[str] = None """Your OAuth Client ID""" @@ -265,7 +264,7 @@ class IdentityProviderListResponseItemAccessFacebookConfig(BaseModel): """Your OAuth Client Secret""" -class IdentityProviderListResponseItemAccessFacebookScimConfig(BaseModel): +class AccessFacebookScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -297,8 +296,8 @@ class IdentityProviderListResponseItemAccessFacebookScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessFacebook(BaseModel): - config: IdentityProviderListResponseItemAccessFacebookConfig +class AccessFacebook(BaseModel): + config: AccessFacebookConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -333,14 +332,14 @@ class IdentityProviderListResponseItemAccessFacebook(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessFacebookScimConfig] = None + scim_config: Optional[AccessFacebookScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessGitHubConfig(BaseModel): +class AccessGitHubConfig(BaseModel): client_id: Optional[str] = None """Your OAuth Client ID""" @@ -348,7 +347,7 @@ class IdentityProviderListResponseItemAccessGitHubConfig(BaseModel): """Your OAuth Client Secret""" -class IdentityProviderListResponseItemAccessGitHubScimConfig(BaseModel): +class AccessGitHubScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -380,8 +379,8 @@ class IdentityProviderListResponseItemAccessGitHubScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessGitHub(BaseModel): - config: IdentityProviderListResponseItemAccessGitHubConfig +class AccessGitHub(BaseModel): + config: AccessGitHubConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -416,14 +415,14 @@ class IdentityProviderListResponseItemAccessGitHub(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessGitHubScimConfig] = None + scim_config: Optional[AccessGitHubScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessGoogleConfig(BaseModel): +class AccessGoogleConfig(BaseModel): claims: Optional[List[str]] = None """Custom claims""" @@ -437,7 +436,7 @@ class IdentityProviderListResponseItemAccessGoogleConfig(BaseModel): """The claim name for email in the id_token response.""" -class IdentityProviderListResponseItemAccessGoogleScimConfig(BaseModel): +class AccessGoogleScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -469,8 +468,8 @@ class IdentityProviderListResponseItemAccessGoogleScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessGoogle(BaseModel): - config: IdentityProviderListResponseItemAccessGoogleConfig +class AccessGoogle(BaseModel): + config: AccessGoogleConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -505,14 +504,14 @@ class IdentityProviderListResponseItemAccessGoogle(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessGoogleScimConfig] = None + scim_config: Optional[AccessGoogleScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessGoogleAppsConfig(BaseModel): +class AccessGoogleAppsConfig(BaseModel): apps_domain: Optional[str] = None """Your companies TLD""" @@ -529,7 +528,7 @@ class IdentityProviderListResponseItemAccessGoogleAppsConfig(BaseModel): """The claim name for email in the id_token response.""" -class IdentityProviderListResponseItemAccessGoogleAppsScimConfig(BaseModel): +class AccessGoogleAppsScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -561,8 +560,8 @@ class IdentityProviderListResponseItemAccessGoogleAppsScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessGoogleApps(BaseModel): - config: IdentityProviderListResponseItemAccessGoogleAppsConfig +class AccessGoogleApps(BaseModel): + config: AccessGoogleAppsConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -597,14 +596,14 @@ class IdentityProviderListResponseItemAccessGoogleApps(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessGoogleAppsScimConfig] = None + scim_config: Optional[AccessGoogleAppsScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessLinkedinConfig(BaseModel): +class AccessLinkedinConfig(BaseModel): client_id: Optional[str] = None """Your OAuth Client ID""" @@ -612,7 +611,7 @@ class IdentityProviderListResponseItemAccessLinkedinConfig(BaseModel): """Your OAuth Client Secret""" -class IdentityProviderListResponseItemAccessLinkedinScimConfig(BaseModel): +class AccessLinkedinScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -644,8 +643,8 @@ class IdentityProviderListResponseItemAccessLinkedinScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessLinkedin(BaseModel): - config: IdentityProviderListResponseItemAccessLinkedinConfig +class AccessLinkedin(BaseModel): + config: AccessLinkedinConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -680,14 +679,14 @@ class IdentityProviderListResponseItemAccessLinkedin(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessLinkedinScimConfig] = None + scim_config: Optional[AccessLinkedinScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessOidcConfig(BaseModel): +class AccessOidcConfig(BaseModel): auth_url: Optional[str] = None """The authorization_endpoint URL of your IdP""" @@ -713,7 +712,7 @@ class IdentityProviderListResponseItemAccessOidcConfig(BaseModel): """The token_endpoint URL of your IdP""" -class IdentityProviderListResponseItemAccessOidcScimConfig(BaseModel): +class AccessOidcScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -745,8 +744,8 @@ class IdentityProviderListResponseItemAccessOidcScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessOidc(BaseModel): - config: IdentityProviderListResponseItemAccessOidcConfig +class AccessOidc(BaseModel): + config: AccessOidcConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -781,14 +780,14 @@ class IdentityProviderListResponseItemAccessOidc(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessOidcScimConfig] = None + scim_config: Optional[AccessOidcScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessOktaConfig(BaseModel): +class AccessOktaConfig(BaseModel): authorization_server_id: Optional[str] = None """Your okta authorization server id""" @@ -808,7 +807,7 @@ class IdentityProviderListResponseItemAccessOktaConfig(BaseModel): """Your okta account url""" -class IdentityProviderListResponseItemAccessOktaScimConfig(BaseModel): +class AccessOktaScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -840,8 +839,8 @@ class IdentityProviderListResponseItemAccessOktaScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessOkta(BaseModel): - config: IdentityProviderListResponseItemAccessOktaConfig +class AccessOkta(BaseModel): + config: AccessOktaConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -876,14 +875,14 @@ class IdentityProviderListResponseItemAccessOkta(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessOktaScimConfig] = None + scim_config: Optional[AccessOktaScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessOneloginConfig(BaseModel): +class AccessOneloginConfig(BaseModel): claims: Optional[List[str]] = None """Custom claims""" @@ -900,7 +899,7 @@ class IdentityProviderListResponseItemAccessOneloginConfig(BaseModel): """Your OneLogin account url""" -class IdentityProviderListResponseItemAccessOneloginScimConfig(BaseModel): +class AccessOneloginScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -932,8 +931,8 @@ class IdentityProviderListResponseItemAccessOneloginScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessOnelogin(BaseModel): - config: IdentityProviderListResponseItemAccessOneloginConfig +class AccessOnelogin(BaseModel): + config: AccessOneloginConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -968,14 +967,14 @@ class IdentityProviderListResponseItemAccessOnelogin(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessOneloginScimConfig] = None + scim_config: Optional[AccessOneloginScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessPingoneConfig(BaseModel): +class AccessPingoneConfig(BaseModel): claims: Optional[List[str]] = None """Custom claims""" @@ -992,7 +991,7 @@ class IdentityProviderListResponseItemAccessPingoneConfig(BaseModel): """Your PingOne environment identifier""" -class IdentityProviderListResponseItemAccessPingoneScimConfig(BaseModel): +class AccessPingoneScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -1024,8 +1023,8 @@ class IdentityProviderListResponseItemAccessPingoneScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessPingone(BaseModel): - config: IdentityProviderListResponseItemAccessPingoneConfig +class AccessPingone(BaseModel): + config: AccessPingoneConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -1060,14 +1059,14 @@ class IdentityProviderListResponseItemAccessPingone(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessPingoneScimConfig] = None + scim_config: Optional[AccessPingoneScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessSamlConfigHeaderAttribute(BaseModel): +class AccessSamlConfigHeaderAttribute(BaseModel): attribute_name: Optional[str] = None """attribute name from the IDP""" @@ -1075,7 +1074,7 @@ class IdentityProviderListResponseItemAccessSamlConfigHeaderAttribute(BaseModel) """header that will be added on the request to the origin""" -class IdentityProviderListResponseItemAccessSamlConfig(BaseModel): +class AccessSamlConfig(BaseModel): attributes: Optional[List[str]] = None """ A list of SAML attribute names that will be added to your signed JWT token and @@ -1085,7 +1084,7 @@ class IdentityProviderListResponseItemAccessSamlConfig(BaseModel): email_attribute_name: Optional[str] = None """The attribute name for email in the SAML response.""" - header_attributes: Optional[List[IdentityProviderListResponseItemAccessSamlConfigHeaderAttribute]] = None + header_attributes: Optional[List[AccessSamlConfigHeaderAttribute]] = None """ Add a list of attribute names that will be returned in the response header from the Access callback. @@ -1107,7 +1106,7 @@ class IdentityProviderListResponseItemAccessSamlConfig(BaseModel): """URL to send the SAML authentication requests to""" -class IdentityProviderListResponseItemAccessSamlScimConfig(BaseModel): +class AccessSamlScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -1139,8 +1138,8 @@ class IdentityProviderListResponseItemAccessSamlScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessSaml(BaseModel): - config: IdentityProviderListResponseItemAccessSamlConfig +class AccessSaml(BaseModel): + config: AccessSamlConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -1175,14 +1174,14 @@ class IdentityProviderListResponseItemAccessSaml(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessSamlScimConfig] = None + scim_config: Optional[AccessSamlScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -class IdentityProviderListResponseItemAccessYandexConfig(BaseModel): +class AccessYandexConfig(BaseModel): client_id: Optional[str] = None """Your OAuth Client ID""" @@ -1190,7 +1189,7 @@ class IdentityProviderListResponseItemAccessYandexConfig(BaseModel): """Your OAuth Client Secret""" -class IdentityProviderListResponseItemAccessYandexScimConfig(BaseModel): +class AccessYandexScimConfig(BaseModel): enabled: Optional[bool] = None """A flag to enable or disable SCIM for the identity provider.""" @@ -1222,8 +1221,8 @@ class IdentityProviderListResponseItemAccessYandexScimConfig(BaseModel): """ -class IdentityProviderListResponseItemAccessYandex(BaseModel): - config: IdentityProviderListResponseItemAccessYandexConfig +class AccessYandex(BaseModel): + config: AccessYandexConfig """The configuration parameters for the identity provider. To view the required parameters for a specific provider, refer to our @@ -1258,27 +1257,25 @@ class IdentityProviderListResponseItemAccessYandex(BaseModel): id: Optional[str] = None """UUID""" - scim_config: Optional[IdentityProviderListResponseItemAccessYandexScimConfig] = None + scim_config: Optional[AccessYandexScimConfig] = None """ The configuration settings for enabling a System for Cross-Domain Identity Management (SCIM) with the identity provider. """ -IdentityProviderListResponseItem = Union[ - IdentityProviderListResponseItemAccessAzureAd, - IdentityProviderListResponseItemAccessCentrify, - IdentityProviderListResponseItemAccessFacebook, - IdentityProviderListResponseItemAccessGitHub, - IdentityProviderListResponseItemAccessGoogle, - IdentityProviderListResponseItemAccessGoogleApps, - IdentityProviderListResponseItemAccessLinkedin, - IdentityProviderListResponseItemAccessOidc, - IdentityProviderListResponseItemAccessOkta, - IdentityProviderListResponseItemAccessOnelogin, - IdentityProviderListResponseItemAccessPingone, - IdentityProviderListResponseItemAccessSaml, - IdentityProviderListResponseItemAccessYandex, +IdentityProviderListResponse = Union[ + AccessAzureAd, + AccessCentrify, + AccessFacebook, + AccessGitHub, + AccessGoogle, + AccessGoogleApps, + AccessLinkedin, + AccessOidc, + AccessOkta, + AccessOnelogin, + AccessPingone, + AccessSaml, + AccessYandex, ] - -IdentityProviderListResponse = List[IdentityProviderListResponseItem] diff --git a/src/cloudflare/types/zero_trust/networks/__init__.py b/src/cloudflare/types/zero_trust/networks/__init__.py index cb21ec98a51..09faf7e0596 100644 --- a/src/cloudflare/types/zero_trust/networks/__init__.py +++ b/src/cloudflare/types/zero_trust/networks/__init__.py @@ -12,6 +12,5 @@ from .virtual_network_list_params import VirtualNetworkListParams as VirtualNetworkListParams from .virtual_network_create_params import VirtualNetworkCreateParams as VirtualNetworkCreateParams from .virtual_network_edit_response import VirtualNetworkEditResponse as VirtualNetworkEditResponse -from .virtual_network_list_response import VirtualNetworkListResponse as VirtualNetworkListResponse from .virtual_network_create_response import VirtualNetworkCreateResponse as VirtualNetworkCreateResponse from .virtual_network_delete_response import VirtualNetworkDeleteResponse as VirtualNetworkDeleteResponse diff --git a/src/cloudflare/types/zero_trust/networks/virtual_network_list_response.py b/src/cloudflare/types/zero_trust/networks/virtual_network_list_response.py deleted file mode 100644 index c0f9137a410..00000000000 --- a/src/cloudflare/types/zero_trust/networks/virtual_network_list_response.py +++ /dev/null @@ -1,9 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .tunnel_virtual_network import TunnelVirtualNetwork - -__all__ = ["VirtualNetworkListResponse"] - -VirtualNetworkListResponse = List[TunnelVirtualNetwork] diff --git a/src/cloudflare/types/zones/subscription_list_response.py b/src/cloudflare/types/zones/subscription_list_response.py index 347713570d5..7ba0172a53f 100644 --- a/src/cloudflare/types/zones/subscription_list_response.py +++ b/src/cloudflare/types/zones/subscription_list_response.py @@ -6,22 +6,15 @@ from ..._models import BaseModel -__all__ = [ - "SubscriptionListResponse", - "SubscriptionListResponseItem", - "SubscriptionListResponseItemApp", - "SubscriptionListResponseItemComponentValue", - "SubscriptionListResponseItemRatePlan", - "SubscriptionListResponseItemZone", -] +__all__ = ["SubscriptionListResponse", "App", "ComponentValue", "RatePlan", "Zone"] -class SubscriptionListResponseItemApp(BaseModel): +class App(BaseModel): install_id: Optional[str] = None """app install id.""" -class SubscriptionListResponseItemComponentValue(BaseModel): +class ComponentValue(BaseModel): default: Optional[float] = None """The default amount assigned.""" @@ -35,7 +28,7 @@ class SubscriptionListResponseItemComponentValue(BaseModel): """The amount of the component value assigned.""" -class SubscriptionListResponseItemRatePlan(BaseModel): +class RatePlan(BaseModel): id: Optional[str] = None """The ID of the rate plan.""" @@ -58,7 +51,7 @@ class SubscriptionListResponseItemRatePlan(BaseModel): """The list of sets this rate plan applies to.""" -class SubscriptionListResponseItemZone(BaseModel): +class Zone(BaseModel): id: Optional[str] = None """Identifier""" @@ -66,13 +59,13 @@ class SubscriptionListResponseItemZone(BaseModel): """The domain name""" -class SubscriptionListResponseItem(BaseModel): +class SubscriptionListResponse(BaseModel): id: Optional[str] = None """Subscription identifier tag.""" - app: Optional[SubscriptionListResponseItemApp] = None + app: Optional[App] = None - component_values: Optional[List[SubscriptionListResponseItemComponentValue]] = None + component_values: Optional[List[ComponentValue]] = None """The list of add-ons subscribed to.""" currency: Optional[str] = None @@ -93,14 +86,11 @@ class SubscriptionListResponseItem(BaseModel): price: Optional[float] = None """The price of the subscription that will be billed, in US dollars.""" - rate_plan: Optional[SubscriptionListResponseItemRatePlan] = None + rate_plan: Optional[RatePlan] = None """The rate plan applied to the subscription.""" state: Optional[Literal["Trial", "Provisioned", "Paid", "AwaitingPayment", "Cancelled", "Failed", "Expired"]] = None """The state that the subscription is in.""" - zone: Optional[SubscriptionListResponseItemZone] = None + zone: Optional[Zone] = None """A simple zone object. May have null properties if not a zone subscription.""" - - -SubscriptionListResponse = List[SubscriptionListResponseItem] diff --git a/tests/api_resources/accounts/test_roles.py b/tests/api_resources/accounts/test_roles.py index 2d8a3fd00a6..53121acc6ff 100644 --- a/tests/api_resources/accounts/test_roles.py +++ b/tests/api_resources/accounts/test_roles.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.accounts import RoleGetResponse, RoleListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.accounts import Role, RoleGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: role = client.accounts.roles.list( account_id={}, ) - assert_matches_type(Optional[RoleListResponse], role, path=["response"]) + assert_matches_type(SyncSinglePage[Role], role, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" role = response.parse() - assert_matches_type(Optional[RoleListResponse], role, path=["response"]) + assert_matches_type(SyncSinglePage[Role], role, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" role = response.parse() - assert_matches_type(Optional[RoleListResponse], role, path=["response"]) + assert_matches_type(SyncSinglePage[Role], role, path=["response"]) assert cast(Any, response.is_closed) is True @@ -98,7 +99,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: role = await async_client.accounts.roles.list( account_id={}, ) - assert_matches_type(Optional[RoleListResponse], role, path=["response"]) + assert_matches_type(AsyncSinglePage[Role], role, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +111,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" role = await response.parse() - assert_matches_type(Optional[RoleListResponse], role, path=["response"]) + assert_matches_type(AsyncSinglePage[Role], role, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +123,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" role = await response.parse() - assert_matches_type(Optional[RoleListResponse], role, path=["response"]) + assert_matches_type(AsyncSinglePage[Role], role, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py index 7420ef870fd..d73e8c6eb13 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_bindings.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_bindings.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.addressing.prefixes.bgp import ( - BindingListResponse, BindingDeleteResponse, AddressingServiceBinding, ) @@ -91,7 +91,7 @@ def test_method_list(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BindingListResponse, binding, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingServiceBinding], binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -104,7 +104,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" binding = response.parse() - assert_matches_type(BindingListResponse, binding, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingServiceBinding], binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +117,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = response.parse() - assert_matches_type(BindingListResponse, binding, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingServiceBinding], binding, path=["response"]) assert cast(Any, response.is_closed) is True @@ -338,7 +338,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(BindingListResponse, binding, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingServiceBinding], binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -351,7 +351,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" binding = await response.parse() - assert_matches_type(BindingListResponse, binding, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingServiceBinding], binding, path=["response"]) @pytest.mark.skip() @parametrize @@ -364,7 +364,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" binding = await response.parse() - assert_matches_type(BindingListResponse, binding, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingServiceBinding], binding, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py index 6aed448b745..48beb73c29d 100644 --- a/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py +++ b/tests/api_resources/addressing/prefixes/bgp/test_prefixes.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.addressing.prefixes.bgp import PrefixListResponse, AddressingIpamBGPPrefixes +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.addressing.prefixes.bgp import AddressingIpamBGPPrefixes base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamBGPPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +38,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" prefix = response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamBGPPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +51,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamBGPPrefixes], prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -219,7 +220,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamBGPPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +233,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" prefix = await response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamBGPPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -245,7 +246,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamBGPPrefixes], prefix, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/addressing/prefixes/test_delegations.py b/tests/api_resources/addressing/prefixes/test_delegations.py index 802f8cdf07a..a915d91accc 100644 --- a/tests/api_resources/addressing/prefixes/test_delegations.py +++ b/tests/api_resources/addressing/prefixes/test_delegations.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.addressing.prefixes import ( - DelegationListResponse, DelegationDeleteResponse, AddressingIpamDelegations, ) @@ -90,7 +90,7 @@ def test_method_list(self, client: Cloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DelegationListResponse], delegation, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamDelegations], delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -103,7 +103,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" delegation = response.parse() - assert_matches_type(Optional[DelegationListResponse], delegation, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamDelegations], delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -116,7 +116,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" delegation = response.parse() - assert_matches_type(Optional[DelegationListResponse], delegation, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamDelegations], delegation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -272,7 +272,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "023e105f4ecef8ad9ca31a8372d0c353", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DelegationListResponse], delegation, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamDelegations], delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -285,7 +285,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" delegation = await response.parse() - assert_matches_type(Optional[DelegationListResponse], delegation, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamDelegations], delegation, path=["response"]) @pytest.mark.skip() @parametrize @@ -298,7 +298,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" delegation = await response.parse() - assert_matches_type(Optional[DelegationListResponse], delegation, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamDelegations], delegation, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/addressing/test_address_maps.py b/tests/api_resources/addressing/test_address_maps.py index df1b21e2e9c..d45b35475fd 100644 --- a/tests/api_resources/addressing/test_address_maps.py +++ b/tests/api_resources/addressing/test_address_maps.py @@ -9,10 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.addressing import ( AddressingAddressMaps, AddressMapGetResponse, - AddressMapListResponse, AddressMapCreateResponse, AddressMapDeleteResponse, ) @@ -81,7 +81,7 @@ def test_method_list(self, client: Cloudflare) -> None: address_map = client.addressing.address_maps.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AddressMapListResponse], address_map, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingAddressMaps], address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,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" address_map = response.parse() - assert_matches_type(Optional[AddressMapListResponse], address_map, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingAddressMaps], address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" address_map = response.parse() - assert_matches_type(Optional[AddressMapListResponse], address_map, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingAddressMaps], address_map, path=["response"]) assert cast(Any, response.is_closed) is True @@ -347,7 +347,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: address_map = await async_client.addressing.address_maps.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AddressMapListResponse], address_map, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingAddressMaps], address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -359,7 +359,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" address_map = await response.parse() - assert_matches_type(Optional[AddressMapListResponse], address_map, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingAddressMaps], address_map, path=["response"]) @pytest.mark.skip() @parametrize @@ -371,7 +371,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" address_map = await response.parse() - assert_matches_type(Optional[AddressMapListResponse], address_map, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingAddressMaps], address_map, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/addressing/test_prefixes.py b/tests/api_resources/addressing/test_prefixes.py index 1868c45271f..a77715e5a73 100644 --- a/tests/api_resources/addressing/test_prefixes.py +++ b/tests/api_resources/addressing/test_prefixes.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.addressing import ( - PrefixListResponse, PrefixDeleteResponse, AddressingIpamPrefixes, ) @@ -81,7 +81,7 @@ def test_method_list(self, client: Cloudflare) -> None: prefix = client.addressing.prefixes.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +93,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" prefix = response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +105,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(SyncSinglePage[AddressingIpamPrefixes], prefix, path=["response"]) assert cast(Any, response.is_closed) is True @@ -342,7 +342,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: prefix = await async_client.addressing.prefixes.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -354,7 +354,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" prefix = await response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamPrefixes], prefix, path=["response"]) @pytest.mark.skip() @parametrize @@ -366,7 +366,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" prefix = await response.parse() - assert_matches_type(Optional[PrefixListResponse], prefix, path=["response"]) + assert_matches_type(AsyncSinglePage[AddressingIpamPrefixes], prefix, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/addressing/test_services.py b/tests/api_resources/addressing/test_services.py index b9a5e22b345..bab9eef74b0 100644 --- a/tests/api_resources/addressing/test_services.py +++ b/tests/api_resources/addressing/test_services.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.addressing import ServiceListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: service = client.addressing.services.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ServiceListResponse, service, path=["response"]) + assert_matches_type(SyncSinglePage[ServiceListResponse], service, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" service = response.parse() - assert_matches_type(ServiceListResponse, service, path=["response"]) + assert_matches_type(SyncSinglePage[ServiceListResponse], service, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service = response.parse() - assert_matches_type(ServiceListResponse, service, path=["response"]) + assert_matches_type(SyncSinglePage[ServiceListResponse], service, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: service = await async_client.addressing.services.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ServiceListResponse, service, path=["response"]) + assert_matches_type(AsyncSinglePage[ServiceListResponse], service, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" service = await response.parse() - assert_matches_type(ServiceListResponse, service, path=["response"]) + assert_matches_type(AsyncSinglePage[ServiceListResponse], service, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" service = await response.parse() - assert_matches_type(ServiceListResponse, service, path=["response"]) + assert_matches_type(AsyncSinglePage[ServiceListResponse], service, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/destinations/test_webhooks.py b/tests/api_resources/alerting/destinations/test_webhooks.py index e6875cc2835..315b3c36ea4 100644 --- a/tests/api_resources/alerting/destinations/test_webhooks.py +++ b/tests/api_resources/alerting/destinations/test_webhooks.py @@ -9,9 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.alerting.destinations import ( AlertingWebhooks, - WebhookListResponse, WebhookCreateResponse, WebhookDeleteResponse, WebhookUpdateResponse, @@ -164,7 +164,7 @@ def test_method_list(self, client: Cloudflare) -> None: webhook = client.alerting.destinations.webhooks.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"]) + assert_matches_type(SyncSinglePage[AlertingWebhooks], webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +176,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" webhook = response.parse() - assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"]) + assert_matches_type(SyncSinglePage[AlertingWebhooks], webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -188,7 +188,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = response.parse() - assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"]) + assert_matches_type(SyncSinglePage[AlertingWebhooks], webhook, path=["response"]) assert cast(Any, response.is_closed) is True @@ -449,7 +449,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: webhook = await async_client.alerting.destinations.webhooks.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"]) + assert_matches_type(AsyncSinglePage[AlertingWebhooks], webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +461,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" webhook = await response.parse() - assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"]) + assert_matches_type(AsyncSinglePage[AlertingWebhooks], webhook, path=["response"]) @pytest.mark.skip() @parametrize @@ -473,7 +473,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" webhook = await response.parse() - assert_matches_type(Optional[WebhookListResponse], webhook, path=["response"]) + assert_matches_type(AsyncSinglePage[AlertingWebhooks], webhook, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/alerting/test_policies.py b/tests/api_resources/alerting/test_policies.py index a186b043a67..3668367e996 100644 --- a/tests/api_resources/alerting/test_policies.py +++ b/tests/api_resources/alerting/test_policies.py @@ -9,9 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.alerting import ( AlertingPolicies, - PolicyListResponse, PolicyCreateResponse, PolicyDeleteResponse, PolicyUpdateResponse, @@ -274,7 +274,7 @@ def test_method_list(self, client: Cloudflare) -> None: policy = client.alerting.policies.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[AlertingPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -286,7 +286,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" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[AlertingPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -298,7 +298,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[AlertingPolicies], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -669,7 +669,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.alerting.policies.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[AlertingPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -681,7 +681,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" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[AlertingPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -693,7 +693,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[AlertingPolicies], policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/durable_objects/test_namespaces.py b/tests/api_resources/durable_objects/test_namespaces.py index c2fabb9447c..75327428664 100644 --- a/tests/api_resources/durable_objects/test_namespaces.py +++ b/tests/api_resources/durable_objects/test_namespaces.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.durable_objects import NamespaceListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.durable_objects import DurableObjectNamespace base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: namespace = client.durable_objects.namespaces.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncSinglePage[DurableObjectNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" namespace = response.parse() - assert_matches_type(Optional[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncSinglePage[DurableObjectNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = response.parse() - assert_matches_type(Optional[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(SyncSinglePage[DurableObjectNamespace], namespace, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.durable_objects.namespaces.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncSinglePage[DurableObjectNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" namespace = await response.parse() - assert_matches_type(Optional[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncSinglePage[DurableObjectNamespace], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = await response.parse() - assert_matches_type(Optional[NamespaceListResponse], namespace, path=["response"]) + assert_matches_type(AsyncSinglePage[DurableObjectNamespace], namespace, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/hyperdrive/test_configs.py b/tests/api_resources/hyperdrive/test_configs.py index 00fe83e9b0a..5871ea95f2f 100644 --- a/tests/api_resources/hyperdrive/test_configs.py +++ b/tests/api_resources/hyperdrive/test_configs.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.hyperdrive import ( ConfigGetResponse, ConfigEditResponse, @@ -133,7 +134,7 @@ def test_method_list(self, client: Cloudflare) -> None: config = client.hyperdrive.configs.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ConfigListResponse, config, path=["response"]) + assert_matches_type(SyncSinglePage[ConfigListResponse], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +146,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" config = response.parse() - assert_matches_type(ConfigListResponse, config, path=["response"]) + assert_matches_type(SyncSinglePage[ConfigListResponse], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +158,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = response.parse() - assert_matches_type(ConfigListResponse, config, path=["response"]) + assert_matches_type(SyncSinglePage[ConfigListResponse], config, path=["response"]) assert cast(Any, response.is_closed) is True @@ -448,7 +449,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: config = await async_client.hyperdrive.configs.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ConfigListResponse, config, path=["response"]) + assert_matches_type(AsyncSinglePage[ConfigListResponse], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -460,7 +461,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" config = await response.parse() - assert_matches_type(ConfigListResponse, config, path=["response"]) + assert_matches_type(AsyncSinglePage[ConfigListResponse], config, path=["response"]) @pytest.mark.skip() @parametrize @@ -472,7 +473,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" config = await response.parse() - assert_matches_type(ConfigListResponse, config, path=["response"]) + assert_matches_type(AsyncSinglePage[ConfigListResponse], config, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/test_indicator_feeds.py b/tests/api_resources/intel/test_indicator_feeds.py index ad28b0440fe..956f15c0233 100644 --- a/tests/api_resources/intel/test_indicator_feeds.py +++ b/tests/api_resources/intel/test_indicator_feeds.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.intel import ( IndicatorFeedGetResponse, IndicatorFeedListResponse, @@ -136,7 +137,7 @@ def test_method_list(self, client: Cloudflare) -> None: indicator_feed = client.intel.indicator_feeds.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedListResponse, indicator_feed, path=["response"]) + assert_matches_type(SyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +149,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" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedListResponse, indicator_feed, path=["response"]) + assert_matches_type(SyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -160,7 +161,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = response.parse() - assert_matches_type(IndicatorFeedListResponse, indicator_feed, path=["response"]) + assert_matches_type(SyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True @@ -382,7 +383,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: indicator_feed = await async_client.intel.indicator_feeds.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndicatorFeedListResponse, indicator_feed, path=["response"]) + assert_matches_type(AsyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -394,7 +395,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" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedListResponse, indicator_feed, path=["response"]) + assert_matches_type(AsyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,7 +407,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" indicator_feed = await response.parse() - assert_matches_type(IndicatorFeedListResponse, indicator_feed, path=["response"]) + assert_matches_type(AsyncSinglePage[IndicatorFeedListResponse], indicator_feed, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intel/test_sinkholes.py b/tests/api_resources/intel/test_sinkholes.py index 21f61ff3a9b..7486df7c274 100644 --- a/tests/api_resources/intel/test_sinkholes.py +++ b/tests/api_resources/intel/test_sinkholes.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.intel import SinkholeListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.intel import IntelSinkholeItem base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: sinkhole = client.intel.sinkholes.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SinkholeListResponse, sinkhole, path=["response"]) + assert_matches_type(SyncSinglePage[IntelSinkholeItem], sinkhole, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" sinkhole = response.parse() - assert_matches_type(SinkholeListResponse, sinkhole, path=["response"]) + assert_matches_type(SyncSinglePage[IntelSinkholeItem], sinkhole, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" sinkhole = response.parse() - assert_matches_type(SinkholeListResponse, sinkhole, path=["response"]) + assert_matches_type(SyncSinglePage[IntelSinkholeItem], sinkhole, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: sinkhole = await async_client.intel.sinkholes.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SinkholeListResponse, sinkhole, path=["response"]) + assert_matches_type(AsyncSinglePage[IntelSinkholeItem], sinkhole, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" sinkhole = await response.parse() - assert_matches_type(SinkholeListResponse, sinkhole, path=["response"]) + assert_matches_type(AsyncSinglePage[IntelSinkholeItem], sinkhole, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" sinkhole = await response.parse() - assert_matches_type(SinkholeListResponse, sinkhole, path=["response"]) + assert_matches_type(AsyncSinglePage[IntelSinkholeItem], sinkhole, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/load_balancers/test_monitors.py b/tests/api_resources/load_balancers/test_monitors.py index 0e3f9490ccd..3fb7491a8c8 100644 --- a/tests/api_resources/load_balancers/test_monitors.py +++ b/tests/api_resources/load_balancers/test_monitors.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.load_balancers import ( - MonitorListResponse, MonitorDeleteResponse, ) from cloudflare.types.user.load_balancers import LoadBalancingMonitor @@ -185,7 +185,7 @@ def test_method_list(self, client: Cloudflare) -> None: monitor = client.load_balancers.monitors.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -197,7 +197,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" monitor = response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -209,7 +209,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -578,7 +578,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.load_balancers.monitors.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -590,7 +590,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" monitor = await response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -602,7 +602,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/load_balancers/test_pools.py b/tests/api_resources/load_balancers/test_pools.py index 1f7bc7482ee..ee970e0cc7e 100644 --- a/tests/api_resources/load_balancers/test_pools.py +++ b/tests/api_resources/load_balancers/test_pools.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.load_balancers import ( - PoolListResponse, PoolDeleteResponse, ) from cloudflare.types.user.load_balancers import LoadBalancingPool @@ -259,7 +259,7 @@ def test_method_list(self, client: Cloudflare) -> None: pool = client.load_balancers.pools.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -268,7 +268,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", monitor={}, ) - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -280,7 +280,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" pool = response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -292,7 +292,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -763,7 +763,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: pool = await async_client.load_balancers.pools.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -772,7 +772,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="023e105f4ecef8ad9ca31a8372d0c353", monitor={}, ) - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -784,7 +784,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" pool = await response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -796,7 +796,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/logpush/test_jobs.py b/tests/api_resources/logpush/test_jobs.py index d0d382b8fe1..a8239d273d1 100644 --- a/tests/api_resources/logpush/test_jobs.py +++ b/tests/api_resources/logpush/test_jobs.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.logpush import JobListResponse, JobDeleteResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.logpush import JobDeleteResponse from cloudflare.types.logpush.datasets import LogpushJob base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -198,7 +199,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -207,7 +208,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -220,7 +221,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" job = response.parse() - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +234,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = response.parse() - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[LogpushJob]], job, path=["response"]) assert cast(Any, response.is_closed) is True @@ -570,7 +571,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -579,7 +580,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -592,7 +593,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" job = await response.parse() - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) @pytest.mark.skip() @parametrize @@ -605,7 +606,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" job = await response.parse() - assert_matches_type(JobListResponse, job, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[LogpushJob]], job, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/magic_network_monitoring/test_rules.py b/tests/api_resources/magic_network_monitoring/test_rules.py index fde54d8a3f9..f5002da51fa 100644 --- a/tests/api_resources/magic_network_monitoring/test_rules.py +++ b/tests/api_resources/magic_network_monitoring/test_rules.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.magic_network_monitoring import RuleListResponse, MagicNetworkMonitoringRule +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.magic_network_monitoring import MagicNetworkMonitoringRule base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -107,7 +108,7 @@ def test_method_list(self, client: Cloudflare) -> None: rule = client.magic_network_monitoring.rules.list( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -119,7 +120,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -131,7 +132,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -393,7 +394,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.magic_network_monitoring.rules.list( account_id="6f91088a406011ed95aed352566e8d4c", ) - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -405,7 +406,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,7 +418,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py index e4b70f13e45..dbbd7ee9e78 100644 --- a/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py +++ b/tests/api_resources/origin_tls_client_auth/hostnames/test_certificates.py @@ -3,16 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.origin_tls_client_auth.hostnames import ( - CertificateListResponse, - OriginTLSClientCertificate, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.origin_tls_client_auth import OriginTLSClientCertificateID +from cloudflare.types.origin_tls_client_auth.hostnames import OriginTLSClientCertificate base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -76,7 +75,7 @@ def test_method_list(self, client: Cloudflare) -> None: certificate = client.origin_tls_client_auth.hostnames.certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[OriginTLSClientCertificateID], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -88,7 +87,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" certificate = response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[OriginTLSClientCertificateID], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +99,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[OriginTLSClientCertificateID], certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -276,7 +275,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate = await async_client.origin_tls_client_auth.hostnames.certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginTLSClientCertificateID], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -288,7 +287,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" certificate = await response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginTLSClientCertificateID], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -300,7 +299,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginTLSClientCertificateID], certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/page_shield/test_connections.py b/tests/api_resources/page_shield/test_connections.py index e77a8cb74ae..bf65f2d82ac 100644 --- a/tests/api_resources/page_shield/test_connections.py +++ b/tests/api_resources/page_shield/test_connections.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.page_shield import PageShieldConnection, ConnectionListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.page_shield import PageShieldConnection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: connection = client.page_shield.connections.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldConnection], connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -43,7 +44,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: status="active,inactive", urls="blog.cloudflare.com,www.example", ) - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldConnection], connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -55,7 +56,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" connection = response.parse() - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldConnection], connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -67,7 +68,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" connection = response.parse() - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldConnection], connection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -141,7 +142,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: connection = await async_client.page_shield.connections.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldConnection], connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +162,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) status="active,inactive", urls="blog.cloudflare.com,www.example", ) - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldConnection], connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +174,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" connection = await response.parse() - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldConnection], connection, path=["response"]) @pytest.mark.skip() @parametrize @@ -185,7 +186,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" connection = await response.parse() - assert_matches_type(Optional[ConnectionListResponse], connection, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldConnection], connection, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/page_shield/test_policies.py b/tests/api_resources/page_shield/test_policies.py index c531d102cdf..6a3a5dc7153 100644 --- a/tests/api_resources/page_shield/test_policies.py +++ b/tests/api_resources/page_shield/test_policies.py @@ -3,16 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.page_shield import ( - PageShieldPolicy, - PolicyListResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.page_shield import PageShieldPolicy base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -147,7 +145,7 @@ def test_method_list(self, client: Cloudflare) -> None: policy = client.page_shield.policies.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +157,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +169,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -418,7 +416,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.page_shield.policies.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -430,7 +428,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" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -442,7 +440,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/page_shield/test_scripts.py b/tests/api_resources/page_shield/test_scripts.py index 5fc356d87af..832d6445cf0 100644 --- a/tests/api_resources/page_shield/test_scripts.py +++ b/tests/api_resources/page_shield/test_scripts.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.page_shield import ScriptGetResponse, ScriptListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.page_shield import PageShieldScript, ScriptGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: script = client.page_shield.scripts.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -44,7 +45,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: status="active,inactive", urls="blog.cloudflare.com,www.example", ) - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +57,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" script = response.parse() - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -68,7 +69,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(SyncSinglePage[PageShieldScript], script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -142,7 +143,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: script = await async_client.page_shield.scripts.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -163,7 +164,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) status="active,inactive", urls="blog.cloudflare.com,www.example", ) - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -175,7 +176,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" script = await response.parse() - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +188,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(Optional[ScriptListResponse], script, path=["response"]) + assert_matches_type(AsyncSinglePage[PageShieldScript], script, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/pages/projects/test_deployments.py b/tests/api_resources/pages/projects/test_deployments.py index e883433ddd1..8cfb0f16fbe 100644 --- a/tests/api_resources/pages/projects/test_deployments.py +++ b/tests/api_resources/pages/projects/test_deployments.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.pages import PagesDeployments -from cloudflare.types.pages.projects import DeploymentListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -87,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +97,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="023e105f4ecef8ad9ca31a8372d0c353", env="preview", ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +110,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" deployment = response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +123,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], deployment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -471,7 +471,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -481,7 +481,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="023e105f4ecef8ad9ca31a8372d0c353", env="preview", ) - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -494,7 +494,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" deployment = await response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"]) @pytest.mark.skip() @parametrize @@ -507,7 +507,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" deployment = await response.parse() - assert_matches_type(DeploymentListResponse, deployment, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], deployment, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/pages/projects/test_domains.py b/tests/api_resources/pages/projects/test_domains.py index c8d6157ad1c..2bd272a95f0 100644 --- a/tests/api_resources/pages/projects/test_domains.py +++ b/tests/api_resources/pages/projects/test_domains.py @@ -9,10 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.pages.projects import ( DomainGetResponse, DomainEditResponse, - DomainListResponse, DomainCreateResponse, ) @@ -86,7 +86,7 @@ def test_method_list(self, client: Cloudflare) -> None: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[object], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +99,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" domain = response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[object], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +112,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[object], domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -391,7 +391,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "this-is-my-project-01", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -404,7 +404,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" domain = await response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,7 +417,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[object], domain, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/pages/test_projects.py b/tests/api_resources/pages/test_projects.py index 1a4093fbd97..cb7cb108582 100644 --- a/tests/api_resources/pages/test_projects.py +++ b/tests/api_resources/pages/test_projects.py @@ -9,10 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.pages import ( PagesProjects, + PagesDeployments, ProjectEditResponse, - ProjectListResponse, ProjectCreateResponse, ) @@ -150,7 +151,7 @@ def test_method_list(self, client: Cloudflare) -> None: project = client.pages.projects.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ProjectListResponse, project, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], project, path=["response"]) @pytest.mark.skip() @parametrize @@ -162,7 +163,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" project = response.parse() - assert_matches_type(ProjectListResponse, project, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], project, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +175,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" project = response.parse() - assert_matches_type(ProjectListResponse, project, path=["response"]) + assert_matches_type(SyncSinglePage[PagesDeployments], project, path=["response"]) assert cast(Any, response.is_closed) is True @@ -606,7 +607,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: project = await async_client.pages.projects.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ProjectListResponse, project, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], project, path=["response"]) @pytest.mark.skip() @parametrize @@ -618,7 +619,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" project = await response.parse() - assert_matches_type(ProjectListResponse, project, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], project, path=["response"]) @pytest.mark.skip() @parametrize @@ -630,7 +631,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" project = await response.parse() - assert_matches_type(ProjectListResponse, project, path=["response"]) + assert_matches_type(AsyncSinglePage[PagesDeployments], project, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/registrar/test_domains.py b/tests/api_resources/registrar/test_domains.py index cac1d01a8e6..69435a7178b 100644 --- a/tests/api_resources/registrar/test_domains.py +++ b/tests/api_resources/registrar/test_domains.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.registrar import DomainGetResponse, DomainListResponse, DomainUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -87,7 +88,7 @@ def test_method_list(self, client: Cloudflare) -> None: domain = client.registrar.domains.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DomainListResponse], domain, path=["response"]) + assert_matches_type(SyncSinglePage[DomainListResponse], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -99,7 +100,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" domain = response.parse() - assert_matches_type(Optional[DomainListResponse], domain, path=["response"]) + assert_matches_type(SyncSinglePage[DomainListResponse], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -111,7 +112,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(Optional[DomainListResponse], domain, path=["response"]) + assert_matches_type(SyncSinglePage[DomainListResponse], domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -249,7 +250,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.registrar.domains.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[DomainListResponse], domain, path=["response"]) + assert_matches_type(AsyncSinglePage[DomainListResponse], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -261,7 +262,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" domain = await response.parse() - assert_matches_type(Optional[DomainListResponse], domain, path=["response"]) + assert_matches_type(AsyncSinglePage[DomainListResponse], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +274,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(Optional[DomainListResponse], domain, path=["response"]) + assert_matches_type(AsyncSinglePage[DomainListResponse], domain, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rules/test_lists.py b/tests/api_resources/rules/test_lists.py index 022c7dd705b..a3284737579 100644 --- a/tests/api_resources/rules/test_lists.py +++ b/tests/api_resources/rules/test_lists.py @@ -9,11 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.rules import ( - ListsList, - ListListResponse, - ListDeleteResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.rules import ListsList, ListDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -150,7 +147,7 @@ def test_method_list(self, client: Cloudflare) -> None: list = client.rules.lists.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -162,7 +159,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" list = response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +171,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(SyncSinglePage[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -423,7 +420,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: list = await async_client.rules.lists.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +432,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" list = await response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -447,7 +444,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ListsList], list, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index d8972f5554d..796957cd2b1 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -9,7 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse +from cloudflare.types import RulesetsRulesetResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.rulesets.phases import VersionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +27,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +51,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" version = response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +65,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -177,7 +179,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -187,7 +189,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -201,7 +203,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" version = await response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -215,7 +217,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index 6372f99dab6..a8812cc8df4 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -9,7 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse +from cloudflare.types import RulesetsRulesetResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.rulesets import VersionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +27,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +51,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" version = response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +65,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(SyncSinglePage[VersionListResponse], version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -281,7 +283,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +293,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -305,7 +307,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" version = await response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) @pytest.mark.skip() @parametrize @@ -319,7 +321,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(RulesetsRulesetsResponse, version, path=["response"]) + assert_matches_type(AsyncSinglePage[VersionListResponse], version, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/secondary_dns/test_acls.py b/tests/api_resources/secondary_dns/test_acls.py index 50e534495c7..81e4b8297c0 100644 --- a/tests/api_resources/secondary_dns/test_acls.py +++ b/tests/api_resources/secondary_dns/test_acls.py @@ -3,17 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.secondary_dns import ( - ACLListResponse, - SecondaryDNSACL, - ACLDeleteResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.secondary_dns import SecondaryDNSACL, ACLDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -135,7 +132,7 @@ def test_method_list(self, client: Cloudflare) -> None: acl = client.secondary_dns.acls.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(Optional[ACLListResponse], acl, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSACL], acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -147,7 +144,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" acl = response.parse() - assert_matches_type(Optional[ACLListResponse], acl, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSACL], acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +156,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = response.parse() - assert_matches_type(Optional[ACLListResponse], acl, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSACL], acl, path=["response"]) assert cast(Any, response.is_closed) is True @@ -393,7 +390,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: acl = await async_client.secondary_dns.acls.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(Optional[ACLListResponse], acl, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSACL], acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -405,7 +402,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" acl = await response.parse() - assert_matches_type(Optional[ACLListResponse], acl, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSACL], acl, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,7 +414,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" acl = await response.parse() - assert_matches_type(Optional[ACLListResponse], acl, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSACL], acl, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/secondary_dns/test_peers.py b/tests/api_resources/secondary_dns/test_peers.py index efbb8aeb073..ac16741dc7a 100644 --- a/tests/api_resources/secondary_dns/test_peers.py +++ b/tests/api_resources/secondary_dns/test_peers.py @@ -3,17 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.secondary_dns import ( - PeerListResponse, - SecondaryDNSPeer, - PeerDeleteResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.secondary_dns import SecondaryDNSPeer, PeerDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -144,7 +141,7 @@ def test_method_list(self, client: Cloudflare) -> None: peer = client.secondary_dns.peers.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(Optional[PeerListResponse], peer, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSPeer], peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +153,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" peer = response.parse() - assert_matches_type(Optional[PeerListResponse], peer, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSPeer], peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -168,7 +165,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = response.parse() - assert_matches_type(Optional[PeerListResponse], peer, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSPeer], peer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -411,7 +408,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: peer = await async_client.secondary_dns.peers.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(Optional[PeerListResponse], peer, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSPeer], peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +420,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" peer = await response.parse() - assert_matches_type(Optional[PeerListResponse], peer, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSPeer], peer, path=["response"]) @pytest.mark.skip() @parametrize @@ -435,7 +432,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" peer = await response.parse() - assert_matches_type(Optional[PeerListResponse], peer, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSPeer], peer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/secondary_dns/test_tsigs.py b/tests/api_resources/secondary_dns/test_tsigs.py index 51f0c9ba49c..b80d8acaf5e 100644 --- a/tests/api_resources/secondary_dns/test_tsigs.py +++ b/tests/api_resources/secondary_dns/test_tsigs.py @@ -3,17 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.secondary_dns import ( - SecondaryDNSTSIG, - TSIGListResponse, - TSIGDeleteResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.secondary_dns import SecondaryDNSTSIG, TSIGDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -148,7 +145,7 @@ def test_method_list(self, client: Cloudflare) -> None: tsig = client.secondary_dns.tsigs.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(Optional[TSIGListResponse], tsig, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSTSIG], tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -160,7 +157,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(Optional[TSIGListResponse], tsig, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSTSIG], tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -172,7 +169,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = response.parse() - assert_matches_type(Optional[TSIGListResponse], tsig, path=["response"]) + assert_matches_type(SyncSinglePage[SecondaryDNSTSIG], tsig, path=["response"]) assert cast(Any, response.is_closed) is True @@ -419,7 +416,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: tsig = await async_client.secondary_dns.tsigs.list( account_id="01a7362d577a6c3019a474fd6f485823", ) - assert_matches_type(Optional[TSIGListResponse], tsig, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSTSIG], tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -431,7 +428,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" tsig = await response.parse() - assert_matches_type(Optional[TSIGListResponse], tsig, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSTSIG], tsig, path=["response"]) @pytest.mark.skip() @parametrize @@ -443,7 +440,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" tsig = await response.parse() - assert_matches_type(Optional[TSIGListResponse], tsig, path=["response"]) + assert_matches_type(AsyncSinglePage[SecondaryDNSTSIG], tsig, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/snippets/test_rules.py b/tests/api_resources/snippets/test_rules.py index 7fcfdef7f29..83e10168142 100644 --- a/tests/api_resources/snippets/test_rules.py +++ b/tests/api_resources/snippets/test_rules.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.snippets import RuleListResponse, RuleUpdateResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -93,7 +94,7 @@ def test_method_list(self, client: Cloudflare) -> None: rule = client.snippets.rules.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RuleListResponse, rule, path=["response"]) + assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -105,7 +106,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleListResponse, rule, path=["response"]) + assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -117,7 +118,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RuleListResponse, rule, path=["response"]) + assert_matches_type(SyncSinglePage[RuleListResponse], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -209,7 +210,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.snippets.rules.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RuleListResponse, rule, path=["response"]) + assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -221,7 +222,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleListResponse, rule, path=["response"]) + assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -233,7 +234,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RuleListResponse, rule, path=["response"]) + assert_matches_type(AsyncSinglePage[RuleListResponse], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/speed/test_pages.py b/tests/api_resources/speed/test_pages.py index afc0ae668e6..cee5ec5833e 100644 --- a/tests/api_resources/speed/test_pages.py +++ b/tests/api_resources/speed/test_pages.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.speed import PageListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: page = client.speed.pages.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PageListResponse], page, path=["response"]) + assert_matches_type(SyncSinglePage[PageListResponse], page, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" page = response.parse() - assert_matches_type(Optional[PageListResponse], page, path=["response"]) + assert_matches_type(SyncSinglePage[PageListResponse], page, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" page = response.parse() - assert_matches_type(Optional[PageListResponse], page, path=["response"]) + assert_matches_type(SyncSinglePage[PageListResponse], page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: page = await async_client.speed.pages.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PageListResponse], page, path=["response"]) + assert_matches_type(AsyncSinglePage[PageListResponse], page, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" page = await response.parse() - assert_matches_type(Optional[PageListResponse], page, path=["response"]) + assert_matches_type(AsyncSinglePage[PageListResponse], page, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" page = await response.parse() - assert_matches_type(Optional[PageListResponse], page, path=["response"]) + assert_matches_type(AsyncSinglePage[PageListResponse], page, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/ssl/test_certificate_packs.py b/tests/api_resources/ssl/test_certificate_packs.py index 6f98b0454ec..20180cc88f5 100644 --- a/tests/api_resources/ssl/test_certificate_packs.py +++ b/tests/api_resources/ssl/test_certificate_packs.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -12,9 +12,9 @@ from cloudflare.types.ssl import ( CertificatePackGetResponse, CertificatePackEditResponse, - CertificatePackListResponse, CertificatePackDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -28,7 +28,7 @@ def test_method_list(self, client: Cloudflare) -> None: certificate_pack = client.ssl.certificate_packs.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: zone_id="023e105f4ecef8ad9ca31a8372d0c353", status="all", ) - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,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" certificate_pack = response.parse() - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) @pytest.mark.skip() @parametrize @@ -61,7 +61,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = response.parse() - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(SyncSinglePage[object], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True @@ -239,7 +239,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: certificate_pack = await async_client.ssl.certificate_packs.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +248,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) zone_id="023e105f4ecef8ad9ca31a8372d0c353", status="all", ) - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) @pytest.mark.skip() @parametrize @@ -260,7 +260,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" certificate_pack = await response.parse() - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) @pytest.mark.skip() @parametrize @@ -272,7 +272,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate_pack = await response.parse() - assert_matches_type(Optional[CertificatePackListResponse], certificate_pack, path=["response"]) + assert_matches_type(AsyncSinglePage[object], certificate_pack, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/live_inputs/test_outputs.py b/tests/api_resources/stream/live_inputs/test_outputs.py index e7b73c5be61..486e740b60b 100644 --- a/tests/api_resources/stream/live_inputs/test_outputs.py +++ b/tests/api_resources/stream/live_inputs/test_outputs.py @@ -9,10 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.stream.live_inputs import ( - StreamOutput, - OutputListResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.stream.live_inputs import StreamOutput base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -171,7 +169,7 @@ def test_method_list(self, client: Cloudflare) -> None: "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(OutputListResponse, output, path=["response"]) + assert_matches_type(SyncSinglePage[StreamOutput], output, path=["response"]) @pytest.mark.skip() @parametrize @@ -184,7 +182,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" output = response.parse() - assert_matches_type(OutputListResponse, output, path=["response"]) + assert_matches_type(SyncSinglePage[StreamOutput], output, path=["response"]) @pytest.mark.skip() @parametrize @@ -197,7 +195,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = response.parse() - assert_matches_type(OutputListResponse, output, path=["response"]) + assert_matches_type(SyncSinglePage[StreamOutput], output, path=["response"]) assert cast(Any, response.is_closed) is True @@ -435,7 +433,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "66be4bf738797e01e1fca35a7bdecdcd", account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(OutputListResponse, output, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamOutput], output, path=["response"]) @pytest.mark.skip() @parametrize @@ -448,7 +446,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" output = await response.parse() - assert_matches_type(OutputListResponse, output, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamOutput], output, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +459,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" output = await response.parse() - assert_matches_type(OutputListResponse, output, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamOutput], output, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/stream/test_watermarks.py b/tests/api_resources/stream/test_watermarks.py index 23974c7f5d7..80af89c021d 100644 --- a/tests/api_resources/stream/test_watermarks.py +++ b/tests/api_resources/stream/test_watermarks.py @@ -9,9 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.stream import ( + StreamWatermarks, WatermarkGetResponse, - WatermarkListResponse, WatermarkCreateResponse, WatermarkDeleteResponse, ) @@ -88,7 +89,7 @@ def test_method_list(self, client: Cloudflare) -> None: watermark = client.stream.watermarks.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WatermarkListResponse, watermark, path=["response"]) + assert_matches_type(SyncSinglePage[StreamWatermarks], watermark, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +101,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" watermark = response.parse() - assert_matches_type(WatermarkListResponse, watermark, path=["response"]) + assert_matches_type(SyncSinglePage[StreamWatermarks], watermark, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +113,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" watermark = response.parse() - assert_matches_type(WatermarkListResponse, watermark, path=["response"]) + assert_matches_type(SyncSinglePage[StreamWatermarks], watermark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -298,7 +299,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: watermark = await async_client.stream.watermarks.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(WatermarkListResponse, watermark, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamWatermarks], watermark, path=["response"]) @pytest.mark.skip() @parametrize @@ -310,7 +311,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" watermark = await response.parse() - assert_matches_type(WatermarkListResponse, watermark, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamWatermarks], watermark, path=["response"]) @pytest.mark.skip() @parametrize @@ -322,7 +323,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" watermark = await response.parse() - assert_matches_type(WatermarkListResponse, watermark, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamWatermarks], watermark, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_calls.py b/tests/api_resources/test_calls.py index 60858d4072d..49df39e2a8b 100644 --- a/tests/api_resources/test_calls.py +++ b/tests/api_resources/test_calls.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import CallsApp, CallListResponse, CallsAppWithSecret +from cloudflare.types import CallsApp, CallsAppWithSecret +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -136,7 +137,7 @@ def test_method_list(self, client: Cloudflare) -> None: call = client.calls.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallListResponse, call, path=["response"]) + assert_matches_type(SyncSinglePage[CallsApp], call, path=["response"]) @pytest.mark.skip() @parametrize @@ -148,7 +149,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" call = response.parse() - assert_matches_type(CallListResponse, call, path=["response"]) + assert_matches_type(SyncSinglePage[CallsApp], call, path=["response"]) @pytest.mark.skip() @parametrize @@ -160,7 +161,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = response.parse() - assert_matches_type(CallListResponse, call, path=["response"]) + assert_matches_type(SyncSinglePage[CallsApp], call, path=["response"]) assert cast(Any, response.is_closed) is True @@ -399,7 +400,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: call = await async_client.calls.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(CallListResponse, call, path=["response"]) + assert_matches_type(AsyncSinglePage[CallsApp], call, path=["response"]) @pytest.mark.skip() @parametrize @@ -411,7 +412,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" call = await response.parse() - assert_matches_type(CallListResponse, call, path=["response"]) + assert_matches_type(AsyncSinglePage[CallsApp], call, path=["response"]) @pytest.mark.skip() @parametrize @@ -423,7 +424,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" call = await response.parse() - assert_matches_type(CallListResponse, call, path=["response"]) + assert_matches_type(AsyncSinglePage[CallsApp], call, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_healthchecks.py b/tests/api_resources/test_healthchecks.py index 15fff51ea85..7e5754cb6c0 100644 --- a/tests/api_resources/test_healthchecks.py +++ b/tests/api_resources/test_healthchecks.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from cloudflare.types import ( Healthcheck, - HealthcheckListResponse, HealthcheckDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -212,7 +212,7 @@ def test_method_list(self, client: Cloudflare) -> None: healthcheck = client.healthchecks.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HealthcheckListResponse], healthcheck, path=["response"]) + assert_matches_type(SyncSinglePage[Healthcheck], healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -224,7 +224,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" healthcheck = response.parse() - assert_matches_type(Optional[HealthcheckListResponse], healthcheck, path=["response"]) + assert_matches_type(SyncSinglePage[Healthcheck], healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -236,7 +236,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = response.parse() - assert_matches_type(Optional[HealthcheckListResponse], healthcheck, path=["response"]) + assert_matches_type(SyncSinglePage[Healthcheck], healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True @@ -646,7 +646,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: healthcheck = await async_client.healthchecks.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HealthcheckListResponse], healthcheck, path=["response"]) + assert_matches_type(AsyncSinglePage[Healthcheck], healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -658,7 +658,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" healthcheck = await response.parse() - assert_matches_type(Optional[HealthcheckListResponse], healthcheck, path=["response"]) + assert_matches_type(AsyncSinglePage[Healthcheck], healthcheck, path=["response"]) @pytest.mark.skip() @parametrize @@ -670,7 +670,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" healthcheck = await response.parse() - assert_matches_type(Optional[HealthcheckListResponse], healthcheck, path=["response"]) + assert_matches_type(AsyncSinglePage[Healthcheck], healthcheck, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_keyless_certificates.py b/tests/api_resources/test_keyless_certificates.py index 61398a313e3..6003a52d371 100644 --- a/tests/api_resources/test_keyless_certificates.py +++ b/tests/api_resources/test_keyless_certificates.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from cloudflare.types import ( KeylessCertificateHostname, - KeylessCertificateListResponse, KeylessCertificateDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -98,7 +98,7 @@ def test_method_list(self, client: Cloudflare) -> None: keyless_certificate = client.keyless_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[KeylessCertificateListResponse], keyless_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[KeylessCertificateHostname], keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +110,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" keyless_certificate = response.parse() - assert_matches_type(Optional[KeylessCertificateListResponse], keyless_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[KeylessCertificateHostname], keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -122,7 +122,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = response.parse() - assert_matches_type(Optional[KeylessCertificateListResponse], keyless_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[KeylessCertificateHostname], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -394,7 +394,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: keyless_certificate = await async_client.keyless_certificates.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[KeylessCertificateListResponse], keyless_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[KeylessCertificateHostname], keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -406,7 +406,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" keyless_certificate = await response.parse() - assert_matches_type(Optional[KeylessCertificateListResponse], keyless_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[KeylessCertificateHostname], keyless_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -418,7 +418,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" keyless_certificate = await response.parse() - assert_matches_type(Optional[KeylessCertificateListResponse], keyless_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[KeylessCertificateHostname], keyless_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_load_balancers.py b/tests/api_resources/test_load_balancers.py index 946a45cf92c..6ef827e239a 100644 --- a/tests/api_resources/test_load_balancers.py +++ b/tests/api_resources/test_load_balancers.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from cloudflare.types import ( LoadBalancer, - LoadBalancerListResponse, LoadBalancerDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -646,7 +646,7 @@ def test_method_list(self, client: Cloudflare) -> None: load_balancer = client.load_balancers.list( zone_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[LoadBalancerListResponse], load_balancer, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancer], load_balancer, path=["response"]) @pytest.mark.skip() @parametrize @@ -658,7 +658,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" load_balancer = response.parse() - assert_matches_type(Optional[LoadBalancerListResponse], load_balancer, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancer], load_balancer, path=["response"]) @pytest.mark.skip() @parametrize @@ -670,7 +670,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" load_balancer = response.parse() - assert_matches_type(Optional[LoadBalancerListResponse], load_balancer, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancer], load_balancer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1699,7 +1699,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: load_balancer = await async_client.load_balancers.list( zone_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[LoadBalancerListResponse], load_balancer, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancer], load_balancer, path=["response"]) @pytest.mark.skip() @parametrize @@ -1711,7 +1711,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" load_balancer = await response.parse() - assert_matches_type(Optional[LoadBalancerListResponse], load_balancer, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancer], load_balancer, path=["response"]) @pytest.mark.skip() @parametrize @@ -1723,7 +1723,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" load_balancer = await response.parse() - assert_matches_type(Optional[LoadBalancerListResponse], load_balancer, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancer], load_balancer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_mtls_certificates.py b/tests/api_resources/test_mtls_certificates.py index e3cdca8326b..ca3dbc38d35 100644 --- a/tests/api_resources/test_mtls_certificates.py +++ b/tests/api_resources/test_mtls_certificates.py @@ -3,17 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import ( - MTLSCertificate, - MTLSCertificateUpdate, - MTLSCertificateListResponse, -) +from cloudflare.types import MTLSCertificate, MTLSCertificateUpdate +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -89,7 +86,7 @@ def test_method_list(self, client: Cloudflare) -> None: mtls_certificate = client.mtls_certificates.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MTLSCertificateListResponse], mtls_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +98,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" mtls_certificate = response.parse() - assert_matches_type(Optional[MTLSCertificateListResponse], mtls_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -113,7 +110,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = response.parse() - assert_matches_type(Optional[MTLSCertificateListResponse], mtls_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -301,7 +298,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: mtls_certificate = await async_client.mtls_certificates.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[MTLSCertificateListResponse], mtls_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -313,7 +310,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" mtls_certificate = await response.parse() - assert_matches_type(Optional[MTLSCertificateListResponse], mtls_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -325,7 +322,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" mtls_certificate = await response.parse() - assert_matches_type(Optional[MTLSCertificateListResponse], mtls_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[MTLSCertificate], mtls_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_origin_ca_certificates.py b/tests/api_resources/test_origin_ca_certificates.py index 65ddd6292f4..b20f9c59221 100644 --- a/tests/api_resources/test_origin_ca_certificates.py +++ b/tests/api_resources/test_origin_ca_certificates.py @@ -3,18 +3,19 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import ( + OriginCACertificate, OriginCACertificateGetResponse, - OriginCACertificateListResponse, OriginCACertificateCreateResponse, OriginCACertificateDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -65,7 +66,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: origin_ca_certificate = client.origin_ca_certificates.list() - assert_matches_type(Optional[OriginCACertificateListResponse], origin_ca_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -75,7 +76,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" origin_ca_certificate = response.parse() - assert_matches_type(Optional[OriginCACertificateListResponse], origin_ca_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -85,7 +86,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = response.parse() - assert_matches_type(Optional[OriginCACertificateListResponse], origin_ca_certificate, path=["response"]) + assert_matches_type(SyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -220,7 +221,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: origin_ca_certificate = await async_client.origin_ca_certificates.list() - assert_matches_type(Optional[OriginCACertificateListResponse], origin_ca_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +231,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" origin_ca_certificate = await response.parse() - assert_matches_type(Optional[OriginCACertificateListResponse], origin_ca_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +241,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_ca_certificate = await response.parse() - assert_matches_type(Optional[OriginCACertificateListResponse], origin_ca_certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginCACertificate], origin_ca_certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_origin_tls_client_auth.py b/tests/api_resources/test_origin_tls_client_auth.py index b038c8d3551..e75e32b30bc 100644 --- a/tests/api_resources/test_origin_tls_client_auth.py +++ b/tests/api_resources/test_origin_tls_client_auth.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -15,6 +15,7 @@ OriginTLSClientAuthCreateResponse, OriginTLSClientAuthDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -78,7 +79,7 @@ def test_method_list(self, client: Cloudflare) -> None: origin_tls_client_auth = client.origin_tls_client_auth.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) + assert_matches_type(SyncSinglePage[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -90,7 +91,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" origin_tls_client_auth = response.parse() - assert_matches_type(Optional[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) + assert_matches_type(SyncSinglePage[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +103,9 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = response.parse() - assert_matches_type(Optional[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) + assert_matches_type( + SyncSinglePage[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -278,7 +281,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: origin_tls_client_auth = await async_client.origin_tls_client_auth.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -290,7 +293,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" origin_tls_client_auth = await response.parse() - assert_matches_type(Optional[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) + assert_matches_type(AsyncSinglePage[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) @pytest.mark.skip() @parametrize @@ -302,7 +305,9 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" origin_tls_client_auth = await response.parse() - assert_matches_type(Optional[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"]) + assert_matches_type( + AsyncSinglePage[OriginTLSClientAuthListResponse], origin_tls_client_auth, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_pcaps.py b/tests/api_resources/test_pcaps.py index ecb68279f4f..2db05d99367 100644 --- a/tests/api_resources/test_pcaps.py +++ b/tests/api_resources/test_pcaps.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare.types import PCAPGetResponse, PCAPListResponse, PCAPCreateResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -184,7 +185,7 @@ def test_method_list(self, client: Cloudflare) -> None: pcap = client.pcaps.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PCAPListResponse], pcap, path=["response"]) + assert_matches_type(SyncSinglePage[PCAPListResponse], pcap, path=["response"]) @pytest.mark.skip() @parametrize @@ -196,7 +197,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" pcap = response.parse() - assert_matches_type(Optional[PCAPListResponse], pcap, path=["response"]) + assert_matches_type(SyncSinglePage[PCAPListResponse], pcap, path=["response"]) @pytest.mark.skip() @parametrize @@ -208,7 +209,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pcap = response.parse() - assert_matches_type(Optional[PCAPListResponse], pcap, path=["response"]) + assert_matches_type(SyncSinglePage[PCAPListResponse], pcap, path=["response"]) assert cast(Any, response.is_closed) is True @@ -443,7 +444,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: pcap = await async_client.pcaps.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PCAPListResponse], pcap, path=["response"]) + assert_matches_type(AsyncSinglePage[PCAPListResponse], pcap, path=["response"]) @pytest.mark.skip() @parametrize @@ -455,7 +456,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" pcap = await response.parse() - assert_matches_type(Optional[PCAPListResponse], pcap, path=["response"]) + assert_matches_type(AsyncSinglePage[PCAPListResponse], pcap, path=["response"]) @pytest.mark.skip() @parametrize @@ -467,7 +468,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" pcap = await response.parse() - assert_matches_type(Optional[PCAPListResponse], pcap, path=["response"]) + assert_matches_type(AsyncSinglePage[PCAPListResponse], pcap, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 06a9beb548f..68d14414ec9 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import PlanListResponse, AvailableRatePlan +from cloudflare.types import AvailableRatePlan +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: plan = client.plans.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PlanListResponse], plan, path=["response"]) + assert_matches_type(SyncSinglePage[AvailableRatePlan], plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" plan = response.parse() - assert_matches_type(Optional[PlanListResponse], plan, path=["response"]) + assert_matches_type(SyncSinglePage[AvailableRatePlan], plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" plan = response.parse() - assert_matches_type(Optional[PlanListResponse], plan, path=["response"]) + assert_matches_type(SyncSinglePage[AvailableRatePlan], plan, path=["response"]) assert cast(Any, response.is_closed) is True @@ -121,7 +122,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: plan = await async_client.plans.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[PlanListResponse], plan, path=["response"]) + assert_matches_type(AsyncSinglePage[AvailableRatePlan], plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +134,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" plan = await response.parse() - assert_matches_type(Optional[PlanListResponse], plan, path=["response"]) + assert_matches_type(AsyncSinglePage[AvailableRatePlan], plan, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +146,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" plan = await response.parse() - assert_matches_type(Optional[PlanListResponse], plan, path=["response"]) + assert_matches_type(AsyncSinglePage[AvailableRatePlan], plan, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_queues.py b/tests/api_resources/test_queues.py index 0d2b8b65738..2204fc81cdb 100644 --- a/tests/api_resources/test_queues.py +++ b/tests/api_resources/test_queues.py @@ -16,6 +16,7 @@ QueueDeleteResponse, QueueUpdateResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -132,7 +133,7 @@ def test_method_list(self, client: Cloudflare) -> None: queue = client.queues.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[QueueListResponse], queue, path=["response"]) + assert_matches_type(SyncSinglePage[QueueListResponse], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -144,7 +145,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" queue = response.parse() - assert_matches_type(Optional[QueueListResponse], queue, path=["response"]) + assert_matches_type(SyncSinglePage[QueueListResponse], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +157,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = response.parse() - assert_matches_type(Optional[QueueListResponse], queue, path=["response"]) + assert_matches_type(SyncSinglePage[QueueListResponse], queue, path=["response"]) assert cast(Any, response.is_closed) is True @@ -385,7 +386,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: queue = await async_client.queues.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[QueueListResponse], queue, path=["response"]) + assert_matches_type(AsyncSinglePage[QueueListResponse], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -397,7 +398,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" queue = await response.parse() - assert_matches_type(Optional[QueueListResponse], queue, path=["response"]) + assert_matches_type(AsyncSinglePage[QueueListResponse], queue, path=["response"]) @pytest.mark.skip() @parametrize @@ -409,7 +410,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" queue = await response.parse() - assert_matches_type(Optional[QueueListResponse], queue, path=["response"]) + assert_matches_type(AsyncSinglePage[QueueListResponse], queue, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index dc218794d84..67251b5ccf2 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -9,10 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import ( - RulesetsRulesetResponse, - RulesetsRulesetsResponse, -) +from cloudflare.types import RulesetListResponse, RulesetsRulesetResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -303,7 +301,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -312,7 +310,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -325,7 +323,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" ruleset = response.parse() - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -338,7 +336,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(SyncSinglePage[RulesetListResponse], ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -792,7 +790,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -801,7 +799,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -814,7 +812,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" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -827,7 +825,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetsResponse, ruleset, path=["response"]) + assert_matches_type(AsyncSinglePage[RulesetListResponse], ruleset, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_snippets.py b/tests/api_resources/test_snippets.py index 3a49b592b81..a47c07cf315 100644 --- a/tests/api_resources/test_snippets.py +++ b/tests/api_resources/test_snippets.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import Snippet, SnippetListResponse, SnippetDeleteResponse +from cloudflare.types import Snippet, SnippetDeleteResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -86,7 +87,7 @@ def test_method_list(self, client: Cloudflare) -> None: snippet = client.snippets.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SnippetListResponse, snippet, path=["response"]) + assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -98,7 +99,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" snippet = response.parse() - assert_matches_type(SnippetListResponse, snippet, path=["response"]) + assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -110,7 +111,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = response.parse() - assert_matches_type(SnippetListResponse, snippet, path=["response"]) + assert_matches_type(SyncSinglePage[Snippet], snippet, path=["response"]) assert cast(Any, response.is_closed) is True @@ -299,7 +300,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: snippet = await async_client.snippets.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(SnippetListResponse, snippet, path=["response"]) + assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +312,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" snippet = await response.parse() - assert_matches_type(SnippetListResponse, snippet, path=["response"]) + assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) @pytest.mark.skip() @parametrize @@ -323,7 +324,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" snippet = await response.parse() - assert_matches_type(SnippetListResponse, snippet, path=["response"]) + assert_matches_type(AsyncSinglePage[Snippet], snippet, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_stream.py b/tests/api_resources/test_stream.py index 5df1fee24d2..118641ae1d8 100644 --- a/tests/api_resources/test_stream.py +++ b/tests/api_resources/test_stream.py @@ -9,8 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import StreamVideos, StreamListResponse +from cloudflare.types import StreamVideos from cloudflare._utils import parse_datetime +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -66,7 +67,7 @@ def test_method_list(self, client: Cloudflare) -> None: stream = client.stream.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(SyncSinglePage[StreamVideos], stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -82,7 +83,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: status="inprogress", type="live", ) - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(SyncSinglePage[StreamVideos], stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -94,7 +95,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" stream = response.parse() - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(SyncSinglePage[StreamVideos], stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +107,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" stream = response.parse() - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(SyncSinglePage[StreamVideos], stream, path=["response"]) assert cast(Any, response.is_closed) is True @@ -274,7 +275,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: stream = await async_client.stream.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamVideos], stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -290,7 +291,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) status="inprogress", type="live", ) - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamVideos], stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -302,7 +303,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" stream = await response.parse() - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamVideos], stream, path=["response"]) @pytest.mark.skip() @parametrize @@ -314,7 +315,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" stream = await response.parse() - assert_matches_type(StreamListResponse, stream, path=["response"]) + assert_matches_type(AsyncSinglePage[StreamVideos], stream, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 7fbd8484de2..ed9927ed618 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -16,6 +16,7 @@ SubscriptionDeleteResponse, SubscriptionUpdateResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -206,7 +207,7 @@ def test_method_list(self, client: Cloudflare) -> None: subscription = client.subscriptions.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(SyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -218,7 +219,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" subscription = response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(SyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -230,7 +231,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" subscription = response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(SyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) assert cast(Any, response.is_closed) is True @@ -525,7 +526,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.subscriptions.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(AsyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -537,7 +538,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" subscription = await response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(AsyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -549,7 +550,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" subscription = await response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(AsyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_waiting_rooms.py b/tests/api_resources/test_waiting_rooms.py index 610dd7a3ab8..b1cbfb03038 100644 --- a/tests/api_resources/test_waiting_rooms.py +++ b/tests/api_resources/test_waiting_rooms.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from cloudflare.types import ( WaitingRoom, - WaitingRoomListResponse, WaitingRoomDeleteResponse, ) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -242,7 +242,7 @@ def test_method_list(self, client: Cloudflare) -> None: waiting_room = client.waiting_rooms.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WaitingRoomListResponse], waiting_room, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingRoom], waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +254,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" waiting_room = response.parse() - assert_matches_type(Optional[WaitingRoomListResponse], waiting_room, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingRoom], waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -266,7 +266,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = response.parse() - assert_matches_type(Optional[WaitingRoomListResponse], waiting_room, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingRoom], waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True @@ -722,7 +722,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: waiting_room = await async_client.waiting_rooms.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[WaitingRoomListResponse], waiting_room, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingRoom], waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -734,7 +734,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" waiting_room = await response.parse() - assert_matches_type(Optional[WaitingRoomListResponse], waiting_room, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingRoom], waiting_room, path=["response"]) @pytest.mark.skip() @parametrize @@ -746,7 +746,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" waiting_room = await response.parse() - assert_matches_type(Optional[WaitingRoomListResponse], waiting_room, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingRoom], waiting_room, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/load_balancers/analytics/test_events.py b/tests/api_resources/user/load_balancers/analytics/test_events.py index 08188629f93..26e4e169ef3 100644 --- a/tests/api_resources/user/load_balancers/analytics/test_events.py +++ b/tests/api_resources/user/load_balancers/analytics/test_events.py @@ -3,14 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type from cloudflare._utils import parse_datetime -from cloudflare.types.user.load_balancers.analytics import EventListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.user.load_balancers.analytics import LoadBalancingAnalytics base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +23,7 @@ class TestEvents: @parametrize def test_method_list(self, client: Cloudflare) -> None: event = client.user.load_balancers.analytics.events.list() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -36,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: since=parse_datetime("2016-11-11T12:00:00Z"), until=parse_datetime("2016-11-11T13:00:00Z"), ) - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -46,7 +47,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" event = response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +57,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -68,7 +69,7 @@ class TestAsyncEvents: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: event = await async_client.user.load_balancers.analytics.events.list() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -82,7 +83,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) since=parse_datetime("2016-11-11T12:00:00Z"), until=parse_datetime("2016-11-11T13:00:00Z"), ) - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +93,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" event = await response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,6 +103,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingAnalytics], event, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/load_balancers/test_monitors.py b/tests/api_resources/user/load_balancers/test_monitors.py index 7c0f1b49ab5..359d83209c7 100644 --- a/tests/api_resources/user/load_balancers/test_monitors.py +++ b/tests/api_resources/user/load_balancers/test_monitors.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.user.load_balancers import ( - MonitorListResponse, LoadBalancingMonitor, MonitorDeleteResponse, MonitorPreviewResponse, @@ -160,7 +160,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: monitor = client.user.load_balancers.monitors.list() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,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" monitor = response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -180,7 +180,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) assert cast(Any, response.is_closed) is True @@ -597,7 +597,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: monitor = await async_client.user.load_balancers.monitors.list() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -607,7 +607,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" monitor = await response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) @pytest.mark.skip() @parametrize @@ -617,7 +617,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" monitor = await response.parse() - assert_matches_type(Optional[MonitorListResponse], monitor, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingMonitor], monitor, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/load_balancers/test_pools.py b/tests/api_resources/user/load_balancers/test_pools.py index a421610df7f..213bc1b0df2 100644 --- a/tests/api_resources/user/load_balancers/test_pools.py +++ b/tests/api_resources/user/load_balancers/test_pools.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.user.load_balancers import ( - PoolListResponse, LoadBalancingPool, PoolDeleteResponse, PoolHealthResponse, @@ -234,7 +234,7 @@ def test_path_params_update(self, client: Cloudflare) -> None: @parametrize def test_method_list(self, client: Cloudflare) -> None: pool = client.user.load_balancers.pools.list() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -242,7 +242,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: pool = client.user.load_balancers.pools.list( monitor={}, ) - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -252,7 +252,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" pool = response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -262,7 +262,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(SyncSinglePage[LoadBalancingPool], pool, path=["response"]) assert cast(Any, response.is_closed) is True @@ -823,7 +823,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: pool = await async_client.user.load_balancers.pools.list() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -831,7 +831,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) pool = await async_client.user.load_balancers.pools.list( monitor={}, ) - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -841,7 +841,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" pool = await response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) @pytest.mark.skip() @parametrize @@ -851,7 +851,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" pool = await response.parse() - assert_matches_type(Optional[PoolListResponse], pool, path=["response"]) + assert_matches_type(AsyncSinglePage[LoadBalancingPool], pool, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/test_invites.py b/tests/api_resources/user/test_invites.py index 1ca3d5d8e27..9527cdf4a38 100644 --- a/tests/api_resources/user/test_invites.py +++ b/tests/api_resources/user/test_invites.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.user import InviteGetResponse, InviteEditResponse, InviteListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +22,7 @@ class TestInvites: @parametrize def test_method_list(self, client: Cloudflare) -> None: invite = client.user.invites.list() - assert_matches_type(Optional[InviteListResponse], invite, path=["response"]) + assert_matches_type(SyncSinglePage[InviteListResponse], invite, path=["response"]) @pytest.mark.skip() @parametrize @@ -31,7 +32,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" invite = response.parse() - assert_matches_type(Optional[InviteListResponse], invite, path=["response"]) + assert_matches_type(SyncSinglePage[InviteListResponse], invite, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +42,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" invite = response.parse() - assert_matches_type(Optional[InviteListResponse], invite, path=["response"]) + assert_matches_type(SyncSinglePage[InviteListResponse], invite, path=["response"]) assert cast(Any, response.is_closed) is True @@ -141,7 +142,7 @@ class TestAsyncInvites: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: invite = await async_client.user.invites.list() - assert_matches_type(Optional[InviteListResponse], invite, path=["response"]) + assert_matches_type(AsyncSinglePage[InviteListResponse], invite, path=["response"]) @pytest.mark.skip() @parametrize @@ -151,7 +152,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" invite = await response.parse() - assert_matches_type(Optional[InviteListResponse], invite, path=["response"]) + assert_matches_type(AsyncSinglePage[InviteListResponse], invite, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +162,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" invite = await response.parse() - assert_matches_type(Optional[InviteListResponse], invite, path=["response"]) + assert_matches_type(AsyncSinglePage[InviteListResponse], invite, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/user/tokens/test_permission_groups.py b/tests/api_resources/user/tokens/test_permission_groups.py index 402d2d372bb..fc5c12aeb29 100644 --- a/tests/api_resources/user/tokens/test_permission_groups.py +++ b/tests/api_resources/user/tokens/test_permission_groups.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.user.tokens import PermissionGroupListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +21,7 @@ class TestPermissionGroups: @parametrize def test_method_list(self, client: Cloudflare) -> None: permission_group = client.user.tokens.permission_groups.list() - assert_matches_type(Optional[PermissionGroupListResponse], permission_group, path=["response"]) + assert_matches_type(SyncSinglePage[object], permission_group, path=["response"]) @pytest.mark.skip() @parametrize @@ -31,7 +31,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" permission_group = response.parse() - assert_matches_type(Optional[PermissionGroupListResponse], permission_group, path=["response"]) + assert_matches_type(SyncSinglePage[object], permission_group, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission_group = response.parse() - assert_matches_type(Optional[PermissionGroupListResponse], permission_group, path=["response"]) + assert_matches_type(SyncSinglePage[object], permission_group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -53,7 +53,7 @@ class TestAsyncPermissionGroups: @parametrize async def test_method_list(self, async_client: AsyncCloudflare) -> None: permission_group = await async_client.user.tokens.permission_groups.list() - assert_matches_type(Optional[PermissionGroupListResponse], permission_group, path=["response"]) + assert_matches_type(AsyncSinglePage[object], permission_group, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,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" permission_group = await response.parse() - assert_matches_type(Optional[PermissionGroupListResponse], permission_group, path=["response"]) + assert_matches_type(AsyncSinglePage[object], permission_group, path=["response"]) @pytest.mark.skip() @parametrize @@ -73,6 +73,6 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" permission_group = await response.parse() - assert_matches_type(Optional[PermissionGroupListResponse], permission_group, path=["response"]) + assert_matches_type(AsyncSinglePage[object], permission_group, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/vectorize/test_indexes.py b/tests/api_resources/vectorize/test_indexes.py index 7024f1d0f18..019423f0773 100644 --- a/tests/api_resources/vectorize/test_indexes.py +++ b/tests/api_resources/vectorize/test_indexes.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.vectorize import ( - IndexListResponse, IndexDeleteResponse, VectorizeIndexQuery, VectorizeCreateIndex, @@ -149,7 +149,7 @@ def test_method_list(self, client: Cloudflare) -> None: index = client.vectorize.indexes.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndexListResponse, index, path=["response"]) + assert_matches_type(SyncSinglePage[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -161,7 +161,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" index = response.parse() - assert_matches_type(IndexListResponse, index, path=["response"]) + assert_matches_type(SyncSinglePage[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -173,7 +173,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = response.parse() - assert_matches_type(IndexListResponse, index, path=["response"]) + assert_matches_type(SyncSinglePage[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True @@ -710,7 +710,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: index = await async_client.vectorize.indexes.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(IndexListResponse, index, path=["response"]) + assert_matches_type(AsyncSinglePage[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -722,7 +722,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" index = await response.parse() - assert_matches_type(IndexListResponse, index, path=["response"]) + assert_matches_type(AsyncSinglePage[VectorizeCreateIndex], index, path=["response"]) @pytest.mark.skip() @parametrize @@ -734,7 +734,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" index = await response.parse() - assert_matches_type(IndexListResponse, index, path=["response"]) + assert_matches_type(AsyncSinglePage[VectorizeCreateIndex], index, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/waiting_rooms/test_events.py b/tests/api_resources/waiting_rooms/test_events.py index b74a62410d6..85413cb8950 100644 --- a/tests/api_resources/waiting_rooms/test_events.py +++ b/tests/api_resources/waiting_rooms/test_events.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.waiting_rooms import ( WaitingroomEvent, - EventListResponse, EventDeleteResponse, ) @@ -222,7 +222,7 @@ def test_method_list(self, client: Cloudflare) -> None: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingroomEvent], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -235,7 +235,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" event = response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingroomEvent], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -248,7 +248,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingroomEvent], event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -705,7 +705,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingroomEvent], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -718,7 +718,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" event = await response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingroomEvent], event, path=["response"]) @pytest.mark.skip() @parametrize @@ -731,7 +731,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(Optional[EventListResponse], event, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingroomEvent], event, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/waiting_rooms/test_rules.py b/tests/api_resources/waiting_rooms/test_rules.py index eb1537f9dfb..cbd401c1043 100644 --- a/tests/api_resources/waiting_rooms/test_rules.py +++ b/tests/api_resources/waiting_rooms/test_rules.py @@ -9,9 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.waiting_rooms import ( + WaitingroomRule, RuleEditResponse, - RuleListResponse, RuleCreateResponse, RuleDeleteResponse, RuleUpdateResponse, @@ -227,7 +228,7 @@ def test_method_list(self, client: Cloudflare) -> None: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingroomRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -240,7 +241,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingroomRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -253,7 +254,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[WaitingroomRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -635,7 +636,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "699d98642c564d2e855e9661899b7252", zone_identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingroomRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -648,7 +649,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingroomRule], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -661,7 +662,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[WaitingroomRule], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/web3/test_hostnames.py b/tests/api_resources/web3/test_hostnames.py index ea1c6bc3f40..8b90939ee6c 100644 --- a/tests/api_resources/web3/test_hostnames.py +++ b/tests/api_resources/web3/test_hostnames.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.web3 import ( - HostnameListResponse, DistributedWebHostname, HostnameDeleteResponse, ) @@ -84,7 +84,7 @@ def test_method_list(self, client: Cloudflare) -> None: hostname = client.web3.hostnames.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HostnameListResponse], hostname, path=["response"]) + assert_matches_type(SyncSinglePage[DistributedWebHostname], hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +96,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" hostname = response.parse() - assert_matches_type(Optional[HostnameListResponse], hostname, path=["response"]) + assert_matches_type(SyncSinglePage[DistributedWebHostname], hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +108,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = response.parse() - assert_matches_type(Optional[HostnameListResponse], hostname, path=["response"]) + assert_matches_type(SyncSinglePage[DistributedWebHostname], hostname, path=["response"]) assert cast(Any, response.is_closed) is True @@ -354,7 +354,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: hostname = await async_client.web3.hostnames.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[HostnameListResponse], hostname, path=["response"]) + assert_matches_type(AsyncSinglePage[DistributedWebHostname], hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -366,7 +366,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" hostname = await response.parse() - assert_matches_type(Optional[HostnameListResponse], hostname, path=["response"]) + assert_matches_type(AsyncSinglePage[DistributedWebHostname], hostname, path=["response"]) @pytest.mark.skip() @parametrize @@ -378,7 +378,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" hostname = await response.parse() - assert_matches_type(Optional[HostnameListResponse], hostname, path=["response"]) + assert_matches_type(AsyncSinglePage[DistributedWebHostname], hostname, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/test_domains.py b/tests/api_resources/workers/test_domains.py index 20907df2d87..f96dbc6dbbb 100644 --- a/tests/api_resources/workers/test_domains.py +++ b/tests/api_resources/workers/test_domains.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.workers import WorkersDomain, DomainListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.workers import WorkersDomain base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -81,7 +82,7 @@ def test_method_list(self, client: Cloudflare) -> None: domain = client.workers.domains.list( account_id="9a7806061c88ada191ed06f989cc3dac", ) - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersDomain], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -94,7 +95,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: zone_id="593c9c94de529bbbfaac7c53ced0447d", zone_name="example.com", ) - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersDomain], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +107,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" domain = response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersDomain], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -118,7 +119,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersDomain], domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -302,7 +303,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: domain = await async_client.workers.domains.list( account_id="9a7806061c88ada191ed06f989cc3dac", ) - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersDomain], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -315,7 +316,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) zone_id="593c9c94de529bbbfaac7c53ced0447d", zone_name="example.com", ) - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersDomain], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +328,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" domain = await response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersDomain], domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -339,7 +340,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" domain = await response.parse() - assert_matches_type(DomainListResponse, domain, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersDomain], domain, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/test_filters.py b/tests/api_resources/workers/test_filters.py index b8cc1e4144a..8b1f32106c5 100644 --- a/tests/api_resources/workers/test_filters.py +++ b/tests/api_resources/workers/test_filters.py @@ -9,9 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.workers import ( WorkersFilter, - FilterListResponse, FilterCreateResponse, FilterDeleteResponse, ) @@ -140,7 +140,7 @@ def test_method_list(self, client: Cloudflare) -> None: filter = client.workers.filters.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FilterListResponse, filter, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -152,7 +152,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(FilterListResponse, filter, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -164,7 +164,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = response.parse() - assert_matches_type(FilterListResponse, filter, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True @@ -350,7 +350,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: filter = await async_client.workers.filters.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(FilterListResponse, filter, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -362,7 +362,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(FilterListResponse, filter, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersFilter], filter, path=["response"]) @pytest.mark.skip() @parametrize @@ -374,7 +374,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" filter = await response.parse() - assert_matches_type(FilterListResponse, filter, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersFilter], filter, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/test_routes.py b/tests/api_resources/workers/test_routes.py index 7fc7824e396..96ec8968fa7 100644 --- a/tests/api_resources/workers/test_routes.py +++ b/tests/api_resources/workers/test_routes.py @@ -9,9 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.workers import ( WorkersRoute, - RouteListResponse, RouteCreateResponse, RouteDeleteResponse, ) @@ -152,7 +152,7 @@ def test_method_list(self, client: Cloudflare) -> None: route = client.workers.routes.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RouteListResponse, route, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersRoute], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -164,7 +164,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" route = response.parse() - assert_matches_type(RouteListResponse, route, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersRoute], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -176,7 +176,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = response.parse() - assert_matches_type(RouteListResponse, route, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersRoute], route, path=["response"]) assert cast(Any, response.is_closed) is True @@ -426,7 +426,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: route = await async_client.workers.routes.list( zone_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(RouteListResponse, route, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersRoute], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -438,7 +438,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" route = await response.parse() - assert_matches_type(RouteListResponse, route, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersRoute], route, path=["response"]) @pytest.mark.skip() @parametrize @@ -450,7 +450,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" route = await response.parse() - assert_matches_type(RouteListResponse, route, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersRoute], route, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers/test_scripts.py b/tests/api_resources/workers/test_scripts.py index 8ff9ba6b84c..e6cb951422b 100644 --- a/tests/api_resources/workers/test_scripts.py +++ b/tests/api_resources/workers/test_scripts.py @@ -17,7 +17,8 @@ StreamedBinaryAPIResponse, AsyncStreamedBinaryAPIResponse, ) -from cloudflare.types.workers import WorkersScript, ScriptListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.workers import WorkersScript base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -230,7 +231,7 @@ def test_method_list(self, client: Cloudflare) -> None: script = client.workers.scripts.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ScriptListResponse, script, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -242,7 +243,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" script = response.parse() - assert_matches_type(ScriptListResponse, script, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -254,7 +255,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = response.parse() - assert_matches_type(ScriptListResponse, script, path=["response"]) + assert_matches_type(SyncSinglePage[WorkersScript], script, path=["response"]) assert cast(Any, response.is_closed) is True @@ -607,7 +608,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: script = await async_client.workers.scripts.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(ScriptListResponse, script, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -619,7 +620,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" script = await response.parse() - assert_matches_type(ScriptListResponse, script, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersScript], script, path=["response"]) @pytest.mark.skip() @parametrize @@ -631,7 +632,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" script = await response.parse() - assert_matches_type(ScriptListResponse, script, path=["response"]) + assert_matches_type(AsyncSinglePage[WorkersScript], script, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py index cbf799783ad..f4a211a5829 100644 --- a/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py +++ b/tests/api_resources/workers_for_platforms/dispatch/test_namespaces.py @@ -9,6 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.workers_for_platforms.dispatch import ( NamespaceGetResponse, NamespaceListResponse, @@ -78,7 +79,7 @@ def test_method_list(self, client: Cloudflare) -> None: namespace = client.workers_for_platforms.dispatch.namespaces.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(NamespaceListResponse, namespace, path=["response"]) + assert_matches_type(SyncSinglePage[NamespaceListResponse], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -90,7 +91,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" namespace = response.parse() - assert_matches_type(NamespaceListResponse, namespace, path=["response"]) + assert_matches_type(SyncSinglePage[NamespaceListResponse], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -102,7 +103,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = response.parse() - assert_matches_type(NamespaceListResponse, namespace, path=["response"]) + assert_matches_type(SyncSinglePage[NamespaceListResponse], namespace, path=["response"]) assert cast(Any, response.is_closed) is True @@ -279,7 +280,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: namespace = await async_client.workers_for_platforms.dispatch.namespaces.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(NamespaceListResponse, namespace, path=["response"]) + assert_matches_type(AsyncSinglePage[NamespaceListResponse], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +292,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" namespace = await response.parse() - assert_matches_type(NamespaceListResponse, namespace, path=["response"]) + assert_matches_type(AsyncSinglePage[NamespaceListResponse], namespace, path=["response"]) @pytest.mark.skip() @parametrize @@ -303,7 +304,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" namespace = await response.parse() - assert_matches_type(NamespaceListResponse, namespace, path=["response"]) + assert_matches_type(AsyncSinglePage[NamespaceListResponse], namespace, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/applications/test_cas.py b/tests/api_resources/zero_trust/access/applications/test_cas.py index 86540de1f96..3ac1aafb0b7 100644 --- a/tests/api_resources/zero_trust/access/applications/test_cas.py +++ b/tests/api_resources/zero_trust/access/applications/test_cas.py @@ -3,15 +3,16 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access.applications import ( + ZeroTrustCA, CAGetResponse, - CAListResponse, CACreateResponse, CADeleteResponse, ) @@ -103,7 +104,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCA], ca, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +113,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCA], ca, path=["response"]) @pytest.mark.skip() @parametrize @@ -125,7 +126,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" ca = response.parse() - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCA], ca, path=["response"]) @pytest.mark.skip() @parametrize @@ -138,7 +139,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ca = response.parse() - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCA], ca, path=["response"]) assert cast(Any, response.is_closed) is True @@ -390,7 +391,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCA], ca, path=["response"]) @pytest.mark.skip() @parametrize @@ -399,7 +400,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCA], ca, path=["response"]) @pytest.mark.skip() @parametrize @@ -412,7 +413,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" ca = await response.parse() - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCA], ca, path=["response"]) @pytest.mark.skip() @parametrize @@ -425,7 +426,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" ca = await response.parse() - assert_matches_type(Optional[CAListResponse], ca, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCA], ca, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/applications/test_policies.py b/tests/api_resources/zero_trust/access/applications/test_policies.py index a61a2e24960..be668123b97 100644 --- a/tests/api_resources/zero_trust/access/applications/test_policies.py +++ b/tests/api_resources/zero_trust/access/applications/test_policies.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access.applications import ( ZeroTrustPolicies, - PolicyListResponse, PolicyDeleteResponse, ) @@ -353,7 +353,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -363,7 +363,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -377,7 +377,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" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -391,7 +391,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -933,7 +933,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -943,7 +943,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -957,7 +957,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" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -971,7 +971,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustPolicies], policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index cd481f558e1..883a2dc7233 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access import ( ZeroTrustApps, - ApplicationListResponse, ApplicationDeleteResponse, ) @@ -1502,7 +1502,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustApps], application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1511,7 +1511,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustApps], application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1524,7 +1524,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" application = response.parse() - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustApps], application, path=["response"]) @pytest.mark.skip() @parametrize @@ -1537,7 +1537,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = response.parse() - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustApps], application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -3242,7 +3242,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustApps], application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3251,7 +3251,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustApps], application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3264,7 +3264,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" application = await response.parse() - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustApps], application, path=["response"]) @pytest.mark.skip() @parametrize @@ -3277,7 +3277,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" application = await response.parse() - assert_matches_type(Optional[ApplicationListResponse], application, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustApps], application, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_bookmarks.py b/tests/api_resources/zero_trust/access/test_bookmarks.py index af1d5cafa7f..64a3451ab3c 100644 --- a/tests/api_resources/zero_trust/access/test_bookmarks.py +++ b/tests/api_resources/zero_trust/access/test_bookmarks.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access import ZeroTrustBookmarks, BookmarkListResponse, BookmarkDeleteResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.access import ZeroTrustBookmarks, BookmarkDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -127,7 +128,7 @@ def test_method_list(self, client: Cloudflare) -> None: bookmark = client.zero_trust.access.bookmarks.list( "699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[BookmarkListResponse], bookmark, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustBookmarks], bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -139,7 +140,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" bookmark = response.parse() - assert_matches_type(Optional[BookmarkListResponse], bookmark, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustBookmarks], bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -151,7 +152,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = response.parse() - assert_matches_type(Optional[BookmarkListResponse], bookmark, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustBookmarks], bookmark, path=["response"]) assert cast(Any, response.is_closed) is True @@ -381,7 +382,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: bookmark = await async_client.zero_trust.access.bookmarks.list( "699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[BookmarkListResponse], bookmark, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustBookmarks], bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -393,7 +394,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" bookmark = await response.parse() - assert_matches_type(Optional[BookmarkListResponse], bookmark, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustBookmarks], bookmark, path=["response"]) @pytest.mark.skip() @parametrize @@ -405,7 +406,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookmark = await response.parse() - assert_matches_type(Optional[BookmarkListResponse], bookmark, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustBookmarks], bookmark, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_certificates.py b/tests/api_resources/zero_trust/access/test_certificates.py index c60a9faf351..2a92155a407 100644 --- a/tests/api_resources/zero_trust/access/test_certificates.py +++ b/tests/api_resources/zero_trust/access/test_certificates.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access import ( ZeroTrustCertificates, - CertificateListResponse, CertificateDeleteResponse, ) @@ -184,7 +184,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -193,7 +193,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +206,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" certificate = response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -219,7 +219,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) assert cast(Any, response.is_closed) is True @@ -553,7 +553,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -562,7 +562,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -575,7 +575,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" certificate = await response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) @pytest.mark.skip() @parametrize @@ -588,7 +588,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" certificate = await response.parse() - assert_matches_type(Optional[CertificateListResponse], certificate, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCertificates], certificate, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_custom_pages.py b/tests/api_resources/zero_trust/access/test_custom_pages.py index b3837e153f5..ccd44ae7fe9 100644 --- a/tests/api_resources/zero_trust/access/test_custom_pages.py +++ b/tests/api_resources/zero_trust/access/test_custom_pages.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access import ( ZeroTrustCustomPage, - CustomPageListResponse, CustomPageDeleteResponse, ZeroTrustCustomPageWithoutHTML, ) @@ -174,7 +174,7 @@ def test_method_list(self, client: Cloudflare) -> None: custom_page = client.zero_trust.access.custom_pages.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CustomPageListResponse], custom_page, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCustomPageWithoutHTML], custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -186,7 +186,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" custom_page = response.parse() - assert_matches_type(Optional[CustomPageListResponse], custom_page, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCustomPageWithoutHTML], custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -198,7 +198,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = response.parse() - assert_matches_type(Optional[CustomPageListResponse], custom_page, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustCustomPageWithoutHTML], custom_page, path=["response"]) assert cast(Any, response.is_closed) is True @@ -470,7 +470,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: custom_page = await async_client.zero_trust.access.custom_pages.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CustomPageListResponse], custom_page, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCustomPageWithoutHTML], custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -482,7 +482,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" custom_page = await response.parse() - assert_matches_type(Optional[CustomPageListResponse], custom_page, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCustomPageWithoutHTML], custom_page, path=["response"]) @pytest.mark.skip() @parametrize @@ -494,7 +494,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" custom_page = await response.parse() - assert_matches_type(Optional[CustomPageListResponse], custom_page, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustCustomPageWithoutHTML], custom_page, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_groups.py b/tests/api_resources/zero_trust/access/test_groups.py index dfbd4b9ca0e..ab5b3adbc4e 100644 --- a/tests/api_resources/zero_trust/access/test_groups.py +++ b/tests/api_resources/zero_trust/access/test_groups.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access import ( ZeroTrustGroups, - GroupListResponse, GroupDeleteResponse, ) @@ -263,7 +263,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGroups], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -272,7 +272,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGroups], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -285,7 +285,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" group = response.parse() - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGroups], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -298,7 +298,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = response.parse() - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGroups], group, path=["response"]) assert cast(Any, response.is_closed) is True @@ -711,7 +711,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGroups], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -720,7 +720,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGroups], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -733,7 +733,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" group = await response.parse() - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGroups], group, path=["response"]) @pytest.mark.skip() @parametrize @@ -746,7 +746,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" group = await response.parse() - assert_matches_type(Optional[GroupListResponse], group, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGroups], group, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_service_tokens.py b/tests/api_resources/zero_trust/access/test_service_tokens.py index 0d5090665c0..4815e282fff 100644 --- a/tests/api_resources/zero_trust/access/test_service_tokens.py +++ b/tests/api_resources/zero_trust/access/test_service_tokens.py @@ -3,15 +3,15 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access import ( ZeroTrustServiceTokens, - ServiceTokenListResponse, ServiceTokenCreateResponse, ServiceTokenRotateResponse, ) @@ -173,7 +173,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -182,7 +182,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +195,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" service_token = response.parse() - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -208,7 +208,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = response.parse() - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -560,7 +560,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -569,7 +569,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -582,7 +582,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" service_token = await response.parse() - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) @pytest.mark.skip() @parametrize @@ -595,7 +595,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" service_token = await response.parse() - assert_matches_type(Optional[ServiceTokenListResponse], service_token, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustServiceTokens], service_token, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_tags.py b/tests/api_resources/zero_trust/access/test_tags.py index d8d355d0b29..57c7961ae67 100644 --- a/tests/api_resources/zero_trust/access/test_tags.py +++ b/tests/api_resources/zero_trust/access/test_tags.py @@ -3,17 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access import ( - ZeroTrustTag, - TagListResponse, - TagDeleteResponse, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.access import ZeroTrustTag, TagDeleteResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -130,7 +127,7 @@ def test_method_list(self, client: Cloudflare) -> None: tag = client.zero_trust.access.tags.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TagListResponse], tag, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustTag], tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -142,7 +139,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" tag = response.parse() - assert_matches_type(Optional[TagListResponse], tag, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustTag], tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -154,7 +151,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = response.parse() - assert_matches_type(Optional[TagListResponse], tag, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustTag], tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -383,7 +380,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: tag = await async_client.zero_trust.access.tags.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[TagListResponse], tag, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustTag], tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -395,7 +392,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" tag = await response.parse() - assert_matches_type(Optional[TagListResponse], tag, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustTag], tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -407,7 +404,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" tag = await response.parse() - assert_matches_type(Optional[TagListResponse], tag, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustTag], tag, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/test_users.py b/tests/api_resources/zero_trust/access/test_users.py index 59f1e45767f..5787f3daf8b 100644 --- a/tests/api_resources/zero_trust/access/test_users.py +++ b/tests/api_resources/zero_trust/access/test_users.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.access import UserListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.access import ZeroTrustUsers base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: user = client.zero_trust.access.users.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[UserListResponse], user, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustUsers], user, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" user = response.parse() - assert_matches_type(Optional[UserListResponse], user, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustUsers], user, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" user = response.parse() - assert_matches_type(Optional[UserListResponse], user, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustUsers], user, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: user = await async_client.zero_trust.access.users.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[UserListResponse], user, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustUsers], user, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" user = await response.parse() - assert_matches_type(Optional[UserListResponse], user, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustUsers], user, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" user = await response.parse() - assert_matches_type(Optional[UserListResponse], user, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustUsers], user, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/users/test_active_sessions.py b/tests/api_resources/zero_trust/access/users/test_active_sessions.py index 3b7b67a00e6..724da335d7c 100644 --- a/tests/api_resources/zero_trust/access/users/test_active_sessions.py +++ b/tests/api_resources/zero_trust/access/users/test_active_sessions.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access.users import ActiveSessionGetResponse, ActiveSessionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ActiveSessionListResponse], active_session, path=["response"]) + assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +38,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" active_session = response.parse() - assert_matches_type(Optional[ActiveSessionListResponse], active_session, path=["response"]) + assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +51,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" active_session = response.parse() - assert_matches_type(Optional[ActiveSessionListResponse], active_session, path=["response"]) + assert_matches_type(SyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +145,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ActiveSessionListResponse], active_session, path=["response"]) + assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @pytest.mark.skip() @parametrize @@ -157,7 +158,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" active_session = await response.parse() - assert_matches_type(Optional[ActiveSessionListResponse], active_session, path=["response"]) + assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +171,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" active_session = await response.parse() - assert_matches_type(Optional[ActiveSessionListResponse], active_session, path=["response"]) + assert_matches_type(AsyncSinglePage[ActiveSessionListResponse], active_session, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/access/users/test_failed_logins.py b/tests/api_resources/zero_trust/access/users/test_failed_logins.py index 9595e61edcf..34259b8225d 100644 --- a/tests/api_resources/zero_trust/access/users/test_failed_logins.py +++ b/tests/api_resources/zero_trust/access/users/test_failed_logins.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.access.users import FailedLoginListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FailedLoginListResponse], failed_login, path=["response"]) + assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +38,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" failed_login = response.parse() - assert_matches_type(Optional[FailedLoginListResponse], failed_login, path=["response"]) + assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +51,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" failed_login = response.parse() - assert_matches_type(Optional[FailedLoginListResponse], failed_login, path=["response"]) + assert_matches_type(SyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +81,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", identifier="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[FailedLoginListResponse], failed_login, path=["response"]) + assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,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" failed_login = await response.parse() - assert_matches_type(Optional[FailedLoginListResponse], failed_login, path=["response"]) + assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +107,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" failed_login = await response.parse() - assert_matches_type(Optional[FailedLoginListResponse], failed_login, path=["response"]) + assert_matches_type(AsyncSinglePage[FailedLoginListResponse], failed_login, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/policies/test_excludes.py b/tests/api_resources/zero_trust/devices/policies/test_excludes.py index 489b9c52146..b154f08001b 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_excludes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_excludes.py @@ -9,9 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices.policies import ( + DevicesSplitTunnel, ExcludeGetResponse, - ExcludeListResponse, ExcludeUpdateResponse, ) @@ -125,7 +126,7 @@ def test_method_list(self, client: Cloudflare) -> None: exclude = client.zero_trust.devices.policies.excludes.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ExcludeListResponse], exclude, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesSplitTunnel], exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +138,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" exclude = response.parse() - assert_matches_type(Optional[ExcludeListResponse], exclude, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesSplitTunnel], exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -149,7 +150,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" exclude = response.parse() - assert_matches_type(Optional[ExcludeListResponse], exclude, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesSplitTunnel], exclude, path=["response"]) assert cast(Any, response.is_closed) is True @@ -321,7 +322,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: exclude = await async_client.zero_trust.devices.policies.excludes.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ExcludeListResponse], exclude, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesSplitTunnel], exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +334,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" exclude = await response.parse() - assert_matches_type(Optional[ExcludeListResponse], exclude, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesSplitTunnel], exclude, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +346,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" exclude = await response.parse() - assert_matches_type(Optional[ExcludeListResponse], exclude, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesSplitTunnel], exclude, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py index 539a25224c1..1fb852868b0 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py +++ b/tests/api_resources/zero_trust/devices/policies/test_fallback_domains.py @@ -9,9 +9,10 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices.policies import ( + DevicesFallbackDomain, FallbackDomainGetResponse, - FallbackDomainListResponse, FallbackDomainUpdateResponse, ) @@ -84,7 +85,7 @@ def test_method_list(self, client: Cloudflare) -> None: fallback_domain = client.zero_trust.devices.policies.fallback_domains.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[FallbackDomainListResponse], fallback_domain, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesFallbackDomain], fallback_domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -96,7 +97,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" fallback_domain = response.parse() - assert_matches_type(Optional[FallbackDomainListResponse], fallback_domain, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesFallbackDomain], fallback_domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +109,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_domain = response.parse() - assert_matches_type(Optional[FallbackDomainListResponse], fallback_domain, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesFallbackDomain], fallback_domain, path=["response"]) assert cast(Any, response.is_closed) is True @@ -239,7 +240,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: fallback_domain = await async_client.zero_trust.devices.policies.fallback_domains.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[FallbackDomainListResponse], fallback_domain, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesFallbackDomain], fallback_domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -251,7 +252,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" fallback_domain = await response.parse() - assert_matches_type(Optional[FallbackDomainListResponse], fallback_domain, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesFallbackDomain], fallback_domain, path=["response"]) @pytest.mark.skip() @parametrize @@ -263,7 +264,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" fallback_domain = await response.parse() - assert_matches_type(Optional[FallbackDomainListResponse], fallback_domain, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesFallbackDomain], fallback_domain, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/policies/test_includes.py b/tests/api_resources/zero_trust/devices/policies/test_includes.py index 1a6e8a7f0a3..41d15bd2c83 100644 --- a/tests/api_resources/zero_trust/devices/policies/test_includes.py +++ b/tests/api_resources/zero_trust/devices/policies/test_includes.py @@ -9,10 +9,11 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices.policies import ( IncludeGetResponse, - IncludeListResponse, IncludeUpdateResponse, + DevicesSplitTunnelInclude, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -125,7 +126,7 @@ def test_method_list(self, client: Cloudflare) -> None: include = client.zero_trust.devices.policies.includes.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IncludeListResponse], include, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesSplitTunnelInclude], include, path=["response"]) @pytest.mark.skip() @parametrize @@ -137,7 +138,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" include = response.parse() - assert_matches_type(Optional[IncludeListResponse], include, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesSplitTunnelInclude], include, path=["response"]) @pytest.mark.skip() @parametrize @@ -149,7 +150,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" include = response.parse() - assert_matches_type(Optional[IncludeListResponse], include, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesSplitTunnelInclude], include, path=["response"]) assert cast(Any, response.is_closed) is True @@ -321,7 +322,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: include = await async_client.zero_trust.devices.policies.includes.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IncludeListResponse], include, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesSplitTunnelInclude], include, path=["response"]) @pytest.mark.skip() @parametrize @@ -333,7 +334,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" include = await response.parse() - assert_matches_type(Optional[IncludeListResponse], include, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesSplitTunnelInclude], include, path=["response"]) @pytest.mark.skip() @parametrize @@ -345,7 +346,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" include = await response.parse() - assert_matches_type(Optional[IncludeListResponse], include, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesSplitTunnelInclude], include, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/posture/test_integrations.py b/tests/api_resources/zero_trust/devices/posture/test_integrations.py index fd4e734bc86..2094d8b4161 100644 --- a/tests/api_resources/zero_trust/devices/posture/test_integrations.py +++ b/tests/api_resources/zero_trust/devices/posture/test_integrations.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices.posture import ( - IntegrationListResponse, DevicePostureIntegrations, IntegrationDeleteResponse, ) @@ -122,7 +122,7 @@ def test_method_list(self, client: Cloudflare) -> None: integration = client.zero_trust.devices.posture.integrations.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IntegrationListResponse], integration, path=["response"]) + assert_matches_type(SyncSinglePage[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -134,7 +134,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" integration = response.parse() - assert_matches_type(Optional[IntegrationListResponse], integration, path=["response"]) + assert_matches_type(SyncSinglePage[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -146,7 +146,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = response.parse() - assert_matches_type(Optional[IntegrationListResponse], integration, path=["response"]) + assert_matches_type(SyncSinglePage[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True @@ -437,7 +437,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: integration = await async_client.zero_trust.devices.posture.integrations.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[IntegrationListResponse], integration, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -449,7 +449,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" integration = await response.parse() - assert_matches_type(Optional[IntegrationListResponse], integration, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicePostureIntegrations], integration, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +461,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" integration = await response.parse() - assert_matches_type(Optional[IntegrationListResponse], integration, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicePostureIntegrations], integration, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_dex_tests.py b/tests/api_resources/zero_trust/devices/test_dex_tests.py index 9e8ccfa5ead..749e995456c 100644 --- a/tests/api_resources/zero_trust/devices/test_dex_tests.py +++ b/tests/api_resources/zero_trust/devices/test_dex_tests.py @@ -9,9 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices import ( DEXTestSchemasHTTP, - DEXTestListResponse, DEXTestDeleteResponse, ) @@ -192,7 +192,7 @@ def test_method_list(self, client: Cloudflare) -> None: dex_test = client.zero_trust.devices.dex_tests.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[DEXTestListResponse], dex_test, path=["response"]) + assert_matches_type(SyncSinglePage[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -204,7 +204,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" dex_test = response.parse() - assert_matches_type(Optional[DEXTestListResponse], dex_test, path=["response"]) + assert_matches_type(SyncSinglePage[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -216,7 +216,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = response.parse() - assert_matches_type(Optional[DEXTestListResponse], dex_test, path=["response"]) + assert_matches_type(SyncSinglePage[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True @@ -507,7 +507,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: dex_test = await async_client.zero_trust.devices.dex_tests.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[DEXTestListResponse], dex_test, path=["response"]) + assert_matches_type(AsyncSinglePage[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -519,7 +519,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" dex_test = await response.parse() - assert_matches_type(Optional[DEXTestListResponse], dex_test, path=["response"]) + assert_matches_type(AsyncSinglePage[DEXTestSchemasHTTP], dex_test, path=["response"]) @pytest.mark.skip() @parametrize @@ -531,7 +531,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" dex_test = await response.parse() - assert_matches_type(Optional[DEXTestListResponse], dex_test, path=["response"]) + assert_matches_type(AsyncSinglePage[DEXTestSchemasHTTP], dex_test, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_networks.py b/tests/api_resources/zero_trust/devices/test_networks.py index dcff69ee7ba..232e6be1425 100644 --- a/tests/api_resources/zero_trust/devices/test_networks.py +++ b/tests/api_resources/zero_trust/devices/test_networks.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices import ( - NetworkListResponse, DeviceManagedNetworks, NetworkDeleteResponse, ) @@ -162,7 +162,7 @@ def test_method_list(self, client: Cloudflare) -> None: network = client.zero_trust.devices.networks.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[NetworkListResponse], network, path=["response"]) + assert_matches_type(SyncSinglePage[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -174,7 +174,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" network = response.parse() - assert_matches_type(Optional[NetworkListResponse], network, path=["response"]) + assert_matches_type(SyncSinglePage[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -186,7 +186,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = response.parse() - assert_matches_type(Optional[NetworkListResponse], network, path=["response"]) + assert_matches_type(SyncSinglePage[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -447,7 +447,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: network = await async_client.zero_trust.devices.networks.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[NetworkListResponse], network, path=["response"]) + assert_matches_type(AsyncSinglePage[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -459,7 +459,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" network = await response.parse() - assert_matches_type(Optional[NetworkListResponse], network, path=["response"]) + assert_matches_type(AsyncSinglePage[DeviceManagedNetworks], network, path=["response"]) @pytest.mark.skip() @parametrize @@ -471,7 +471,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" network = await response.parse() - assert_matches_type(Optional[NetworkListResponse], network, path=["response"]) + assert_matches_type(AsyncSinglePage[DeviceManagedNetworks], network, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_policies.py b/tests/api_resources/zero_trust/devices/test_policies.py index 9dd46518c65..2fcbeec752d 100644 --- a/tests/api_resources/zero_trust/devices/test_policies.py +++ b/tests/api_resources/zero_trust/devices/test_policies.py @@ -9,8 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices import ( - PolicyListResponse, PolicyDeleteResponse, DevicesDeviceSettingsPolicy, ) @@ -109,7 +109,7 @@ def test_method_list(self, client: Cloudflare) -> None: policy = client.zero_trust.devices.policies.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +121,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" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +133,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(SyncSinglePage[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True @@ -420,7 +420,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: policy = await async_client.zero_trust.devices.policies.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -432,7 +432,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" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesDeviceSettingsPolicy], policy, path=["response"]) @pytest.mark.skip() @parametrize @@ -444,7 +444,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" policy = await response.parse() - assert_matches_type(Optional[PolicyListResponse], policy, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicesDeviceSettingsPolicy], policy, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/devices/test_posture.py b/tests/api_resources/zero_trust/devices/test_posture.py index 01f053a9399..22dc0343f2d 100644 --- a/tests/api_resources/zero_trust/devices/test_posture.py +++ b/tests/api_resources/zero_trust/devices/test_posture.py @@ -9,9 +9,9 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.devices import ( DevicePostureRules, - PostureListResponse, PostureDeleteResponse, ) @@ -182,7 +182,7 @@ def test_method_list(self, client: Cloudflare) -> None: posture = client.zero_trust.devices.posture.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PostureListResponse], posture, path=["response"]) + assert_matches_type(SyncSinglePage[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -194,7 +194,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" posture = response.parse() - assert_matches_type(Optional[PostureListResponse], posture, path=["response"]) + assert_matches_type(SyncSinglePage[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -206,7 +206,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = response.parse() - assert_matches_type(Optional[PostureListResponse], posture, path=["response"]) + assert_matches_type(SyncSinglePage[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True @@ -487,7 +487,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: posture = await async_client.zero_trust.devices.posture.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[PostureListResponse], posture, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -499,7 +499,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" posture = await response.parse() - assert_matches_type(Optional[PostureListResponse], posture, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicePostureRules], posture, path=["response"]) @pytest.mark.skip() @parametrize @@ -511,7 +511,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" posture = await response.parse() - assert_matches_type(Optional[PostureListResponse], posture, path=["response"]) + assert_matches_type(AsyncSinglePage[DevicePostureRules], posture, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dex/test_colos.py b/tests/api_resources/zero_trust/dex/test_colos.py index 743e557aa1d..2a700707496 100644 --- a/tests/api_resources/zero_trust/dex/test_colos.py +++ b/tests/api_resources/zero_trust/dex/test_colos.py @@ -3,13 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dex import ColoListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: time_end="2023-08-24T20:45:00Z", time_start="2023-08-20T20:45:00Z", ) - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(SyncSinglePage[object], colo, path=["response"]) @pytest.mark.skip() @parametrize @@ -36,7 +36,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: time_start="2023-08-20T20:45:00Z", sort_by="fleet-status-usage", ) - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(SyncSinglePage[object], colo, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +50,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" colo = response.parse() - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(SyncSinglePage[object], colo, path=["response"]) @pytest.mark.skip() @parametrize @@ -64,7 +64,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" colo = response.parse() - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(SyncSinglePage[object], colo, path=["response"]) assert cast(Any, response.is_closed) is True @@ -90,7 +90,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: time_end="2023-08-24T20:45:00Z", time_start="2023-08-20T20:45:00Z", ) - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) @pytest.mark.skip() @parametrize @@ -101,7 +101,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) time_start="2023-08-20T20:45:00Z", sort_by="fleet-status-usage", ) - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) @pytest.mark.skip() @parametrize @@ -115,7 +115,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" colo = await response.parse() - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) @pytest.mark.skip() @parametrize @@ -129,7 +129,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" colo = await response.parse() - assert_matches_type(Optional[ColoListResponse], colo, path=["response"]) + assert_matches_type(AsyncSinglePage[object], colo, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dlp/test_datasets.py b/tests/api_resources/zero_trust/dlp/test_datasets.py index 41c95702da4..6a9e3a59c4e 100644 --- a/tests/api_resources/zero_trust/dlp/test_datasets.py +++ b/tests/api_resources/zero_trust/dlp/test_datasets.py @@ -9,11 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp import ( - DLPDataset, - DLPDatasetArray, - DLPDatasetCreation, -) +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.dlp import DLPDataset, DLPDatasetCreation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -147,7 +144,7 @@ def test_method_list(self, client: Cloudflare) -> None: dataset = client.zero_trust.dlp.datasets.list( account_id="string", ) - assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) + assert_matches_type(SyncSinglePage[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -159,7 +156,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" dataset = response.parse() - assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) + assert_matches_type(SyncSinglePage[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -171,7 +168,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = response.parse() - assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) + assert_matches_type(SyncSinglePage[DLPDataset], dataset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -417,7 +414,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: dataset = await async_client.zero_trust.dlp.datasets.list( account_id="string", ) - assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) + assert_matches_type(AsyncSinglePage[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -429,7 +426,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" dataset = await response.parse() - assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) + assert_matches_type(AsyncSinglePage[DLPDataset], dataset, path=["response"]) @pytest.mark.skip() @parametrize @@ -441,7 +438,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" dataset = await response.parse() - assert_matches_type(Optional[DLPDatasetArray], dataset, path=["response"]) + assert_matches_type(AsyncSinglePage[DLPDataset], dataset, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/dlp/test_profiles.py b/tests/api_resources/zero_trust/dlp/test_profiles.py index 0c9f30725ef..d4aba3617f9 100644 --- a/tests/api_resources/zero_trust/dlp/test_profiles.py +++ b/tests/api_resources/zero_trust/dlp/test_profiles.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.dlp import ProfileGetResponse, ProfileListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.dlp import DLPProfiles, ProfileGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: profile = client.zero_trust.dlp.profiles.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ProfileListResponse], profile, path=["response"]) + assert_matches_type(SyncSinglePage[DLPProfiles], profile, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" profile = response.parse() - assert_matches_type(Optional[ProfileListResponse], profile, path=["response"]) + assert_matches_type(SyncSinglePage[DLPProfiles], profile, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" profile = response.parse() - assert_matches_type(Optional[ProfileListResponse], profile, path=["response"]) + assert_matches_type(SyncSinglePage[DLPProfiles], profile, path=["response"]) assert cast(Any, response.is_closed) is True @@ -121,7 +122,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: profile = await async_client.zero_trust.dlp.profiles.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[ProfileListResponse], profile, path=["response"]) + assert_matches_type(AsyncSinglePage[DLPProfiles], profile, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +134,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" profile = await response.parse() - assert_matches_type(Optional[ProfileListResponse], profile, path=["response"]) + assert_matches_type(AsyncSinglePage[DLPProfiles], profile, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +146,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" profile = await response.parse() - assert_matches_type(Optional[ProfileListResponse], profile, path=["response"]) + assert_matches_type(AsyncSinglePage[DLPProfiles], profile, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/lists/test_items.py b/tests/api_resources/zero_trust/gateway/lists/test_items.py index 897c1cd5eba..e16f44bd1ce 100644 --- a/tests/api_resources/zero_trust/gateway/lists/test_items.py +++ b/tests/api_resources/zero_trust/gateway/lists/test_items.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway.lists import ItemListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -24,7 +25,7 @@ def test_method_list(self, client: Cloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ItemListResponse], item, path=["response"]) + assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) @pytest.mark.skip() @parametrize @@ -37,7 +38,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" item = response.parse() - assert_matches_type(Optional[ItemListResponse], item, path=["response"]) + assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) @pytest.mark.skip() @parametrize @@ -50,7 +51,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" item = response.parse() - assert_matches_type(Optional[ItemListResponse], item, path=["response"]) + assert_matches_type(SyncSinglePage[ItemListResponse], item, path=["response"]) assert cast(Any, response.is_closed) is True @@ -80,7 +81,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: "f174e90a-fafe-4643-bbbc-4a0ed4fc8415", account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ItemListResponse], item, path=["response"]) + assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,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" item = await response.parse() - assert_matches_type(Optional[ItemListResponse], item, path=["response"]) + assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +107,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" item = await response.parse() - assert_matches_type(Optional[ItemListResponse], item, path=["response"]) + assert_matches_type(AsyncSinglePage[ItemListResponse], item, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_app_types.py b/tests/api_resources/zero_trust/gateway/test_app_types.py index 4a31c39d68c..1c07ff95dc2 100644 --- a/tests/api_resources/zero_trust/gateway/test_app_types.py +++ b/tests/api_resources/zero_trust/gateway/test_app_types.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway import AppTypeListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayAppTypes base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: app_type = client.zero_trust.gateway.app_types.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AppTypeListResponse], app_type, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayAppTypes], app_type, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" app_type = response.parse() - assert_matches_type(Optional[AppTypeListResponse], app_type, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayAppTypes], app_type, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" app_type = response.parse() - assert_matches_type(Optional[AppTypeListResponse], app_type, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayAppTypes], app_type, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: app_type = await async_client.zero_trust.gateway.app_types.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[AppTypeListResponse], app_type, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayAppTypes], app_type, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" app_type = await response.parse() - assert_matches_type(Optional[AppTypeListResponse], app_type, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayAppTypes], app_type, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" app_type = await response.parse() - assert_matches_type(Optional[AppTypeListResponse], app_type, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayAppTypes], app_type, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_categories.py b/tests/api_resources/zero_trust/gateway/test_categories.py index ea56415fa87..597b08b3c5d 100644 --- a/tests/api_resources/zero_trust/gateway/test_categories.py +++ b/tests/api_resources/zero_trust/gateway/test_categories.py @@ -3,13 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust.gateway import CategoryListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust.gateway import ZeroTrustGatewayCategories base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: category = client.zero_trust.gateway.categories.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CategoryListResponse], category, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayCategories], category, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" category = response.parse() - assert_matches_type(Optional[CategoryListResponse], category, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayCategories], category, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" category = response.parse() - assert_matches_type(Optional[CategoryListResponse], category, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayCategories], category, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +70,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: category = await async_client.zero_trust.gateway.categories.list( account_id="023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[CategoryListResponse], category, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayCategories], category, path=["response"]) @pytest.mark.skip() @parametrize @@ -81,7 +82,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" category = await response.parse() - assert_matches_type(Optional[CategoryListResponse], category, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayCategories], category, path=["response"]) @pytest.mark.skip() @parametrize @@ -93,7 +94,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" category = await response.parse() - assert_matches_type(Optional[CategoryListResponse], category, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayCategories], category, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_lists.py b/tests/api_resources/zero_trust/gateway/test_lists.py index 93252fb2077..3744b856256 100644 --- a/tests/api_resources/zero_trust/gateway/test_lists.py +++ b/tests/api_resources/zero_trust/gateway/test_lists.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( - ListListResponse, ListCreateResponse, ListDeleteResponse, ZeroTrustGatewayLists, @@ -158,7 +158,7 @@ def test_method_list(self, client: Cloudflare) -> None: list = client.zero_trust.gateway.lists.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayLists], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,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" list = response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayLists], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -182,7 +182,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayLists], list, path=["response"]) assert cast(Any, response.is_closed) is True @@ -501,7 +501,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: list = await async_client.zero_trust.gateway.lists.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayLists], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -513,7 +513,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" list = await response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayLists], list, path=["response"]) @pytest.mark.skip() @parametrize @@ -525,7 +525,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" list = await response.parse() - assert_matches_type(Optional[ListListResponse], list, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayLists], list, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_locations.py b/tests/api_resources/zero_trust/gateway/test_locations.py index eac3bc084ca..fcc448b5063 100644 --- a/tests/api_resources/zero_trust/gateway/test_locations.py +++ b/tests/api_resources/zero_trust/gateway/test_locations.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( - LocationListResponse, LocationDeleteResponse, ZeroTrustGatewayLocations, ) @@ -155,7 +155,7 @@ def test_method_list(self, client: Cloudflare) -> None: location = client.zero_trust.gateway.locations.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[LocationListResponse], location, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayLocations], location, path=["response"]) @pytest.mark.skip() @parametrize @@ -167,7 +167,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" location = response.parse() - assert_matches_type(Optional[LocationListResponse], location, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayLocations], location, path=["response"]) @pytest.mark.skip() @parametrize @@ -179,7 +179,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = response.parse() - assert_matches_type(Optional[LocationListResponse], location, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayLocations], location, path=["response"]) assert cast(Any, response.is_closed) is True @@ -433,7 +433,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: location = await async_client.zero_trust.gateway.locations.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[LocationListResponse], location, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayLocations], location, path=["response"]) @pytest.mark.skip() @parametrize @@ -445,7 +445,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" location = await response.parse() - assert_matches_type(Optional[LocationListResponse], location, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayLocations], location, path=["response"]) @pytest.mark.skip() @parametrize @@ -457,7 +457,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" location = await response.parse() - assert_matches_type(Optional[LocationListResponse], location, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayLocations], location, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py index 4165f99f68e..8b9d29867c4 100644 --- a/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py +++ b/tests/api_resources/zero_trust/gateway/test_proxy_endpoints.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( - ProxyEndpointListResponse, ProxyEndpointDeleteResponse, ZeroTrustGatewayProxyEndpoints, ) @@ -88,7 +88,7 @@ def test_method_list(self, client: Cloudflare) -> None: proxy_endpoint = client.zero_trust.gateway.proxy_endpoints.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ProxyEndpointListResponse], proxy_endpoint, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayProxyEndpoints], proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -100,7 +100,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" proxy_endpoint = response.parse() - assert_matches_type(Optional[ProxyEndpointListResponse], proxy_endpoint, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayProxyEndpoints], proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -112,7 +112,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = response.parse() - assert_matches_type(Optional[ProxyEndpointListResponse], proxy_endpoint, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayProxyEndpoints], proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True @@ -363,7 +363,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: proxy_endpoint = await async_client.zero_trust.gateway.proxy_endpoints.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[ProxyEndpointListResponse], proxy_endpoint, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayProxyEndpoints], proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -375,7 +375,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" proxy_endpoint = await response.parse() - assert_matches_type(Optional[ProxyEndpointListResponse], proxy_endpoint, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayProxyEndpoints], proxy_endpoint, path=["response"]) @pytest.mark.skip() @parametrize @@ -387,7 +387,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" proxy_endpoint = await response.parse() - assert_matches_type(Optional[ProxyEndpointListResponse], proxy_endpoint, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayProxyEndpoints], proxy_endpoint, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/gateway/test_rules.py b/tests/api_resources/zero_trust/gateway/test_rules.py index 0855ed25352..c6ba3450655 100644 --- a/tests/api_resources/zero_trust/gateway/test_rules.py +++ b/tests/api_resources/zero_trust/gateway/test_rules.py @@ -3,14 +3,14 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.gateway import ( - RuleListResponse, RuleDeleteResponse, ZeroTrustGatewayRules, ) @@ -366,7 +366,7 @@ def test_method_list(self, client: Cloudflare) -> None: rule = client.zero_trust.gateway.rules.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayRules], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -378,7 +378,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayRules], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -390,7 +390,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustGatewayRules], rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -855,7 +855,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: rule = await async_client.zero_trust.gateway.rules.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayRules], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -867,7 +867,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayRules], rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -879,7 +879,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(Optional[RuleListResponse], rule, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustGatewayRules], rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/networks/test_virtual_networks.py b/tests/api_resources/zero_trust/networks/test_virtual_networks.py index 7303c7ba480..0f9798517cb 100644 --- a/tests/api_resources/zero_trust/networks/test_virtual_networks.py +++ b/tests/api_resources/zero_trust/networks/test_virtual_networks.py @@ -3,15 +3,16 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust.networks import ( + TunnelVirtualNetwork, VirtualNetworkEditResponse, - VirtualNetworkListResponse, VirtualNetworkCreateResponse, VirtualNetworkDeleteResponse, ) @@ -85,7 +86,7 @@ def test_method_list(self, client: Cloudflare) -> None: virtual_network = client.zero_trust.networks.virtual_networks.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(SyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) @pytest.mark.skip() @parametrize @@ -97,7 +98,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: name="us-east-1-vpc", vnet_name="us-east-1-vpc", ) - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(SyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +110,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" virtual_network = response.parse() - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(SyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +122,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" virtual_network = response.parse() - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(SyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) assert cast(Any, response.is_closed) is True @@ -316,7 +317,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: virtual_network = await async_client.zero_trust.networks.virtual_networks.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(AsyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) @pytest.mark.skip() @parametrize @@ -328,7 +329,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) name="us-east-1-vpc", vnet_name="us-east-1-vpc", ) - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(AsyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +341,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" virtual_network = await response.parse() - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(AsyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) @pytest.mark.skip() @parametrize @@ -352,7 +353,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" virtual_network = await response.parse() - assert_matches_type(Optional[VirtualNetworkListResponse], virtual_network, path=["response"]) + assert_matches_type(AsyncSinglePage[TunnelVirtualNetwork], virtual_network, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/test_devices.py b/tests/api_resources/zero_trust/test_devices.py index 4906f8a07c7..bdc426140f6 100644 --- a/tests/api_resources/zero_trust/test_devices.py +++ b/tests/api_resources/zero_trust/test_devices.py @@ -9,7 +9,8 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types.zero_trust import DeviceGetResponse, DeviceListResponse +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage +from cloudflare.types.zero_trust import ZeroTrustDevices, DeviceGetResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +24,7 @@ def test_method_list(self, client: Cloudflare) -> None: device = client.zero_trust.devices.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustDevices], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -35,7 +36,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" device = response.parse() - assert_matches_type(Optional[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustDevices], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -47,7 +48,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" device = response.parse() - assert_matches_type(Optional[DeviceListResponse], device, path=["response"]) + assert_matches_type(SyncSinglePage[ZeroTrustDevices], device, path=["response"]) assert cast(Any, response.is_closed) is True @@ -121,7 +122,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: device = await async_client.zero_trust.devices.list( account_id="699d98642c564d2e855e9661899b7252", ) - assert_matches_type(Optional[DeviceListResponse], device, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustDevices], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +134,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" device = await response.parse() - assert_matches_type(Optional[DeviceListResponse], device, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustDevices], device, path=["response"]) @pytest.mark.skip() @parametrize @@ -145,7 +146,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" device = await response.parse() - assert_matches_type(Optional[DeviceListResponse], device, path=["response"]) + assert_matches_type(AsyncSinglePage[ZeroTrustDevices], device, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zero_trust/test_identity_providers.py b/tests/api_resources/zero_trust/test_identity_providers.py index 88f99fd5541..39ad381c741 100644 --- a/tests/api_resources/zero_trust/test_identity_providers.py +++ b/tests/api_resources/zero_trust/test_identity_providers.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zero_trust import ( ZeroTrustIdentityProviders, IdentityProviderListResponse, @@ -2836,7 +2837,7 @@ def test_method_list(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2845,7 +2846,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2858,7 +2859,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" identity_provider = response.parse() - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -2871,7 +2872,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = response.parse() - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(SyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True @@ -5857,7 +5858,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5866,7 +5867,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) account_id="string", zone_id="string", ) - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5879,7 +5880,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" identity_provider = await response.parse() - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) @pytest.mark.skip() @parametrize @@ -5892,7 +5893,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" identity_provider = await response.parse() - assert_matches_type(Optional[IdentityProviderListResponse], identity_provider, path=["response"]) + assert_matches_type(AsyncSinglePage[IdentityProviderListResponse], identity_provider, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/zones/test_subscriptions.py b/tests/api_resources/zones/test_subscriptions.py index 4466dd2d214..969e48d0ee7 100644 --- a/tests/api_resources/zones/test_subscriptions.py +++ b/tests/api_resources/zones/test_subscriptions.py @@ -3,12 +3,13 @@ from __future__ import annotations import os -from typing import Any, Optional, cast +from typing import Any, cast import pytest from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type +from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.zones import ( SubscriptionGetResponse, SubscriptionListResponse, @@ -109,7 +110,7 @@ def test_method_list(self, client: Cloudflare) -> None: subscription = client.zones.subscriptions.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(SyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +122,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" subscription = response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(SyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -133,7 +134,7 @@ def test_streaming_response_list(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" subscription = response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(SyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) assert cast(Any, response.is_closed) is True @@ -279,7 +280,7 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None: subscription = await async_client.zones.subscriptions.list( "023e105f4ecef8ad9ca31a8372d0c353", ) - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(AsyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -291,7 +292,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" subscription = await response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(AsyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) @pytest.mark.skip() @parametrize @@ -303,7 +304,7 @@ async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" subscription = await response.parse() - assert_matches_type(Optional[SubscriptionListResponse], subscription, path=["response"]) + assert_matches_type(AsyncSinglePage[SubscriptionListResponse], subscription, path=["response"]) assert cast(Any, response.is_closed) is True From 71da3ed76c65bcb5e14bb964c98327f797ad1c1c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 06:13:32 +0000 Subject: [PATCH 08/16] feat(api): update via SDK Studio (#188) --- api.md | 35 +++-- mypy.ini | 2 +- src/cloudflare/_client.py | 16 +- src/cloudflare/resources/__init__.py | 24 +-- .../resources/hyperdrive/__init__.py | 24 +-- .../resources/hyperdrive/hyperdrive.py | 38 ++--- .../resources/rulesets/phases/phases.py | 18 +-- .../resources/rulesets/phases/versions.py | 10 +- src/cloudflare/resources/rulesets/rules.py | 58 +++---- src/cloudflare/resources/rulesets/rulesets.py | 31 ++-- .../resources/rulesets/versions/by_tag.py | 10 +- .../resources/rulesets/versions/versions.py | 10 +- src/cloudflare/types/__init__.py | 3 +- src/cloudflare/types/hyperdrive/__init__.py | 1 + src/cloudflare/types/hyperdrive/hyperdrive.py | 12 ++ .../types/request_tracers/__init__.py | 1 + src/cloudflare/types/request_tracers/trace.py | 46 +----- .../types/request_tracers/trace_item.py | 49 ++++++ ...ulesets_ruleset_response.py => ruleset.py} | 4 +- .../types/rulesets_rulesets_response.py | 59 ------- .../rulesets/phases/test_versions.py | 18 +-- tests/api_resources/rulesets/test_phases.py | 34 ++-- tests/api_resources/rulesets/test_rules.py | 146 +++++++++--------- tests/api_resources/rulesets/test_versions.py | 18 +-- .../rulesets/versions/test_by_tag.py | 14 +- tests/api_resources/test_rulesets.py | 50 +++--- 26 files changed, 348 insertions(+), 383 deletions(-) create mode 100644 src/cloudflare/types/hyperdrive/hyperdrive.py create mode 100644 src/cloudflare/types/request_tracers/trace_item.py rename src/cloudflare/types/{rulesets_ruleset_response.py => ruleset.py} (99%) delete mode 100644 src/cloudflare/types/rulesets_rulesets_response.py diff --git a/api.md b/api.md index bbbeb5a3bad..503c59f2ae6 100644 --- a/api.md +++ b/api.md @@ -3080,23 +3080,23 @@ Methods: Types: ```python -from cloudflare.types import RulesetsRulesetResponse, RulesetsRulesetsResponse, RulesetListResponse +from cloudflare.types import Ruleset, RulesetListResponse ``` Methods: -- client.rulesets.create(\*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse -- client.rulesets.update(ruleset_id, \*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse +- client.rulesets.create(\*, account_id, zone_id, \*\*params) -> Ruleset +- client.rulesets.update(ruleset_id, \*, account_id, zone_id, \*\*params) -> Ruleset - client.rulesets.list(\*, account_id, zone_id) -> SyncSinglePage[RulesetListResponse] - client.rulesets.delete(ruleset_id, \*, account_id, zone_id) -> None -- client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> RulesetsRulesetResponse +- client.rulesets.get(ruleset_id, \*, account_id, zone_id) -> Ruleset ## Phases Methods: -- client.rulesets.phases.update(ruleset_phase, \*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse -- client.rulesets.phases.get(ruleset_phase, \*, account_id, zone_id) -> RulesetsRulesetResponse +- client.rulesets.phases.update(ruleset_phase, \*, account_id, zone_id, \*\*params) -> Ruleset +- client.rulesets.phases.get(ruleset_phase, \*, account_id, zone_id) -> Ruleset ### Versions @@ -3109,15 +3109,15 @@ from cloudflare.types.rulesets.phases import VersionListResponse Methods: - client.rulesets.phases.versions.list(ruleset_phase, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse] -- client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> RulesetsRulesetResponse +- client.rulesets.phases.versions.get(ruleset_version, \*, ruleset_phase, account_id, zone_id) -> Ruleset ## Rules Methods: -- client.rulesets.rules.create(ruleset_id, \*, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse -- client.rulesets.rules.delete(rule_id, \*, ruleset_id, account_id, zone_id) -> RulesetsRulesetResponse -- client.rulesets.rules.edit(rule_id, \*, ruleset_id, account_id, zone_id, \*\*params) -> RulesetsRulesetResponse +- client.rulesets.rules.create(ruleset_id, \*, account_id, zone_id, \*\*params) -> Ruleset +- client.rulesets.rules.delete(rule_id, \*, ruleset_id, account_id, zone_id) -> Ruleset +- client.rulesets.rules.edit(rule_id, \*, ruleset_id, account_id, zone_id, \*\*params) -> Ruleset ## Versions @@ -3131,13 +3131,13 @@ Methods: - client.rulesets.versions.list(ruleset_id, \*, account_id, zone_id) -> SyncSinglePage[VersionListResponse] - 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 +- client.rulesets.versions.get(ruleset_version, \*, ruleset_id, account_id, zone_id) -> Ruleset ### ByTag Methods: -- client.rulesets.versions.by_tag.get(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> RulesetsRulesetResponse +- client.rulesets.versions.by_tag.get(rule_tag, \*, account_id, ruleset_id, ruleset_version) -> Ruleset # URLNormalization @@ -4143,7 +4143,7 @@ Methods: Types: ```python -from cloudflare.types.request_tracers import Trace, TraceCreateResponse +from cloudflare.types.request_tracers import Trace, TraceItem, TraceCreateResponse ``` Methods: @@ -5776,7 +5776,13 @@ Methods: - client.challenges.widgets.get(sitekey, \*, account_id) -> Optional - client.challenges.widgets.rotate_secret(sitekey, \*, account_id, \*\*params) -> Optional -# Hyperdrive +# HyperdriveResource + +Types: + +```python +from cloudflare.types import Hyperdrive +``` ## Configs @@ -5784,7 +5790,6 @@ Types: ```python from cloudflare.types.hyperdrive import ( - Hyperdrive, ConfigCreateResponse, ConfigUpdateResponse, ConfigListResponse, diff --git a/mypy.ini b/mypy.ini index 52065c456a8..1df17ff1948 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,7 +5,7 @@ show_error_codes = True # Exclude _files.py because mypy isn't smart enough to apply # the correct type narrowing and as this is an internal module # it's fine to just use Pyright. -exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/workers/ai\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py)$ +exclude = ^(src/cloudflare/_files\.py|_dev/.*\.py|src/cloudflare/resources/zero_trust/identity_providers\.py|src/cloudflare/resources/zero_trust/access/applications/applications\.py|src/cloudflare/resources/workers/ai\.py)$ strict_equality = True implicit_reexport = True diff --git a/src/cloudflare/_client.py b/src/cloudflare/_client.py index dfb824979f7..8951d5319e1 100644 --- a/src/cloudflare/_client.py +++ b/src/cloudflare/_client.py @@ -114,7 +114,7 @@ class Cloudflare(SyncAPIClient): workers_for_platforms: resources.WorkersForPlatforms zero_trust: resources.ZeroTrust challenges: resources.Challenges - hyperdrive: resources.Hyperdrive + hyperdrive: resources.HyperdriveResource rum: resources.RUM vectorize: resources.Vectorize url_scanner: resources.URLScanner @@ -267,7 +267,7 @@ def __init__( self.workers_for_platforms = resources.WorkersForPlatforms(self) self.zero_trust = resources.ZeroTrust(self) self.challenges = resources.Challenges(self) - self.hyperdrive = resources.Hyperdrive(self) + self.hyperdrive = resources.HyperdriveResource(self) self.rum = resources.RUM(self) self.vectorize = resources.Vectorize(self) self.url_scanner = resources.URLScanner(self) @@ -525,7 +525,7 @@ class AsyncCloudflare(AsyncAPIClient): workers_for_platforms: resources.AsyncWorkersForPlatforms zero_trust: resources.AsyncZeroTrust challenges: resources.AsyncChallenges - hyperdrive: resources.AsyncHyperdrive + hyperdrive: resources.AsyncHyperdriveResource rum: resources.AsyncRUM vectorize: resources.AsyncVectorize url_scanner: resources.AsyncURLScanner @@ -678,7 +678,7 @@ def __init__( self.workers_for_platforms = resources.AsyncWorkersForPlatforms(self) self.zero_trust = resources.AsyncZeroTrust(self) self.challenges = resources.AsyncChallenges(self) - self.hyperdrive = resources.AsyncHyperdrive(self) + self.hyperdrive = resources.AsyncHyperdriveResource(self) self.rum = resources.AsyncRUM(self) self.vectorize = resources.AsyncVectorize(self) self.url_scanner = resources.AsyncURLScanner(self) @@ -937,7 +937,7 @@ def __init__(self, client: Cloudflare) -> None: self.workers_for_platforms = resources.WorkersForPlatformsWithRawResponse(client.workers_for_platforms) self.zero_trust = resources.ZeroTrustWithRawResponse(client.zero_trust) self.challenges = resources.ChallengesWithRawResponse(client.challenges) - self.hyperdrive = resources.HyperdriveWithRawResponse(client.hyperdrive) + self.hyperdrive = resources.HyperdriveResourceWithRawResponse(client.hyperdrive) self.rum = resources.RUMWithRawResponse(client.rum) self.vectorize = resources.VectorizeWithRawResponse(client.vectorize) self.url_scanner = resources.URLScannerWithRawResponse(client.url_scanner) @@ -1027,7 +1027,7 @@ def __init__(self, client: AsyncCloudflare) -> None: self.workers_for_platforms = resources.AsyncWorkersForPlatformsWithRawResponse(client.workers_for_platforms) self.zero_trust = resources.AsyncZeroTrustWithRawResponse(client.zero_trust) self.challenges = resources.AsyncChallengesWithRawResponse(client.challenges) - self.hyperdrive = resources.AsyncHyperdriveWithRawResponse(client.hyperdrive) + self.hyperdrive = resources.AsyncHyperdriveResourceWithRawResponse(client.hyperdrive) self.rum = resources.AsyncRUMWithRawResponse(client.rum) self.vectorize = resources.AsyncVectorizeWithRawResponse(client.vectorize) self.url_scanner = resources.AsyncURLScannerWithRawResponse(client.url_scanner) @@ -1117,7 +1117,7 @@ def __init__(self, client: Cloudflare) -> None: self.workers_for_platforms = resources.WorkersForPlatformsWithStreamingResponse(client.workers_for_platforms) self.zero_trust = resources.ZeroTrustWithStreamingResponse(client.zero_trust) self.challenges = resources.ChallengesWithStreamingResponse(client.challenges) - self.hyperdrive = resources.HyperdriveWithStreamingResponse(client.hyperdrive) + self.hyperdrive = resources.HyperdriveResourceWithStreamingResponse(client.hyperdrive) self.rum = resources.RUMWithStreamingResponse(client.rum) self.vectorize = resources.VectorizeWithStreamingResponse(client.vectorize) self.url_scanner = resources.URLScannerWithStreamingResponse(client.url_scanner) @@ -1213,7 +1213,7 @@ def __init__(self, client: AsyncCloudflare) -> None: ) self.zero_trust = resources.AsyncZeroTrustWithStreamingResponse(client.zero_trust) self.challenges = resources.AsyncChallengesWithStreamingResponse(client.challenges) - self.hyperdrive = resources.AsyncHyperdriveWithStreamingResponse(client.hyperdrive) + self.hyperdrive = resources.AsyncHyperdriveResourceWithStreamingResponse(client.hyperdrive) self.rum = resources.AsyncRUMWithStreamingResponse(client.rum) self.vectorize = resources.AsyncVectorizeWithStreamingResponse(client.vectorize) self.url_scanner = resources.AsyncURLScannerWithStreamingResponse(client.url_scanner) diff --git a/src/cloudflare/resources/__init__.py b/src/cloudflare/resources/__init__.py index e9596573a34..84e182ac364 100644 --- a/src/cloudflare/resources/__init__.py +++ b/src/cloudflare/resources/__init__.py @@ -353,12 +353,12 @@ AsyncChallengesWithStreamingResponse, ) from .hyperdrive import ( - Hyperdrive, - AsyncHyperdrive, - HyperdriveWithRawResponse, - AsyncHyperdriveWithRawResponse, - HyperdriveWithStreamingResponse, - AsyncHyperdriveWithStreamingResponse, + HyperdriveResource, + AsyncHyperdriveResource, + HyperdriveResourceWithRawResponse, + AsyncHyperdriveResourceWithRawResponse, + HyperdriveResourceWithStreamingResponse, + AsyncHyperdriveResourceWithStreamingResponse, ) from .rate_plans import ( RatePlans, @@ -1044,12 +1044,12 @@ "AsyncChallengesWithRawResponse", "ChallengesWithStreamingResponse", "AsyncChallengesWithStreamingResponse", - "Hyperdrive", - "AsyncHyperdrive", - "HyperdriveWithRawResponse", - "AsyncHyperdriveWithRawResponse", - "HyperdriveWithStreamingResponse", - "AsyncHyperdriveWithStreamingResponse", + "HyperdriveResource", + "AsyncHyperdriveResource", + "HyperdriveResourceWithRawResponse", + "AsyncHyperdriveResourceWithRawResponse", + "HyperdriveResourceWithStreamingResponse", + "AsyncHyperdriveResourceWithStreamingResponse", "RUM", "AsyncRUM", "RUMWithRawResponse", diff --git a/src/cloudflare/resources/hyperdrive/__init__.py b/src/cloudflare/resources/hyperdrive/__init__.py index 0b028a42f00..f83f2db969d 100644 --- a/src/cloudflare/resources/hyperdrive/__init__.py +++ b/src/cloudflare/resources/hyperdrive/__init__.py @@ -9,12 +9,12 @@ AsyncConfigsWithStreamingResponse, ) from .hyperdrive import ( - Hyperdrive, - AsyncHyperdrive, - HyperdriveWithRawResponse, - AsyncHyperdriveWithRawResponse, - HyperdriveWithStreamingResponse, - AsyncHyperdriveWithStreamingResponse, + HyperdriveResource, + AsyncHyperdriveResource, + HyperdriveResourceWithRawResponse, + AsyncHyperdriveResourceWithRawResponse, + HyperdriveResourceWithStreamingResponse, + AsyncHyperdriveResourceWithStreamingResponse, ) __all__ = [ @@ -24,10 +24,10 @@ "AsyncConfigsWithRawResponse", "ConfigsWithStreamingResponse", "AsyncConfigsWithStreamingResponse", - "Hyperdrive", - "AsyncHyperdrive", - "HyperdriveWithRawResponse", - "AsyncHyperdriveWithRawResponse", - "HyperdriveWithStreamingResponse", - "AsyncHyperdriveWithStreamingResponse", + "HyperdriveResource", + "AsyncHyperdriveResource", + "HyperdriveResourceWithRawResponse", + "AsyncHyperdriveResourceWithRawResponse", + "HyperdriveResourceWithStreamingResponse", + "AsyncHyperdriveResourceWithStreamingResponse", ] diff --git a/src/cloudflare/resources/hyperdrive/hyperdrive.py b/src/cloudflare/resources/hyperdrive/hyperdrive.py index e756a012bc1..0f2abb955fa 100644 --- a/src/cloudflare/resources/hyperdrive/hyperdrive.py +++ b/src/cloudflare/resources/hyperdrive/hyperdrive.py @@ -13,39 +13,39 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -__all__ = ["Hyperdrive", "AsyncHyperdrive"] +__all__ = ["HyperdriveResource", "AsyncHyperdriveResource"] -class Hyperdrive(SyncAPIResource): +class HyperdriveResource(SyncAPIResource): @cached_property def configs(self) -> Configs: return Configs(self._client) @cached_property - def with_raw_response(self) -> HyperdriveWithRawResponse: - return HyperdriveWithRawResponse(self) + def with_raw_response(self) -> HyperdriveResourceWithRawResponse: + return HyperdriveResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> HyperdriveWithStreamingResponse: - return HyperdriveWithStreamingResponse(self) + def with_streaming_response(self) -> HyperdriveResourceWithStreamingResponse: + return HyperdriveResourceWithStreamingResponse(self) -class AsyncHyperdrive(AsyncAPIResource): +class AsyncHyperdriveResource(AsyncAPIResource): @cached_property def configs(self) -> AsyncConfigs: return AsyncConfigs(self._client) @cached_property - def with_raw_response(self) -> AsyncHyperdriveWithRawResponse: - return AsyncHyperdriveWithRawResponse(self) + def with_raw_response(self) -> AsyncHyperdriveResourceWithRawResponse: + return AsyncHyperdriveResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncHyperdriveWithStreamingResponse: - return AsyncHyperdriveWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncHyperdriveResourceWithStreamingResponse: + return AsyncHyperdriveResourceWithStreamingResponse(self) -class HyperdriveWithRawResponse: - def __init__(self, hyperdrive: Hyperdrive) -> None: +class HyperdriveResourceWithRawResponse: + def __init__(self, hyperdrive: HyperdriveResource) -> None: self._hyperdrive = hyperdrive @cached_property @@ -53,8 +53,8 @@ def configs(self) -> ConfigsWithRawResponse: return ConfigsWithRawResponse(self._hyperdrive.configs) -class AsyncHyperdriveWithRawResponse: - def __init__(self, hyperdrive: AsyncHyperdrive) -> None: +class AsyncHyperdriveResourceWithRawResponse: + def __init__(self, hyperdrive: AsyncHyperdriveResource) -> None: self._hyperdrive = hyperdrive @cached_property @@ -62,8 +62,8 @@ def configs(self) -> AsyncConfigsWithRawResponse: return AsyncConfigsWithRawResponse(self._hyperdrive.configs) -class HyperdriveWithStreamingResponse: - def __init__(self, hyperdrive: Hyperdrive) -> None: +class HyperdriveResourceWithStreamingResponse: + def __init__(self, hyperdrive: HyperdriveResource) -> None: self._hyperdrive = hyperdrive @cached_property @@ -71,8 +71,8 @@ def configs(self) -> ConfigsWithStreamingResponse: return ConfigsWithStreamingResponse(self._hyperdrive.configs) -class AsyncHyperdriveWithStreamingResponse: - def __init__(self, hyperdrive: AsyncHyperdrive) -> None: +class AsyncHyperdriveResourceWithStreamingResponse: + def __init__(self, hyperdrive: AsyncHyperdriveResource) -> None: self._hyperdrive = hyperdrive @cached_property diff --git a/src/cloudflare/resources/rulesets/phases/phases.py b/src/cloudflare/resources/rulesets/phases/phases.py index b034e28fe16..f1098a71bff 100644 --- a/src/cloudflare/resources/rulesets/phases/phases.py +++ b/src/cloudflare/resources/rulesets/phases/phases.py @@ -7,7 +7,7 @@ import httpx -from ....types import RulesetsRulesetResponse +from ....types import Ruleset from .versions import ( Versions, AsyncVersions, @@ -118,7 +118,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an account or zone entry point ruleset, creating a new version. @@ -186,7 +186,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) def get( @@ -225,7 +225,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches the latest version of the account or zone entry point ruleset for a given phase. @@ -271,7 +271,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @@ -355,7 +355,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an account or zone entry point ruleset, creating a new version. @@ -423,7 +423,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) async def get( @@ -462,7 +462,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches the latest version of the account or zone entry point ruleset for a given phase. @@ -508,7 +508,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) diff --git a/src/cloudflare/resources/rulesets/phases/versions.py b/src/cloudflare/resources/rulesets/phases/versions.py index 88d2733058d..6dbbb398f8c 100644 --- a/src/cloudflare/resources/rulesets/phases/versions.py +++ b/src/cloudflare/resources/rulesets/phases/versions.py @@ -7,7 +7,7 @@ import httpx -from ....types import RulesetsRulesetResponse +from ....types import Ruleset from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -155,7 +155,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches a specific version of an account or zone entry point ruleset. @@ -204,7 +204,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @@ -335,7 +335,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches a specific version of an account or zone entry point ruleset. @@ -384,7 +384,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) diff --git a/src/cloudflare/resources/rulesets/rules.py b/src/cloudflare/resources/rulesets/rules.py index c7c92424969..d9135563a66 100644 --- a/src/cloudflare/resources/rulesets/rules.py +++ b/src/cloudflare/resources/rulesets/rules.py @@ -7,7 +7,7 @@ import httpx -from ...types import RulesetsRulesetResponse +from ...types import Ruleset from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( required_args, @@ -61,7 +61,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -121,7 +121,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -181,7 +181,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -241,7 +241,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -304,7 +304,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: if not ruleset_id: raise ValueError(f"Expected a non-empty value for `ruleset_id` but received {ruleset_id!r}") if not account_id: @@ -344,7 +344,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) def delete( @@ -360,7 +360,7 @@ def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Deletes an existing rule from an account or zone ruleset. @@ -409,7 +409,7 @@ def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @overload @@ -434,7 +434,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -495,7 +495,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -556,7 +556,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -617,7 +617,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -682,7 +682,7 @@ def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: if not ruleset_id: raise ValueError(f"Expected a non-empty value for `ruleset_id` but received {ruleset_id!r}") if not rule_id: @@ -724,7 +724,7 @@ def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @@ -758,7 +758,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -818,7 +818,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -878,7 +878,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -938,7 +938,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """Adds a new rule to an account or zone ruleset. The rule will be added to the end @@ -1001,7 +1001,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: if not ruleset_id: raise ValueError(f"Expected a non-empty value for `ruleset_id` but received {ruleset_id!r}") if not account_id: @@ -1041,7 +1041,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) async def delete( @@ -1057,7 +1057,7 @@ async def delete( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Deletes an existing rule from an account or zone ruleset. @@ -1106,7 +1106,7 @@ async def delete( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @overload @@ -1131,7 +1131,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -1192,7 +1192,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -1253,7 +1253,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -1314,7 +1314,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an existing rule in an account or zone ruleset. @@ -1379,7 +1379,7 @@ async def edit( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: if not ruleset_id: raise ValueError(f"Expected a non-empty value for `ruleset_id` but received {ruleset_id!r}") if not rule_id: @@ -1421,7 +1421,7 @@ async def edit( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) diff --git a/src/cloudflare/resources/rulesets/rulesets.py b/src/cloudflare/resources/rulesets/rulesets.py index 987edf37a38..f57071173b4 100644 --- a/src/cloudflare/resources/rulesets/rulesets.py +++ b/src/cloudflare/resources/rulesets/rulesets.py @@ -23,12 +23,7 @@ PhasesWithStreamingResponse, AsyncPhasesWithStreamingResponse, ) -from ...types import ( - RulesetListResponse, - RulesetsRulesetResponse, - ruleset_create_params, - ruleset_update_params, -) +from ...types import Ruleset, RulesetListResponse, ruleset_create_params, ruleset_update_params from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ..._utils import ( maybe_transform, @@ -123,7 +118,7 @@ def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Creates a ruleset. @@ -184,7 +179,7 @@ def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) def update( @@ -230,7 +225,7 @@ def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an account or zone ruleset, creating a new version. @@ -298,7 +293,7 @@ def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) def list( @@ -422,7 +417,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches the latest version of an account or zone ruleset. @@ -467,7 +462,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @@ -532,7 +527,7 @@ async def create( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Creates a ruleset. @@ -593,7 +588,7 @@ async def create( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) async def update( @@ -639,7 +634,7 @@ async def update( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Updates an account or zone ruleset, creating a new version. @@ -707,7 +702,7 @@ async def update( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) def list( @@ -831,7 +826,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches the latest version of an account or zone ruleset. @@ -876,7 +871,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) diff --git a/src/cloudflare/resources/rulesets/versions/by_tag.py b/src/cloudflare/resources/rulesets/versions/by_tag.py index 298651cddab..227d92f4b37 100644 --- a/src/cloudflare/resources/rulesets/versions/by_tag.py +++ b/src/cloudflare/resources/rulesets/versions/by_tag.py @@ -6,7 +6,7 @@ import httpx -from ....types import RulesetsRulesetResponse +from ....types import Ruleset from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -46,7 +46,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches the rules of a managed account ruleset version for a given tag. @@ -84,7 +84,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @@ -110,7 +110,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches the rules of a managed account ruleset version for a given tag. @@ -148,7 +148,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) diff --git a/src/cloudflare/resources/rulesets/versions/versions.py b/src/cloudflare/resources/rulesets/versions/versions.py index 6722ae11b41..70590d82022 100644 --- a/src/cloudflare/resources/rulesets/versions/versions.py +++ b/src/cloudflare/resources/rulesets/versions/versions.py @@ -14,7 +14,7 @@ ByTagWithStreamingResponse, AsyncByTagWithStreamingResponse, ) -from ....types import RulesetsRulesetResponse +from ....types import Ruleset from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven from ...._compat import cached_property from ...._resource import SyncAPIResource, AsyncAPIResource @@ -180,7 +180,7 @@ def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches a specific version of an account or zone ruleset. @@ -229,7 +229,7 @@ def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) @@ -378,7 +378,7 @@ async def get( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RulesetsRulesetResponse: + ) -> Ruleset: """ Fetches a specific version of an account or zone ruleset. @@ -427,7 +427,7 @@ async def get( timeout=timeout, post_parser=ResultWrapper._unwrapper, ), - cast_to=cast(Type[RulesetsRulesetResponse], ResultWrapper[RulesetsRulesetResponse]), + cast_to=cast(Type[Ruleset], ResultWrapper[Ruleset]), ) diff --git a/src/cloudflare/types/__init__.py b/src/cloudflare/types/__init__.py index 2a1eba444ba..9d99cc14a2a 100644 --- a/src/cloudflare/types/__init__.py +++ b/src/cloudflare/types/__init__.py @@ -7,6 +7,7 @@ from .dnssec import DNSSEC as DNSSEC from .shared import ErrorData as ErrorData from .account import Account as Account +from .ruleset import Ruleset as Ruleset from .snippet import Snippet as Snippet from .calls_app import CallsApp as CallsApp from .membership import Membership as Membership @@ -102,7 +103,6 @@ from .intel_phishing_url_submit import IntelPhishingURLSubmit as IntelPhishingURLSubmit from .load_balancer_edit_params import LoadBalancerEditParams as LoadBalancerEditParams from .page_shield_update_params import PageShieldUpdateParams as PageShieldUpdateParams -from .rulesets_ruleset_response import RulesetsRulesetResponse as RulesetsRulesetResponse 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 @@ -112,7 +112,6 @@ from .membership_update_response import MembershipUpdateResponse as MembershipUpdateResponse from .rate_limit_create_response import RateLimitCreateResponse as RateLimitCreateResponse from .rate_limit_delete_response import RateLimitDeleteResponse as RateLimitDeleteResponse -from .rulesets_rulesets_response import RulesetsRulesetsResponse as RulesetsRulesetsResponse from .subscription_create_params import SubscriptionCreateParams as SubscriptionCreateParams from .subscription_list_response import SubscriptionListResponse as SubscriptionListResponse from .subscription_update_params import SubscriptionUpdateParams as SubscriptionUpdateParams diff --git a/src/cloudflare/types/hyperdrive/__init__.py b/src/cloudflare/types/hyperdrive/__init__.py index eb73e1cbd1f..0891cd295ba 100644 --- a/src/cloudflare/types/hyperdrive/__init__.py +++ b/src/cloudflare/types/hyperdrive/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .hyperdrive import Hyperdrive as Hyperdrive from .config_edit_params import ConfigEditParams as ConfigEditParams from .config_get_response import ConfigGetResponse as ConfigGetResponse from .config_create_params import ConfigCreateParams as ConfigCreateParams diff --git a/src/cloudflare/types/hyperdrive/hyperdrive.py b/src/cloudflare/types/hyperdrive/hyperdrive.py new file mode 100644 index 00000000000..320e9948ce3 --- /dev/null +++ b/src/cloudflare/types/hyperdrive/hyperdrive.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["Hyperdrive"] + + +class Hyperdrive(BaseModel): + id: Optional[str] = None + """Identifier""" diff --git a/src/cloudflare/types/request_tracers/__init__.py b/src/cloudflare/types/request_tracers/__init__.py index a1d489d78fa..40a59470259 100644 --- a/src/cloudflare/types/request_tracers/__init__.py +++ b/src/cloudflare/types/request_tracers/__init__.py @@ -3,5 +3,6 @@ from __future__ import annotations from .trace import Trace as Trace +from .trace_item import TraceItem as TraceItem from .trace_create_params import TraceCreateParams as TraceCreateParams from .trace_create_response import TraceCreateResponse as TraceCreateResponse diff --git a/src/cloudflare/types/request_tracers/trace.py b/src/cloudflare/types/request_tracers/trace.py index 32e14ff128c..4687762c7f8 100644 --- a/src/cloudflare/types/request_tracers/trace.py +++ b/src/cloudflare/types/request_tracers/trace.py @@ -2,48 +2,10 @@ from __future__ import annotations -from typing import List, Optional +from typing import List -from ..._compat import PYDANTIC_V2 -from ..._models import BaseModel +__all__ = ["Trace"] -__all__ = ["Trace", "TraceItem"] +Trace = List["TraceItem"] - -class TraceItem(BaseModel): - action: Optional[str] = None - """If step type is rule, then action performed by this rule""" - - action_parameters: Optional[object] = None - """If step type is rule, then action parameters of this rule as JSON""" - - description: Optional[str] = None - """If step type is rule or ruleset, the description of this entity""" - - expression: Optional[str] = None - """If step type is rule, then expression used to match for this rule""" - - kind: Optional[str] = None - """If step type is ruleset, then kind of this ruleset""" - - matched: Optional[bool] = None - """Whether tracing step affected tracing request/response""" - - name: Optional[str] = None - """If step type is ruleset, then name of this ruleset""" - - step_name: Optional[str] = None - """Tracing step identifying name""" - - trace: Optional[Trace] = None - - type: Optional[str] = None - """Tracing step type""" - - -Trace = List[TraceItem] - -if PYDANTIC_V2: - TraceItem.model_rebuild() -else: - TraceItem.update_forward_refs() # type: ignore +from .trace_item import TraceItem diff --git a/src/cloudflare/types/request_tracers/trace_item.py b/src/cloudflare/types/request_tracers/trace_item.py new file mode 100644 index 00000000000..2830764115e --- /dev/null +++ b/src/cloudflare/types/request_tracers/trace_item.py @@ -0,0 +1,49 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional + +from ..._compat import PYDANTIC_V2 +from ..._models import BaseModel + +__all__ = ["TraceItem"] + + +class TraceItem(BaseModel): + action: Optional[str] = None + """If step type is rule, then action performed by this rule""" + + action_parameters: Optional[object] = None + """If step type is rule, then action parameters of this rule as JSON""" + + description: Optional[str] = None + """If step type is rule or ruleset, the description of this entity""" + + expression: Optional[str] = None + """If step type is rule, then expression used to match for this rule""" + + kind: Optional[str] = None + """If step type is ruleset, then kind of this ruleset""" + + matched: Optional[bool] = None + """Whether tracing step affected tracing request/response""" + + name: Optional[str] = None + """If step type is ruleset, then name of this ruleset""" + + step_name: Optional[str] = None + """Tracing step identifying name""" + + trace: Optional["Trace"] = None + + type: Optional[str] = None + """Tracing step type""" + + +from .trace import Trace + +if PYDANTIC_V2: + TraceItem.model_rebuild() +else: + TraceItem.update_forward_refs() # type: ignore diff --git a/src/cloudflare/types/rulesets_ruleset_response.py b/src/cloudflare/types/ruleset.py similarity index 99% rename from src/cloudflare/types/rulesets_ruleset_response.py rename to src/cloudflare/types/ruleset.py index c3f54637f5d..5bc71c6f377 100644 --- a/src/cloudflare/types/rulesets_ruleset_response.py +++ b/src/cloudflare/types/ruleset.py @@ -7,7 +7,7 @@ from .._models import BaseModel __all__ = [ - "RulesetsRulesetResponse", + "Ruleset", "Rule", "RuleRulesetsBlockRule", "RuleRulesetsBlockRuleActionParameters", @@ -343,7 +343,7 @@ class RuleRulesetsSkipRule(BaseModel): Rule = Union[RuleRulesetsBlockRule, RuleRulesetsExecuteRule, RuleRulesetsLogRule, RuleRulesetsSkipRule] -class RulesetsRulesetResponse(BaseModel): +class Ruleset(BaseModel): id: str """The unique ID of the ruleset.""" diff --git a/src/cloudflare/types/rulesets_rulesets_response.py b/src/cloudflare/types/rulesets_rulesets_response.py deleted file mode 100644 index f5f3bfabd0b..00000000000 --- a/src/cloudflare/types/rulesets_rulesets_response.py +++ /dev/null @@ -1,59 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["RulesetsRulesetsResponse", "RulesetsRulesetsResponseItem"] - - -class RulesetsRulesetsResponseItem(BaseModel): - kind: Literal["managed", "custom", "root", "zone"] - """The kind of the ruleset.""" - - name: str - """The human-readable name of the ruleset.""" - - phase: Literal[ - "ddos_l4", - "ddos_l7", - "http_config_settings", - "http_custom_errors", - "http_log_custom_fields", - "http_ratelimit", - "http_request_cache_settings", - "http_request_dynamic_redirect", - "http_request_firewall_custom", - "http_request_firewall_managed", - "http_request_late_transform", - "http_request_origin", - "http_request_redirect", - "http_request_sanitize", - "http_request_sbfm", - "http_request_select_configuration", - "http_request_transform", - "http_response_compression", - "http_response_firewall_managed", - "http_response_headers_transform", - "magic_transit", - "magic_transit_ids_managed", - "magic_transit_managed", - ] - """The phase of the ruleset.""" - - id: Optional[str] = None - """The unique ID of the ruleset.""" - - description: Optional[str] = None - """An informative description of the ruleset.""" - - last_updated: Optional[datetime] = None - """The timestamp of when the ruleset was last modified.""" - - version: Optional[str] = None - """The version of the ruleset.""" - - -RulesetsRulesetsResponse = List[RulesetsRulesetsResponseItem] diff --git a/tests/api_resources/rulesets/phases/test_versions.py b/tests/api_resources/rulesets/phases/test_versions.py index 796957cd2b1..621104eb9da 100644 --- a/tests/api_resources/rulesets/phases/test_versions.py +++ b/tests/api_resources/rulesets/phases/test_versions.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse +from cloudflare.types import Ruleset from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.rulesets.phases import VersionListResponse @@ -95,7 +95,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -106,7 +106,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -121,7 +121,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" version = response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -136,7 +136,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -247,7 +247,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -258,7 +258,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -273,7 +273,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" version = await response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -288,7 +288,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/test_phases.py b/tests/api_resources/rulesets/test_phases.py index 23240617708..114168a5d5e 100644 --- a/tests/api_resources/rulesets/test_phases.py +++ b/tests/api_resources/rulesets/test_phases.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse +from cloudflare.types import Ruleset base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -27,7 +27,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +92,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -108,7 +108,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" phase = response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -124,7 +124,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) assert cast(Any, response.is_closed) is True @@ -157,7 +157,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -167,7 +167,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -181,7 +181,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" phase = response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -195,7 +195,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) assert cast(Any, response.is_closed) is True @@ -230,7 +230,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -295,7 +295,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -311,7 +311,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" phase = await response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -327,7 +327,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = await response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) assert cast(Any, response.is_closed) is True @@ -360,7 +360,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -370,7 +370,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -384,7 +384,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" phase = await response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) @pytest.mark.skip() @parametrize @@ -398,7 +398,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" phase = await response.parse() - assert_matches_type(RulesetsRulesetResponse, phase, path=["response"]) + assert_matches_type(Ruleset, phase, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/test_rules.py b/tests/api_resources/rulesets/test_rules.py index 51ec61ff352..b508825c027 100644 --- a/tests/api_resources/rulesets/test_rules.py +++ b/tests/api_resources/rulesets/test_rules.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse +from cloudflare.types import Ruleset base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ def test_method_create_overload_1(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -49,7 +49,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -63,7 +63,7 @@ def test_raw_response_create_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -77,7 +77,7 @@ def test_streaming_response_create_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -113,7 +113,7 @@ def test_method_create_overload_2(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -156,7 +156,7 @@ def test_method_create_with_all_params_overload_2(self, client: Cloudflare) -> N logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -170,7 +170,7 @@ def test_raw_response_create_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -184,7 +184,7 @@ def test_streaming_response_create_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -220,7 +220,7 @@ def test_method_create_overload_3(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -238,7 +238,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -252,7 +252,7 @@ def test_raw_response_create_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -266,7 +266,7 @@ def test_streaming_response_create_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -302,7 +302,7 @@ def test_method_create_overload_4(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -326,7 +326,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -340,7 +340,7 @@ def test_raw_response_create_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -354,7 +354,7 @@ def test_streaming_response_create_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -391,7 +391,7 @@ def test_method_delete(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -402,7 +402,7 @@ def test_method_delete_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -417,7 +417,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -432,7 +432,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -480,7 +480,7 @@ def test_method_edit_overload_1(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -505,7 +505,7 @@ def test_method_edit_with_all_params_overload_1(self, client: Cloudflare) -> Non logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -520,7 +520,7 @@ def test_raw_response_edit_overload_1(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -535,7 +535,7 @@ def test_streaming_response_edit_overload_1(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -583,7 +583,7 @@ def test_method_edit_overload_2(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -627,7 +627,7 @@ def test_method_edit_with_all_params_overload_2(self, client: Cloudflare) -> Non logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -642,7 +642,7 @@ def test_raw_response_edit_overload_2(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -657,7 +657,7 @@ def test_streaming_response_edit_overload_2(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -705,7 +705,7 @@ def test_method_edit_overload_3(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -724,7 +724,7 @@ def test_method_edit_with_all_params_overload_3(self, client: Cloudflare) -> Non logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -739,7 +739,7 @@ def test_raw_response_edit_overload_3(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -754,7 +754,7 @@ def test_streaming_response_edit_overload_3(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -802,7 +802,7 @@ def test_method_edit_overload_4(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -827,7 +827,7 @@ def test_method_edit_with_all_params_overload_4(self, client: Cloudflare) -> Non logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -842,7 +842,7 @@ def test_raw_response_edit_overload_4(self, client: Cloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -857,7 +857,7 @@ def test_streaming_response_edit_overload_4(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -908,7 +908,7 @@ async def test_method_create_overload_1(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -932,7 +932,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -946,7 +946,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -960,7 +960,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -996,7 +996,7 @@ async def test_method_create_overload_2(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1039,7 +1039,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1053,7 +1053,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1067,7 +1067,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1103,7 +1103,7 @@ async def test_method_create_overload_3(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1121,7 +1121,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1135,7 +1135,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1149,7 +1149,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1185,7 +1185,7 @@ async def test_method_create_overload_4(self, async_client: AsyncCloudflare) -> account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1209,7 +1209,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1223,7 +1223,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncCloudflar assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1237,7 +1237,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncClo assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1274,7 +1274,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1285,7 +1285,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncCloudflare account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1300,7 +1300,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1315,7 +1315,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1363,7 +1363,7 @@ async def test_method_edit_overload_1(self, async_client: AsyncCloudflare) -> No account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1388,7 +1388,7 @@ async def test_method_edit_with_all_params_overload_1(self, async_client: AsyncC logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1403,7 +1403,7 @@ async def test_raw_response_edit_overload_1(self, async_client: AsyncCloudflare) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1418,7 +1418,7 @@ async def test_streaming_response_edit_overload_1(self, async_client: AsyncCloud assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1466,7 +1466,7 @@ async def test_method_edit_overload_2(self, async_client: AsyncCloudflare) -> No account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1510,7 +1510,7 @@ async def test_method_edit_with_all_params_overload_2(self, async_client: AsyncC logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1525,7 +1525,7 @@ async def test_raw_response_edit_overload_2(self, async_client: AsyncCloudflare) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1540,7 +1540,7 @@ async def test_streaming_response_edit_overload_2(self, async_client: AsyncCloud assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1588,7 +1588,7 @@ async def test_method_edit_overload_3(self, async_client: AsyncCloudflare) -> No account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1607,7 +1607,7 @@ async def test_method_edit_with_all_params_overload_3(self, async_client: AsyncC logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1622,7 +1622,7 @@ async def test_raw_response_edit_overload_3(self, async_client: AsyncCloudflare) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1637,7 +1637,7 @@ async def test_streaming_response_edit_overload_3(self, async_client: AsyncCloud assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1685,7 +1685,7 @@ async def test_method_edit_overload_4(self, async_client: AsyncCloudflare) -> No account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1710,7 +1710,7 @@ async def test_method_edit_with_all_params_overload_4(self, async_client: AsyncC logging={"enabled": True}, ref="my_ref", ) - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1725,7 +1725,7 @@ async def test_raw_response_edit_overload_4(self, async_client: AsyncCloudflare) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) @pytest.mark.skip() @parametrize @@ -1740,7 +1740,7 @@ async def test_streaming_response_edit_overload_4(self, async_client: AsyncCloud assert response.http_request.headers.get("X-Stainless-Lang") == "python" rule = await response.parse() - assert_matches_type(RulesetsRulesetResponse, rule, path=["response"]) + assert_matches_type(Ruleset, rule, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/test_versions.py b/tests/api_resources/rulesets/test_versions.py index a8812cc8df4..59d53feb980 100644 --- a/tests/api_resources/rulesets/test_versions.py +++ b/tests/api_resources/rulesets/test_versions.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse +from cloudflare.types import Ruleset from cloudflare.pagination import SyncSinglePage, AsyncSinglePage from cloudflare.types.rulesets import VersionListResponse @@ -191,7 +191,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -202,7 +202,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -217,7 +217,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" version = response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -232,7 +232,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) assert cast(Any, response.is_closed) is True @@ -447,7 +447,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -458,7 +458,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -473,7 +473,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" version = await response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) @pytest.mark.skip() @parametrize @@ -488,7 +488,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" version = await response.parse() - assert_matches_type(RulesetsRulesetResponse, version, path=["response"]) + assert_matches_type(Ruleset, version, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/rulesets/versions/test_by_tag.py b/tests/api_resources/rulesets/versions/test_by_tag.py index 026deb6874f..e3632bf6314 100644 --- a/tests/api_resources/rulesets/versions/test_by_tag.py +++ b/tests/api_resources/rulesets/versions/test_by_tag.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetsRulesetResponse +from cloudflare.types import Ruleset base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -26,7 +26,7 @@ def test_method_get(self, client: Cloudflare) -> None: ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", ) - assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) + assert_matches_type(Ruleset, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -41,7 +41,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" by_tag = response.parse() - assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) + assert_matches_type(Ruleset, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -56,7 +56,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" by_tag = response.parse() - assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) + assert_matches_type(Ruleset, by_tag, path=["response"]) assert cast(Any, response.is_closed) is True @@ -108,7 +108,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: ruleset_id="2f2feab2026849078ba485f918791bdc", ruleset_version="1", ) - assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) + assert_matches_type(Ruleset, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -123,7 +123,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" by_tag = await response.parse() - assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) + assert_matches_type(Ruleset, by_tag, path=["response"]) @pytest.mark.skip() @parametrize @@ -138,7 +138,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" by_tag = await response.parse() - assert_matches_type(RulesetsRulesetResponse, by_tag, path=["response"]) + assert_matches_type(Ruleset, by_tag, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_rulesets.py b/tests/api_resources/test_rulesets.py index 67251b5ccf2..285259542bf 100644 --- a/tests/api_resources/test_rulesets.py +++ b/tests/api_resources/test_rulesets.py @@ -9,7 +9,7 @@ from cloudflare import Cloudflare, AsyncCloudflare from tests.utils import assert_matches_type -from cloudflare.types import RulesetListResponse, RulesetsRulesetResponse +from cloudflare.types import Ruleset, RulesetListResponse from cloudflare.pagination import SyncSinglePage, AsyncSinglePage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -29,7 +29,7 @@ def test_method_create(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -92,7 +92,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: zone_id="string", description="My ruleset to execute managed rulesets", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -109,7 +109,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" ruleset = response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -126,7 +126,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -163,7 +163,7 @@ def test_method_update(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -228,7 +228,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None: name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -244,7 +244,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" ruleset = response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -260,7 +260,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -437,7 +437,7 @@ def test_method_get(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -447,7 +447,7 @@ def test_method_get_with_all_params(self, client: Cloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -461,7 +461,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" ruleset = response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -475,7 +475,7 @@ def test_streaming_response_get(self, client: Cloudflare) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -518,7 +518,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -581,7 +581,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare zone_id="string", description="My ruleset to execute managed rulesets", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -598,7 +598,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" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -615,7 +615,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -652,7 +652,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -717,7 +717,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare name="My ruleset", phase="http_request_firewall_custom", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -733,7 +733,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" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -749,7 +749,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True @@ -926,7 +926,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None: account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -936,7 +936,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) - account_id="string", zone_id="string", ) - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -950,7 +950,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" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) @pytest.mark.skip() @parametrize @@ -964,7 +964,7 @@ async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> No assert response.http_request.headers.get("X-Stainless-Lang") == "python" ruleset = await response.parse() - assert_matches_type(RulesetsRulesetResponse, ruleset, path=["response"]) + assert_matches_type(Ruleset, ruleset, path=["response"]) assert cast(Any, response.is_closed) is True From 4058dbb8f270873b49bb12bd5c56186c9a74b380 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:02:08 +0000 Subject: [PATCH 09/16] feat(api): OpenAPI spec update via Stainless API (#189) --- src/cloudflare/resources/radar/bgp/routes.py | 8 ++++++++ src/cloudflare/types/radar/bgp/route_timeseries_params.py | 3 +++ tests/api_resources/radar/bgp/test_routes.py | 2 ++ 3 files changed, 13 insertions(+) diff --git a/src/cloudflare/resources/radar/bgp/routes.py b/src/cloudflare/resources/radar/bgp/routes.py index e295ba6d9f6..c98a3fb7886 100644 --- a/src/cloudflare/resources/radar/bgp/routes.py +++ b/src/cloudflare/resources/radar/bgp/routes.py @@ -239,6 +239,7 @@ def timeseries( | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: str | 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, @@ -262,6 +263,8 @@ def timeseries( format: Format results are returned in. + location: Location Alpha2 code. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -284,6 +287,7 @@ def timeseries( "date_range": date_range, "date_start": date_start, "format": format, + "location": location, }, route_timeseries_params.RouteTimeseriesParams, ), @@ -493,6 +497,7 @@ async def timeseries( | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: str | 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, @@ -516,6 +521,8 @@ async def timeseries( format: Format results are returned in. + location: Location Alpha2 code. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -538,6 +545,7 @@ async def timeseries( "date_range": date_range, "date_start": date_start, "format": format, + "location": location, }, route_timeseries_params.RouteTimeseriesParams, ), diff --git a/src/cloudflare/types/radar/bgp/route_timeseries_params.py b/src/cloudflare/types/radar/bgp/route_timeseries_params.py index b17fded926d..6bdf01690de 100644 --- a/src/cloudflare/types/radar/bgp/route_timeseries_params.py +++ b/src/cloudflare/types/radar/bgp/route_timeseries_params.py @@ -48,3 +48,6 @@ class RouteTimeseriesParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + + location: str + """Location Alpha2 code.""" diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py index d64e0ba0886..c0a2b5b6a1f 100644 --- a/tests/api_resources/radar/bgp/test_routes.py +++ b/tests/api_resources/radar/bgp/test_routes.py @@ -155,6 +155,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), format="JSON", + location="US", ) assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) @@ -316,6 +317,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), format="JSON", + location="US", ) assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) From 54b63444f5d4492dbb12c4736936f82e66ef07c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:59:50 +0000 Subject: [PATCH 10/16] feat(api): update via SDK Studio (#190) --- src/cloudflare/resources/logpush/jobs.py | 4 +- .../magic_network_monitoring/rules/rules.py | 4 +- src/cloudflare/resources/workers/ai.py | 398 +----- src/cloudflare/types/workers/ai_run_params.py | 84 +- tests/api_resources/workers/test_ai.py | 1088 +++-------------- 5 files changed, 213 insertions(+), 1365 deletions(-) diff --git a/src/cloudflare/resources/logpush/jobs.py b/src/cloudflare/resources/logpush/jobs.py index f16d111e08b..13b4b38af47 100644 --- a/src/cloudflare/resources/logpush/jobs.py +++ b/src/cloudflare/resources/logpush/jobs.py @@ -285,7 +285,7 @@ def list( account_or_zone_id = zone_id return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs", - page=SyncSinglePage[LogpushJob], + page=SyncSinglePage[Optional[LogpushJob]], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -667,7 +667,7 @@ def list( account_or_zone_id = zone_id return self._get_api_list( f"/{account_or_zone}/{account_or_zone_id}/logpush/jobs", - page=AsyncSinglePage[LogpushJob], + page=AsyncSinglePage[Optional[LogpushJob]], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py index fa4ae167353..4560798250e 100644 --- a/src/cloudflare/resources/magic_network_monitoring/rules/rules.py +++ b/src/cloudflare/resources/magic_network_monitoring/rules/rules.py @@ -150,7 +150,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/mnm/rules", - page=SyncSinglePage[MagicNetworkMonitoringRule], + page=SyncSinglePage[Optional[MagicNetworkMonitoringRule]], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -394,7 +394,7 @@ def list( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get_api_list( f"/accounts/{account_id}/mnm/rules", - page=AsyncSinglePage[MagicNetworkMonitoringRule], + page=AsyncSinglePage[Optional[MagicNetworkMonitoringRule]], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/cloudflare/resources/workers/ai.py b/src/cloudflare/resources/workers/ai.py index fbdb4390602..bfa50dff4b9 100644 --- a/src/cloudflare/resources/workers/ai.py +++ b/src/cloudflare/resources/workers/ai.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( required_args, maybe_transform, @@ -188,42 +188,6 @@ def run( """ ... - @overload - def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload def run( self, @@ -260,42 +224,6 @@ def run( """ ... - @overload - def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload def run( self, @@ -332,42 +260,6 @@ def run( """ ... - @overload - def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload def run( self, @@ -410,9 +302,10 @@ def run( model_name: str, *, account_id: str, - prompt: str, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, + prompt: str | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -444,44 +337,6 @@ def run( """ ... - @overload - def run( - self, - model_name: str, - *, - account_id: str, - messages: Iterable[ai_run_params.Variant11Message], - max_tokens: int | NotGiven = NOT_GIVEN, - stream: bool | 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, - ) -> Optional[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload def run( self, @@ -557,42 +412,6 @@ def run( """ ... - @overload - def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload def run( self, @@ -636,17 +455,12 @@ def run( ["account_id", "prompt"], ["account_id", "sentences", "source"], ["account_id", "text"], - ["account_id", "body"], ["account_id"], - ["account_id", "body"], ["account_id"], - ["account_id", "body"], ["account_id"], - ["account_id", "prompt"], - ["account_id", "messages"], + ["account_id"], ["account_id", "target_lang", "text"], ["account_id", "input_text"], - ["account_id", "body"], ["account_id"], ) def run( @@ -663,13 +477,12 @@ def run( strength: float | NotGiven = NOT_GIVEN, sentences: List[str] | NotGiven = NOT_GIVEN, source: str | NotGiven = NOT_GIVEN, - body: FileTypes | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.Variant11Message] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, @@ -700,13 +513,12 @@ def run( "strength": strength, "sentences": sentences, "source": source, - "body": body, "audio": audio, "lora": lora, "max_tokens": max_tokens, + "messages": messages, "raw": raw, "stream": stream, - "messages": messages, "target_lang": target_lang, "source_lang": source_lang, "input_text": input_text, @@ -887,42 +699,6 @@ async def run( """ ... - @overload - async def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload async def run( self, @@ -959,42 +735,6 @@ async def run( """ ... - @overload - async def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload async def run( self, @@ -1031,42 +771,6 @@ async def run( """ ... - @overload - async def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload async def run( self, @@ -1109,9 +813,10 @@ async def run( model_name: str, *, account_id: str, - prompt: str, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, + prompt: str | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -1143,44 +848,6 @@ async def run( """ ... - @overload - async def run( - self, - model_name: str, - *, - account_id: str, - messages: Iterable[ai_run_params.Variant11Message], - max_tokens: int | NotGiven = NOT_GIVEN, - stream: bool | 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, - ) -> Optional[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload async def run( self, @@ -1256,42 +923,6 @@ async def run( """ ... - @overload - async def run( - self, - model_name: str, - *, - account_id: str, - body: FileTypes, - # 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[AIRunResponse]: - """ - This endpoint provides users with the capability to run specific AI models - on-demand. - - By submitting the required input data, users can receive real-time predictions - or results generated by the chosen AI model. The endpoint supports various AI - model types, ensuring flexibility and adaptability for diverse use cases. - - Model specific inputs available in - [Cloudflare Docs](https://developers.cloudflare.com/workers-ai/models/). - - Args: - 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 - """ - ... - @overload async def run( self, @@ -1335,17 +966,12 @@ async def run( ["account_id", "prompt"], ["account_id", "sentences", "source"], ["account_id", "text"], - ["account_id", "body"], ["account_id"], - ["account_id", "body"], ["account_id"], - ["account_id", "body"], ["account_id"], - ["account_id", "prompt"], - ["account_id", "messages"], + ["account_id"], ["account_id", "target_lang", "text"], ["account_id", "input_text"], - ["account_id", "body"], ["account_id"], ) async def run( @@ -1362,13 +988,12 @@ async def run( strength: float | NotGiven = NOT_GIVEN, sentences: List[str] | NotGiven = NOT_GIVEN, source: str | NotGiven = NOT_GIVEN, - body: FileTypes | NotGiven = NOT_GIVEN, audio: Iterable[float] | NotGiven = NOT_GIVEN, lora: str | NotGiven = NOT_GIVEN, max_tokens: int | NotGiven = NOT_GIVEN, + messages: Iterable[ai_run_params.TextGenerationMessage] | NotGiven = NOT_GIVEN, raw: bool | NotGiven = NOT_GIVEN, stream: bool | NotGiven = NOT_GIVEN, - messages: Iterable[ai_run_params.Variant11Message] | NotGiven = NOT_GIVEN, target_lang: str | NotGiven = NOT_GIVEN, source_lang: str | NotGiven = NOT_GIVEN, input_text: str | NotGiven = NOT_GIVEN, @@ -1399,13 +1024,12 @@ async def run( "strength": strength, "sentences": sentences, "source": source, - "body": body, "audio": audio, "lora": lora, "max_tokens": max_tokens, + "messages": messages, "raw": raw, "stream": stream, - "messages": messages, "target_lang": target_lang, "source_lang": source_lang, "input_text": input_text, diff --git a/src/cloudflare/types/workers/ai_run_params.py b/src/cloudflare/types/workers/ai_run_params.py index 7bb117df3a2..f29e3068b68 100644 --- a/src/cloudflare/types/workers/ai_run_params.py +++ b/src/cloudflare/types/workers/ai_run_params.py @@ -5,27 +5,20 @@ from typing import List, Union, Iterable from typing_extensions import Required, TypedDict -from ..._types import FileTypes - __all__ = [ "AIRunParams", "TextClassification", "TextToImage", "SentenceSimilarity", "TextEmbeddings", - "Variant4", - "Variant5", - "Variant6", - "Variant7", - "Variant8", - "Variant9", - "Variant10", - "Variant11", - "Variant11Message", + "SpeechRecognition", + "ImageClassification", + "ObjectDetection", + "TextGeneration", + "TextGenerationMessage", "Translation", "Summarization", - "Variant14", - "Variant15", + "ImageToText", ] @@ -65,67 +58,41 @@ class TextEmbeddings(TypedDict, total=False): text: Required[Union[str, List[str]]] -class Variant4(TypedDict, total=False): - account_id: Required[str] - - body: Required[FileTypes] - - -class Variant5(TypedDict, total=False): +class SpeechRecognition(TypedDict, total=False): account_id: Required[str] audio: Iterable[float] -class Variant6(TypedDict, total=False): - account_id: Required[str] - - body: Required[FileTypes] - - -class Variant7(TypedDict, total=False): +class ImageClassification(TypedDict, total=False): account_id: Required[str] image: Iterable[float] -class Variant8(TypedDict, total=False): - account_id: Required[str] - - body: Required[FileTypes] - - -class Variant9(TypedDict, total=False): +class ObjectDetection(TypedDict, total=False): account_id: Required[str] image: Iterable[float] -class Variant10(TypedDict, total=False): +class TextGeneration(TypedDict, total=False): account_id: Required[str] - prompt: Required[str] - lora: str max_tokens: int - raw: bool - - stream: bool - - -class Variant11(TypedDict, total=False): - account_id: Required[str] + messages: Iterable[TextGenerationMessage] - messages: Required[Iterable[Variant11Message]] + prompt: str - max_tokens: int + raw: bool stream: bool -class Variant11Message(TypedDict, total=False): +class TextGenerationMessage(TypedDict, total=False): content: Required[str] role: Required[str] @@ -149,13 +116,7 @@ class Summarization(TypedDict, total=False): max_length: int -class Variant14(TypedDict, total=False): - account_id: Required[str] - - body: Required[FileTypes] - - -class Variant15(TypedDict, total=False): +class ImageToText(TypedDict, total=False): account_id: Required[str] image: Iterable[float] @@ -170,16 +131,11 @@ class Variant15(TypedDict, total=False): TextToImage, SentenceSimilarity, TextEmbeddings, - Variant4, - Variant5, - Variant6, - Variant7, - Variant8, - Variant9, - Variant10, - Variant11, + SpeechRecognition, + ImageClassification, + ObjectDetection, + TextGeneration, Translation, Summarization, - Variant14, - Variant15, + ImageToText, ] diff --git a/tests/api_resources/workers/test_ai.py b/tests/api_resources/workers/test_ai.py index d4580b77ba0..3ad76d766d6 100644 --- a/tests/api_resources/workers/test_ai.py +++ b/tests/api_resources/workers/test_ai.py @@ -271,7 +271,16 @@ def test_method_run_overload_5(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_method_run_with_all_params_overload_5(self, client: Cloudflare) -> None: + ai = client.workers.ai.run( + "string", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -281,7 +290,6 @@ def test_raw_response_run_overload_5(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) assert response.is_closed is True @@ -295,7 +303,6 @@ def test_streaming_response_run_overload_5(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -312,14 +319,12 @@ def test_path_params_run_overload_5(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", - body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) @pytest.mark.skip() @@ -337,7 +342,7 @@ def test_method_run_with_all_params_overload_6(self, client: Cloudflare) -> None ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - audio=[0, 0, 0], + image=[0, 0, 0], ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -390,7 +395,16 @@ def test_method_run_overload_7(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_method_run_with_all_params_overload_7(self, client: Cloudflare) -> None: + ai = client.workers.ai.run( + "string", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + image=[0, 0, 0], ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -400,7 +414,6 @@ def test_raw_response_run_overload_7(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) assert response.is_closed is True @@ -414,7 +427,6 @@ def test_streaming_response_run_overload_7(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -431,14 +443,12 @@ def test_path_params_run_overload_7(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", - body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) @pytest.mark.skip() @@ -456,7 +466,25 @@ def test_method_run_with_all_params_overload_8(self, client: Cloudflare) -> None ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - image=[0, 0, 0], + lora="string", + max_tokens=0, + messages=[ + { + "content": "string", + "role": "string", + }, + { + "content": "string", + "role": "string", + }, + { + "content": "string", + "role": "string", + }, + ], + prompt="x", + raw=True, + stream=True, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -509,7 +537,20 @@ def test_method_run_overload_9(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + target_lang="string", + text="x", + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @pytest.mark.skip() + @parametrize + def test_method_run_with_all_params_overload_9(self, client: Cloudflare) -> None: + ai = client.workers.ai.run( + "string", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + target_lang="string", + text="x", + source_lang="string", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -519,7 +560,8 @@ def test_raw_response_run_overload_9(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + target_lang="string", + text="x", ) assert response.is_closed is True @@ -533,7 +575,8 @@ def test_streaming_response_run_overload_9(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + target_lang="string", + text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -550,14 +593,16 @@ def test_path_params_run_overload_9(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", - body=b"raw file contents", + target_lang="string", + text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + target_lang="string", + text="x", ) @pytest.mark.skip() @@ -566,6 +611,7 @@ def test_method_run_overload_10(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + input_text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -575,7 +621,8 @@ def test_method_run_with_all_params_overload_10(self, client: Cloudflare) -> Non ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - image=[0, 0, 0], + input_text="x", + max_length=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -585,6 +632,7 @@ def test_raw_response_run_overload_10(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + input_text="x", ) assert response.is_closed is True @@ -598,6 +646,7 @@ def test_streaming_response_run_overload_10(self, client: Cloudflare) -> None: with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + input_text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -614,12 +663,14 @@ def test_path_params_run_overload_10(self, client: Cloudflare) -> None: client.workers.ai.with_raw_response.run( "string", account_id="", + input_text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + input_text="x", ) @pytest.mark.skip() @@ -628,7 +679,6 @@ def test_method_run_overload_11(self, client: Cloudflare) -> None: ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -638,11 +688,9 @@ def test_method_run_with_all_params_overload_11(self, client: Cloudflare) -> Non ai = client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - lora="string", + image=[0, 0, 0], max_tokens=0, - raw=True, - stream=True, + prompt="string", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @@ -652,115 +700,6 @@ def test_raw_response_run_overload_11(self, client: Cloudflare) -> None: response = client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_run_overload_11(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - "string", - account_id="", - prompt="x", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - - @pytest.mark.skip() - @parametrize - def test_method_run_overload_12(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_run_with_all_params_overload_12(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], - max_tokens=0, - stream=True, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], ) assert response.is_closed is True @@ -770,608 +709,55 @@ def test_raw_response_run_overload_12(self, client: Cloudflare) -> None: @pytest.mark.skip() @parametrize - def test_streaming_response_run_overload_12(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_run_overload_12(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - "string", - account_id="", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], - ) - - @pytest.mark.skip() - @parametrize - def test_method_run_overload_13(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", - text="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_run_with_all_params_overload_13(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", - text="x", - source_lang="string", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_run_overload_13(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", - text="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_run_overload_13(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", - text="x", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_run_overload_13(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - "string", - account_id="", - target_lang="string", - text="x", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - target_lang="string", - text="x", - ) - - @pytest.mark.skip() - @parametrize - def test_method_run_overload_14(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - input_text="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_run_with_all_params_overload_14(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - input_text="x", - max_length=0, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_run_overload_14(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - input_text="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_run_overload_14(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - input_text="x", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_run_overload_14(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - "string", - account_id="", - input_text="x", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - input_text="x", - ) - - @pytest.mark.skip() - @parametrize - def test_method_run_overload_15(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_run_overload_15(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_run_overload_15(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_run_overload_15(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - "string", - account_id="", - body=b"raw file contents", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) - - @pytest.mark.skip() - @parametrize - def test_method_run_overload_16(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_method_run_with_all_params_overload_16(self, client: Cloudflare) -> None: - ai = client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - image=[0, 0, 0], - max_tokens=0, - prompt="string", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_raw_response_run_overload_16(self, client: Cloudflare) -> None: - response = client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - def test_streaming_response_run_overload_16(self, client: Cloudflare) -> None: - with client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - def test_path_params_run_overload_16(self, client: Cloudflare) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.workers.ai.with_raw_response.run( - "string", - account_id="", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - - -class TestAsyncAI: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @pytest.mark.skip() - @parametrize - async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_run_overload_1(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.ai.with_raw_response.run( - "string", - account_id="", - text="x", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", - ) - - @pytest.mark.skip() - @parametrize - async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - guidance=0, - image=[0, 0, 0], - mask=[0, 0, 0], - num_steps=0, - strength=0, - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_run_overload_2(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.ai.with_raw_response.run( - "string", - account_id="", - prompt="x", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - ) - - @pytest.mark.skip() - @parametrize - async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_run_overload_3(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.ai.with_raw_response.run( - "string", - account_id="", - sentences=["x", "x", "x"], - source="x", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - sentences=["x", "x", "x"], - source="x", - ) - - @pytest.mark.skip() - @parametrize - async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( + def test_streaming_response_run_overload_11(self, client: Cloudflare) -> None: + with client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() + ai = response.parse() assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) assert cast(Any, response.is_closed) is True @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_4(self, async_client: AsyncCloudflare) -> None: + def test_path_params_run_overload_11(self, client: Cloudflare) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.workers.ai.with_raw_response.run( + client.workers.ai.with_raw_response.run( "string", account_id="", - text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( + client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - text="x", ) + +class TestAsyncAI: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip() @parametrize - async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_1(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + text="x", ) assert response.is_closed is True @@ -1381,11 +767,11 @@ async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_1(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1397,46 +783,53 @@ async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudf @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_5(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_1(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.ai.with_raw_response.run( "string", account_id="", - body=b"raw file contents", + text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + text="x", ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_2(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - audio=[0, 0, 0], + prompt="x", + guidance=0, + image=[0, 0, 0], + mask=[0, 0, 0], + num_steps=0, + strength=0, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", ) assert response.is_closed is True @@ -1446,10 +839,11 @@ async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_2(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1461,36 +855,40 @@ async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudf @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_6(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_2(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.ai.with_raw_response.run( "string", account_id="", + prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + prompt="x", ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_3(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + sentences=["x", "x", "x"], + source="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + sentences=["x", "x", "x"], + source="x", ) assert response.is_closed is True @@ -1500,11 +898,12 @@ async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_3(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + sentences=["x", "x", "x"], + source="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1516,46 +915,40 @@ async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudf @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_7(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_3(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.ai.with_raw_response.run( "string", account_id="", - body=b"raw file contents", + sentences=["x", "x", "x"], + source="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", + sentences=["x", "x", "x"], + source="x", ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_4(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - image=[0, 0, 0], + text="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + text="x", ) assert response.is_closed is True @@ -1565,10 +958,11 @@ async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_4(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + text="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1580,36 +974,46 @@ async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudf @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_8(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_4(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.ai.with_raw_response.run( "string", account_id="", + text="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", + text="x", ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_5(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_5(self, async_client: AsyncCloudflare) -> None: + ai = await async_client.workers.ai.run( + "string", + account_id="023e105f4ecef8ad9ca31a8372d0c353", + audio=[0, 0, 0], + ) + assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) + + @pytest.mark.skip() + @parametrize + async def test_raw_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) assert response.is_closed is True @@ -1619,11 +1023,10 @@ async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_5(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1635,24 +1038,22 @@ async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudf @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_9(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_5(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.ai.with_raw_response.run( "string", account_id="", - body=b"raw file contents", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1661,7 +1062,7 @@ async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> No @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_6(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1671,7 +1072,7 @@ async def test_method_run_with_all_params_overload_10(self, async_client: AsyncC @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1684,7 +1085,7 @@ async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_6(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1699,7 +1100,7 @@ async def test_streaming_response_run_overload_10(self, async_client: AsyncCloud @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_6(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.ai.with_raw_response.run( "string", @@ -1714,35 +1115,29 @@ async def test_path_params_run_overload_10(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_7(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", - lora="string", - max_tokens=0, - raw=True, - stream=True, + image=[0, 0, 0], ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", ) assert response.is_closed is True @@ -1752,11 +1147,10 @@ async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_7(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1768,50 +1162,36 @@ async def test_streaming_response_run_overload_11(self, async_client: AsyncCloud @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_11(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_7(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.ai.with_raw_response.run( "string", account_id="", - prompt="x", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - prompt="x", ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_8(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", + lora="string", + max_tokens=0, messages=[ { "content": "string", @@ -1826,31 +1206,18 @@ async def test_method_run_with_all_params_overload_12(self, async_client: AsyncC "role": "string", }, ], - max_tokens=0, + prompt="x", + raw=True, stream=True, ) assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], ) assert response.is_closed is True @@ -1860,24 +1227,10 @@ async def test_raw_response_run_overload_12(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_8(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1889,50 +1242,22 @@ async def test_streaming_response_run_overload_12(self, async_client: AsyncCloud @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_12(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_8(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.ai.with_raw_response.run( "string", account_id="", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): await async_client.workers.ai.with_raw_response.run( "", account_id="023e105f4ecef8ad9ca31a8372d0c353", - messages=[ - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - { - "content": "string", - "role": "string", - }, - ], ) @pytest.mark.skip() @parametrize - async def test_method_run_overload_13(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1943,7 +1268,7 @@ async def test_method_run_overload_13(self, async_client: AsyncCloudflare) -> No @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_13(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_9(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1955,7 +1280,7 @@ async def test_method_run_with_all_params_overload_13(self, async_client: AsyncC @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_13(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1970,7 +1295,7 @@ async def test_raw_response_run_overload_13(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_13(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_9(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -1987,7 +1312,7 @@ async def test_streaming_response_run_overload_13(self, async_client: AsyncCloud @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_13(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_9(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.ai.with_raw_response.run( "string", @@ -2006,7 +1331,7 @@ async def test_path_params_run_overload_13(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_method_run_overload_14(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2016,7 +1341,7 @@ async def test_method_run_overload_14(self, async_client: AsyncCloudflare) -> No @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_14(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_10(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2027,7 +1352,7 @@ async def test_method_run_with_all_params_overload_14(self, async_client: AsyncC @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_14(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2041,7 +1366,7 @@ async def test_raw_response_run_overload_14(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_14(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_10(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2057,7 +1382,7 @@ async def test_streaming_response_run_overload_14(self, async_client: AsyncCloud @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_14(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_10(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.ai.with_raw_response.run( "string", @@ -2074,64 +1399,7 @@ async def test_path_params_run_overload_14(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_method_run_overload_15(self, async_client: AsyncCloudflare) -> None: - ai = await async_client.workers.ai.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_raw_response_run_overload_15(self, async_client: AsyncCloudflare) -> None: - response = await async_client.workers.ai.with_raw_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - @pytest.mark.skip() - @parametrize - async def test_streaming_response_run_overload_15(self, async_client: AsyncCloudflare) -> None: - async with async_client.workers.ai.with_streaming_response.run( - "string", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - ai = await response.parse() - assert_matches_type(Optional[AIRunResponse], ai, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip() - @parametrize - async def test_path_params_run_overload_15(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.ai.with_raw_response.run( - "string", - account_id="", - body=b"raw file contents", - ) - - with pytest.raises(ValueError, match=r"Expected a non-empty value for `model_name` but received ''"): - await async_client.workers.ai.with_raw_response.run( - "", - account_id="023e105f4ecef8ad9ca31a8372d0c353", - body=b"raw file contents", - ) - - @pytest.mark.skip() - @parametrize - async def test_method_run_overload_16(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2140,7 +1408,7 @@ async def test_method_run_overload_16(self, async_client: AsyncCloudflare) -> No @pytest.mark.skip() @parametrize - async def test_method_run_with_all_params_overload_16(self, async_client: AsyncCloudflare) -> None: + async def test_method_run_with_all_params_overload_11(self, async_client: AsyncCloudflare) -> None: ai = await async_client.workers.ai.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2152,7 +1420,7 @@ async def test_method_run_with_all_params_overload_16(self, async_client: AsyncC @pytest.mark.skip() @parametrize - async def test_raw_response_run_overload_16(self, async_client: AsyncCloudflare) -> None: + async def test_raw_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: response = await async_client.workers.ai.with_raw_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2165,7 +1433,7 @@ async def test_raw_response_run_overload_16(self, async_client: AsyncCloudflare) @pytest.mark.skip() @parametrize - async def test_streaming_response_run_overload_16(self, async_client: AsyncCloudflare) -> None: + async def test_streaming_response_run_overload_11(self, async_client: AsyncCloudflare) -> None: async with async_client.workers.ai.with_streaming_response.run( "string", account_id="023e105f4ecef8ad9ca31a8372d0c353", @@ -2180,7 +1448,7 @@ async def test_streaming_response_run_overload_16(self, async_client: AsyncCloud @pytest.mark.skip() @parametrize - async def test_path_params_run_overload_16(self, async_client: AsyncCloudflare) -> None: + async def test_path_params_run_overload_11(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.ai.with_raw_response.run( "string", From b705bb679ef127492d0eac9abc54669c4c4263b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:11:56 +0000 Subject: [PATCH 11/16] feat(api): OpenAPI spec update via Stainless API (#191) --- src/cloudflare/__init__.py | 4 ++++ src/cloudflare/_base_client.py | 6 +++--- src/cloudflare/_constants.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/cloudflare/__init__.py b/src/cloudflare/__init__.py index 05853450323..c68ec60b863 100644 --- a/src/cloudflare/__init__.py +++ b/src/cloudflare/__init__.py @@ -17,6 +17,7 @@ from ._models import BaseModel from ._version import __title__, __version__ from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse +from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS from ._exceptions import ( APIError, ConflictError, @@ -68,6 +69,9 @@ "AsyncCloudflare", "file_from_path", "BaseModel", + "DEFAULT_TIMEOUT", + "DEFAULT_MAX_RETRIES", + "DEFAULT_CONNECTION_LIMITS", ] _setup_logging() diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index 2b3a1f98bab..df68237a10f 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -71,13 +71,13 @@ extract_response_type, ) from ._constants import ( - DEFAULT_LIMITS, DEFAULT_TIMEOUT, MAX_RETRY_DELAY, DEFAULT_MAX_RETRIES, INITIAL_RETRY_DELAY, RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER, + DEFAULT_CONNECTION_LIMITS, ) from ._streaming import Stream, SSEDecoder, AsyncStream, SSEBytesDecoder from ._exceptions import ( @@ -746,7 +746,7 @@ def __init__( if http_client is not None: raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`") else: - limits = DEFAULT_LIMITS + limits = DEFAULT_CONNECTION_LIMITS if transport is not None: warnings.warn( @@ -1280,7 +1280,7 @@ def __init__( if http_client is not None: raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`") else: - limits = DEFAULT_LIMITS + limits = DEFAULT_CONNECTION_LIMITS if transport is not None: warnings.warn( diff --git a/src/cloudflare/_constants.py b/src/cloudflare/_constants.py index 1d56f7fde03..a2ac3b6f327 100644 --- a/src/cloudflare/_constants.py +++ b/src/cloudflare/_constants.py @@ -8,7 +8,7 @@ # default timeout is 1 minute DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0) DEFAULT_MAX_RETRIES = 2 -DEFAULT_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) +DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) INITIAL_RETRY_DELAY = 0.5 MAX_RETRY_DELAY = 8.0 From 5d528fcf8a7f45e7b5394bed02997a0c91b2d55d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 17:00:41 +0000 Subject: [PATCH 12/16] feat(api): update via SDK Studio (#192) --- pyproject.toml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c81f795d48e..7d652c5d80f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "cloudflare" version = "3.0.0-beta.6" description = "The official Python library for the cloudflare API" -readme = "README.md" +dynamic = ["readme"] license = "Apache-2.0" authors = [ { name = "Cloudflare", email = "api@cloudflare.com" }, @@ -88,7 +88,7 @@ typecheck = { chain = [ "typecheck:mypy" = "mypy ." [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-fancy-pypi-readme"] build-backend = "hatchling.build" [tool.hatch.build] @@ -99,6 +99,17 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["src/cloudflare"] +[tool.hatch.metadata.hooks.fancy-pypi-readme] +content-type = "text/markdown" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +path = "README.md" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +# replace relative links with absolute links +pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' +replacement = '[\1](https://github.com/cloudflare/cloudflare-python/tree/main/\g<2>)' + [tool.black] line-length = 120 target-version = ["py37"] From d19970f8a9bc6ae9bbd30b59b8406007a79a3401 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:01:42 +0000 Subject: [PATCH 13/16] feat(api): OpenAPI spec update via Stainless API (#193) --- README.md | 4 ++-- src/cloudflare/_base_client.py | 5 +++++ tests/test_client.py | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 681b87a7e15..6066af741ab 100644 --- a/README.md +++ b/README.md @@ -332,12 +332,12 @@ response = client.post( print(response.headers.get("x-foo")) ``` -#### Undocumented params +#### Undocumented request params If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request options. -#### Undocumented properties +#### Undocumented response properties To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You can also get all the extra fields on the Pydantic model as a dict with diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index df68237a10f..21c336d5fe8 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -360,6 +360,11 @@ def __init__( self._strict_response_validation = _strict_response_validation self._idempotency_header = None + if max_retries is None: # pyright: ignore[reportUnnecessaryComparison] + raise TypeError( + "max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `cloudflare.DEFAULT_MAX_RETRIES`" + ) + def _enforce_trailing_slash(self, url: URL) -> URL: if url.raw_path.endswith(b"/"): return url diff --git a/tests/test_client.py b/tests/test_client.py index d2bb96ba3ed..9b15628f2bd 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -727,6 +727,16 @@ class Model(BaseModel): assert isinstance(exc.value.__cause__, ValidationError) + def test_client_max_retries_validation(self) -> None: + with pytest.raises(TypeError, match=r"max_retries cannot be None"): + Cloudflare( + base_url=base_url, + api_key=api_key, + api_email=api_email, + _strict_response_validation=True, + max_retries=cast(Any, None), + ) + @pytest.mark.respx(base_url=base_url) def test_received_text_for_expected_json(self, respx_mock: MockRouter) -> None: class Model(BaseModel): @@ -1493,6 +1503,16 @@ class Model(BaseModel): assert isinstance(exc.value.__cause__, ValidationError) + async def test_client_max_retries_validation(self) -> None: + with pytest.raises(TypeError, match=r"max_retries cannot be None"): + AsyncCloudflare( + base_url=base_url, + api_key=api_key, + api_email=api_email, + _strict_response_validation=True, + max_retries=cast(Any, None), + ) + @pytest.mark.respx(base_url=base_url) @pytest.mark.asyncio async def test_received_text_for_expected_json(self, respx_mock: MockRouter) -> None: From d2bad015a9a95405d4f770bdd579a2de821e835f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 11:53:35 +0000 Subject: [PATCH 14/16] feat(api): OpenAPI spec update via Stainless API (#194) --- .../resources/dns/firewall/firewall.py | 16 ---------------- src/cloudflare/types/dns/dns_firewall.py | 6 ------ .../types/dns/firewall_create_params.py | 6 ------ src/cloudflare/types/dns/firewall_edit_params.py | 6 ------ tests/api_resources/dns/test_firewall.py | 8 -------- 5 files changed, 42 deletions(-) diff --git a/src/cloudflare/resources/dns/firewall/firewall.py b/src/cloudflare/resources/dns/firewall/firewall.py index 009cbc6681d..c8fe6388eb0 100644 --- a/src/cloudflare/resources/dns/firewall/firewall.py +++ b/src/cloudflare/resources/dns/firewall/firewall.py @@ -70,7 +70,6 @@ def create( maximum_cache_ttl: float | NotGiven = NOT_GIVEN, minimum_cache_ttl: float | NotGiven = NOT_GIVEN, negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN, - origin_ips: object | NotGiven = NOT_GIVEN, ratelimit: Optional[float] | NotGiven = NOT_GIVEN, retries: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -100,8 +99,6 @@ def create( negative_cache_ttl: Negative DNS Cache TTL. - origin_ips: Deprecated alias for "upstream_ips". - ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -130,7 +127,6 @@ def create( "maximum_cache_ttl": maximum_cache_ttl, "minimum_cache_ttl": minimum_cache_ttl, "negative_cache_ttl": negative_cache_ttl, - "origin_ips": origin_ips, "ratelimit": ratelimit, "retries": retries, }, @@ -256,7 +252,6 @@ def edit( upstream_ips: List[Union[str, str]], attack_mitigation: Optional[firewall_edit_params.AttackMitigation] | NotGiven = NOT_GIVEN, negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN, - origin_ips: object | NotGiven = NOT_GIVEN, ratelimit: Optional[float] | NotGiven = NOT_GIVEN, retries: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -288,8 +283,6 @@ def edit( negative_cache_ttl: Negative DNS Cache TTL. - origin_ips: Deprecated alias for "upstream_ips". - ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -321,7 +314,6 @@ def edit( "upstream_ips": upstream_ips, "attack_mitigation": attack_mitigation, "negative_cache_ttl": negative_cache_ttl, - "origin_ips": origin_ips, "ratelimit": ratelimit, "retries": retries, }, @@ -407,7 +399,6 @@ async def create( maximum_cache_ttl: float | NotGiven = NOT_GIVEN, minimum_cache_ttl: float | NotGiven = NOT_GIVEN, negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN, - origin_ips: object | NotGiven = NOT_GIVEN, ratelimit: Optional[float] | NotGiven = NOT_GIVEN, retries: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -437,8 +428,6 @@ async def create( negative_cache_ttl: Negative DNS Cache TTL. - origin_ips: Deprecated alias for "upstream_ips". - ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -467,7 +456,6 @@ async def create( "maximum_cache_ttl": maximum_cache_ttl, "minimum_cache_ttl": minimum_cache_ttl, "negative_cache_ttl": negative_cache_ttl, - "origin_ips": origin_ips, "ratelimit": ratelimit, "retries": retries, }, @@ -593,7 +581,6 @@ async def edit( upstream_ips: List[Union[str, str]], attack_mitigation: Optional[firewall_edit_params.AttackMitigation] | NotGiven = NOT_GIVEN, negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN, - origin_ips: object | NotGiven = NOT_GIVEN, ratelimit: Optional[float] | NotGiven = NOT_GIVEN, retries: float | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -625,8 +612,6 @@ async def edit( negative_cache_ttl: Negative DNS Cache TTL. - origin_ips: Deprecated alias for "upstream_ips". - ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to the upstream nameservers configured on the cluster). @@ -658,7 +643,6 @@ async def edit( "upstream_ips": upstream_ips, "attack_mitigation": attack_mitigation, "negative_cache_ttl": negative_cache_ttl, - "origin_ips": origin_ips, "ratelimit": ratelimit, "retries": retries, }, diff --git a/src/cloudflare/types/dns/dns_firewall.py b/src/cloudflare/types/dns/dns_firewall.py index 0b537b38884..6b01c523358 100644 --- a/src/cloudflare/types/dns/dns_firewall.py +++ b/src/cloudflare/types/dns/dns_firewall.py @@ -15,9 +15,6 @@ class AttackMitigation(BaseModel): DNS servers protected. """ - only_when_origin_unhealthy: Optional[object] = None - """Deprecated alias for "only_when_upstream_unhealthy".""" - only_when_upstream_unhealthy: Optional[bool] = None """Only mitigate attacks when upstream servers seem unhealthy.""" @@ -54,9 +51,6 @@ class DNSFirewall(BaseModel): negative_cache_ttl: Optional[float] = None """Negative DNS Cache TTL.""" - origin_ips: Optional[object] = None - """Deprecated alias for "upstream_ips".""" - ratelimit: Optional[float] = None """ Ratelimit in queries per second per datacenter (applies to DNS queries sent to diff --git a/src/cloudflare/types/dns/firewall_create_params.py b/src/cloudflare/types/dns/firewall_create_params.py index 22e8d50ac02..7562374f23c 100644 --- a/src/cloudflare/types/dns/firewall_create_params.py +++ b/src/cloudflare/types/dns/firewall_create_params.py @@ -35,9 +35,6 @@ class FirewallCreateParams(TypedDict, total=False): negative_cache_ttl: Optional[float] """Negative DNS Cache TTL.""" - origin_ips: object - """Deprecated alias for "upstream_ips".""" - ratelimit: Optional[float] """ Ratelimit in queries per second per datacenter (applies to DNS queries sent to @@ -58,8 +55,5 @@ class AttackMitigation(TypedDict, total=False): DNS servers protected. """ - only_when_origin_unhealthy: object - """Deprecated alias for "only_when_upstream_unhealthy".""" - only_when_upstream_unhealthy: bool """Only mitigate attacks when upstream servers seem unhealthy.""" diff --git a/src/cloudflare/types/dns/firewall_edit_params.py b/src/cloudflare/types/dns/firewall_edit_params.py index 25e392e0519..b3e117eb015 100644 --- a/src/cloudflare/types/dns/firewall_edit_params.py +++ b/src/cloudflare/types/dns/firewall_edit_params.py @@ -37,9 +37,6 @@ class FirewallEditParams(TypedDict, total=False): negative_cache_ttl: Optional[float] """Negative DNS Cache TTL.""" - origin_ips: object - """Deprecated alias for "upstream_ips".""" - ratelimit: Optional[float] """ Ratelimit in queries per second per datacenter (applies to DNS queries sent to @@ -60,8 +57,5 @@ class AttackMitigation(TypedDict, total=False): DNS servers protected. """ - only_when_origin_unhealthy: object - """Deprecated alias for "only_when_upstream_unhealthy".""" - only_when_upstream_unhealthy: bool """Only mitigate attacks when upstream servers seem unhealthy.""" diff --git a/tests/api_resources/dns/test_firewall.py b/tests/api_resources/dns/test_firewall.py index ccf77c74206..736b3bf0e5f 100644 --- a/tests/api_resources/dns/test_firewall.py +++ b/tests/api_resources/dns/test_firewall.py @@ -40,7 +40,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], attack_mitigation={ "enabled": True, - "only_when_origin_unhealthy": {}, "only_when_upstream_unhealthy": False, }, deprecate_any_requests=True, @@ -48,7 +47,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None: maximum_cache_ttl=900, minimum_cache_ttl=60, negative_cache_ttl=900, - origin_ips={}, ratelimit=600, retries=2, ) @@ -229,11 +227,9 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None: upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], attack_mitigation={ "enabled": True, - "only_when_origin_unhealthy": {}, "only_when_upstream_unhealthy": False, }, negative_cache_ttl=900, - origin_ips={}, ratelimit=600, retries=2, ) @@ -385,7 +381,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], attack_mitigation={ "enabled": True, - "only_when_origin_unhealthy": {}, "only_when_upstream_unhealthy": False, }, deprecate_any_requests=True, @@ -393,7 +388,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare maximum_cache_ttl=900, minimum_cache_ttl=60, negative_cache_ttl=900, - origin_ips={}, ratelimit=600, retries=2, ) @@ -574,11 +568,9 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"], attack_mitigation={ "enabled": True, - "only_when_origin_unhealthy": {}, "only_when_upstream_unhealthy": False, }, negative_cache_ttl=900, - origin_ips={}, ratelimit=600, retries=2, ) From 7b2beb3e0cf0bf5415b3cf434ab36cf54546c864 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:02:32 +0000 Subject: [PATCH 15/16] feat(api): OpenAPI spec update via Stainless API (#195) --- .../access/applications/applications.py | 24 +++++++++----- .../access/application_create_params.py | 17 +++++----- .../access/application_update_params.py | 17 +++++----- .../applications/policy_create_params.py | 4 +-- .../applications/policy_update_params.py | 4 +-- .../applications/zero_trust_policies.py | 2 +- .../access/service_token_create_response.py | 2 +- .../access/service_token_rotate_response.py | 2 +- .../zero_trust/access/zero_trust_apps.py | 15 +++++---- .../zero_trust/access/zero_trust_bookmarks.py | 2 +- .../access/zero_trust_certificates.py | 2 +- .../zero_trust/access/zero_trust_users.py | 4 +-- .../zero_trust/access/test_applications.py | 32 +++++++++---------- 13 files changed, 69 insertions(+), 58 deletions(-) diff --git a/src/cloudflare/resources/zero_trust/access/applications/applications.py b/src/cloudflare/resources/zero_trust/access/applications/applications.py index 79e1cc21d43..1fc1f0789fd 100644 --- a/src/cloudflare/resources/zero_trust/access/applications/applications.py +++ b/src/cloudflare/resources/zero_trust/access/applications/applications.py @@ -620,7 +620,7 @@ def create( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - app_launcher_visible: object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, domain: str | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, @@ -641,6 +641,8 @@ def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + app_launcher_visible: Displays the application in the App Launcher. + domain: The URL or domain of the bookmark. logo_url: The image URL for the logo shown in the App Launcher dashboard. @@ -673,7 +675,7 @@ def create( zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, allowed_idps: List[str] | NotGiven = NOT_GIVEN, - app_launcher_visible: bool | object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: application_create_params.SelfHostedApplicationCorsHeaders | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, @@ -1320,7 +1322,7 @@ def update( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - app_launcher_visible: object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, domain: str | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, @@ -1343,6 +1345,8 @@ def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + app_launcher_visible: Displays the application in the App Launcher. + domain: The URL or domain of the bookmark. logo_url: The image URL for the logo shown in the App Launcher dashboard. @@ -1376,7 +1380,7 @@ def update( zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, allowed_idps: List[str] | NotGiven = NOT_GIVEN, - app_launcher_visible: bool | object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: application_update_params.SelfHostedApplicationCorsHeaders | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, @@ -2254,7 +2258,7 @@ async def create( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - app_launcher_visible: object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, domain: str | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, @@ -2275,6 +2279,8 @@ async def create( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + app_launcher_visible: Displays the application in the App Launcher. + domain: The URL or domain of the bookmark. logo_url: The image URL for the logo shown in the App Launcher dashboard. @@ -2307,7 +2313,7 @@ async def create( zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, allowed_idps: List[str] | NotGiven = NOT_GIVEN, - app_launcher_visible: bool | object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: application_create_params.SelfHostedApplicationCorsHeaders | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, @@ -2954,7 +2960,7 @@ async def update( *, account_id: str | NotGiven = NOT_GIVEN, zone_id: str | NotGiven = NOT_GIVEN, - app_launcher_visible: object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, domain: str | NotGiven = NOT_GIVEN, logo_url: str | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, @@ -2977,6 +2983,8 @@ async def update( zone_id: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. + app_launcher_visible: Displays the application in the App Launcher. + domain: The URL or domain of the bookmark. logo_url: The image URL for the logo shown in the App Launcher dashboard. @@ -3010,7 +3018,7 @@ async def update( zone_id: str | NotGiven = NOT_GIVEN, allow_authenticate_via_warp: bool | NotGiven = NOT_GIVEN, allowed_idps: List[str] | NotGiven = NOT_GIVEN, - app_launcher_visible: bool | object | NotGiven = NOT_GIVEN, + app_launcher_visible: bool | NotGiven = NOT_GIVEN, auto_redirect_to_identity: bool | NotGiven = NOT_GIVEN, cors_headers: application_update_params.SelfHostedApplicationCorsHeaders | NotGiven = NOT_GIVEN, custom_deny_message: str | NotGiven = NOT_GIVEN, diff --git a/src/cloudflare/types/zero_trust/access/application_create_params.py b/src/cloudflare/types/zero_trust/access/application_create_params.py index c0fdd9fd956..c8cf94ea9fa 100644 --- a/src/cloudflare/types/zero_trust/access/application_create_params.py +++ b/src/cloudflare/types/zero_trust/access/application_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Union, Iterable +from typing import List, Union from typing_extensions import Literal, Required, TypedDict __all__ = [ @@ -160,13 +160,13 @@ class SelfHostedApplicationCorsHeaders(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: Iterable[object] + allowed_headers: List[str] """Allowed HTTP request headers.""" allowed_methods: List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] """Allowed HTTP request methods.""" - allowed_origins: Iterable[object] + allowed_origins: List[str] """Allowed origins.""" max_age: float @@ -464,13 +464,13 @@ class BrowserSSHApplicationCorsHeaders(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: Iterable[object] + allowed_headers: List[str] """Allowed HTTP request headers.""" allowed_methods: List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] """Allowed HTTP request methods.""" - allowed_origins: Iterable[object] + allowed_origins: List[str] """Allowed origins.""" max_age: float @@ -611,13 +611,13 @@ class BrowserVncApplicationCorsHeaders(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: Iterable[object] + allowed_headers: List[str] """Allowed HTTP request headers.""" allowed_methods: List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] """Allowed HTTP request methods.""" - allowed_origins: Iterable[object] + allowed_origins: List[str] """Allowed origins.""" max_age: float @@ -727,7 +727,8 @@ class BookmarkApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - app_launcher_visible: object + app_launcher_visible: bool + """Displays the application in the App Launcher.""" domain: str """The URL or domain of the bookmark.""" diff --git a/src/cloudflare/types/zero_trust/access/application_update_params.py b/src/cloudflare/types/zero_trust/access/application_update_params.py index d9dcb4ca480..e722654c5b7 100644 --- a/src/cloudflare/types/zero_trust/access/application_update_params.py +++ b/src/cloudflare/types/zero_trust/access/application_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Union, Iterable +from typing import List, Union from typing_extensions import Literal, Required, TypedDict __all__ = [ @@ -160,13 +160,13 @@ class SelfHostedApplicationCorsHeaders(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: Iterable[object] + allowed_headers: List[str] """Allowed HTTP request headers.""" allowed_methods: List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] """Allowed HTTP request methods.""" - allowed_origins: Iterable[object] + allowed_origins: List[str] """Allowed origins.""" max_age: float @@ -464,13 +464,13 @@ class BrowserSSHApplicationCorsHeaders(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: Iterable[object] + allowed_headers: List[str] """Allowed HTTP request headers.""" allowed_methods: List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] """Allowed HTTP request methods.""" - allowed_origins: Iterable[object] + allowed_origins: List[str] """Allowed origins.""" max_age: float @@ -611,13 +611,13 @@ class BrowserVncApplicationCorsHeaders(TypedDict, total=False): client certificates) with requests. """ - allowed_headers: Iterable[object] + allowed_headers: List[str] """Allowed HTTP request headers.""" allowed_methods: List[Literal["GET", "POST", "HEAD", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"]] """Allowed HTTP request methods.""" - allowed_origins: Iterable[object] + allowed_origins: List[str] """Allowed origins.""" max_age: float @@ -727,7 +727,8 @@ class BookmarkApplication(TypedDict, total=False): zone_id: str """The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.""" - app_launcher_visible: object + app_launcher_visible: bool + """Displays the application in the App Launcher.""" domain: str """The URL or domain of the bookmark.""" diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_create_params.py b/src/cloudflare/types/zero_trust/access/applications/policy_create_params.py index 2dea20f8e01..a6d53febf41 100644 --- a/src/cloudflare/types/zero_trust/access/applications/policy_create_params.py +++ b/src/cloudflare/types/zero_trust/access/applications/policy_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import List, Union, Iterable from typing_extensions import Literal, Required, Annotated, TypedDict from ....._utils import PropertyInfo @@ -395,7 +395,7 @@ class ApprovalGroup(TypedDict, total=False): approvals_needed: Required[float] """The number of approvals needed to obtain access.""" - email_addresses: Iterable[object] + email_addresses: List[str] """A list of emails that can approve the access request.""" email_list_uuid: str diff --git a/src/cloudflare/types/zero_trust/access/applications/policy_update_params.py b/src/cloudflare/types/zero_trust/access/applications/policy_update_params.py index 24e018b7080..223aea70ccd 100644 --- a/src/cloudflare/types/zero_trust/access/applications/policy_update_params.py +++ b/src/cloudflare/types/zero_trust/access/applications/policy_update_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import List, Union, Iterable from typing_extensions import Literal, Required, Annotated, TypedDict from ....._utils import PropertyInfo @@ -398,7 +398,7 @@ class ApprovalGroup(TypedDict, total=False): approvals_needed: Required[float] """The number of approvals needed to obtain access.""" - email_addresses: Iterable[object] + email_addresses: List[str] """A list of emails that can approve the access request.""" email_list_uuid: str diff --git a/src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py b/src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py index ff50f127132..91fd93a10f2 100644 --- a/src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py +++ b/src/cloudflare/types/zero_trust/access/applications/zero_trust_policies.py @@ -126,7 +126,7 @@ class ApprovalGroup(BaseModel): approvals_needed: float """The number of approvals needed to obtain access.""" - email_addresses: Optional[List[object]] = None + email_addresses: Optional[List[str]] = None """A list of emails that can approve the access request.""" email_list_uuid: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/access/service_token_create_response.py b/src/cloudflare/types/zero_trust/access/service_token_create_response.py index 47841d8a654..e74b74cd80b 100644 --- a/src/cloudflare/types/zero_trust/access/service_token_create_response.py +++ b/src/cloudflare/types/zero_trust/access/service_token_create_response.py @@ -9,7 +9,7 @@ class ServiceTokenCreateResponse(BaseModel): - id: Optional[object] = None + id: Optional[str] = None """The ID of the service token.""" client_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/access/service_token_rotate_response.py b/src/cloudflare/types/zero_trust/access/service_token_rotate_response.py index 0eac1cad0bc..b4a74bcfc69 100644 --- a/src/cloudflare/types/zero_trust/access/service_token_rotate_response.py +++ b/src/cloudflare/types/zero_trust/access/service_token_rotate_response.py @@ -9,7 +9,7 @@ class ServiceTokenRotateResponse(BaseModel): - id: Optional[object] = None + id: Optional[str] = None """The ID of the service token.""" client_id: Optional[str] = None diff --git a/src/cloudflare/types/zero_trust/access/zero_trust_apps.py b/src/cloudflare/types/zero_trust/access/zero_trust_apps.py index b0160e4ce25..bbd1111c7da 100644 --- a/src/cloudflare/types/zero_trust/access/zero_trust_apps.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_apps.py @@ -43,7 +43,7 @@ class SelfHostedApplicationCorsHeaders(BaseModel): client certificates) with requests. """ - allowed_headers: Optional[List[object]] = None + allowed_headers: Optional[List[str]] = None """Allowed HTTP request headers.""" allowed_methods: Optional[ @@ -51,7 +51,7 @@ class SelfHostedApplicationCorsHeaders(BaseModel): ] = None """Allowed HTTP request methods.""" - allowed_origins: Optional[List[object]] = None + allowed_origins: Optional[List[str]] = None """Allowed origins.""" max_age: Optional[float] = None @@ -367,7 +367,7 @@ class BrowserSSHApplicationCorsHeaders(BaseModel): client certificates) with requests. """ - allowed_headers: Optional[List[object]] = None + allowed_headers: Optional[List[str]] = None """Allowed HTTP request headers.""" allowed_methods: Optional[ @@ -375,7 +375,7 @@ class BrowserSSHApplicationCorsHeaders(BaseModel): ] = None """Allowed HTTP request methods.""" - allowed_origins: Optional[List[object]] = None + allowed_origins: Optional[List[str]] = None """Allowed origins.""" max_age: Optional[float] = None @@ -520,7 +520,7 @@ class BrowserVncApplicationCorsHeaders(BaseModel): client certificates) with requests. """ - allowed_headers: Optional[List[object]] = None + allowed_headers: Optional[List[str]] = None """Allowed HTTP request headers.""" allowed_methods: Optional[ @@ -528,7 +528,7 @@ class BrowserVncApplicationCorsHeaders(BaseModel): ] = None """Allowed HTTP request methods.""" - allowed_origins: Optional[List[object]] = None + allowed_origins: Optional[List[str]] = None """Allowed origins.""" max_age: Optional[float] = None @@ -799,7 +799,8 @@ class BookmarkApplication(BaseModel): id: Optional[str] = None """UUID""" - app_launcher_visible: Optional[object] = None + app_launcher_visible: Optional[bool] = None + """Displays the application in the App Launcher.""" aud: Optional[str] = None """Audience tag.""" diff --git a/src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py b/src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py index 4d760428841..6ecee05ac03 100644 --- a/src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_bookmarks.py @@ -9,7 +9,7 @@ class ZeroTrustBookmarks(BaseModel): - id: Optional[object] = None + id: Optional[str] = None """The unique identifier for the Bookmark application.""" app_launcher_visible: Optional[bool] = None diff --git a/src/cloudflare/types/zero_trust/access/zero_trust_certificates.py b/src/cloudflare/types/zero_trust/access/zero_trust_certificates.py index 94eeacc0530..07c742c30e3 100644 --- a/src/cloudflare/types/zero_trust/access/zero_trust_certificates.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_certificates.py @@ -9,7 +9,7 @@ class ZeroTrustCertificates(BaseModel): - id: Optional[object] = None + id: Optional[str] = None """The ID of the application that will use this certificate.""" associated_hostnames: Optional[List[str]] = None diff --git a/src/cloudflare/types/zero_trust/access/zero_trust_users.py b/src/cloudflare/types/zero_trust/access/zero_trust_users.py index dc771a52d92..df60d7a1ecf 100644 --- a/src/cloudflare/types/zero_trust/access/zero_trust_users.py +++ b/src/cloudflare/types/zero_trust/access/zero_trust_users.py @@ -32,10 +32,10 @@ class ZeroTrustUsers(BaseModel): name: Optional[str] = None """The name of the user.""" - seat_uid: Optional[object] = None + seat_uid: Optional[str] = None """The unique API identifier for the Zero Trust seat.""" - uid: Optional[object] = None + uid: Optional[str] = None """The unique API identifier for the user.""" updated_at: Optional[datetime] = None diff --git a/tests/api_resources/zero_trust/access/test_applications.py b/tests/api_resources/zero_trust/access/test_applications.py index 883a2dc7233..8902c1dc5df 100644 --- a/tests/api_resources/zero_trust/access/test_applications.py +++ b/tests/api_resources/zero_trust/access/test_applications.py @@ -53,7 +53,7 @@ def test_method_create_with_all_params_overload_1(self, client: Cloudflare) -> N "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -257,7 +257,7 @@ def test_method_create_with_all_params_overload_3(self, client: Cloudflare) -> N "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -367,7 +367,7 @@ def test_method_create_with_all_params_overload_4(self, client: Cloudflare) -> N "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -682,7 +682,7 @@ def test_method_create_with_all_params_overload_8(self, client: Cloudflare) -> N application = client.zero_trust.access.applications.create( account_id="string", zone_id="string", - app_launcher_visible={}, + app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", @@ -768,7 +768,7 @@ def test_method_update_with_all_params_overload_1(self, client: Cloudflare) -> N "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -984,7 +984,7 @@ def test_method_update_with_all_params_overload_3(self, client: Cloudflare) -> N "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -1100,7 +1100,7 @@ def test_method_update_with_all_params_overload_4(self, client: Cloudflare) -> N "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -1439,7 +1439,7 @@ def test_method_update_with_all_params_overload_8(self, client: Cloudflare) -> N "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", zone_id="string", - app_launcher_visible={}, + app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", @@ -1793,7 +1793,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -1997,7 +1997,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -2107,7 +2107,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -2422,7 +2422,7 @@ async def test_method_create_with_all_params_overload_8(self, async_client: Asyn application = await async_client.zero_trust.access.applications.create( account_id="string", zone_id="string", - app_launcher_visible={}, + app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", @@ -2508,7 +2508,7 @@ async def test_method_update_with_all_params_overload_1(self, async_client: Asyn "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -2724,7 +2724,7 @@ async def test_method_update_with_all_params_overload_3(self, async_client: Asyn "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -2840,7 +2840,7 @@ async def test_method_update_with_all_params_overload_4(self, async_client: Asyn "allow_all_methods": True, "allow_all_origins": True, "allow_credentials": True, - "allowed_headers": [{}, {}, {}], + "allowed_headers": ["string", "string", "string"], "allowed_methods": ["GET"], "allowed_origins": ["https://example.com"], "max_age": -1, @@ -3179,7 +3179,7 @@ async def test_method_update_with_all_params_overload_8(self, async_client: Asyn "023e105f4ecef8ad9ca31a8372d0c353", account_id="string", zone_id="string", - app_launcher_visible={}, + app_launcher_visible=True, domain="https://mybookmark.com", logo_url="https://www.cloudflare.com/img/logo-web-badges/cf-logo-on-white-bg.svg", name="Admin Site", From 814fa37427b3f855458831e54601389884fecfa4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 17:02:50 +0000 Subject: [PATCH 16/16] release: 3.0.0-beta.7 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 22 ++++++++++++++++++++++ pyproject.toml | 2 +- src/cloudflare/_version.py | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3c4dbee7d84..beb0318b90a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.0.0-beta.6" + ".": "3.0.0-beta.7" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dfe6b247083..f2701a3df42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 3.0.0-beta.7 (2024-04-01) + +Full Changelog: [v3.0.0-beta.6...v3.0.0-beta.7](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0-beta.6...v3.0.0-beta.7) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#189](https://github.com/cloudflare/cloudflare-python/issues/189)) ([4058dbb](https://github.com/cloudflare/cloudflare-python/commit/4058dbb8f270873b49bb12bd5c56186c9a74b380)) +* **api:** OpenAPI spec update via Stainless API ([#191](https://github.com/cloudflare/cloudflare-python/issues/191)) ([b705bb6](https://github.com/cloudflare/cloudflare-python/commit/b705bb679ef127492d0eac9abc54669c4c4263b0)) +* **api:** OpenAPI spec update via Stainless API ([#193](https://github.com/cloudflare/cloudflare-python/issues/193)) ([d19970f](https://github.com/cloudflare/cloudflare-python/commit/d19970f8a9bc6ae9bbd30b59b8406007a79a3401)) +* **api:** OpenAPI spec update via Stainless API ([#194](https://github.com/cloudflare/cloudflare-python/issues/194)) ([d2bad01](https://github.com/cloudflare/cloudflare-python/commit/d2bad015a9a95405d4f770bdd579a2de821e835f)) +* **api:** OpenAPI spec update via Stainless API ([#195](https://github.com/cloudflare/cloudflare-python/issues/195)) ([7b2beb3](https://github.com/cloudflare/cloudflare-python/commit/7b2beb3e0cf0bf5415b3cf434ab36cf54546c864)) +* **api:** update via SDK Studio ([#180](https://github.com/cloudflare/cloudflare-python/issues/180)) ([0ad46e1](https://github.com/cloudflare/cloudflare-python/commit/0ad46e17772a799cd8a3be894f5a81da0d055ad0)) +* **api:** update via SDK Studio ([#182](https://github.com/cloudflare/cloudflare-python/issues/182)) ([5fd3378](https://github.com/cloudflare/cloudflare-python/commit/5fd33784fbb92a0ac2b98f6835287cc6397cb955)) +* **api:** update via SDK Studio ([#183](https://github.com/cloudflare/cloudflare-python/issues/183)) ([1fecb6d](https://github.com/cloudflare/cloudflare-python/commit/1fecb6d96a53f2139d152e0374b08c2eb068592b)) +* **api:** update via SDK Studio ([#184](https://github.com/cloudflare/cloudflare-python/issues/184)) ([f0b4983](https://github.com/cloudflare/cloudflare-python/commit/f0b49831d42186dc6b187b274e23f2f03907070f)) +* **api:** update via SDK Studio ([#185](https://github.com/cloudflare/cloudflare-python/issues/185)) ([2df49c1](https://github.com/cloudflare/cloudflare-python/commit/2df49c12d18c610d41497c56013f4e4eb9e0124b)) +* **api:** update via SDK Studio ([#186](https://github.com/cloudflare/cloudflare-python/issues/186)) ([c2435a8](https://github.com/cloudflare/cloudflare-python/commit/c2435a8988667dbfb08810f26507cd2f21a7faf2)) +* **api:** update via SDK Studio ([#187](https://github.com/cloudflare/cloudflare-python/issues/187)) ([16b6e68](https://github.com/cloudflare/cloudflare-python/commit/16b6e68d27670f443c9cd01c65a6006e839db8a9)) +* **api:** update via SDK Studio ([#188](https://github.com/cloudflare/cloudflare-python/issues/188)) ([71da3ed](https://github.com/cloudflare/cloudflare-python/commit/71da3ed76c65bcb5e14bb964c98327f797ad1c1c)) +* **api:** update via SDK Studio ([#190](https://github.com/cloudflare/cloudflare-python/issues/190)) ([54b6344](https://github.com/cloudflare/cloudflare-python/commit/54b63444f5d4492dbb12c4736936f82e66ef07c2)) +* **api:** update via SDK Studio ([#192](https://github.com/cloudflare/cloudflare-python/issues/192)) ([5d528fc](https://github.com/cloudflare/cloudflare-python/commit/5d528fcf8a7f45e7b5394bed02997a0c91b2d55d)) + ## 3.0.0-beta.6 (2024-03-27) Full Changelog: [v3.0.0-beta.5...v3.0.0-beta.6](https://github.com/cloudflare/cloudflare-python/compare/v3.0.0-beta.5...v3.0.0-beta.6) diff --git a/pyproject.toml b/pyproject.toml index 7d652c5d80f..e7932554a83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cloudflare" -version = "3.0.0-beta.6" +version = "3.0.0-beta.7" description = "The official Python library for the cloudflare API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/cloudflare/_version.py b/src/cloudflare/_version.py index e554e52efc0..86a48234c39 100644 --- a/src/cloudflare/_version.py +++ b/src/cloudflare/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "cloudflare" -__version__ = "3.0.0-beta.6" # x-release-please-version +__version__ = "3.0.0-beta.7" # x-release-please-version